CH.ifa.draw.framework
Interface Handle
-
- All Known Implementing Classes:
- AbstractHandle, ChangeConnectionEndHandle, ChangeConnectionHandle, ChangeConnectionStartHandle, ConnectionHandle, ElbowHandle, FontSizeHandle, LocatorHandle, NullHandle, PolygonHandle, PolyLineHandle, SpecialConnectionHandle
public interface HandleHandles 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
-
-
Field Summary
Fields Modifier and Type Field and Description static intHANDLESIZE
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method and Description booleancontainsPoint(int x, int y)Tests if a point is contained in the handle.java.awt.RectangledisplayBox()Gets the display box of the handle.voiddraw(java.awt.Graphics g)Draws this handle.voidinvokeEnd(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.voidinvokeEnd(int x, int y, int anchorX, int anchorY, DrawingView view)Tracks the end of the interaction.voidinvokeStart(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.voidinvokeStart(int x, int y, DrawingView view)Deprecated.As of version 4.1, use invokeStart(x, y, drawingView) Tracks the start of the interaction. The default implementation does nothing.voidinvokeStep(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.voidinvokeStep(int x, int y, int anchorX, int anchorY, DrawingView view)Tracks a step of the interaction.java.awt.Pointlocate()Locates the handle on the figure.Figureowner()Gets the handle's owner.
-
-
-
Field Detail
-
HANDLESIZE
static final int HANDLESIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
locate
java.awt.Point locate()
Locates the handle on the figure. The handle is drawn centered around the returned point.
-
invokeStart
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.- Parameters:
x- the x position where the interaction startedy- the y position where the interaction started
-
invokeStart
void invokeStart(int x, int y, DrawingView view)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 startedy- the y position where the interaction startedview- the handles container
-
invokeStep
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.- Parameters:
dx- x delta of this stepdy- y delta of this step
-
invokeStep
void invokeStep(int x, int y, int anchorX, int anchorY, DrawingView view)Tracks a step of the interaction.- Parameters:
x- the current x positiony- the current y positionanchorX- the x position where the interaction startedanchorY- the y position where the interaction started
-
invokeEnd
void invokeEnd(int x, int y, int anchorX, int anchorY, DrawingView view)Tracks the end of the interaction.- Parameters:
x- the current x positiony- the current y positionanchorX- the x position where the interaction startedanchorY- the y position where the interaction started
-
invokeEnd
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.
-
owner
Figure owner()
Gets the handle's owner.
-
displayBox
java.awt.Rectangle displayBox()
Gets the display box of the handle.
-
containsPoint
boolean containsPoint(int x, int y)Tests if a point is contained in the handle.
-
draw
void draw(java.awt.Graphics g)
Draws this handle.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG