org.tigris.gef.base
Class ModeCreateFigRect

java.lang.Object
  extended by org.tigris.gef.base.ModeImpl
      extended by org.tigris.gef.base.FigModifyingModeImpl
          extended by org.tigris.gef.base.ModeCreate
              extended by org.tigris.gef.base.ModeCreateFigRect
All Implemented Interfaces:
java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable, java.util.EventListener, FigModifyingMode, Mode

public class ModeCreateFigRect
extends ModeCreate

A Mode to interpert user input while creating a FigRect. All of the actual event handling is inherited from ModeCreate. This class just implements the differences needed to make it specific to rectangles.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.tigris.gef.base.ModeCreate
_defaultHeight, _defaultWidth, _newItem, anchorX, anchorY
 
Fields inherited from class org.tigris.gef.base.FigModifyingModeImpl
editor
 
Fields inherited from class org.tigris.gef.base.ModeImpl
_args
 
Constructor Summary
ModeCreateFigRect()
           
 
Method Summary
 Fig createNewItem(java.awt.event.MouseEvent me, int snapX, int snapY)
          Create a new FigRect instance based on the given mouse down event and the state of the parent Editor.
 java.lang.String instructions()
          Reply a string of instructions that should be shown in the statusbar when this mode starts.
 
Methods inherited from class org.tigris.gef.base.ModeCreate
createFig, creationDrag, getInitialCursor, keyPressed, mouseDragged, mousePressed, mouseReleased, paint
 
Methods inherited from class org.tigris.gef.base.FigModifyingModeImpl
done, getEditor, isFigEnclosedIn, print, setCursor, setEditor
 
Methods inherited from class org.tigris.gef.base.ModeImpl
canExit, getArg, getArgs, init, keyReleased, keyTyped, leave, mouseClicked, mouseEntered, mouseExited, mouseMoved, setArg, setArgs, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.tigris.gef.base.Mode
canExit, getArg, getArgs, init, setArg, setArgs, start
 

Constructor Detail

ModeCreateFigRect

public ModeCreateFigRect()
Method Detail

instructions

public java.lang.String instructions()
Description copied from class: FigModifyingModeImpl
Reply a string of instructions that should be shown in the statusbar when this mode starts.

Specified by:
instructions in interface FigModifyingMode
Overrides:
instructions in class FigModifyingModeImpl

createNewItem

public Fig createNewItem(java.awt.event.MouseEvent me,
                         int snapX,
                         int snapY)
Create a new FigRect instance based on the given mouse down event and the state of the parent Editor.

Specified by:
createNewItem in class ModeCreate