de.erichseifert.gral.plots.lines
Interface LineRenderer
-
- All Known Implementing Classes:
- AbstractLineRenderer2D, DefaultLineRenderer2D, DiscreteLineRenderer2D, SmoothLineRenderer2D
public interface LineRendererInterface that provides functions for rendering a line in two dimensional space.
Functionality includes:
- Punching data points out of the line's shape
- Administration of settings
-
-
Method Summary
All Methods Instance Methods Abstract 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.DrawablegetLine(java.util.List<DataPoint> points, java.awt.Shape shape)Returns a graphical representation for the line defined bypoints.java.awt.ShapegetLineShape(java.util.List<DataPoint> points)Returns the geometric shape for this line.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.
-
-
-
Method Detail
-
getLineShape
java.awt.Shape getLineShape(java.util.List<DataPoint> points)
Returns the geometric shape for this line.- Parameters:
points- Points used for creating the line.- Returns:
- Geometric shape for this line.
-
getLine
Drawable getLine(java.util.List<DataPoint> points, java.awt.Shape shape)
Returns a graphical representation for the line defined bypoints.- Parameters:
points- Points to be used for creating the line.shape- Geometric shape for this line.- Returns:
- Representation of the line.
-
getStroke
java.awt.Stroke getStroke()
Returns the stroke to be used to define the line shape.- Returns:
- Stroke used for drawing.
-
setStroke
void setStroke(java.awt.Stroke stroke)
Sets the stroke to be used to define the line shape.- Parameters:
stroke- Stroke used for drawing.
-
getGap
double getGap()
Returns 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.- Returns:
- Gap size between drawn line and connected points in pixels.
-
setGap
void setGap(double gap)
Sets 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.- Parameters:
gap- Gap size between drawn line and connected points in pixels.
-
isGapRounded
boolean isGapRounded()
Returns whether the gaps should have rounded corners.- Returns:
trueif the gap corners should be rounded.
-
setGapRounded
void setGapRounded(boolean gapRounded)
Sets whether the gaps should have rounded corners.- Parameters:
gapRounded-trueif the gap corners should be rounded.
-
getColor
java.awt.Paint getColor()
Returns the paint to be used to paint the line shape.- Returns:
- Paint for line drawing.
-
setColor
void setColor(java.awt.Paint color)
Sets the paint to be used to paint the line shape.- Parameters:
color- Paint for line drawing.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG