- All Superinterfaces:
ChartElement
- All Known Subinterfaces:
CategoryAxis3D,ValueAxis3D
- All Known Implementing Classes:
AbstractAxis3D,AbstractValueAxis3D,LogAxis3D,NumberAxis3D,StandardCategoryAxis3D
An interface that must be supported by axes for 3D plots.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddChangeListener(Axis3DChangeListener listener) Registers a listener so that it receives notification of changes to the axis.voiddraw(Graphics2D g2, Point2D startPt, Point2D endPt, Point2D opposingPt, List<TickData> tickData, RenderingInfo info, boolean hinting) Draws the axis along an arbitrary line (betweenstartPtandendPt).Returns the color used to draw the axis label.Returns the font that is used to display the main axis label.getRange()Returns the axis range (the minimum and maximum values displayed on the axis).Returns the color used to draw the axis tick labels.Returns the font that is used to display the tick labels.booleanReturns the flag that determines whether or not the order of values on the axis is inverted.booleanReturns the flag that determines whether or not the axis is drawn on the chart.voidremoveChangeListener(Axis3DChangeListener listener) Deregisters a listener so that it no longer receives notification of changes to the axis.voidsetInverted(boolean inverted) Sets the flag that determines whether or not the order of values on the axis is inverted, and sends anAxis3DChangeEventto all registered listeners.voidsetLabelColor(Color color) Sets the color used to draw the axis label and sends anAxis3DChangeEventto all registered listeners.voidsetLabelFont(Font font) Sets the font for the axis label (the main label, not the tick labels) and sends anAxis3DChangeEventto all registered listeners.voidsetRange(double min, double max) Sets the axis range and sends anAxis3DChangeEventto all registered listeners.voidSets the axis range and sends anAxis3DChangeEventto all registered listeners.voidsetTickLabelColor(Color color) Sets the color used to draw the axis tick labels and sends anAxis3DChangeEventto all registered listeners.voidsetTickLabelFont(Font font) Sets the font for the tick labels and sends anAxis3DChangeEventto all registered listeners.voidsetVisible(boolean visible) Sets the flag that determines whether or not the axis is drawn on the chart and sends anAxis3DChangeEventto all registered listeners.doubletranslateToWorld(double value, double length) Translates a data value to a world coordinate.Methods inherited from interface org.jfree.chart3d.ChartElement
receive
-
Method Details
-
isVisible
boolean isVisible()Returns the flag that determines whether or not the axis is drawn on the chart.- Returns:
- A boolean.
- See Also:
-
setVisible
Sets the flag that determines whether or not the axis is drawn on the chart and sends anAxis3DChangeEventto all registered listeners.- Parameters:
visible- the flag.- See Also:
-
getLabelFont
Returns the font that is used to display the main axis label.- Returns:
- The font (never
null).
-
setLabelFont
Sets the font for the axis label (the main label, not the tick labels) and sends anAxis3DChangeEventto all registered listeners.- Parameters:
font- the font (nullnot permitted).
-
getLabelColor
Returns the color used to draw the axis label.- Returns:
- The color (never
null). - Since:
- 1.2
-
setLabelColor
Sets the color used to draw the axis label and sends anAxis3DChangeEventto all registered listeners.- Parameters:
color- the color (nullnot permitted).- Since:
- 1.2
-
getTickLabelFont
Returns the font that is used to display the tick labels.- Returns:
- The font (never
null).
-
setTickLabelFont
Sets the font for the tick labels and sends anAxis3DChangeEventto all registered listeners.- Parameters:
font- the font (nullnot permitted).
-
getTickLabelColor
Returns the color used to draw the axis tick labels.- Returns:
- The color (never
null). - Since:
- 1.2
-
setTickLabelColor
Sets the color used to draw the axis tick labels and sends anAxis3DChangeEventto all registered listeners.- Parameters:
color- the color (nullnot permitted).- Since:
- 1.2
-
getRange
Returns the axis range (the minimum and maximum values displayed on the axis). Note that even categorical axes will have a range, although since numerical values are not displayed the range is often set to(0.0, 1.0)for convenience.- Returns:
- The axis range (never
null).
-
setRange
Sets the axis range and sends anAxis3DChangeEventto all registered listeners.- Parameters:
range- the range (nullnot permitted).
-
setRange
Sets the axis range and sends anAxis3DChangeEventto all registered listeners.- Parameters:
min- the lower bound for the axis.max- the upper bound for the axis.
-
isInverted
boolean isInverted()Returns the flag that determines whether or not the order of values on the axis is inverted. The default value isfalse.- Returns:
- A boolean.
- Since:
- 1.5
-
setInverted
Sets the flag that determines whether or not the order of values on the axis is inverted, and sends anAxis3DChangeEventto all registered listeners.- Parameters:
inverted- the new flag value.- Since:
- 1.5
-
translateToWorld
Translates a data value to a world coordinate. Since we draw the charts in a box that has one corner at(0, 0, 0), we only need to know the length of the side of the box along which we are translating in order to do the calculation.- Parameters:
value- the data value.length- the box side length.- Returns:
- The translated value.
-
draw
void draw(Graphics2D g2, Point2D startPt, Point2D endPt, Point2D opposingPt, List<TickData> tickData, RenderingInfo info, boolean hinting) Draws the axis along an arbitrary line (betweenstartPtandendPt). The opposing point is used as a reference point to know on which side of the axis to draw the labels.- Parameters:
g2- the graphics target (nullnot permitted).startPt- the starting point (nullnot permitted).endPt- the end point (nullnot permitted)opposingPt- an opposing point (nullnot permitted).tickData- info about the ticks to draw (nullnot permitted).info- an object to be populated with rendering info (nullpermitted).hinting- a flag that controls whether or not element hinting should be performed.- Since:
- 1.3
-
addChangeListener
Registers a listener so that it receives notification of changes to the axis.- Parameters:
listener- the listener (nullnot permitted).
-
removeChangeListener
Deregisters a listener so that it no longer receives notification of changes to the axis.- Parameters:
listener- the listener (nullnot permitted).
-