com.rolemodelsoft.drawlet.shapes
Class RightHandle

java.lang.Object
  |
  +--com.rolemodelsoft.drawlet.basics.AbstractInputEventHandler
        |
        +--com.rolemodelsoft.drawlet.basics.CanvasHandle
              |
              +--com.rolemodelsoft.drawlet.basics.SquareCanvasHandle
                    |
                    +--com.rolemodelsoft.drawlet.shapes.BoundsHandle
                          |
                          +--com.rolemodelsoft.drawlet.shapes.RightHandle

public class RightHandle
extends BoundsHandle

This class provides a handle that shows up at the right of a figure and resizes the figure accordingly as it is dragged.


Fields inherited from class com.rolemodelsoft.drawlet.shapes.BoundsHandle
figure, locator
 
Fields inherited from class com.rolemodelsoft.drawlet.basics.CanvasHandle
canvas, halfWidth, HANDLE_SIZE, previousTool
 
Constructor Summary
RightHandle(Figure figure)
          Constructs and initializes a new instance of a handle which can affect the figure's bounds by changing its right.
 
Method Summary
protected  Locator defaultLocator(Figure figure)
          Answer the default/initial locator.
 void mouseDragged(java.awt.event.MouseEvent evt)
          Called if the mouse is dragged (the mouse button is down).
 
Methods inherited from class com.rolemodelsoft.drawlet.shapes.BoundsHandle
centerX, centerY, getFigure, reshape, resize, setFigure
 
Methods inherited from class com.rolemodelsoft.drawlet.basics.SquareCanvasHandle
getBounds, paint
 
Methods inherited from class com.rolemodelsoft.drawlet.basics.CanvasHandle
contains, defaultHandleSize, finished, getHandleHeight, getHandleSize, getHandleWidth, getX, getY, intersects, mouseReleased, releaseControl, setHandleSize, takeControl
 
Methods inherited from class com.rolemodelsoft.drawlet.basics.AbstractInputEventHandler
keyPressed, keyReleased, keyTyped, mouseClicked, mouseDoubleClicked, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseSingleClicked
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RightHandle

public RightHandle(Figure figure)
Constructs and initializes a new instance of a handle which can affect the figure's bounds by changing its right.
Parameters:
figure - the figure whose bounds we may wish to change.
Method Detail

defaultLocator

protected Locator defaultLocator(Figure figure)
Answer the default/initial locator.
Overrides:
defaultLocator in class BoundsHandle
Parameters:
figure - the figure
Returns:
the default/initial Locator

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent evt)
Called if the mouse is dragged (the mouse button is down). Resize the figure as appropriate.
Overrides:
mouseDragged in class BoundsHandle
Parameters:
evt - the event