|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
com.nutiteq.listeners.DelayedMapListener
public class DelayedMapListener
This class implements a delayed map listener that can be used as a wrapper for another map listener. It waits a few seconds before triggering mapMoved in the wrapped listener. This allows for quick map moves without calling mapMoved after each one.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
DelayedMapListener(MapListener listener)
Constructor for DelayedMapListener. |
|
DelayedMapListener(MapListener listener,
int mapDelay,
int timeoutInterval)
Constructor for DelayedMapListener. |
|
| Method Summary | |
|---|---|
void |
mapClicked(WgsPoint point)
Called when a point on the map is clicked (when place is not selected). |
void |
mapMoved()
Called after map has been moved. |
void |
needRepaint(boolean mapIsComplete)
Called when the map is changed in some way and repaint needs to be called on the container object. |
void |
run()
Main thread method. |
void |
setTimeoutInterval(int timeoutInterval)
Set the timeout interval. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DelayedMapListener(MapListener listener)
listener - wrapped listener
public DelayedMapListener(MapListener listener,
int mapDelay,
int timeoutInterval)
listener - wrapped listenermapDelay - delay introduced before calling mapMoved in the wrapped listener.timeoutInterval - timeout interval. If a map move does not occur within this interval,
mapMoved is triggered anyway. Useful for services that should dynamically update map content
even if the user doesn't move. If set to zero (by default) this behavior is disabled.| Method Detail |
|---|
public void mapClicked(WgsPoint point)
MapListener
mapClicked in interface MapListenerpoint - point clicked in WGS84public void mapMoved()
MapListener
mapMoved in interface MapListenerpublic void needRepaint(boolean mapIsComplete)
MapListener
needRepaint in interface MapListenermapIsComplete - is current map view complete (if FALSE, then some map tiles are
not yet downloaded)public void run()
run in interface java.lang.Runnablerun in class java.lang.ThreadThread.run()public void setTimeoutInterval(int timeoutInterval)
timeoutInterval - new timeout interval
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||