|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.crowd.client.LocationAdapter
public class LocationAdapter
The location adapter makes life easier for a class that really only cares about one or two of the location observer callbacks and doesn't want to provide empty implementations of the others. One can either extend location adapter, or create an anonymous instance that overrides the desired callback(s). Note that the location adapter defaults to ratifying any location change.
LocationObserver| Constructor Summary | |
|---|---|
LocationAdapter()
|
|
| Method Summary | |
|---|---|
void |
locationChangeFailed(int placeId,
String reason)
This is called on all location observers when a location change request is rejected by the server or fails for some other reason. |
void |
locationDidChange(PlaceObject place)
Called when we have switched to a new location. |
boolean |
locationMayChange(int placeId)
Called when someone has requested that we switch to a new location. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocationAdapter()
| Method Detail |
|---|
public boolean locationMayChange(int placeId)
LocationObserver
locationMayChange in interface LocationObserverpublic void locationDidChange(PlaceObject place)
LocationObserver
locationDidChange in interface LocationObserverplace - the place object that represents the new location or
null if we have switched to no location.
public void locationChangeFailed(int placeId,
String reason)
LocationObserver
locationChangeFailed in interface LocationObserverplaceId - the place id to which we attempted to relocate, but
failed.reason - the reason code that explains why the location change
request was rejected or otherwise failed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||