com.bbn.openmap.omGraphics.editable
Class CircleUndefinedState

java.lang.Object
  extended by com.bbn.openmap.util.stateMachine.State
      extended by com.bbn.openmap.omGraphics.editable.GraphicUndefinedState
          extended by com.bbn.openmap.omGraphics.editable.ClckOrDrgUndefinedState
              extended by com.bbn.openmap.omGraphics.editable.CircleUndefinedState
All Implemented Interfaces:
MapMouseListener, EOMGUndefinedState, 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 CircleUndefinedState
extends ClckOrDrgUndefinedState


Field Summary
 
Fields inherited from class com.bbn.openmap.omGraphics.editable.GraphicUndefinedState
graphic
 
Fields inherited from class com.bbn.openmap.util.stateMachine.State
i18n
 
Constructor Summary
CircleUndefinedState(EditableOMCircle eomc)
           
 
Method Summary
 boolean mousePressed(java.awt.event.MouseEvent e)
          In this state, we need to draw a circle from scratch.
 
Methods inherited from class com.bbn.openmap.omGraphics.editable.ClckOrDrgUndefinedState
mouseDragged, mouseMoved, mouseReleased
 
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, 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
 

Constructor Detail

CircleUndefinedState

public CircleUndefinedState(EditableOMCircle eomc)
Method Detail

mousePressed

public boolean mousePressed(java.awt.event.MouseEvent e)
In this state, we need to draw a circle from scratch. So, we listen for a mouse down, and set both points there, and then set the mode to circle edit. This method is overridden because of weirdness with drawing circles and that EditableOMCircle/CircleStateMachine.

Specified by:
mousePressed in interface MapMouseListener
Overrides:
mousePressed in class ClckOrDrgUndefinedState
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