public interface AxisRenderer
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.Double,java.lang.String> |
getCustomTicks()
Returns custom ticks with their respective position and label.
|
java.lang.Number |
getIntersection()
Returns the intersection point of the axis.
|
java.lang.String |
getLabel()
Returns the label text of the axis.
|
java.awt.Paint |
getLabelColor()
Returns the paint used to draw the axis label.
|
double |
getLabelDistance()
Returns the distance from the axis to the label.
|
java.awt.Font |
getLabelFont()
Returns the font used to display the axis label text.
|
double |
getLabelRotation()
Returns the rotation of the axis label.
|
double |
getMinorTickAlignment()
Returns the alignment of minor ticks.
0.0 means outside the plotting area, 0.5 means centered on the axis,
1.0 means inside the plotting area.
|
java.awt.Paint |
getMinorTickColor()
Returns the paint used to draw the shapes of minor ticks.
|
double |
getMinorTickLength()
Returns the length of minor tick strokes.
|
int |
getMinorTicksCount()
Returns the count of minor ticks.
|
java.awt.Stroke |
getMinorTickStroke()
Returns the stroke used to draw all minor ticks.
|
PointND<java.lang.Double> |
getNormal(Axis axis,
java.lang.Number value,
boolean extrapolate,
boolean forceLinear)
Returns the normal vector at the position of the specified value.
|
PointND<java.lang.Double> |
getPosition(Axis axis,
java.lang.Number value,
boolean extrapolate,
boolean forceLinear)
Returns the position of the specified value on the axis.
|
Drawable |
getRendererComponent(Axis axis)
Returns a component that displays the specified axis.
|
java.awt.Shape |
getShape()
Returns the shape of the axis.
|
java.awt.Paint |
getShapeColor()
Returns the paint used to draw the axis, its ticks and its labels.
|
java.awt.Stroke |
getShapeStroke()
Returns the stroke which defines the shape of the axis.
|
double |
getTickAlignment()
Returns the alignment of major ticks relative to the axis.
0.0 means outside the plotting area, 0.5 means centered on the axis,
1.0 means inside the plotting area.
|
java.awt.Paint |
getTickColor()
Returns the paint used to draw the shapes of major ticks.
|
java.awt.Font |
getTickFont()
Returns the font used to display the text of major ticks.
|
double |
getTickLabelDistance()
Returns the distance of labels to their ticks.
|
java.text.Format |
getTickLabelFormat()
Returns the format which converts the tick values to labels.
|
double |
getTickLabelRotation()
Returns the rotation of the tick labels.
|
double |
getTickLength()
Returns the length of major tick strokes.
|
java.util.List<Tick> |
getTicks(Axis axis)
Returns a list of all tick element on the axis.
|
java.lang.Number |
getTickSpacing()
Returns the interval for major ticks.
|
java.awt.Stroke |
getTickStroke()
Returns the stroke which is used to draw all major ticks.
|
boolean |
isMinorTicksVisible()
Returns whether minor ticks are drawn.
|
boolean |
isShapeDirectionSwapped()
Returns whether the axis direction is changed.
|
boolean |
isShapeNormalOrientationClockwise()
Returns whether the normal vector of the shape is calculated using
clockwise or counterclockwise rotation.
|
boolean |
isShapeVisible()
Returns whether the shape of the axis will be drawn.
|
boolean |
isTickLabelsOutside()
Returns whether the tick labels are drawn outside of the plot.
|
boolean |
isTickLabelsVisible()
Returns whether tick labels will be shown.
|
boolean |
isTicksAutoSpaced()
Returns whether the interval for major and minor ticks is chosen automatically.
|
boolean |
isTicksVisible()
Returns whether major ticks are drawn.
|
void |
setCustomTicks(java.util.Map<java.lang.Double,java.lang.String> positionsAndLabels)
Sets custom ticks with their respective position and label.
|
void |
setIntersection(java.lang.Number intersection)
Sets the intersection point of the axis.
|
void |
setLabel(java.lang.String label)
Sets the label text of the axis.
|
void |
setLabelColor(java.awt.Paint color)
Sets the paint used to draw the axis label.
|
void |
setLabelDistance(double distance)
Sets the distance from the axis to the label.
|
void |
setLabelFont(java.awt.Font font)
Sets the font used to display the axis label text.
|
void |
setLabelRotation(double angle)
Sets the rotation of the axis label.
|
void |
setMinorTickAlignment(double alignment)
Sets the alignment of minor ticks.
0.0 means outside the plotting area, 0.5 means centered on the axis,
1.0 means inside the plotting area.
|
void |
setMinorTickColor(java.awt.Paint ticksMinorColor)
Sets the paint used to draw the shapes of minor ticks.
|
void |
setMinorTickLength(double length)
Sets the length of minor tick strokes.
|
void |
setMinorTicksCount(int count)
Sets the count of minor ticks.
|
void |
setMinorTickStroke(java.awt.Stroke stroke)
Sets the stroke used to draw all minor ticks.
|
void |
setMinorTicksVisible(boolean minorTicksVisible)
Sets whether minor ticks are drawn.
|
void |
setShape(java.awt.Shape shape)
Sets the shape of the axis.
|
void |
setShapeColor(java.awt.Paint color)
Sets the paint used to draw the axis, its ticks and its labels.
|
void |
setShapeDirectionSwapped(boolean directionSwapped)
Sets whether the axis direction will be changed.
|
void |
setShapeNormalOrientationClockwise(boolean clockwise)
Sets whether the normal vector of the shape is calculated using
clockwise or counterclockwise rotation.
|
void |
setShapeStroke(java.awt.Stroke stroke)
Sets the stroke which defines the shape of the axis.
|
void |
setShapeVisible(boolean shapeVisible)
Sets whether the shape of the axis will be drawn.
|
void |
setTickAlignment(double alignment)
Sets the alignment of major ticks relative to the axis.
0.0 means outside the plotting area, 0.5 means centered on the axis,
1.0 means inside the plotting area.
|
void |
setTickColor(java.awt.Paint color)
Sets the paint used to draw the shapes of major ticks.
|
void |
setTickFont(java.awt.Font font)
Sets the font used to display the text of major ticks.
|
void |
setTickLabelDistance(double distance)
Sets the distance of labels to their ticks.
|
void |
setTickLabelFormat(java.text.Format format)
Sets the format which converts the tick values to labels.
|
void |
setTickLabelRotation(double angle)
Sets the rotation of the tick labels.
|
void |
setTickLabelsOutside(boolean tickLabelsOutside)
Sets whether the tick labels are drawn outside of the plot.
|
void |
setTickLabelsVisible(boolean tickLabelsVisible)
Sets whether tick labels will be shown.
|
void |
setTickLength(double length)
Sets the length of major tick strokes.
|
void |
setTicksAutoSpaced(boolean autoSpaced)
Sets whether the interval for major and minor ticks is chosen automatically.
|
void |
setTickSpacing(java.lang.Number spacing)
Sets the interval for major ticks.
|
void |
setTickStroke(java.awt.Stroke stroke)
Sets the stroke which is used to draw all major ticks.
|
void |
setTicksVisible(boolean ticksVisible)
Sets whether major ticks will be drawn.
|
java.lang.Number |
viewToWorld(Axis axis,
double value,
boolean extrapolate)
Converts a view (screen) coordinate value to a world (axis) coordinate
value.
|
double |
worldToView(Axis axis,
java.lang.Number value,
boolean extrapolate)
Converts a world (axis) coordinate value to a view (screen) coordinate
value.
|
Drawable getRendererComponent(Axis axis)
axis
- axis to be displayedAxis
double worldToView(Axis axis, java.lang.Number value, boolean extrapolate)
axis
- Axisvalue
- World coordinate value to convertextrapolate
- Option to activate extrapolation value that are not
on the axisjava.lang.Number viewToWorld(Axis axis, double value, boolean extrapolate)
axis
- Axisvalue
- View coordinate value to convertextrapolate
- Option to activate extrapolation value that are not
on the axisjava.util.List<Tick> getTicks(Axis axis)
axis
- AxisTick
instancesPointND<java.lang.Double> getPosition(Axis axis, java.lang.Number value, boolean extrapolate, boolean forceLinear)
axis
- Axisvalue
- World coordinate value to convertextrapolate
- Option to activate extrapolation value that are not
on the axisforceLinear
- Force linear interpolation.PointND<java.lang.Double> getNormal(Axis axis, java.lang.Number value, boolean extrapolate, boolean forceLinear)
axis
- Axisvalue
- World coordinate value to convertextrapolate
- Option to activate extrapolation value that are not
on the axisforceLinear
- Force linear interpolation.java.lang.Number getIntersection()
void setIntersection(java.lang.Number intersection)
intersection
- Point at which this axis intersects other axes.java.awt.Shape getShape()
void setShape(java.awt.Shape shape)
shape
- Shape used for drawing.boolean isShapeVisible()
true
if the shape should be drawn, false otherwise.void setShapeVisible(boolean shapeVisible)
shapeVisible
- true
if the shape should be drawn, false otherwise.boolean isShapeNormalOrientationClockwise()
true
if the orientation is clockwise, false
if it is
counterclockwise.void setShapeNormalOrientationClockwise(boolean clockwise)
clockwise
- true
if the orientation is clockwise,
false
if it is counterclockwise.java.awt.Paint getShapeColor()
void setShapeColor(java.awt.Paint color)
color
- Paint used for drawing.java.awt.Stroke getShapeStroke()
void setShapeStroke(java.awt.Stroke stroke)
stroke
- Stroke used for drawing the shape.boolean isShapeDirectionSwapped()
true
if the shape of the axis is inverted,
false
otherwise.void setShapeDirectionSwapped(boolean directionSwapped)
directionSwapped
- true
if the shape of the axis
should be inverted, false
otherwise.boolean isTicksVisible()
true
if major ticks are drawn, false
otherwise.void setTicksVisible(boolean ticksVisible)
ticksVisible
- true
if major ticks should be drawn,
false
otherwise.java.lang.Number getTickSpacing()
void setTickSpacing(java.lang.Number spacing)
spacing
- Distance on axis in which major ticks are drawn.boolean isTicksAutoSpaced()
true
if auto-spacing is enabled, false
otherwise.void setTicksAutoSpaced(boolean autoSpaced)
autoSpaced
- true
if auto-spacing is enabled, false
otherwise.double getTickLength()
void setTickLength(double length)
length
- Tick length relative to the font height.java.awt.Stroke getTickStroke()
void setTickStroke(java.awt.Stroke stroke)
stroke
- Stroke used for major tick drawing.double getTickAlignment()
void setTickAlignment(double alignment)
alignment
- Major tick alignment relative to the axis.java.awt.Font getTickFont()
void setTickFont(java.awt.Font font)
font
- Font used for tick labels.java.awt.Paint getTickColor()
void setTickColor(java.awt.Paint color)
color
- Paint used for major tick drawing.boolean isTickLabelsVisible()
true
if tick labels will be drawn, false
otherwise.void setTickLabelsVisible(boolean tickLabelsVisible)
tickLabelsVisible
- true
if tick labels will be drawn, false
otherwise.java.text.Format getTickLabelFormat()
void setTickLabelFormat(java.text.Format format)
format
- Format used for tick labels.double getTickLabelDistance()
void setTickLabelDistance(double distance)
distance
- Label distance relative to the font height.boolean isTickLabelsOutside()
true
if the labels are drawn outside of the plot, false
otherwise.void setTickLabelsOutside(boolean tickLabelsOutside)
tickLabelsOutside
- true
if the labels are drawn outside of the plot,
false
otherwise.double getTickLabelRotation()
void setTickLabelRotation(double angle)
angle
- Tick label rotation in degrees.boolean isMinorTicksVisible()
true
if minor ticks are drawn, false
otherwise.void setMinorTicksVisible(boolean minorTicksVisible)
minorTicksVisible
- true
if minor ticks are drawn, false
otherwise.int getMinorTicksCount()
void setMinorTicksCount(int count)
count
- Number of minor ticks between two major ticks.double getMinorTickLength()
void setMinorTickLength(double length)
length
- Tick length relative to font height.java.awt.Stroke getMinorTickStroke()
void setMinorTickStroke(java.awt.Stroke stroke)
stroke
- Stroke used for minor tick drawing.double getMinorTickAlignment()
void setMinorTickAlignment(double alignment)
alignment
- Minor tick alignment relative to the axis.java.awt.Paint getMinorTickColor()
void setMinorTickColor(java.awt.Paint ticksMinorColor)
ticksMinorColor
- Paint used for minor tick drawing.java.util.Map<java.lang.Double,java.lang.String> getCustomTicks()
void setCustomTicks(java.util.Map<java.lang.Double,java.lang.String> positionsAndLabels)
positionsAndLabels
- A map of custom tick positions and labels.java.lang.String getLabel()
void setLabel(java.lang.String label)
label
- Axis label.double getLabelDistance()
void setLabelDistance(double distance)
distance
- Distance relative to font height.double getLabelRotation()
void setLabelRotation(double angle)
angle
- Axis label rotation in degrees.java.awt.Font getLabelFont()
void setLabelFont(java.awt.Font font)
font
- Font for axis label text.java.awt.Paint getLabelColor()
void setLabelColor(java.awt.Paint color)
color
- Paint for axis label drawing.