com.bbn.openmap.omGraphics.editable
Class GraphicUndefinedEditState
java.lang.Object
com.bbn.openmap.util.stateMachine.State
com.bbn.openmap.omGraphics.editable.GraphicEditState
com.bbn.openmap.omGraphics.editable.GraphicUndefinedEditState
- All Implemented Interfaces:
- MapMouseListener, EOMGEditState, java.awt.event.ActionListener, java.awt.event.AdjustmentListener, java.awt.event.ComponentListener, java.awt.event.ContainerListener, java.awt.event.FocusListener, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.event.TextListener, java.awt.event.WindowListener, java.util.EventListener
public class GraphicUndefinedEditState
- extends GraphicEditState
- implements EOMGEditState
The GraphicUndefinedEditState is for a couple of OMGraphics that are still
undefined when they are created after a first click. We can have the
OMGraphic in an edit state, but we need to have a mouse released away from
the first mouse pressed in order to have an OMGraphic that makes sense. For
instance, circles and rectangles can't have just one point defined, so if
only one point is defined, the mouse dragged and mouse moved actions should
be the same, and then mouse release should mark the second definition point
of the OMGraphic.
- Author:
- ddietrick
Fields inherited from class com.bbn.openmap.util.stateMachine.State |
i18n |
Method Summary |
boolean |
mouseDragged(java.awt.event.MouseEvent e)
Invoked when a mouse button is pressed on a component and then
dragged. |
boolean |
mouseMoved(java.awt.event.MouseEvent e)
Invoked when the mouse button has been moved on a component
(with no buttons down). |
boolean |
mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a component. |
Methods inherited from class com.bbn.openmap.util.stateMachine.State |
actionPerformed, adjustmentValueChanged, componentAdded, componentHidden, componentMoved, componentRemoved, componentResized, componentShown, focusGained, focusLost, getMapMouseListenerResponse, getMouseModeServiceList, itemStateChanged, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseMoved, mousePressed, setMapMouseListenerResponse, textValueChanged, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
needAnotherPoint
protected boolean needAnotherPoint
GraphicUndefinedEditState
public GraphicUndefinedEditState(EditableOMGraphic eomg)
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
- Overrides:
mouseDragged
in class GraphicEditState
- Parameters:
e
- MouseEvent
- Returns:
- true if the listener was able to process the event.
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
- Overrides:
mouseReleased
in class GraphicEditState
- 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
- Overrides:
mouseMoved
in class State
- Parameters:
e
- MouseEvent
- Returns:
- true if the listener was able to process the event.
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details