All Packages Class Hierarchy This Package Previous Next Index
Interface CH.ifa.draw.framework.Handle
- public interface 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.
Design Patterns
Adapter
Handles adapt the operations to manipulate a figure to a common interface.
- See Also:
- Figure
-
HANDLESIZE
-
-
containsPoint(int, int)
- Tests if a point is contained in the handle.
-
displayBox()
- Gets the display box of the handle.
-
draw(Graphics)
- Draws this handle.
-
invokeEnd(int, int, Drawing)
-
Deprecated.
-
invokeEnd(int, int, int, int, DrawingView)
- Tracks the end of the interaction.
-
invokeStart(int, int, Drawing)
-
Deprecated.
-
invokeStart(int, int, DrawingView)
-
Deprecated.
-
invokeStep(int, int, Drawing)
-
Deprecated.
-
invokeStep(int, int, int, int, DrawingView)
- Tracks a step of the interaction.
-
locate()
- Locates the handle on the figure.
-
owner()
- Gets the handle's owner.
HANDLESIZE
public static final int HANDLESIZE
locate
public abstract Point locate()
- Locates the handle on the figure. The handle is drawn
centered around the returned point.
invokeStart
public abstract void invokeStart(int x,
int y,
Drawing drawing)
- Note: invokeStart() is deprecated.
As of version 4.1,
use invokeStart(x, y, drawingView)
Tracks the start of the interaction. The default implementation
does nothing.
- Parameters:
- x - the x position where the interaction started
- y - the y position where the interaction started
invokeStart
public abstract void invokeStart(int x,
int y,
DrawingView view)
- Note: invokeStart() is deprecated.
As of version 4.1,
use invokeStart(x, y, drawingView)
Tracks the start of the interaction. The default implementation
does nothing.
- Parameters:
- x - the x position where the interaction started
- y - the y position where the interaction started
- view - the handles container
invokeStep
public abstract void invokeStep(int dx,
int dy,
Drawing drawing)
- Note: invokeStep() is deprecated.
As of version 4.1,
use invokeStep(x, y, anchorX, anchorY, drawingView)
Tracks a step of the interaction.
- Parameters:
- dx - x delta of this step
- dy - y delta of this step
invokeStep
public abstract void invokeStep(int x,
int y,
int anchorX,
int anchorY,
DrawingView view)
- Tracks a step of the interaction.
- 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
invokeEnd
public abstract void invokeEnd(int x,
int y,
int anchorX,
int anchorY,
DrawingView view)
- Tracks the end of the interaction.
- 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
invokeEnd
public abstract void invokeEnd(int dx,
int dy,
Drawing drawing)
- Note: invokeEnd() is deprecated.
As of version 4.1,
use invokeEnd(x, y, anchorX, anchorY, drawingView).
Tracks the end of the interaction.
owner
public abstract Figure owner()
- Gets the handle's owner.
displayBox
public abstract Rectangle displayBox()
- Gets the display box of the handle.
containsPoint
public abstract boolean containsPoint(int x,
int y)
- Tests if a point is contained in the handle.
draw
public abstract void draw(Graphics g)
- Draws this handle.
All Packages Class Hierarchy This Package Previous Next Index