org.tigris.gef.base
Class ModeBroom

java.lang.Object
  extended by org.tigris.gef.base.ModeImpl
      extended by org.tigris.gef.base.FigModifyingModeImpl
          extended by org.tigris.gef.base.ModeBroom
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 ModeBroom
extends FigModifyingModeImpl

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.tigris.gef.base.FigModifyingModeImpl
editor
 
Fields inherited from class org.tigris.gef.base.ModeImpl
_args
 
Constructor Summary
ModeBroom()
          Construct a new ModeBroom instance.
ModeBroom(Editor par)
          Construct a new ModeBroom with the given parent.
 
Method Summary
 void addNewItems()
           
 void doDistibute(boolean alignToGrid, boolean doCentering)
           
 java.lang.String instructions()
          Reply a string of instructions that should be shown in the statusbar when this mode starts.
 void keyPressed(java.awt.event.KeyEvent ke)
           
 void mouseDragged(java.awt.event.MouseEvent me)
          On mouse dragging, stretch the selection rectangle.
 void mousePressed(java.awt.event.MouseEvent me)
          Handle mouse down events by preparing for a drag.
 void mouseReleased(java.awt.event.MouseEvent me)
          On mouse up, select or toggle the selection of items under the mouse or in the selection rectangle.
 void paint(java.awt.Graphics g)
          Paint this mode by painting the selection rectangle if appropriate.
 java.util.Vector touching()
           
 
Methods inherited from class org.tigris.gef.base.FigModifyingModeImpl
done, getEditor, getInitialCursor, 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

ModeBroom

public ModeBroom(Editor par)
Construct a new ModeBroom with the given parent.


ModeBroom

public ModeBroom()
Construct a new ModeBroom instance. Its parent must be set before this instance can be used.

Method Detail

mousePressed

public void mousePressed(java.awt.event.MouseEvent me)
Handle mouse down events by preparing for a drag. If the mouse down event happens on a handle or an already selected object, and the shift key is not down, then go to ModeModify. If the mouse down event happens on a port, to to ModeCreateEdge.

Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class ModeImpl

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent me)
On mouse dragging, stretch the selection rectangle.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Overrides:
mouseDragged in class ModeImpl

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent me)
On mouse up, select or toggle the selection of items under the mouse or in the selection rectangle.

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class ModeImpl

addNewItems

public void addNewItems()

keyPressed

public void keyPressed(java.awt.event.KeyEvent ke)
Specified by:
keyPressed in interface java.awt.event.KeyListener
Overrides:
keyPressed in class ModeImpl

doDistibute

public void doDistibute(boolean alignToGrid,
                        boolean doCentering)

touching

public java.util.Vector touching()

instructions

public java.lang.String instructions()
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

paint

public void paint(java.awt.Graphics g)
Paint this mode by painting the selection rectangle if appropriate.

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