Package org.mapsforge.map.layer
Class LayerManager
- java.lang.Object
-
- java.lang.Thread
-
- org.mapsforge.map.util.PausableThread
-
- org.mapsforge.map.layer.LayerManager
-
- All Implemented Interfaces:
java.lang.Runnable,Redrawer
public class LayerManager extends PausableThread implements Redrawer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.mapsforge.map.util.PausableThread
PausableThread.ThreadPriority
-
-
Field Summary
-
Fields inherited from class org.mapsforge.map.util.PausableThread
waitForWork
-
-
Constructor Summary
Constructors Constructor Description LayerManager(MapView mapView, IMapViewPosition mapViewPosition, org.mapsforge.core.graphics.GraphicFactory graphicFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafterRun()Called once at the end of thePausableThread.run()method.protected voiddoWork()Called when this thread is not paused and should do its work.LayersgetLayers()protected PausableThread.ThreadPrioritygetThreadPriority()protected booleanhasWork()voidredrawLayers()Requests an asynchronous redrawing of all layers.-
Methods inherited from class org.mapsforge.map.util.PausableThread
awaitPausing, finish, interrupt, isPausing, pause, proceed, run
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Constructor Detail
-
LayerManager
public LayerManager(MapView mapView, IMapViewPosition mapViewPosition, org.mapsforge.core.graphics.GraphicFactory graphicFactory)
-
-
Method Detail
-
getLayers
public Layers getLayers()
-
redrawLayers
public void redrawLayers()
Description copied from interface:RedrawerRequests an asynchronous redrawing of all layers.- Specified by:
redrawLayersin interfaceRedrawer
-
afterRun
protected void afterRun()
Description copied from class:PausableThreadCalled once at the end of thePausableThread.run()method. The default implementation is empty.- Overrides:
afterRunin classPausableThread
-
doWork
protected void doWork() throws java.lang.InterruptedExceptionDescription copied from class:PausableThreadCalled when this thread is not paused and should do its work.- Specified by:
doWorkin classPausableThread- Throws:
java.lang.InterruptedException- if the thread has been interrupted.
-
getThreadPriority
protected PausableThread.ThreadPriority getThreadPriority()
- Specified by:
getThreadPriorityin classPausableThread- Returns:
- the priority which will be set for this thread.
-
hasWork
protected boolean hasWork()
- Specified by:
hasWorkin classPausableThread- Returns:
- true if this thread has some work to do, false otherwise.
-
-