edu.sc.seis.fissuresUtil.map.layers
Class StationLayer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by com.bbn.openmap.Layer
                  extended by edu.sc.seis.fissuresUtil.map.layers.MouseAdapterLayer
                      extended by edu.sc.seis.fissuresUtil.map.layers.StationLayer
All Implemented Interfaces:
com.bbn.openmap.event.MapMouseListener, com.bbn.openmap.event.ProjectionListener, com.bbn.openmap.ProjectionPainter, com.bbn.openmap.PropertyConsumer, AvailableStationDataListener, StationDataListener, StationSelectionListener, EQSelectionListener, EventDataListener, java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.io.Serializable, java.util.EventListener
Direct Known Subclasses:
ChannelChooserLayer

public class StationLayer
extends MouseAdapterLayer
implements StationDataListener, StationSelectionListener, AvailableStationDataListener, EQSelectionListener, EventDataListener

See Also:
Serialized Form

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
 
Fields inherited from class edu.sc.seis.fissuresUtil.map.layers.MouseAdapterLayer
currentPopup
 
Fields inherited from class com.bbn.openmap.Layer
addAsBackground, AddAsBackgroundProperty, addToBeanContext, AddToBeanContextProperty, autoPalette, AutoPaletteProperty, beanContextChildSupport, DisplayPaletteCmd, DisplayPropertiesCmd, doHack, HidePaletteCmd, i18n, IDListeners, localHackList, lsListeners, palette, paletteListener, PrettyNameProperty, propertyPrefix, RedrawCmd, removable, RemovableProperty, RemoveableProperty, SWING_PACKAGE, windowSupport
 
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
StationLayer()
          Adds this layer as a listener on station data arriving and station selection occuring on the channel chooser being passed in.
 
Method Summary
static double calcDistEventFromLocation(double latitude, double longitude, edu.iris.Fissures.IfEvent.EventAccessOperations event)
           
 void eqSelectionChanged(EQSelectionEvent eqSelectionEvent)
          Method eqSelectionChanged
 void eventDataAppended(EQDataEvent eqDataEvent)
          No impl here, only the eventDataCleared() method is needed
 void eventDataChanged(EQDataEvent eqDataEvent)
          No impl here, only the eventDataCleared() method is needed
 void eventDataCleared()
          Method eventDataCleared
 java.lang.String[] getMouseModeServiceList()
          Return a list of the modes that are interesting to the MapMouseListener.
static java.lang.String getStationInfo(edu.iris.Fissures.IfNetwork.Station station, edu.iris.Fissures.IfEvent.EventAccessOperations event)
           
 StationLoc[] getStationLocs()
           
 void honorRepaint(boolean honor)
           
 boolean mouseClicked(java.awt.event.MouseEvent e)
           
 boolean mouseMoved(java.awt.event.MouseEvent e)
           
 void paint(java.awt.Graphics g)
           
 void printStationLocs()
           
 void projectionChanged(com.bbn.openmap.event.ProjectionEvent e)
           
 void repaint()
           
 void stationAvailabiltyChanged(AvailableStationDataEvent e)
          Method stationAvailabiltyChanged
 void stationDataChanged(StationDataEvent s)
           
 void stationDataCleared()
           
 void stationSelectionChanged(StationSelectionEvent s)
           
 void toggleStationSelection(edu.iris.Fissures.IfNetwork.Station station)
           
 
Methods inherited from class edu.sc.seis.fissuresUtil.map.layers.MouseAdapterLayer
getMapMouseListener, maybeKillCurrentPopup, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased
 
Methods inherited from class com.bbn.openmap.Layer
actionPerformed, addComponentListener, added, addInfoDisplayListener, addLayerStatusListener, addMouseListener, addVetoableChangeListener, childrenAdded, childrenRemoved, clearListeners, connectToBeanContext, createWindowSupport, finalize, findAndInit, findAndInit, findAndUndo, fireHideToolTip, fireHideToolTip, firePaletteEvent, fireRequestBrowserContent, fireRequestBrowserContent, fireRequestCursor, fireRequestInfoLine, fireRequestInfoLine, fireRequestInfoLine, fireRequestMessage, fireRequestMessage, fireRequestToolTip, fireRequestToolTip, fireRequestToolTip, fireRequestToolTip, fireRequestURL, fireRequestURL, fireStatusUpdate, fireStatusUpdate, fireVetoableChange, getAddAsBackground, getAddToBeanContext, getBeanContext, getGUI, getPackage, getPalette, getProjection, getProperties, getPropertyInfo, getPropertyPrefix, getWindowSupport, hidePalette, isRemovable, isRemoveable, notifyHideHack, removeComponentListener, removeConfirmed, removed, removeInfoDisplayListener, removeLayerStatusListener, removeVetoableChangeListener, renderDataForProjection, repaint, resetPalette, setAddAsBackground, setAddToBeanContext, setBeanContext, setName, setPaletteVisible, setProjection, setProjection, setProperties, setProperties, setPropertyPrefix, setRemovable, setRemoveable, setVisible, setWindowSupport, showPalette
 
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, 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
 

Constructor Detail

StationLayer

public StationLayer()
Adds this layer as a listener on station data arriving and station selection occuring on the channel chooser being passed in. If station data is passed, a blue triangle is drawn on the map. If a station is selected, the triangle turns red.

Method Detail

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class javax.swing.JComponent

projectionChanged

public void projectionChanged(com.bbn.openmap.event.ProjectionEvent e)
Specified by:
projectionChanged in interface com.bbn.openmap.event.ProjectionListener
Specified by:
projectionChanged in class MouseAdapterLayer

honorRepaint

public void honorRepaint(boolean honor)

repaint

public void repaint()
Overrides:
repaint in class java.awt.Component

printStationLocs

public void printStationLocs()

getStationLocs

public StationLoc[] getStationLocs()

stationDataChanged

public void stationDataChanged(StationDataEvent s)
Specified by:
stationDataChanged in interface StationDataListener

stationDataCleared

public void stationDataCleared()
Specified by:
stationDataCleared in interface StationDataListener

stationSelectionChanged

public void stationSelectionChanged(StationSelectionEvent s)
Specified by:
stationSelectionChanged in interface StationSelectionListener

stationAvailabiltyChanged

public void stationAvailabiltyChanged(AvailableStationDataEvent e)
Method stationAvailabiltyChanged

Specified by:
stationAvailabiltyChanged in interface AvailableStationDataListener
Parameters:
e - an AvailableStationDataEvent

eqSelectionChanged

public void eqSelectionChanged(EQSelectionEvent eqSelectionEvent)
Method eqSelectionChanged

Specified by:
eqSelectionChanged in interface EQSelectionListener
Parameters:
eqSelectionEvent - an EQSelectionEvent

eventDataAppended

public void eventDataAppended(EQDataEvent eqDataEvent)
No impl here, only the eventDataCleared() method is needed

Specified by:
eventDataAppended in interface EventDataListener

eventDataChanged

public void eventDataChanged(EQDataEvent eqDataEvent)
No impl here, only the eventDataCleared() method is needed

Specified by:
eventDataChanged in interface EventDataListener

eventDataCleared

public void eventDataCleared()
Method eventDataCleared

Specified by:
eventDataCleared in interface EventDataListener

getMouseModeServiceList

public java.lang.String[] getMouseModeServiceList()
Description copied from class: MouseAdapterLayer
Return a list of the modes that are interesting to the MapMouseListener. The source MouseEvents will only get sent to the MapMouseListener if the mode is set to one that the listener is interested in. Layers interested in receiving events should register for receiving events in "select" mode:
  return new String[] {
      SelectMouseMode.modeID
  };
 

Specified by:
getMouseModeServiceList in interface com.bbn.openmap.event.MapMouseListener
Specified by:
getMouseModeServiceList in class MouseAdapterLayer
Returns:
String[] of modeID's
See Also:
NavMouseMode.modeID, SelectMouseMode.modeID, NullMouseMode.modeID

mouseClicked

public boolean mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface com.bbn.openmap.event.MapMouseListener
Overrides:
mouseClicked in class MouseAdapterLayer

toggleStationSelection

public void toggleStationSelection(edu.iris.Fissures.IfNetwork.Station station)

mouseMoved

public boolean mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface com.bbn.openmap.event.MapMouseListener
Overrides:
mouseMoved in class MouseAdapterLayer

getStationInfo

public static java.lang.String getStationInfo(edu.iris.Fissures.IfNetwork.Station station,
                                              edu.iris.Fissures.IfEvent.EventAccessOperations event)

calcDistEventFromLocation

public static double calcDistEventFromLocation(double latitude,
                                               double longitude,
                                               edu.iris.Fissures.IfEvent.EventAccessOperations event)
                                        throws edu.iris.Fissures.IfEvent.NoPreferredOrigin
Throws:
edu.iris.Fissures.IfEvent.NoPreferredOrigin