com.bbn.openmap.gui.time
Class TimelineLayer

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 com.bbn.openmap.layer.OMGraphicHandlerLayer
                      extended by com.bbn.openmap.gui.time.TimelineLayer
All Implemented Interfaces:
MapMouseListener, ProjectionListener, GestureResponsePolicy, OMGraphicHandler, ProjectionPainter, PropertyConsumer, TimeBoundsListener, TimeEventListener, DrawingToolRequestor, java.awt.event.ActionListener, java.awt.event.ComponentListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener

public class TimelineLayer
extends OMGraphicHandlerLayer
implements java.awt.event.ActionListener, DrawingToolRequestor, java.beans.PropertyChangeListener, MapMouseListener, java.awt.event.ComponentListener, TimeBoundsListener, TimeEventListener

Timeline layer Render events and allow for their selection on a variable-scale time line.

See Also:
Serialized Form

Nested Class Summary
static class TimelineLayer.CurrentTimeMarker
           
 class TimelineLayer.EventMarkerLine
           
static class TimelineLayer.PlayFilter
           
static class TimelineLayer.SelectionArea
           
static class TimelineLayer.TimeHashFactory
           
static class TimelineLayer.TimeHashMarks
           
 
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  OMEventSelectionCoordinator aesc
           
protected static java.lang.String ATT_KEY_EVENT
           
protected  CenterSupport centerDelegate
           
protected  Clock clock
           
protected  OMGraphicList currentTimeMarker
           
protected  TimeSliderLayer.TimeDrape drape
           
static java.lang.String EventDetailsProperty
          This property is used to send event details that can be displayed when the mouse is over an event in the timeline.
protected  OMGraphicList eventGraphicList
           
protected  EventPresenter eventPresenter
           
static java.util.logging.Logger logger
           
static java.lang.String MouseTimeProperty
          This property is used to send the current offset time where the mouse is over the timeline.
protected  javax.swing.Box paletteBox
           
protected  TimelineLayer.PlayFilter playFilter
           
static java.lang.String PlayFilterProperty
          This property is used to signify whether any OMEvents have been designated as play filterable, so GUI controls for the play filter can be enabled/disabled.
protected  TimelineLayer.SelectionArea.PostTime postTime
           
protected  TimelineLayer.SelectionArea.PreTime preTime
           
protected  OMGraphicList ratingAreas
           
protected  TimelineLayer.SelectionArea selectionRect
           
protected  TimelineLayer.TimeHashFactory timeHashFactory
           
protected  OMGraphicList timeLinesList
           
static java.lang.String TimeParametersProperty
          This property is used to notify listeners that the time projection parameters have changed, and they need to contact this object to figure out how to display those changes.
protected static java.awt.Color tint
           
 
Fields inherited from class com.bbn.openmap.layer.OMGraphicHandlerLayer
consumeEvents, ConsumeEventsProperty, filter, interruptable, InterruptableProperty, layerWorker, LAYERWORKER_LOCK, layerWorkerQueue, mouseEventInterpreter, mouseModeIDs, MouseModesProperty, projectionChangePolicy, ProjectionChangePolicyProperty, renderPolicy, RenderPolicyProperty, selectedList, TransparencyProperty
 
Fields inherited from class com.bbn.openmap.Layer
addAsBackground, AddAsBackgroundProperty, addToBeanContext, AddToBeanContextProperty, attributes, autoPalette, AutoPaletteProperty, beanContextChildSupport, coordTransform, DataPathPrefixProperty, DisplayPaletteCmd, DisplayPropertiesCmd, doHack, HidePaletteCmd, i18n, localHackList, maxScale, MaxScaleProperty, minScale, MinScaleProperty, palette, paletteListener, PrettyNameProperty, propertyPrefix, readyToPaint, RedrawCmd, removable, RemovableProperty, SWING_PACKAGE, TransformProperty, 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
TimelineLayer()
          Construct the TimelineLayer.
 
Method Summary
 void adjustZoomFromMouseWheel(int rot)
           
protected  boolean checkAndSetForNoTime(TimeEvent te)
           
 void clearSelection()
           
 void componentHidden(java.awt.event.ComponentEvent e)
           
 void componentMoved(java.awt.event.ComponentEvent e)
           
 void componentResized(java.awt.event.ComponentEvent e)
           
 void componentShown(java.awt.event.ComponentEvent e)
           
protected  OMGraphicList constructTimeLines(Projection projection)
           
 void drawingComplete(OMGraphic omg, OMAction action)
          The method where a graphic, and an action to take on the graphic, arrives.
protected  void evaluateEventAttributes()
           
 void findAndInit(java.lang.Object someObj)
          This method is called by the findAndInit(Iterator) method, once for every object inside the iterator.
 void findAndUndo(java.lang.Object someObj)
          This is the method that does the opposite as the findAndInit(Object).
static double forwardProjectMillis(long time)
           
protected  OMGraphic getCurrentTimeMarker(Projection proj)
           
 long getDuration()
           
 long getEndTime()
           
 OMGraphicList getEventGraphicList()
           
protected  OMGraphicList getEventList(java.util.Iterator<OMEvent> it, Projection projection)
           
protected  OMGraphicList getEventList(Projection projection)
           
 java.awt.Component getGUI()
          Gets the gui controls associated with the layer.
 MapMouseListener getMapMouseListener()
          Query asked from the MouseDelegator for interest in receiving MapMouseEvents.
 java.lang.String[] getMouseModeServiceList()
          Return a list of the modes that are interesting to the MapMouseListener.
 java.lang.String getName()
          Needed to fill in a GUI with a receiver's name, to enable the user to send a graphic to a specific object.
 TimelineLayer.SelectionArea getSelectionRectangle(Projection proj)
           
protected  java.util.List<OMEvent> handleEventSelection()
           
static long inverseProjectMillis(double timef)
           
 boolean isSelectable(OMGraphic omg)
          Query asking if an OMGraphic is select-able, or able to be moved, deleted or otherwise modified.
 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.
 void paint(java.awt.Graphics g)
          The default action is to get the OMGraphicList and render it.
 OMGraphicList prepare()
          Creates the OMGraphic list with the time and event markings.
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
protected  void selectEventForMouseEvent(java.awt.event.MouseEvent e)
           
 void setEventGraphicList(OMGraphicList eventGraphicList)
           
protected  void setMapBeanMaxScale(boolean setScaleToMax)
           
 void setRealTimeMode(boolean realTimeMode)
           
protected  void setSelectionRectangleToEvents()
           
protected  void setTimeBounds(long start, long end)
           
 void setUserHasChangedScale(boolean userHasChangedScale)
           
protected  void updateEventDetails()
           
protected  void updateEventDetails(java.awt.event.MouseEvent e)
           
 void updateMouseTimeDisplay(java.lang.Long offsetMillis)
           
protected  double updateMouseTimeDisplay(java.awt.event.MouseEvent e)
           
 void updateTime(TimeEvent te)
           
 void updateTimeBounds(TimeBoundsEvent tbe)
          This method will be called on the TimeBoundsListener to let it know that the time bounds have changed.
 
Methods inherited from class com.bbn.openmap.layer.OMGraphicHandlerLayer
actionPerformed, canSetList, copy, createLayerWorker, cut, deselect, dispose, doAction, doPrepare, filter, filter, filter, getConsumeEvents, getDefaultSettingsPanel, getFilter, getInfoText, getItemsForMapMenu, getItemsForOMGraphicMenu, getLayerWorker, getList, getMouseEventInterpreter, getMouseModeIDsForEvents, getProjectionChangePolicy, getProperties, getPropertyInfo, getRedrawButton, getRenderPolicy, getSelected, getSettingsButton, getToolTipTextFor, getTransparency, getTransparencyAdjustmentPanel, highlight, isCancelled, isHighlightable, isInterruptable, isWorking, leftClick, mouseOver, paste, projectionChanged, receivesMapEvents, renderDataForProjection, resetFiltering, select, setConsumeEvents, setFilter, setInterruptable, setLayerWorker, setList, setMouseEventInterpreter, setMouseModeIDsForEvents, setProjectionChangePolicy, setProperties, setRenderPolicy, setTransparency, supportsSQL, unhighlight, workerComplete
 
Methods inherited from class com.bbn.openmap.Layer
addComponentListener, added, addInfoDisplayListener, addLayerStatusListener, addMouseListener, addVetoableChangeListener, childrenAdded, childrenRemoved, clearListeners, connectToBeanContext, createWindowSupport, disconnectFromBeanContext, finalize, findAndInit, fireHideToolTip, firePaletteEvent, fireRequestBrowserContent, fireRequestBrowserContent, fireRequestCursor, fireRequestInfoLine, fireRequestInfoLine, fireRequestInfoLine, fireRequestMessage, fireRequestMessage, fireRequestToolTip, fireRequestToolTip, fireRequestURL, fireRequestURL, fireStatusUpdate, fireStatusUpdate, fireVetoableChange, getAddAsBackground, getAddToBeanContext, getAttribute, getBeanContext, getCoordTransform, getIcon, getMaxScale, getMinScale, getPackage, getPalette, getProjection, getPropertyPrefix, getWindowSupport, hasGUI, hidePalette, isAutoPalette, isProjectionOK, isReadyToPaint, isRemovable, notifyHideHack, prependDataPathPrefix, putAttribute, removeComponentListener, removeConfirmed, removed, removeInfoDisplayListener, removeLayerStatusListener, removeVetoableChangeListener, repaint, resetPalette, setAddAsBackground, setAddToBeanContext, setAutoPalette, setBeanContext, setCoordTransform, setIcon, setLayerProperties, setMaxScale, setMinScale, setName, setPaletteVisible, setProjection, setProjection, setProperties, setPropertyPrefix, setReadyToPaint, setRemovable, 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, 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.awt.event.ActionListener
actionPerformed
 
Methods inherited from interface java.beans.beancontext.BeanContextChild
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

PlayFilterProperty

public static final java.lang.String PlayFilterProperty
This property is used to signify whether any OMEvents have been designated as play filterable, so GUI controls for the play filter can be enabled/disabled.

See Also:
Constant Field Values

MouseTimeProperty

public static final java.lang.String MouseTimeProperty
This property is used to send the current offset time where the mouse is over the timeline.

See Also:
Constant Field Values

EventDetailsProperty

public static final java.lang.String EventDetailsProperty
This property is used to send event details that can be displayed when the mouse is over an event in the timeline.

See Also:
Constant Field Values

TimeParametersProperty

public static final java.lang.String TimeParametersProperty
This property is used to notify listeners that the time projection parameters have changed, and they need to contact this object to figure out how to display those changes.

See Also:
Constant Field Values

logger

public static java.util.logging.Logger logger

eventGraphicList

protected OMGraphicList eventGraphicList

timeLinesList

protected OMGraphicList timeLinesList

playFilter

protected TimelineLayer.PlayFilter playFilter

ratingAreas

protected OMGraphicList ratingAreas

selectionRect

protected TimelineLayer.SelectionArea selectionRect

drape

protected TimeSliderLayer.TimeDrape drape

centerDelegate

protected CenterSupport centerDelegate

eventPresenter

protected EventPresenter eventPresenter

aesc

protected OMEventSelectionCoordinator aesc

tint

protected static java.awt.Color tint

clock

protected Clock clock

timeHashFactory

protected TimelineLayer.TimeHashFactory timeHashFactory

currentTimeMarker

protected OMGraphicList currentTimeMarker

preTime

protected TimelineLayer.SelectionArea.PreTime preTime

postTime

protected TimelineLayer.SelectionArea.PostTime postTime

ATT_KEY_EVENT

protected static final java.lang.String ATT_KEY_EVENT
See Also:
Constant Field Values

paletteBox

protected javax.swing.Box paletteBox
Constructor Detail

TimelineLayer

public TimelineLayer()
Construct the TimelineLayer.

Method Detail

findAndInit

public void findAndInit(java.lang.Object someObj)
Description copied from class: Layer
This method is called by the findAndInit(Iterator) method, once for every object inside the iterator. It's here to allow subclasses a way to receive objects and still let the super classes have a shot at the object. So, you can override this method can call super.findAndInit(obj), or override the findAndInit(Iterator) method and call super.findAndInit(obj). Whatever.

Overrides:
findAndInit in class Layer

findAndUndo

public void findAndUndo(java.lang.Object someObj)
Description copied from class: Layer
This is the method that does the opposite as the findAndInit(Object). Lets you call super classes with objects that need to be removed. At this level, if the layer detects that it is being removed from the MapHandler, it calls dispose on itself.

Overrides:
findAndUndo in class Layer

forwardProjectMillis

public static double forwardProjectMillis(long time)

inverseProjectMillis

public static long inverseProjectMillis(double timef)

prepare

public OMGraphicList prepare()
Creates the OMGraphic list with the time and event markings.

Overrides:
prepare in class OMGraphicHandlerLayer

getEventGraphicList

public OMGraphicList getEventGraphicList()

setEventGraphicList

public void setEventGraphicList(OMGraphicList eventGraphicList)

constructTimeLines

protected OMGraphicList constructTimeLines(Projection projection)
Returns:
OMGraphicList new graphic list

getSelectionRectangle

public TimelineLayer.SelectionArea getSelectionRectangle(Projection proj)

getCurrentTimeMarker

protected OMGraphic getCurrentTimeMarker(Projection proj)

getEventList

protected OMGraphicList getEventList(Projection projection)

getEventList

protected OMGraphicList getEventList(java.util.Iterator<OMEvent> it,
                                     Projection projection)

getGUI

public java.awt.Component getGUI()
Description copied from class: Layer
Gets the gui controls associated with the layer. This default implementation returns null indicating that the layer has no gui controls.

Overrides:
getGUI in class Layer
Returns:
java.awt.Component or null, null by default.

drawingComplete

public void drawingComplete(OMGraphic omg,
                            OMAction action)
Description copied from interface: DrawingToolRequestor
The method where a graphic, and an action to take on the graphic, arrives.

Specified by:
drawingComplete in interface DrawingToolRequestor

isSelectable

public boolean isSelectable(OMGraphic omg)
Description copied from class: OMGraphicHandlerLayer
Query asking if an OMGraphic is select-able, or able to be moved, deleted or otherwise modified. Responding true to this method may cause select() to be called (depends on the MapMouseInterpertor) so the meaning depends on what the layer does in select.

Specified by:
isSelectable in interface GestureResponsePolicy
Overrides:
isSelectable in class OMGraphicHandlerLayer

getName

public java.lang.String getName()
Description copied from interface: DrawingToolRequestor
Needed to fill in a GUI with a receiver's name, to enable the user to send a graphic to a specific object. Should be a pretty name, suitable to let a user know what it is. It's important that the requestor have a name, because that could be the key that is used in some GUI components.

Specified by:
getName in interface DrawingToolRequestor
Overrides:
getName in class java.awt.Component

setTimeBounds

protected void setTimeBounds(long start,
                             long end)

updateTimeBounds

public void updateTimeBounds(TimeBoundsEvent tbe)
Description copied from interface: TimeBoundsListener
This method will be called on the TimeBoundsListener to let it know that the time bounds have changed.

Specified by:
updateTimeBounds in interface TimeBoundsListener
Parameters:
tbe - TimeBoundsEvent with the source of the change along with the old and new values.

updateTime

public void updateTime(TimeEvent te)
Specified by:
updateTime in interface TimeEventListener

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

checkAndSetForNoTime

protected boolean checkAndSetForNoTime(TimeEvent te)

getMapMouseListener

public MapMouseListener getMapMouseListener()
Description copied from class: OMGraphicHandlerLayer
Query asked from the MouseDelegator for interest in receiving MapMouseEvents. This returns a MapMouseInterpreter that has been told to listen for events from the MapMouseModes in setMouseModeIDsForEvents().

Overrides:
getMapMouseListener in class OMGraphicHandlerLayer
Returns:
null for the default, method can be overridden to return something interested in mouse events.

getMouseModeServiceList

public java.lang.String[] getMouseModeServiceList()
Description copied from interface: MapMouseListener
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 MapMouseListener
Returns:
String[] of modeID's
See Also:
NavMouseMode.modeID, SelectMouseMode.modeID, NullMouseMode.modeID

mousePressed

public boolean mousePressed(java.awt.event.MouseEvent e)
Description copied from interface: MapMouseListener
Invoked when a mouse button has been pressed on a component.

Specified by:
mousePressed in interface MapMouseListener
Parameters:
e - MouseEvent
Returns:
true if the listener was able to process the event.

selectEventForMouseEvent

protected void selectEventForMouseEvent(java.awt.event.MouseEvent e)

mouseReleased

public boolean mouseReleased(java.awt.event.MouseEvent e)
Description copied from interface: MapMouseListener
Invoked when a mouse button has been released on a component.

Specified by:
mouseReleased in interface MapMouseListener
Parameters:
e - MouseEvent
Returns:
true if the listener was able to process the event.

mouseClicked

public boolean mouseClicked(java.awt.event.MouseEvent e)
Description copied from interface: MapMouseListener
Invoked when the mouse has been clicked on a component. The listener will receive this event if it successfully processed 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.

NOTE: We have noticed that this method can sometimes be erroneously invoked. It seems to occur when a light-weight AWT component (like an internal window or menu) closes (removes itself from the window hierarchy). A specific OpenMap example is when you make a menu selection when the MenuItem you select is above the MapBean canvas. After making the selection, the mouseClicked() gets invoked on the MouseDelegator, which passes it to the appropriate listeners depending on the MouseMode. The best way to avoid this problem is to not implement anything crucial in this method. Use a combination of mousePressed() and mouseReleased() instead.

Specified by:
mouseClicked in interface MapMouseListener
Parameters:
e - MouseEvent
Returns:
true if the listener was able to process the event.

updateMouseTimeDisplay

protected double updateMouseTimeDisplay(java.awt.event.MouseEvent e)

updateMouseTimeDisplay

public void updateMouseTimeDisplay(java.lang.Long offsetMillis)

updateEventDetails

protected void updateEventDetails(java.awt.event.MouseEvent e)

updateEventDetails

protected void updateEventDetails()

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Description copied from interface: MapMouseListener
Invoked when the mouse enters a component.

Specified by:
mouseEntered in interface MapMouseListener
Parameters:
e - MouseEvent

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Description copied from interface: MapMouseListener
Invoked when the mouse exits a component.

Specified by:
mouseExited in interface MapMouseListener
Parameters:
e - MouseEvent

mouseDragged

public boolean mouseDragged(java.awt.event.MouseEvent e)
Description copied from interface: MapMouseListener
Invoked when a mouse button is pressed on a component and then dragged. The listener will receive these events if it successfully processes mousePressed(), or if no other listener processes the event.

Specified by:
mouseDragged in interface MapMouseListener
Parameters:
e - MouseEvent
Returns:
true if the listener was able to process the event.

mouseMoved

public boolean mouseMoved(java.awt.event.MouseEvent e)
Description copied from interface: MapMouseListener
Invoked when the mouse button has been moved on a component (with no buttons down).

Specified by:
mouseMoved in interface MapMouseListener
Parameters:
e - MouseEvent
Returns:
true if the listener was able to process the event.

mouseMoved

public void mouseMoved()
Description copied from interface: MapMouseListener
Handle a mouse cursor moving without the button being pressed. This event is intended to tell the listener that there was a mouse movement, but that the event was consumed by another layer. This will allow a mouse listener to clean up actions that might have happened because of another motion event response.

Specified by:
mouseMoved in interface MapMouseListener

handleEventSelection

protected java.util.List<OMEvent> handleEventSelection()

evaluateEventAttributes

protected void evaluateEventAttributes()

setSelectionRectangleToEvents

protected void setSelectionRectangleToEvents()

setMapBeanMaxScale

protected void setMapBeanMaxScale(boolean setScaleToMax)

componentHidden

public void componentHidden(java.awt.event.ComponentEvent e)
Specified by:
componentHidden in interface java.awt.event.ComponentListener

componentMoved

public void componentMoved(java.awt.event.ComponentEvent e)
Specified by:
componentMoved in interface java.awt.event.ComponentListener

componentResized

public void componentResized(java.awt.event.ComponentEvent e)
Specified by:
componentResized in interface java.awt.event.ComponentListener

componentShown

public void componentShown(java.awt.event.ComponentEvent e)
Specified by:
componentShown in interface java.awt.event.ComponentListener

paint

public void paint(java.awt.Graphics g)
Description copied from class: OMGraphicHandlerLayer
The default action is to get the OMGraphicList and render it.

Overrides:
paint in class OMGraphicHandlerLayer
Parameters:
g - java.awt.Graphics object to render OMGraphics into.

setRealTimeMode

public void setRealTimeMode(boolean realTimeMode)

getDuration

public long getDuration()

getEndTime

public long getEndTime()

setUserHasChangedScale

public void setUserHasChangedScale(boolean userHasChangedScale)

adjustZoomFromMouseWheel

public void adjustZoomFromMouseWheel(int rot)

clearSelection

public void clearSelection()


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details