|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent com.bbn.openmap.Layer com.bbn.openmap.layer.OMGraphicHandlerLayer com.bbn.openmap.layer.EarthquakeLayer
public class EarthquakeLayer
Get data about recent earthquakes from the USGS finger sites and display it.
Debugging information is printed when the OpenMap Viewer is launch with -Ddebug.earthquake flag.
# Properties for the Earthquake Layer earthquake.sites=<finger site> <finger site> ... # in seconds earthquake.queryinterval=300NOTE: I'm not sure this layer works anymore, probably hasn't for some time since the finger sites no longer provide data AFAIK. Leaving this layer in the package as another example.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected boolean[] |
activeSites
Sites that are actively being queried. |
protected java.lang.String[] |
drillData
|
protected java.lang.String[] |
fingerSites
Sites to finger user the user `quake'. |
static java.lang.String |
fingerSitesProperty
|
protected javax.swing.JPanel |
gui
The layer GUI. |
protected java.lang.String[] |
infoData
|
protected java.awt.Color |
lineColor
|
protected float[] |
llData
|
static java.lang.String |
queryIntervalProperty
|
protected boolean |
showingInfoLine
|
Fields inherited from class com.bbn.openmap.layer.OMGraphicHandlerLayer |
---|
consumeEvents, ConsumeEventsProperty, filter, interruptable, InterruptableProperty, layerWorker, LAYERWORKER_LOCK, layerWorkerQueue, logger, mouseEventInterpreter, mouseModeIDs, MouseModesProperty, projectionChangePolicy, ProjectionChangePolicyProperty, renderPolicy, RenderPolicyProperty, selectedList, TransparencyProperty |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface com.bbn.openmap.PropertyConsumer |
---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
EarthquakeLayer()
Construct an EarthquakeLayer. |
Method Summary | |
---|---|
protected OMGraphicList |
generateGraphics()
Create the graphics. |
protected java.util.Vector |
getEarthquakeData()
Get the earthquake data from the USGS. |
java.awt.Component |
getGUI()
Gets the gui controls associated with the layer. |
MapMouseListener |
getMapMouseListener()
Returns the MapMouseListener object that handles the mouse events. |
java.lang.String[] |
getMouseModeServiceList()
Return a list of the modes that are interesting to the MapMouseListener. |
java.util.Properties |
getProperties(java.util.Properties props)
Get the associated properties object. |
java.util.Properties |
getProperties(java.lang.String prefix,
java.util.Properties props)
Get the associated properties object. |
java.util.Properties |
getPropertyInfo(java.util.Properties info)
Supplies the propertiesInfo object associated with this EarthquakeLayer object. |
boolean |
mouseClicked(java.awt.event.MouseEvent e)
Invoked when the mouse has been clicked on a component. |
boolean |
mouseDragged(java.awt.event.MouseEvent e)
Invoked when a mouse button is pressed on a component and then dragged. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Invoked when the mouse enters a component. |
void |
mouseExited(java.awt.event.MouseEvent e)
Invoked when the mouse exits a component. |
void |
mouseMoved()
Handle a mouse cursor moving without the button being pressed. |
boolean |
mouseMoved(java.awt.event.MouseEvent e)
Invoked when the mouse button has been moved on a component (with no buttons down). |
boolean |
mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a component. |
boolean |
mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a component. |
protected boolean |
needToRefetchData()
Fetches data if it hasn't been fetched in a while. |
protected void |
parseData(java.util.Vector data)
Parse the finger site data. |
OMGraphicList |
prepare()
Fetch data from finger sites, if needed, generate the OMGraphics with the current projection regardless. |
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Set the properties of the EarthquakeLayer. |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, 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, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, 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, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
---|
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, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, 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, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.beans.beancontext.BeanContextChild |
---|
addPropertyChangeListener, removePropertyChangeListener |
Field Detail |
---|
public static final transient java.lang.String fingerSitesProperty
public static final transient java.lang.String queryIntervalProperty
protected java.lang.String[] fingerSites
protected boolean[] activeSites
protected float[] llData
protected java.lang.String[] infoData
protected java.lang.String[] drillData
protected java.awt.Color lineColor
protected boolean showingInfoLine
protected javax.swing.JPanel gui
Constructor Detail |
---|
public EarthquakeLayer()
Method Detail |
---|
public OMGraphicList prepare()
prepare
in class OMGraphicHandlerLayer
protected boolean needToRefetchData()
protected OMGraphicList generateGraphics()
protected void parseData(java.util.Vector data)
data
- Vectorprotected java.util.Vector getEarthquakeData()
public java.awt.Component getGUI()
getGUI
in class Layer
public MapMouseListener getMapMouseListener()
getMapMouseListener
in class OMGraphicHandlerLayer
public java.lang.String[] getMouseModeServiceList()
return new String[] { SelectMouseMode.modeID };
- Specified by:
getMouseModeServiceList
in interface MapMouseListener
- Returns:
- String[] of modeID's
- See Also:
NavMouseMode.modeID
,
SelectMouseMode.modeID
,
NullMouseMode.modeID
public boolean mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface MapMouseListener
e
- MouseEvent
public boolean mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface MapMouseListener
e
- MouseEvent
public boolean mouseClicked(java.awt.event.MouseEvent e)
mousePressed()
, or if no other listener processes the event.
If the listener successfully processes mouseClicked(), then it will
receive the next mouseClicked() notifications that have a click count
greater than one.
mouseClicked
in interface MapMouseListener
e
- MouseEvent
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface MapMouseListener
e
- MouseEventpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface MapMouseListener
e
- MouseEventpublic boolean mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface MapMouseListener
e
- MouseEvent
public boolean mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface MapMouseListener
e
- MouseEvent
public void mouseMoved()
mouseMoved
in interface MapMouseListener
public void setProperties(java.lang.String prefix, java.util.Properties props)
setProperties
in interface PropertyConsumer
setProperties
in class OMGraphicHandlerLayer
prefix
- Stringprops
- Propertiespublic java.util.Properties getProperties(java.util.Properties props)
getProperties
in interface PropertyConsumer
getProperties
in class OMGraphicHandlerLayer
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 getProperties(java.lang.String prefix, java.util.Properties props)
public java.util.Properties getPropertyInfo(java.util.Properties info)
initPropertiesProperty
(see Inspector class.)
getPropertyInfo
in interface PropertyConsumer
getPropertyInfo
in class OMGraphicHandlerLayer
info
- 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 |