|
JHotDraw 7.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Handle
Handles are used to change a figure by direct manipulation. Handles know their owning figure and they provide methods to locate the handle on the figure and to track changes.
Handles are used for user interaction. Unlike figures, a handle works with the user interface coordinates of the DrawingView. The user interface coordinates are expressed in integer pixels.
A Handle forwards UndoableEdit events to the Drawing object onto which it is performing changes.
Method Summary | |
---|---|
void |
addHandleListener(HandleListener l)
Adds a listener for this handle. |
boolean |
contains(java.awt.Point p)
Tests if a point is contained in the handle. |
java.util.Collection<Handle> |
createSecondaryHandles()
Creates secondary handles. |
void |
dispose()
Disposes the resources aquired by the handler. |
void |
draw(java.awt.Graphics2D g)
Draws this handle. |
java.awt.Rectangle |
getBounds()
Returns the bounding box of the handle. |
java.awt.Cursor |
getCursor()
Returns a cursor for the handle. |
java.awt.Rectangle |
getDrawingArea()
Returns the drawing area of the handle. |
Figure |
getOwner()
Returns the owner of this handle. |
java.lang.String |
getToolTipText(java.awt.Point p)
Returns a tooltip for the specified location. |
void |
invalidate()
Invalidates the handle. |
boolean |
isCombinableWith(Handle handle)
Returns true, if this handle is combinable with the specified handle. |
void |
removeHandleListener(HandleListener l)
Removes a listener for this handle. |
void |
setView(DrawingView view)
Sets the view of the handle. |
void |
trackDoubleClick(java.awt.Point p,
int modifiersEx)
Tracks a double click. |
void |
trackEnd(java.awt.Point anchor,
java.awt.Point lead,
int modifiersEx)
Tracks the end of the interaction. |
void |
trackStart(java.awt.Point anchor,
int modifiersEx)
Tracks the start of the interaction. |
void |
trackStep(java.awt.Point anchor,
java.awt.Point lead,
int modifiersEx)
Tracks a step of the interaction. |
void |
viewTransformChanged()
This method is invoked by the drawing view, when its transform has changed. |
Methods inherited from interface java.awt.event.KeyListener |
---|
keyPressed, keyReleased, keyTyped |
Method Detail |
---|
Figure getOwner()
void setView(DrawingView view)
void addHandleListener(HandleListener l)
void removeHandleListener(HandleListener l)
java.awt.Rectangle getBounds()
java.awt.Rectangle getDrawingArea()
boolean contains(java.awt.Point p)
void draw(java.awt.Graphics2D g)
void invalidate()
void dispose()
java.awt.Cursor getCursor()
boolean isCombinableWith(Handle handle)
void trackStart(java.awt.Point anchor, int modifiersEx)
anchor
- the position where the interaction startedvoid trackStep(java.awt.Point anchor, java.awt.Point lead, int modifiersEx)
anchor
- the position where the interaction startedlead
- the current positionvoid trackEnd(java.awt.Point anchor, java.awt.Point lead, int modifiersEx)
anchor
- the position where the interaction startedlead
- the current positionvoid trackDoubleClick(java.awt.Point p, int modifiersEx)
void viewTransformChanged()
java.util.Collection<Handle> createSecondaryHandles()
java.lang.String getToolTipText(java.awt.Point p)
|
Copyright 1996-2007 (c) JHotDraw.org. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |