public class LayerSupport extends ListenerSupport<LayerListener>
Modifier and Type | Class and Description |
---|---|
protected class |
LayerSupport.SetLayerRunnable
A reusable Runnable used by a thread to notify listeners when layers are
turned on/off or shuffled.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.Vector<LayerSupport.SetLayerRunnable> |
events
Event information stack.
|
protected boolean |
synchronous |
protected java.lang.Thread |
t
Used to see if another Thread object needs to be created.
|
source
Constructor and Description |
---|
LayerSupport(java.lang.Object sourceBean)
Construct a LayerSupport.
|
Modifier and Type | Method and Description |
---|---|
void |
fireLayer(int type,
Layer[] layers)
Send a layer event to all registered listeners.
|
boolean |
isSynchronous() |
LayerSupport.SetLayerRunnable |
popLayerEvent()
Return the first event on the stack, may be null if there is nothing to
do.
|
void |
pushLayerEvent(int layerEventType,
Layer[] layers)
Pushed the information onto a Vector stack to get executed by a separate
thread.
|
void |
setSynchronous(boolean synchronous) |
add, add, addAll, clear, getSource, iterator, listIterator, remove, remove, set, setSource, size
protected boolean synchronous
protected java.lang.Thread t
protected java.util.Vector<LayerSupport.SetLayerRunnable> events
public LayerSupport(java.lang.Object sourceBean)
sourceBean
- The bean to be given as the source for any events.public void fireLayer(int type, Layer[] layers)
type
- the event type: one of ADD, REMOVE, REPLACElayers
- the list of layersLayerEvent
public void pushLayerEvent(int layerEventType, Layer[] layers)
layerEventType
- layers
- public LayerSupport.SetLayerRunnable popLayerEvent()
public boolean isSynchronous()
public void setSynchronous(boolean synchronous)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details