org.placelab.demo.jsr0179
Class Locator

java.lang.Object
  extended byorg.placelab.demo.jsr0179.Locator
All Implemented Interfaces:
javax.microedition.location.LocationListener

public class Locator
extends java.lang.Object
implements javax.microedition.location.LocationListener


Constructor Summary
Locator()
           
 
Method Summary
 void locationUpdated(javax.microedition.location.LocationProvider provider, javax.microedition.location.Location location)
          Called by the LocationProvider to which this listener is registered.
static void main(java.lang.String[] args)
           
 void providerStateChanged(javax.microedition.location.LocationProvider provider, int newState)
          Called by the LocationProvider to which this listener is registered if the state of the LocationProvider has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Locator

public Locator()
Method Detail

locationUpdated

public void locationUpdated(javax.microedition.location.LocationProvider provider,
                            javax.microedition.location.Location location)
Description copied from interface: javax.microedition.location.LocationListener
Called by the LocationProvider to which this listener is registered. This method will be called periodically according to the interval defined when registering the listener to provide updates of the current location.

Specified by:
locationUpdated in interface javax.microedition.location.LocationListener
Parameters:
provider - the source of the event
location - the location to which the event relates, i.e. the new position

providerStateChanged

public void providerStateChanged(javax.microedition.location.LocationProvider provider,
                                 int newState)
Description copied from interface: javax.microedition.location.LocationListener
Called by the LocationProvider to which this listener is registered if the state of the LocationProvider has changed. These provider state changes are delivered to the application as soon as possible after the state of a provider changes. The timing of these events is not related to the period of the location updates. If the application is subscribed to receive periodic location updates, it will continue to receive these regardless of the state of the LocationProvider. If the application wishes to stop receiving location updates for an unavailable provider, it should de-register itself from the provider.

Specified by:
providerStateChanged in interface javax.microedition.location.LocationListener
Parameters:
provider - the source of the event
newState - the new state of the LocationProvider. This value is one of the constants for the state defined in the LocationProvider class.

main

public static void main(java.lang.String[] args)