public abstract class Arrow extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Arrow.FilledArrow
Arrow instance with a filled triangular head.
|
| Constructor and Description |
|---|
Arrow() |
| Modifier and Type | Method and Description |
|---|---|
static Arrow |
createFilledArrow(int lpar,
int lperp)
Returns an arrow instance with a filled head.
|
protected abstract void |
drawArrow(Graphics2D g2,
int x1)
Does the shape-specific work of drawing the arrow.
|
void |
drawArrow(Graphics2D g2,
int x1,
int y1,
int x2,
int y2)
Draws an arrow.
|
void |
setPad(int pad)
Sets padding.
|
public void drawArrow(Graphics2D g2, int x1, int y1, int x2, int y2)
g2 - graphics contextx1 - nominal X coordinate of start (tail) positiony1 - nominal Y coordinate of start (tail) positionx2 - nominal X coordinate of end (head) positiony2 - nominal Y coordinate of end (head) positionprotected abstract void drawArrow(Graphics2D g2, int x1)
g2 - graphics contextx1 - X coordinate of tail of arrow; x1 >= 0public void setPad(int pad)
pad - padding in pixelspublic static Arrow createFilledArrow(int lpar, int lperp)
lpar - head length parallel to the trajectorylperp - head half-width perpendicular to the trajectoryCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.