org.tigris.gef.base
Class SelectionMove

java.lang.Object
  extended byorg.tigris.gef.base.Selection
      extended byorg.tigris.gef.base.SelectionMove
All Implemented Interfaces:
java.util.EventListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable

public class SelectionMove
extends Selection

Selection object that allows the user to move the selected Fig, but not to resize it.

See Also:
Serialized Form

Field Summary
static int BORDER_WIDTH
          The margin between the contents bbox and the frame
 
Fields inherited from class org.tigris.gef.base.Selection
_content, HAND_SIZE
 
Constructor Summary
SelectionMove(org.tigris.gef.presentation.Fig f)
          Construct a new SelectionMove around the given DiagramElement
 
Method Summary
 void dragHandle(int mx, int my, int an_x, int an_y, org.tigris.gef.presentation.Handle h)
          SelectionMove is used when there are no handles, so dragHandle does nothing.
 void hitHandle(java.awt.Rectangle r, org.tigris.gef.presentation.Handle h)
          Return -1 as a special code to indicate that the user clicked in the body of the Fig and wants to drag it around.
 void paint(java.awt.Graphics g)
          Paint the selection.
 
Methods inherited from class org.tigris.gef.base.Selection
contains, contains, contains, damage, delete, dispose, endTrans, getBounds, getContent, getContentBounds, getLocation, getLocked, hit, hitHandle, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, print, reorder, setcontent, stuffBounds, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BORDER_WIDTH

public static final int BORDER_WIDTH
The margin between the contents bbox and the frame

See Also:
Constant Field Values
Constructor Detail

SelectionMove

public SelectionMove(org.tigris.gef.presentation.Fig f)
Construct a new SelectionMove around the given DiagramElement

Method Detail

paint

public void paint(java.awt.Graphics g)
Paint the selection.

Overrides:
paint in class Selection

dragHandle

public void dragHandle(int mx,
                       int my,
                       int an_x,
                       int an_y,
                       org.tigris.gef.presentation.Handle h)
SelectionMove is used when there are no handles, so dragHandle does nothing. Actually, hitHandle always returns -1 , so this method should never even get called.

Specified by:
dragHandle in class Selection

hitHandle

public void hitHandle(java.awt.Rectangle r,
                      org.tigris.gef.presentation.Handle h)
Return -1 as a special code to indicate that the user clicked in the body of the Fig and wants to drag it around.

Specified by:
hitHandle in class Selection