public abstract class AbstractGraphicLoader extends OMComponent implements GraphicLoader, java.awt.event.ActionListener
This object is really intended to be used with the GraphicLoaderPlugIn, but it doesn't really have to be. If you have a GraphicLoaderConnector in the MapHandler and then add a GraphicLoader to the MapHandler, the GraphicLoaderConnector will check to see if the GraphicLoader has a receiver. If there isn't a receiver, the GraphicLoaderConnetor will create a GraphicLoaderPlugIn for you, connect the GraphicLoader to it, and then add the GraphicLoaderPlugIn to the LayerHandler. Then, the GraphicLoader will have its graphics on the map.
Modifier and Type | Field and Description |
---|---|
protected int |
DO_NOT_UPDATE_TIMER |
protected java.lang.String |
name |
static java.lang.String |
NameProperty |
protected Projection |
proj |
protected OMGraphicHandler |
receiver |
protected javax.swing.Timer |
timer |
static java.lang.String |
TimerCmd |
protected int |
updateInterval
The delay between timer pulses, in milliseconds.
|
i18n, propertyPrefix
beanContextChildSupport, isolated
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
Constructor and Description |
---|
AbstractGraphicLoader() |
AbstractGraphicLoader(OMGraphicHandler receiver) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ae)
Method gets called by the timer if it's running.
|
void |
createTimer()
Creates a timer with the current updateInterval and calls
setTimer().
|
java.awt.Component |
getGUI()
Provide a GUI for controlling the GraphicLoader.
|
java.lang.String |
getName()
Return a pretty name for the GUI to let folks know what the
loader does.
|
Projection |
getProjection() |
java.util.Properties |
getProperties(java.util.Properties props)
PropertyConsumer method, to fill in a Properties object, reflecting the
current values of the OMComponent.
|
java.util.Properties |
getPropertyInfo(java.util.Properties list)
Method to fill in a Properties object with values reflecting the
properties able to be set on this PropertyConsumer.
|
OMGraphicHandler |
getReceiver()
Get the OMGraphicHandler that will receive OMGraphic updates
from the GraphicLoader.
|
javax.swing.Timer |
getTimer()
Get the timer being used for automatic updates.
|
int |
getUpdateInterval() |
abstract void |
manageGraphics()
The method where the AbstractGraphicLoader is expected to tell
the receiver what the OMGraphics are.
|
void |
setName(java.lang.String name) |
void |
setProjection(Projection p)
Calls manageGraphics() if projection is different().
|
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Sets the properties for the OMComponent.
|
void |
setReceiver(OMGraphicHandler r)
Set the OMGraphicHandler that will receive OMGraphic updates
from the GraphicLoader.
|
void |
setTimer(javax.swing.Timer t)
If you want the layer to update itself at certain intervals,
you can set the timer to do that.
|
void |
setUpdateInterval(int delay) |
getPropertyPrefix, setProperties, setPropertyPrefix
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndInit, findAndUndo, firePropertyChange, fireVetoableChange, getBeanContext, isIsolated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, setIsolated
protected javax.swing.Timer timer
protected int DO_NOT_UPDATE_TIMER
protected OMGraphicHandler receiver
protected Projection proj
protected java.lang.String name
public static final java.lang.String TimerCmd
public static final java.lang.String NameProperty
protected int updateInterval
public AbstractGraphicLoader()
public AbstractGraphicLoader(OMGraphicHandler receiver)
public abstract void manageGraphics()
public java.awt.Component getGUI()
getGUI
in interface GraphicLoader
public void setProjection(Projection p)
setProjection
in interface GraphicLoader
public Projection getProjection()
public void setReceiver(OMGraphicHandler r)
GraphicLoader
setReceiver
in interface GraphicLoader
public OMGraphicHandler getReceiver()
GraphicLoader
getReceiver
in interface GraphicLoader
public javax.swing.Timer getTimer()
public void setTimer(javax.swing.Timer t)
public void createTimer()
public void setUpdateInterval(int delay)
public int getUpdateInterval()
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener
public java.lang.String getName()
getName
in interface GraphicLoader
public void setName(java.lang.String name)
public void setProperties(java.lang.String prefix, java.util.Properties props)
OMComponent
setProperties
in interface PropertyConsumer
setProperties
in class OMComponent
prefix
- the token to prefix the property namesprops
- the Properties
objectpublic java.util.Properties getProperties(java.util.Properties props)
OMComponent
getProperties
in interface PropertyConsumer
getProperties
in class OMComponent
props
- a Properties object to load the PropertyConsumer properties
into. If props equals null, then a new Properties object should be
created.public java.util.Properties getPropertyInfo(java.util.Properties list)
OMComponent
getPropertyInfo
in interface PropertyConsumer
getPropertyInfo
in class OMComponent
list
- a Properties object to load the PropertyConsumer properties
into. If getList equals null, then a new Properties object should
be created.Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details