|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.MapHandlerChild com.bbn.openmap.OMComponent com.bbn.openmap.graphicLoader.AbstractGraphicLoader
public abstract class AbstractGraphicLoader
The abstract AbstractGraphicLoader class is an OMGraphic managing object. It can talk to any source it wants to for configuring its OMGraphicList, and then notifies its OMGraphicHandler with the changes. The AbstractGraphicLoader comes with a built-in timer, in case you want to check back with the graphic source within certain intervals in order to update the graphics in an animated fashion. This class also extends MapHandlerChild so if you want to add it to the MapHandler to find other objects, you can override the findAndInit() method.
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.
Field Summary | |
---|---|
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. |
Fields inherited from class com.bbn.openmap.OMComponent |
---|
i18n, propertyPrefix |
Fields inherited from class com.bbn.openmap.MapHandlerChild |
---|
beanContextChildSupport, isolated |
Fields inherited from interface com.bbn.openmap.PropertyConsumer |
---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
Constructor Summary | |
---|---|
AbstractGraphicLoader()
|
|
AbstractGraphicLoader(OMGraphicHandler receiver)
|
Method Summary | |
---|---|
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)
|
Methods inherited from class com.bbn.openmap.OMComponent |
---|
getPropertyPrefix, setProperties, setPropertyPrefix |
Methods inherited from class com.bbn.openmap.MapHandlerChild |
---|
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndInit, findAndUndo, firePropertyChange, fireVetoableChange, getBeanContext, isIsolated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, setIsolated |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public AbstractGraphicLoader()
public AbstractGraphicLoader(OMGraphicHandler receiver)
Method Detail |
---|
public abstract void manageGraphics()
OMGraphicHandler.setList(OMGraphicList)
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |