Package diva.canvas.connector
Interface ConnectorEnd
-
public interface ConnectorEnd
An interface for objects that can be attached to the end of a connector. Implementations of this interface are used to draw arrow-heads, circles, diamonds, and various other kinds of decoration at the end of connectors.- Version:
- $Id$
- Author:
- John Reekie
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.awt.geom.Rectangle2D
getBounds()
Get the bounding box of the shape used to draw this connector end.void
getConnection(java.awt.geom.Point2D p)
Get the connection point of the end.void
getOrigin(java.awt.geom.Point2D p)
Get the origin of the line end.void
paint(java.awt.Graphics2D g)
Paint the connector end.void
setNormal(double angle)
Set the normal of the connector end.void
setOrigin(double x, double y)
Set the origin of the decoration.void
translate(double x, double y)
Translate the connector end by the given amount.
-
-
-
Method Detail
-
getBounds
java.awt.geom.Rectangle2D getBounds()
Get the bounding box of the shape used to draw this connector end.
-
getConnection
void getConnection(java.awt.geom.Point2D p)
Get the connection point of the end. The given point is modified with the location to which the connector should be drawn.
-
getOrigin
void getOrigin(java.awt.geom.Point2D p)
Get the origin of the line end. The given point is modified.
-
paint
void paint(java.awt.Graphics2D g)
Paint the connector end. This method assumes that the graphics context is already set up with the correct paint and stroke.
-
setNormal
void setNormal(double angle)
Set the normal of the connector end. The argument is the angle in radians away from the origin.
-
setOrigin
void setOrigin(double x, double y)
Set the origin of the decoration.
-
translate
void translate(double x, double y)
Translate the connector end by the given amount.
-
-