de.erichseifert.gral.plots.points
Interface PointRenderer
-
- All Known Implementing Classes:
- AbstractPointRenderer, BarPlot.BarRenderer, BoxPlot.BoxWhiskerRenderer, DefaultPointRenderer2D, LabelPointRenderer, PiePlot.PieSliceRenderer, SizeablePointRenderer
public interface PointRendererAn interface providing functions for rendering points in a plot. It defines methods for:
- Retrieving the point of a certain row in a DataTable
- Getting and setting the points color
- Getting and setting the bounds of the points
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description ColorMappergetColor()Returns a mapping that is used to fill the point shapes.ColorMappergetErrorColor()Returns the mapping that is used to fill the error indicators.intgetErrorColumnBottom()Returns the index of the column that contains the lower error value.intgetErrorColumnTop()Returns the index of the column that contains the upper error value.java.awt.ShapegetErrorShape()Returns the shape which is used to draw the error indicators.java.awt.StrokegetErrorStroke()Returns the stroke which is used to draw the error indicators.DrawablegetPoint(PointData data, java.awt.Shape shape)Returns the graphical representation to be drawn for the specified data value.java.awt.ShapegetPointShape(PointData data)Returns aShapeinstance that can be used for further calculations.java.awt.ShapegetShape()Returns the shape which is used to draw the point.DrawablegetValue(PointData data, java.awt.Shape shape)Returns a graphical representation of the value label to be drawn for the specified data value.doublegetValueAlignmentX()Returns the relative horizontal position of the value.doublegetValueAlignmentY()Returns the relative vertical position of the value.ColorMappergetValueColor()Returns the mapping that is used to fill the value.intgetValueColumn()Returns the index of the column that contains the displayed values.doublegetValueDistance()Returns the current distance of values to the point.java.awt.FontgetValueFont()Returns the font that is used to render the value.java.text.FormatgetValueFormat()Returns the format that is used to render the displayed data values.LocationgetValueLocation()Returns the current positioning of the data value relative to the data point.doublegetValueRotation()Returns the current rotation angle of the value.booleanisErrorVisible()Returns whether the error value is displayed.booleanisValueVisible()Returns whether the data value of a point is displayed or not.voidsetColor(ColorMapper color)Sets the mapping that will be used to fill the point shapes.voidsetColor(java.awt.Paint color)Sets the paint that will be used to fill the point shapes.voidsetErrorColor(ColorMapper color)Sets the mapping that will be used to fill the error indicators.voidsetErrorColor(java.awt.Paint color)Sets the paint that will be used to fill the error indicators.voidsetErrorColumnBottom(int columnIndex)Sets the index of the column that contains the lower error value.voidsetErrorColumnTop(int columnIndex)Sets the index of the column that contains the upper error value.voidsetErrorShape(java.awt.Shape shape)Sets the shape which will be used to draw the error indicators.voidsetErrorStroke(java.awt.Stroke stroke)Sets the stroke which will be used to draw the error indicators.voidsetErrorVisible(boolean errorVisible)Sets whether the error value will be displayed.voidsetShape(java.awt.Shape shape)Sets the shape which will be used to draw the point.voidsetValueAlignmentX(double alignmentX)Sets the relative horizontal position of the value.voidsetValueAlignmentY(double alignmentX)Sets the relative vertical position of the value.voidsetValueColor(ColorMapper color)Sets the mapping that will be used to fill the value.voidsetValueColor(java.awt.Paint color)Sets the paint that will be used to fill the value.voidsetValueColumn(int columnIndex)Sets the index of the column that contains the displayed values.voidsetValueDistance(double distance)Sets the distance of values to the point.voidsetValueFont(java.awt.Font font)Sets the font that will be used to render the value.voidsetValueFormat(java.text.Format format)Sets the format that will be used to render the displayed data values.voidsetValueLocation(Location location)Sets the positioning of the data value relative to the data point.voidsetValueRotation(double angle)Sets the rotation angle of the value.voidsetValueVisible(boolean valueVisible)Returns whether the data value of a point will be displayed or not.
-
-
-
Method Detail
-
getShape
java.awt.Shape getShape()
Returns the shape which is used to draw the point.- Returns:
Shapeinstance for the point.
-
setShape
void setShape(java.awt.Shape shape)
Sets the shape which will be used to draw the point.- Parameters:
shape-Shapeinstance for the point.
-
getColor
ColorMapper getColor()
Returns a mapping that is used to fill the point shapes.- Returns:
ColorMapperthat is used to fill the point shapes.
-
setColor
void setColor(ColorMapper color)
Sets the mapping that will be used to fill the point shapes.- Parameters:
color-ColorMapperinstance to fill the point shapes.
-
setColor
void setColor(java.awt.Paint color)
Sets the paint that will be used to fill the point shapes.- Parameters:
color-Paintinstance to fill the point shapes.
-
isValueVisible
boolean isValueVisible()
Returns whether the data value of a point is displayed or not.- Returns:
truewhen the value is displayed, otherwisefalse.
-
setValueVisible
void setValueVisible(boolean valueVisible)
Returns whether the data value of a point will be displayed or not.- Parameters:
valueVisible-trueif the value should be displayed, otherwisefalse.
-
getValueColumn
int getValueColumn()
Returns the index of the column that contains the displayed values.- Returns:
- Index of the column that contains the displayed values.
-
setValueColumn
void setValueColumn(int columnIndex)
Sets the index of the column that contains the displayed values.- Parameters:
columnIndex- Index of the column that contains the displayed values.
-
getValueFormat
java.text.Format getValueFormat()
Returns the format that is used to render the displayed data values.- Returns:
Formatinstance that is used to render the displayed data values.
-
setValueFormat
void setValueFormat(java.text.Format format)
Sets the format that will be used to render the displayed data values.- Parameters:
format-Formatinstance that will be used to render the displayed data values.
-
getValueLocation
Location getValueLocation()
Returns the current positioning of the data value relative to the data point.- Returns:
- Current positioning of the data value relative to the data point.
-
setValueLocation
void setValueLocation(Location location)
Sets the positioning of the data value relative to the data point.- Parameters:
location- Positioning of the data value relative to the data point.
-
getValueAlignmentX
double getValueAlignmentX()
Returns the relative horizontal position of the value. The position will be between 0 and 1.- Returns:
- Relative horizontal position of the value.
-
setValueAlignmentX
void setValueAlignmentX(double alignmentX)
Sets the relative horizontal position of the value. The position can be specified between 0 and 1.- Parameters:
alignmentX- Relative horizontal position of the value.
-
getValueAlignmentY
double getValueAlignmentY()
Returns the relative vertical position of the value. The position will be between 0 and 1.- Returns:
- Relative vertical position of the value.
-
setValueAlignmentY
void setValueAlignmentY(double alignmentX)
Sets the relative vertical position of the value. The position can be specified between 0 and 1.- Parameters:
alignmentX- Relative vertical position of the value.
-
getValueRotation
double getValueRotation()
Returns the current rotation angle of the value.- Returns:
- Rotation angle in degrees.
-
setValueRotation
void setValueRotation(double angle)
Sets the rotation angle of the value.- Parameters:
angle- Rotation angle in degrees.
-
getValueDistance
double getValueDistance()
Returns the current distance of values to the point. The distance is specified relative to the font height.- Returns:
- Distance relative to the font height.
-
setValueDistance
void setValueDistance(double distance)
Sets the distance of values to the point. The distance is specified relative to the font height.- Parameters:
distance- Distance relative to the font height.
-
getValueColor
ColorMapper getValueColor()
Returns the mapping that is used to fill the value.- Returns:
ColorMapperinstance that is used to fill the value.
-
setValueColor
void setValueColor(ColorMapper color)
Sets the mapping that will be used to fill the value.- Parameters:
color-ColorMapperinstance that will be used to fill the value.
-
setValueColor
void setValueColor(java.awt.Paint color)
Sets the paint that will be used to fill the value.- Parameters:
color-Paintinstance that will be used to fill the value.
-
getValueFont
java.awt.Font getValueFont()
Returns the font that is used to render the value.- Returns:
- Font that is used to render the value.
-
setValueFont
void setValueFont(java.awt.Font font)
Sets the font that will be used to render the value.- Parameters:
font- Font that will be used to render the value.
-
isErrorVisible
boolean isErrorVisible()
Returns whether the error value is displayed.- Returns:
trueif the error value is displayed, otherwisefalse.
-
setErrorVisible
void setErrorVisible(boolean errorVisible)
Sets whether the error value will be displayed.- Parameters:
errorVisible-trueif the error value should be displayed, otherwisefalse.
-
getErrorColumnTop
int getErrorColumnTop()
Returns the index of the column that contains the upper error value.- Returns:
- Index of the column that contains the upper error value.
-
setErrorColumnTop
void setErrorColumnTop(int columnIndex)
Sets the index of the column that contains the upper error value.- Parameters:
columnIndex- Index of the column that contains the upper error value.
-
getErrorColumnBottom
int getErrorColumnBottom()
Returns the index of the column that contains the lower error value.- Returns:
- Index of the column that contains the lower error value.
-
setErrorColumnBottom
void setErrorColumnBottom(int columnIndex)
Sets the index of the column that contains the lower error value.- Parameters:
columnIndex- Index of the column that contains the lower error value.
-
getErrorColor
ColorMapper getErrorColor()
Returns the mapping that is used to fill the error indicators.- Returns:
ColorMapperinstance that is used to fill the error indicators.
-
setErrorColor
void setErrorColor(ColorMapper color)
Sets the mapping that will be used to fill the error indicators.- Parameters:
color-ColorMapperinstance that will be used to fill the error indicators.
-
setErrorColor
void setErrorColor(java.awt.Paint color)
Sets the paint that will be used to fill the error indicators.- Parameters:
color-Paintinstance that will be used to fill the error indicators.
-
getErrorShape
java.awt.Shape getErrorShape()
Returns the shape which is used to draw the error indicators.- Returns:
Shapeinstance of the error indicators.
-
setErrorShape
void setErrorShape(java.awt.Shape shape)
Sets the shape which will be used to draw the error indicators.- Parameters:
shape-Shapeinstance for the error indicators.
-
getErrorStroke
java.awt.Stroke getErrorStroke()
Returns the stroke which is used to draw the error indicators.- Returns:
- Current stroke of the error indicators.
-
setErrorStroke
void setErrorStroke(java.awt.Stroke stroke)
Sets the stroke which will be used to draw the error indicators.- Parameters:
stroke- Stroke of the error indicators.
-
getPointShape
java.awt.Shape getPointShape(PointData data)
Returns aShapeinstance that can be used for further calculations.- Parameters:
data- Information on axes, renderers, and values.- Returns:
- Outline that describes the point's shape.
-
getPoint
Drawable getPoint(PointData data, java.awt.Shape shape)
Returns the graphical representation to be drawn for the specified data value.- Parameters:
data- Information on axes, renderers, and values.shape- Outline that describes the point's shape.- Returns:
- Component that can be used to draw the point.
-
getValue
Drawable getValue(PointData data, java.awt.Shape shape)
Returns a graphical representation of the value label to be drawn for the specified data value.- Parameters:
data- Information on axes, renderers, and values.shape- Outline that describes the bounds for the value label.- Returns:
- Component that can be used to draw the value label.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG