## com.bbn.openmap.omGraphics.editable
Class EOMGStateMachine

    java.lang.Object
      com.bbn.openmap.layer.util.stateMachine.StateMachine
          com.bbn.openmap.omGraphics.editable.EOMGStateMachine

Direct Known Subclasses:
  CircleStateMachine, LineStateMachine, ListStateMachine, PointStateMachine, PolyStateMachine, RectStateMachine, ScalingRasterStateMachine, TextStateMachine

public class EOMGStateMachine
extends StateMachine

Field Summary
`static int` `DEFAULT_NUMBER_STATES`
`EditableOMGraphic` `graphic`
`static int` `GRAPHIC_EDIT` The state when the graphic points are in the process of changing.
`static int` `GRAPHIC_SELECTED` The state when an existing graphic is selected, ready for change given the correct input.
`static int` `GRAPHIC_SETOFFSET` The state where an offset point needs to be defined.
`static int` `GRAPHIC_UNDEFINED` The state when a graphic is not there yet, about to be drawn.
`static int` `GRAPHIC_UNSELECTED` The state when an existing graphic is present, but has not been selected.
`int` `NUMBER_STATES`
`protected boolean` `offsetNeeded`

Fields inherited from class com.bbn.openmap.layer.util.stateMachine.StateMachine
`currentState, resetState, states`

Constructor Summary
`EOMGStateMachine(EditableOMGraphic graphic)`

Method Summary
`protected State[]` `init()`
`boolean` `isOffsetNeeded()` Check to see if the graphic offset point needs to be defined.
`void` `setEdit()`
`void` `setOffset()`
`void` `setOffsetNeeded(boolean set)` The state machine, from the edit mode, tests this to see if an offset point needs to be defined.
`void` `setSelected()`
`void` `setUndefined()`
`void` `setUnselected()`

Methods inherited from class com.bbn.openmap.layer.util.stateMachine.StateMachine
`addStates, getResetState, getState, getState, getStates, reset, setMapMouseListenerResponses, setResetState, setResetState, setState, setState, setStateAt, setStates, setStates`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### graphic

    public EditableOMGraphic graphic

### offsetNeeded

    protected boolean offsetNeeded

### GRAPHIC_UNDEFINED

    public static final int GRAPHIC_UNDEFINED

  The state when a graphic is not there yet, about to be drawn.

  See Also:
    Constant Field Values

### GRAPHIC_UNSELECTED

    public static final int GRAPHIC_UNSELECTED

  The state when an existing graphic is present, but has not been selected. At this point, the point nodes should not be visible, but the graphic is.

  See Also:
    Constant Field Values

### GRAPHIC_SELECTED

    public static final int GRAPHIC_SELECTED

  The state when an existing graphic is selected, ready for change given the correct input. The point nodes and the graphic are visible.

  See Also:
    Constant Field Values

### GRAPHIC_EDIT

    public static final int GRAPHIC_EDIT

  The state when the graphic points are in the process of changing.

  See Also:
    Constant Field Values

### GRAPHIC_SETOFFSET

    public static final int GRAPHIC_SETOFFSET

  The state where an offset point needs to be defined.

  See Also:
    Constant Field Values

### DEFAULT_NUMBER_STATES

    public static final int DEFAULT_NUMBER_STATES

See Also:
  Constant Field Values

### NUMBER_STATES

    public int NUMBER_STATES

Constructor Detail

### EOMGStateMachine

    public EOMGStateMachine(EditableOMGraphic graphic)

Method Detail

### init

    protected State[] init()

### isOffsetNeeded

    public boolean isOffsetNeeded()

  Check to see if the graphic offset point needs to be defined.

### setOffsetNeeded

    public void setOffsetNeeded(boolean set)

  The state machine, from the edit mode, tests this to see if an offset point needs to be defined. This is set to true when the OMGraphic (offset rendertype) is undefined. Can't be set every time the state machine gets in edit mode, because we may be just moving the graphic. Set to true if you want to define the offset point after defining the actual graphic, which should be done only for offset graphics.

### setUndefined

    public void setUndefined()

### setUnselected

    public void setUnselected()

### setSelected

    public void setSelected()

### setEdit

    public void setEdit()

### setOffset

    public void setOffset()

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