|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--location.generators.FakeGPSMonitor
This class reads the data comming from a simulated GPS system.
Field Summary | |
static long |
DEFAULT_INTERVAL
The default interval between generating points is 1000ms. |
static double |
DEFAULT_LAT_STEP_SIZE
The default latitude step size in sexagesimal units. |
static Latitude |
DEFAULT_LATITUDE
The default latitude is (38 38.8935' N) |
static double |
DEFAULT_LONG_STEP_SIZE
The default longitude step size in sexagesimal units. |
static Longitude |
DEFAULT_LONGITUDE
The default longitude is (90 18.389986' W) |
Constructor Summary | |
FakeGPSMonitor()
Creates a FakeGPSMonitor with all the default settings. |
|
FakeGPSMonitor(boolean showGUI)
Creates a FakeGPSMonitor with all of the default settings except for the showGUI. |
|
FakeGPSMonitor(long updatePeriod)
Creates a FakeGPSMonitor starting at the default location with the specified update period. |
|
FakeGPSMonitor(long updatePeriod,
double latStep,
double longStep)
Creates a FakeGPSMonitor starting at a default location. |
|
FakeGPSMonitor(long updatePeriod,
Latitude defaultLat,
Longitude defaultLong)
Creates a FakeGPSMonitor with the starting location as specified by the parameter without reporting its location to a RoutSimulatorServer and default increment. |
|
FakeGPSMonitor(long interval,
Latitude defaultLat,
Longitude defaultLong,
double latStep,
double longStep,
boolean showGUI)
Creates a FakeGPSMonitor with the starting location as specified by the parameter. |
Method Summary | |
void |
addGpsInfoListener(GpsInfoListener gps)
Add a GpsInfo listener. |
void |
addLocationListener(LocationListener ll)
Add a Location listener. |
LocationEvent |
getLocation()
Returns the most previously current location |
void |
kill()
Stops this class from generating location events. |
void |
removeGpsInfoListener(GpsInfoListener gps)
Remove a GpsInfo listener. |
void |
removeLocationListener(LocationListener ll)
Remove a location listener. |
void |
setGPSInfo(GpsInfoEvent gpsinfo)
Sets the GpsInfoEvent to be broadcasted with the location event. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Latitude DEFAULT_LATITUDE
public static final Longitude DEFAULT_LONGITUDE
public static final double DEFAULT_LAT_STEP_SIZE
public static final double DEFAULT_LONG_STEP_SIZE
public static final long DEFAULT_INTERVAL
Constructor Detail |
public FakeGPSMonitor()
public FakeGPSMonitor(boolean showGUI)
public FakeGPSMonitor(long updatePeriod)
updatePeriod
- the period of updating in milliseconds.public FakeGPSMonitor(long updatePeriod, double latStep, double longStep)
updatePeriod
- the period of updating in millisecondslatStep
- the latitude step size in sexagesimal unitslongStep
- the longitude step size in sexagesimal unitspublic FakeGPSMonitor(long updatePeriod, Latitude defaultLat, Longitude defaultLong)
updatePeriod
- the period of updating.defaultLat
- the default Latitude.defaultLong
- the default Longitude.public FakeGPSMonitor(long interval, Latitude defaultLat, Longitude defaultLong, double latStep, double longStep, boolean showGUI)
interval
- the period of updatingdefaultLat
- the default LatitudedefaultLong
- the default LongitudelatStep
- the latitude step size in sexagesimal unitslongStep
- the longitude step size in sexagesimal unitsshowGUI
- determines whether the GUI that allows the user
to change the data to be displayed.Method Detail |
public void addLocationListener(LocationListener ll)
addLocationListener
in interface LocationGenerator
ll
- the new location listener.public void removeLocationListener(LocationListener ll)
removeLocationListener
in interface LocationGenerator
ll
- the location listener to remove.public void addGpsInfoListener(GpsInfoListener gps)
addGpsInfoListener
in interface LocationGenerator
gps
- the new GpsInfo listener.public void removeGpsInfoListener(GpsInfoListener gps)
removeGpsInfoListener
in interface LocationGenerator
gps
- the GpsInfo listener to remove.public void kill()
kill
in interface LocationGenerator
public void setGPSInfo(GpsInfoEvent gpsinfo)
public LocationEvent getLocation()
getLocation
in interface LocationGenerator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |