|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dk.itu.haas.GPS.services.AreaAlarm
This class implements an AreaAlarm-service. The class allows the user to specify two positions, which will be used as opposite corners in a rectangular area. Whenever the GPS enters or exits the area all listeners are notified through the IAlarmListener-interface.
Constructor Summary | |
AreaAlarm(GPS g,
Position p1,
Position p2)
|
Method Summary | |
void |
addAlarmListener(IAlarmListener l)
Adds l to the list of listeners interested in receiving notification when the GPS enters or exits the area. |
void |
dateReceived(IDate d)
Invoked when the GPS transmits date-data. |
protected void |
fireInside()
This method propagates the information that the gps has entered the area to all listeners. |
protected void |
fireOutside()
This method propagates the information that the gps has exited the area to all listeners. |
void |
positionReceived(IPosition pos)
Invoked when the GPS transmits position-data. |
void |
removeAlarmListener(IAlarmListener l)
Removes the the Alarm-listener l from the list of Waypoint-listeners. |
void |
timeReceived(ITime t)
Invoked when the GPS transmits time-data. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AreaAlarm(GPS g, Position p1, Position p2)
Method Detail |
public void addAlarmListener(IAlarmListener l)
public void removeAlarmListener(IAlarmListener l)
protected void fireOutside()
protected void fireInside()
public void timeReceived(ITime t)
IGPSlistener
timeReceived
in interface IGPSlistener
public void dateReceived(IDate d)
IGPSlistener
dateReceived
in interface IGPSlistener
public void positionReceived(IPosition pos)
IGPSlistener
positionReceived
in interface IGPSlistener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |