public class TimerGeoCanvas extends GeoCanvas implements TimeDisplay
javax.swing.JComponent.AccessibleJComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
TimerGeoCanvas()
Instantiates a new TimerGeoCanvas.
|
TimerGeoCanvas(GeoCanvas baseCanvas)
Instantiates a new TimerGeoCanvas, using the specified GeoCanvas as the
geographic display.
|
Modifier and Type | Method and Description |
---|---|
void |
addLayer(GeoLayer layer)
Adds the layer.
|
void |
addShape(GeoShape newShape)
Adds a GeoShape.
|
void |
addShapes(java.util.Collection<GeoShape> newShapes)
Adds all shapes in the collection.
|
void |
addSpan(GeoShape shape,
TimeSpan span)
Adds a shape with a specified TimeSpan.
|
void |
addTimedShape(GeoShape shape,
Sequential time)
Adds the shape with the specified time sequence.
|
GeoLayer |
findLayer(java.lang.String name)
Find a named geographic layer.
|
java.util.Date |
getDisplayTime()
Get the currently displayed time
|
long |
getFadeTime()
Get the fade time for the temporal display.
|
GeoBounds |
getGeoBounds()
Get the current geographic bounds
|
java.util.List<GeoLayer> |
getLayers()
Get the list of layers.
|
Projection |
getProjection()
Get the current projection
|
long |
getPurgeTime()
Gets the purge time, which is used to remove stale temporal components.
|
RenderStyle |
getRenderStyle()
Set the render style, which is used to display the temporal components.
|
Sequential |
getSequence(GeoShape shape)
Gets the time sequence associated with a particular GeoShape
|
GeoShape |
getShapeAt(java.awt.geom.Point2D pickPoint)
Return the geographic shape at the picked point.
|
java.awt.Color |
getWorldColor()
Get the world color.
|
boolean |
isRealTime()
Return whether this display is in real time mode.
|
protected void |
paintComponent(java.awt.Graphics g)
Paint this component.
|
protected void |
processComponentEvent(java.awt.event.ComponentEvent event)
Processes any resize event.
|
void |
purgeData()
Purge any data which has exceeded the purgeTime.
|
void |
setDisplayTime(java.util.Date time)
Set the time currently displayed.
|
void |
setFadeTime(long millis)
Set the fade time.
|
void |
setGeoBounds(GeoBounds geoBounds)
Sets the geographic bounds.
|
void |
setLayers(java.util.Collection<GeoLayer> layers)
Sets the layers displayed.
|
void |
setProjection(Projection proj)
Sets the projection.
|
void |
setPurgeTime(long millis)
Set the purge time.
|
void |
setRealTime(boolean realTimeFlag)
Set the real time flag.
|
void |
setRenderStyle(RenderStyle style)
Get the render style, which is used to display the temporal components.
|
void |
setWorldColor(java.awt.Color worldColor)
Set the world color.
|
clearShapes, getBackgroundImage, paintGeoLayers, setBackgroundImage
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public TimerGeoCanvas()
public TimerGeoCanvas(GeoCanvas baseCanvas)
baseCanvas
- the base canvaspublic void addLayer(GeoLayer layer)
addLayer
in interface GeoDisplay
addLayer
in class GeoCanvas
layer
- the layerGeoCanvas.addLayer(prajna.geo.GeoLayer)
public void addShape(GeoShape newShape)
addShape
in class GeoCanvas
newShape
- the new shapeGeoCanvas.addShape(prajna.geo.GeoShape)
public void addShapes(java.util.Collection<GeoShape> newShapes)
addShape
on each shape in the collection. Any Sequential
shapes are added to the temporal layer, and the rest are added to the
underlying canvas.addShapes
in class GeoCanvas
newShapes
- the new shapesGeoCanvas.addShapes(java.util.Collection)
public void addSpan(GeoShape shape, TimeSpan span)
shape
- the GeoShapespan
- the associated TimeSpanpublic void addTimedShape(GeoShape shape, Sequential time)
shape
- the GeoShapetime
- the time sequencepublic GeoLayer findLayer(java.lang.String name)
public java.util.Date getDisplayTime()
getDisplayTime
in interface TimeDisplay
TimeDisplay.getDisplayTime()
public long getFadeTime()
getFadeTime
in interface TimeDisplay
TimeDisplay.getFadeTime()
public GeoBounds getGeoBounds()
getGeoBounds
in interface GeoDisplay
getGeoBounds
in class GeoCanvas
public java.util.List<GeoLayer> getLayers()
getLayers
in interface GeoDisplay
getLayers
in class GeoCanvas
public Projection getProjection()
getProjection
in interface GeoDisplay
getProjection
in class GeoCanvas
public long getPurgeTime()
getPurgeTime
in interface TimeDisplay
public RenderStyle getRenderStyle()
public Sequential getSequence(GeoShape shape)
shape
- the GeoShaoepublic GeoShape getShapeAt(java.awt.geom.Point2D pickPoint)
getShapeAt
in class GeoCanvas
pickPoint
- the point to use to query the geographic layerspublic java.awt.Color getWorldColor()
getWorldColor
in class GeoCanvas
public boolean isRealTime()
isRealTime
in interface TimeDisplay
TimeDisplay.isRealTime()
protected void paintComponent(java.awt.Graphics g)
paintComponent
in class GeoCanvas
g
- the graphics contextprotected void processComponentEvent(java.awt.event.ComponentEvent event)
processComponentEvent
in class java.awt.Component
event
- the component eventpublic void purgeData()
purgeData
in interface TimeDisplay
public void setDisplayTime(java.util.Date time)
setDisplayTime
in interface TimeDisplay
time
- the new current timeTimeDisplay.setDisplayTime(java.util.Date)
public void setFadeTime(long millis)
setFadeTime
in interface TimeDisplay
millis
- the fade time, in milliseconds.TimeDisplay.setFadeTime(long)
public void setGeoBounds(GeoBounds geoBounds)
setGeoBounds
in interface GeoDisplay
setGeoBounds
in class GeoCanvas
geoBounds
- the geo boundsGeoCanvas.setGeoBounds(prajna.geo.GeoBounds)
public void setLayers(java.util.Collection<GeoLayer> layers)
setLayers
in interface GeoDisplay
setLayers
in class GeoCanvas
layers
- the geographic layersGeoCanvas.setLayers(java.util.Collection)
public void setProjection(Projection proj)
setProjection
in interface GeoDisplay
setProjection
in class GeoCanvas
proj
- the projectionGeoCanvas.setProjection(prajna.geo.Projection)
public void setPurgeTime(long millis)
setPurgeTime
in interface TimeDisplay
millis
- the purgeTime in millisecondspublic void setRealTime(boolean realTimeFlag)
setRealTime
in interface TimeDisplay
realTimeFlag
- whether to display in realTime modeTimeDisplay.setRealTime(boolean)
public void setRenderStyle(RenderStyle style)
style
- the renderStylepublic void setWorldColor(java.awt.Color worldColor)
setWorldColor
in class GeoCanvas
worldColor
- the new world colorGeoCanvas.setWorldColor(java.awt.Color)