public abstract class AbstractLineRenderer2D extends java.lang.Object implements LineRenderer, java.io.Serializable
Abstract class that renders a line in two-dimensional space.
Functionality includes:
Constructor and Description |
---|
AbstractLineRenderer2D()
Initializes a new
AbstractLineRenderer2D instance with
default settings. |
Modifier and Type | Method and Description |
---|---|
java.awt.Paint |
getColor()
Returns the paint to be used to paint the line shape.
|
double |
getGap()
Returns the value for the gap between the line and a point.
|
java.awt.Stroke |
getStroke()
Returns the stroke to be used to define the line shape.
|
boolean |
isGapRounded()
Returns whether the gaps should have rounded corners.
|
protected java.awt.Shape |
punch(java.awt.Shape line,
java.lang.Iterable<DataPoint> dataPoints)
Returns the shape of a line from which the shapes of the specified
points are subtracted.
|
void |
setColor(java.awt.Paint color)
Sets the paint to be used to paint the line shape.
|
void |
setGap(double gap)
Sets the value for the gap between the line and a point.
|
void |
setGapRounded(boolean gapRounded)
Sets whether the gaps should have rounded corners.
|
void |
setStroke(java.awt.Stroke stroke)
Sets the stroke to be used to define the line shape.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLine, getLineShape
public AbstractLineRenderer2D()
AbstractLineRenderer2D
instance with
default settings.protected java.awt.Shape punch(java.awt.Shape line, java.lang.Iterable<DataPoint> dataPoints)
line
- Shape of the line.dataPoints
- Data points on the line.public java.awt.Stroke getStroke()
LineRenderer
getStroke
in interface LineRenderer
public void setStroke(java.awt.Stroke stroke)
LineRenderer
setStroke
in interface LineRenderer
stroke
- Stroke used for drawing.public double getGap()
LineRenderer
getGap
in interface LineRenderer
public void setGap(double gap)
LineRenderer
setGap
in interface LineRenderer
gap
- Gap size between drawn line and connected points in pixels.public boolean isGapRounded()
LineRenderer
isGapRounded
in interface LineRenderer
true
if the gap corners should be rounded.public void setGapRounded(boolean gapRounded)
LineRenderer
setGapRounded
in interface LineRenderer
gapRounded
- true
if the gap corners should be rounded.public java.awt.Paint getColor()
LineRenderer
getColor
in interface LineRenderer
public void setColor(java.awt.Paint color)
LineRenderer
setColor
in interface LineRenderer
color
- Paint for line drawing.