CH.ifa.draw.standard
Class AbstractHandle
- java.lang.Object
-
- CH.ifa.draw.standard.AbstractHandle
-
- All Implemented Interfaces:
- Handle
- Direct Known Subclasses:
- ChangeConnectionHandle, ElbowHandle, LocatorHandle, PolygonHandle
public abstract class AbstractHandle extends java.lang.Object implements Handle
AbstractHandle provides defaulf implementation for the Handle interface.
-
-
Field Summary
Fields Modifier and Type Field and Description static intHANDLESIZEThe standard size of a handle.
-
Constructor Summary
Constructors Constructor and Description AbstractHandle(Figure owner)Initializes the owner of the figure.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete 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)voidinvokeStart(int x, int y, DrawingView view)voidinvokeStep(int dx, int dy, Drawing drawing)voidinvokeStep(int x, int y, int anchorX, int anchorY, DrawingView view)Tracks a step of the interaction.abstract java.awt.Pointlocate()Locates the handle on the figure.Figureowner()Gets the handle's owner.
-
-
-
Field Detail
-
HANDLESIZE
public static final int HANDLESIZE
The standard size of a handle.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractHandle
public AbstractHandle(Figure owner)
Initializes the owner of the figure.
-
-
Method Detail
-
locate
public abstract java.awt.Point locate()
Locates the handle on the figure. The handle is drawn centered around the returned point.
-
invokeStart
public void invokeStart(int x, int y, Drawing drawing)- Specified by:
invokeStartin interfaceHandle- Parameters:
x- the x position where the interaction startedy- the y position where the interaction started
-
invokeStart
public void invokeStart(int x, int y, DrawingView view)- Specified by:
invokeStartin interfaceHandle- Parameters:
x- the x position where the interaction startedy- the y position where the interaction startedview- the handles container
-
invokeStep
public void invokeStep(int dx, int dy, Drawing drawing)- Specified by:
invokeStepin interfaceHandle- Parameters:
dx- x delta of this stepdy- y delta of this step
-
invokeStep
public void invokeStep(int x, int y, int anchorX, int anchorY, DrawingView view)Tracks a step of the interaction.- Specified by:
invokeStepin interfaceHandle- 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
public void invokeEnd(int x, int y, int anchorX, int anchorY, DrawingView view)Tracks the end of the interaction.
-
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.
-
displayBox
public java.awt.Rectangle displayBox()
Gets the display box of the handle.- Specified by:
displayBoxin interfaceHandle
-
containsPoint
public boolean containsPoint(int x, int y)Tests if a point is contained in the handle.- Specified by:
containsPointin interfaceHandle
-
-
DataMelt 3.0 © DataMelt by jWork.ORG