Class ArrowShape
java.lang.Object
org.pathvisio.libgpml.model.shape.ArrowShape
public class ArrowShape
extends java.lang.Object
ArrowShapes determine how the ending of a line can be drawn. These are arrows
in a broad sense - they could be T-bars for example.
ArrowShapes have a fill type. FillType can be OPEN, CLOSED or WIRE. The fillType determines whether the body of the arrow head is filled with the foreground color or with the canvas color.
For the outline, the shape returned by getShape() will be used. getFillShape() optionally defines a different shape for the body. If there is no separate fillShape defined, the same shape is used for the outline and for the body.
open closed wire |\ #\ \ ______| \ ______##\ _____\ | / ##/ / |/ #/ /
- Author:
- unknown, finterly
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ArrowShape.FillType
Enumerates possible ways to combine the outline and body. -
Field Summary
Fields Modifier and Type Field Description private ArrowShape.FillType
fillType
private int
gap
private java.awt.Shape
shape
-
Constructor Summary
Constructors Constructor Description ArrowShape(java.awt.Shape shape, ArrowShape.FillType fillType)
Normally, this constructor is not called directly.ArrowShape(java.awt.Shape shape, ArrowShape.FillType fillType, int gap)
Normally, this constructor is not called directly. -
Method Summary
Modifier and Type Method Description ArrowShape.FillType
getFillType()
double
getGap()
java.awt.Shape
getShape()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
shape
private java.awt.Shape shape -
fillType
-
gap
private int gap
-
-
Constructor Details
-
ArrowShape
Normally, this constructor is not called directly. UseShapeRegistry.registerShape(org.pathvisio.libgpml.model.shape.IShape)
instead to define a new ArrowShape. -
ArrowShape
Normally, this constructor is not called directly. UseShapeRegistry.registerShape(org.pathvisio.libgpml.model.shape.IShape)
instead to define a new ArrowShape.
-
-
Method Details
-
getFillType
- Returns:
- one of
ArrowShape.FillType.OPEN
,ArrowShape.FillType.CLOSED
orArrowShape.FillType.WIRE
-
getShape
public java.awt.Shape getShape()- Returns:
- the outline for this arrow type.
-
getGap
public double getGap()- Returns:
- the gap at the end of the line, for arrow shapes that should not overlap the thing the line is connected with.
-