JHotDraw 6.0b1

org.jhotdraw.util
Class UndoableHandle

java.lang.Object
  extended by org.jhotdraw.util.UndoableHandle
All Implemented Interfaces:
Handle

public class UndoableHandle
extends java.lang.Object
implements Handle


Field Summary
 
Fields inherited from interface org.jhotdraw.framework.Handle
HANDLESIZE
 
Constructor Summary
UndoableHandle(Handle newWrappedHandle)
          Constructor for UndoableHandle.
UndoableHandle(Handle newWrappedHandle, DrawingView newDrawingView)
          Deprecated. use the constructor without the DrawingView instead
 
Method Summary
 boolean containsPoint(int x, int y)
          Tests if a point is contained in the handle.
 java.awt.Rectangle displayBox()
          Gets the display box of the handle.
 void draw(java.awt.Graphics g)
          Draws this handle.
 Cursor getCursor()
          Returns the preferred Cursor for this Handle.
 DrawingView getDrawingView()
          Deprecated. attribute not required anymore
 Undoable getUndoActivity()
          Returns an Undoable to be used by the Undo/Redo infrastructure.
protected  Handle getWrappedHandle()
           
 void invokeEnd(int dx, int dy, Drawing drawing)
          Deprecated. As of version 4.1, use invokeEnd(x, y, anchorX, anchorY, drawingView).
 void invokeEnd(int x, int y, int anchorX, int anchorY, DrawingView view)
          Tracks the end of the interaction.
 void invokeStart(int x, int y, Drawing drawing)
          Deprecated. As of version 4.1, use invokeStart(x, y, drawingView)
 void invokeStart(int x, int y, DrawingView view)
          Tracks the start of the interaction.
 void invokeStep(int dx, int dy, Drawing drawing)
          Deprecated. As of version 4.1, use invokeStep(x, y, anchorX, anchorY, drawingView)
 void invokeStep(int x, int y, int anchorX, int anchorY, DrawingView view)
          Tracks a step of the interaction.
 java.awt.Point locate()
          Locates the handle on the figure.
 Figure owner()
          Gets the handle's owner.
protected  void setDrawingView(DrawingView newDrawingView)
          Deprecated. attribute not required anymore
 void setUndoActivity(Undoable newUndoableActivity)
          Sets an Undoable to be used by the Undo/Redo infrastructure.
protected  void setWrappedHandle(Handle newWrappedHandle)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UndoableHandle

public UndoableHandle(Handle newWrappedHandle)
Constructor for UndoableHandle.

Parameters:
newWrappedHandle -

UndoableHandle

public UndoableHandle(Handle newWrappedHandle,
                      DrawingView newDrawingView)
Deprecated. use the constructor without the DrawingView instead

Constructor for UndoableHandle.

Parameters:
newWrappedHandle -
newDrawingView -
Method Detail

locate

public java.awt.Point locate()
Locates the handle on the figure. The handle is drawn centered around the returned point.

Specified by:
locate in interface Handle
See Also:
Handle.locate()

invokeStart

public void invokeStart(int x,
                        int y,
                        DrawingView view)
Tracks the start of the interaction. The default implementation does nothing.

Specified by:
invokeStart in interface Handle
Parameters:
x - the x position where the interaction started
y - the y position where the interaction started
view - the handles container
See Also:
Handle.invokeStart(int, int, org.jhotdraw.framework.DrawingView)

invokeStart

public void invokeStart(int x,
                        int y,
                        Drawing drawing)
Deprecated. As of version 4.1, use invokeStart(x, y, drawingView)

Tracks the start of the interaction. The default implementation does nothing.

Specified by:
invokeStart in interface Handle
Parameters:
x - the x position where the interaction started
y - the y position where the interaction started
See Also:
Handle.invokeStart(int, int, org.jhotdraw.framework.Drawing)

invokeStep

public void invokeStep(int x,
                       int y,
                       int anchorX,
                       int anchorY,
                       DrawingView view)
Tracks a step of the interaction.

Specified by:
invokeStep in interface Handle
Parameters:
x - the current x position
y - the current y position
anchorX - the x position where the interaction started
anchorY - the y position where the interaction started
See Also:
Handle.invokeStep(int, int, int, int, org.jhotdraw.framework.DrawingView)

invokeStep

public void invokeStep(int dx,
                       int dy,
                       Drawing drawing)
Deprecated. As of version 4.1, use invokeStep(x, y, anchorX, anchorY, drawingView)

Tracks a step of the interaction.

Specified by:
invokeStep in interface Handle
Parameters:
dx - x delta of this step
dy - y delta of this step
See Also:
Handle.invokeStep(int, int, org.jhotdraw.framework.Drawing)

invokeEnd

public void invokeEnd(int x,
                      int y,
                      int anchorX,
                      int anchorY,
                      DrawingView view)
Tracks the end of the interaction.

Specified by:
invokeEnd in interface Handle
Parameters:
x - the current x position
y - the current y position
anchorX - the x position where the interaction started
anchorY - the y position where the interaction started
See Also:
Handle.invokeEnd(int, int, int, int, org.jhotdraw.framework.DrawingView)

invokeEnd

public void invokeEnd(int dx,
                      int dy,
                      Drawing drawing)
Deprecated. As of version 4.1, use invokeEnd(x, y, anchorX, anchorY, drawingView).

Tracks the end of the interaction.

Specified by:
invokeEnd in interface Handle
See Also:
Handle.invokeEnd(int, int, org.jhotdraw.framework.Drawing)

owner

public Figure owner()
Gets the handle's owner.

Specified by:
owner in interface Handle
See Also:
Handle.owner()

displayBox

public java.awt.Rectangle displayBox()
Gets the display box of the handle.

Specified by:
displayBox in interface Handle
See Also:
Handle.displayBox()

containsPoint

public boolean containsPoint(int x,
                             int y)
Tests if a point is contained in the handle.

Specified by:
containsPoint in interface Handle
See Also:
Handle.containsPoint(int, int)

draw

public void draw(java.awt.Graphics g)
Draws this handle.

Specified by:
draw in interface Handle
See Also:
Handle.draw(java.awt.Graphics)

setWrappedHandle

protected void setWrappedHandle(Handle newWrappedHandle)

getWrappedHandle

protected Handle getWrappedHandle()

getDrawingView

public DrawingView getDrawingView()
Deprecated. attribute not required anymore


setDrawingView

protected void setDrawingView(DrawingView newDrawingView)
Deprecated. attribute not required anymore


getUndoActivity

public Undoable getUndoActivity()
Description copied from interface: Handle
Returns an Undoable to be used by the Undo/Redo infrastructure.

Specified by:
getUndoActivity in interface Handle
Returns:
Undoable
See Also:
Handle.getUndoActivity()

setUndoActivity

public void setUndoActivity(Undoable newUndoableActivity)
Description copied from interface: Handle
Sets an Undoable to be used by the Undo/Redo infrastructure.

Specified by:
setUndoActivity in interface Handle
See Also:
Handle.setUndoActivity(org.jhotdraw.util.Undoable)

getCursor

public Cursor getCursor()
Description copied from interface: Handle
Returns the preferred Cursor for this Handle.

Specified by:
getCursor in interface Handle
Returns:
Cursor
See Also:
Handle.getCursor()

JHotDraw 6.0b1