de.erichseifert.gral.plots.lines
Class AbstractLineRenderer2D
- java.lang.Object
-
- de.erichseifert.gral.plots.lines.AbstractLineRenderer2D
-
- All Implemented Interfaces:
- LineRenderer, java.io.Serializable
- Direct Known Subclasses:
- DefaultLineRenderer2D, DiscreteLineRenderer2D, SmoothLineRenderer2D
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:
- Punching data points out of the line's shape
- Administration of settings
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description AbstractLineRenderer2D()Initializes a newAbstractLineRenderer2Dinstance with default settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.awt.PaintgetColor()Returns the paint to be used to paint the line shape.doublegetGap()Returns the value for the gap between the line and a point.java.awt.StrokegetStroke()Returns the stroke to be used to define the line shape.booleanisGapRounded()Returns whether the gaps should have rounded corners.voidsetColor(java.awt.Paint color)Sets the paint to be used to paint the line shape.voidsetGap(double gap)Sets the value for the gap between the line and a point.voidsetGapRounded(boolean gapRounded)Sets whether the gaps should have rounded corners.voidsetStroke(java.awt.Stroke stroke)Sets the stroke to be used to define the line shape.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.erichseifert.gral.plots.lines.LineRenderer
getLine, getLineShape
-
-
-
-
Constructor Detail
-
AbstractLineRenderer2D
public AbstractLineRenderer2D()
Initializes a newAbstractLineRenderer2Dinstance with default settings.
-
-
Method Detail
-
getStroke
public java.awt.Stroke getStroke()
Description copied from interface:LineRendererReturns the stroke to be used to define the line shape.- Specified by:
getStrokein interfaceLineRenderer- Returns:
- Stroke used for drawing.
-
setStroke
public void setStroke(java.awt.Stroke stroke)
Description copied from interface:LineRendererSets the stroke to be used to define the line shape.- Specified by:
setStrokein interfaceLineRenderer- Parameters:
stroke- Stroke used for drawing.
-
getGap
public double getGap()
Description copied from interface:LineRendererReturns the value for the gap between the line and a point. If the gap value is equal to or smaller than 0 no gap will be used.- Specified by:
getGapin interfaceLineRenderer- Returns:
- Gap size between drawn line and connected points in pixels.
-
setGap
public void setGap(double gap)
Description copied from interface:LineRendererSets the value for the gap between the line and a point. If the gap value is equal to or smaller than 0 no gap will be used.- Specified by:
setGapin interfaceLineRenderer- Parameters:
gap- Gap size between drawn line and connected points in pixels.
-
isGapRounded
public boolean isGapRounded()
Description copied from interface:LineRendererReturns whether the gaps should have rounded corners.- Specified by:
isGapRoundedin interfaceLineRenderer- Returns:
trueif the gap corners should be rounded.
-
setGapRounded
public void setGapRounded(boolean gapRounded)
Description copied from interface:LineRendererSets whether the gaps should have rounded corners.- Specified by:
setGapRoundedin interfaceLineRenderer- Parameters:
gapRounded-trueif the gap corners should be rounded.
-
getColor
public java.awt.Paint getColor()
Description copied from interface:LineRendererReturns the paint to be used to paint the line shape.- Specified by:
getColorin interfaceLineRenderer- Returns:
- Paint for line drawing.
-
setColor
public void setColor(java.awt.Paint color)
Description copied from interface:LineRendererSets the paint to be used to paint the line shape.- Specified by:
setColorin interfaceLineRenderer- Parameters:
color- Paint for line drawing.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG