FileDocCategorySizeDatePackage
StubLocationListener.javaAPI DocphoneME MR2 API (J2ME)2851Wed May 02 18:00:40 BST 2007com.sun.j2me.location

StubLocationListener

public class StubLocationListener extends Object implements LocationListener
This class contains the simplified code for testing the JSR179 implementation.

Fields Summary
private Location
currLocation
Received location from listener
private int
currState
Received location provider state from listener
Constructors Summary
Methods Summary
public LocationgetCurrLocation()
Return the current location.

return
current location

        return currLocation;
    
public intgetCurrState()
Return the current state.

return
current state

    
                
       
        return currState;
    
public voidlocationUpdated(LocationProvider provider, Location location)
locationUpdated implementation.

param
provider the source of the event
param
location the location to which the event relates, i.e. the new position

        currLocation = location; // save the location
    
public voidproviderStateChanged(LocationProvider provider, int newState)
providerStateChanged implementation.

param
provider the source of the event
param
newState the new state of the LocationProvider.

        currState = newState; // save the location
    
public voidsetCurrLocation(Location newLocation)
Sets the current location.

param
newLocation new location for setting

        currLocation = newLocation;
    
public voidsetCurrState(int newState)
Sets the current state.

param
newState new state value

        currState = newState;