public class Arrowhead extends Object implements ConnectorEnd
| Constructor and Description |
|---|
Arrowhead()
Create a new arrowhead at (0,0).
|
Arrowhead(double x,
double y,
double normal)
Create a new arrowhead at the given point and
with the given normal.
|
| Modifier and Type | Method and Description |
|---|---|
Rectangle2D |
getBounds()
Get the bounding box of the shape used to draw
this connector end.
|
void |
getConnection(Point2D p)
Get the connection point into the given point
|
boolean |
getFlipped()
Get the flag saying to flip the arrowhead.
|
double |
getLength()
Get the length.
|
void |
getOrigin(Point2D p)
Get the origin into the given point.
|
void |
paint(Graphics2D g)
Paint the arrow-head.
|
void |
reshape()
Recalculate the shape of the decoration.
|
void |
setFlipped(boolean flag)
Set the flag that says the arrowhead is "flipped." This means
that the arrowhead is drawn so that the apparent direction
of the arrowhead is the same as its normal.
|
void |
setLength(double l)
Set the length of the arrowhead.
|
void |
setNormal(double angle)
Set the normal of the decoration.
|
void |
setOrigin(double x,
double y)
Set the origin of the decoration.
|
void |
translate(double x,
double y)
Translate the origin by the given amount.
|
public Arrowhead()
public Arrowhead(double x,
double y,
double normal)
public Rectangle2D getBounds()
getBounds in interface ConnectorEndpublic void getConnection(Point2D p)
getConnection in interface ConnectorEndpublic boolean getFlipped()
public void getOrigin(Point2D p)
getOrigin in interface ConnectorEndpublic double getLength()
public void paint(Graphics2D g)
paint in interface ConnectorEndpublic void reshape()
public void setNormal(double angle)
setNormal in interface ConnectorEndpublic void setFlipped(boolean flag)
public void setOrigin(double x,
double y)
setOrigin in interface ConnectorEndpublic void setLength(double l)
public void translate(double x,
double y)
translate in interface ConnectorEndCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.