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

 o Adapter
Handles adapt the operations to manipulate a figure to a common interface.

See Also:
Figure

Variable Index

 o HANDLESIZE

Method Index

 o containsPoint(int, int)
Tests if a point is contained in the handle.
 o displayBox()
Gets the display box of the handle.
 o draw(Graphics)
Draws this handle.
 o invokeEnd(int, int, Drawing)
Deprecated.
 o invokeEnd(int, int, int, int, DrawingView)
Tracks the end of the interaction.
 o invokeStart(int, int, Drawing)
Deprecated.
 o invokeStart(int, int, DrawingView)
Deprecated.
 o invokeStep(int, int, Drawing)
Deprecated.
 o invokeStep(int, int, int, int, DrawingView)
Tracks a step of the interaction.
 o locate()
Locates the handle on the figure.
 o owner()
Gets the handle's owner.

Variables

 o HANDLESIZE
 public static final int HANDLESIZE

Methods

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

 o 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
 o 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
 o 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
 o 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
 o 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
 o 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.

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

 o displayBox
 public abstract Rectangle displayBox()
Gets the display box of the handle.

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

 o draw
 public abstract void draw(Graphics g)
Draws this handle.


All Packages  Class Hierarchy  This Package  Previous  Next  Index