java.lang.Object
org.jfree.chart3d.axis.AbstractAxis3D
org.jfree.chart3d.axis.AbstractValueAxis3D
- All Implemented Interfaces:
Serializable,EventListener,Axis3D,ValueAxis3D,ChartElement,MarkerChangeListener
- Direct Known Subclasses:
LogAxis3D,NumberAxis3D
public abstract class AbstractValueAxis3D
extends AbstractAxis3D
implements ValueAxis3D, Serializable
A base class for implementing numerical axes.
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
- See Also:
-
Field Summary
FieldsFields inherited from class org.jfree.chart3d.axis.AbstractAxis3D
DEFAULT_LABEL_COLOR, DEFAULT_LABEL_FONT, DEFAULT_LABEL_OFFSET, DEFAULT_LINE_COLOR, DEFAULT_LINE_STROKE, DEFAULT_TICK_LABEL_COLOR, DEFAULT_TICK_LABEL_FONT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract RangeadjustedDataRange(Range range) Adjusts the range by adding the lower and upper margins and taking into account any other settings.protected StringaxisStr()Returns a string representing the configured type of the axis.voidConfigures the axis to be used as the value axis for the specified plot.voidconfigureAsXAxis(XYZPlot plot) Configures the axis to be used as the x-axis for the specified plot.voidconfigureAsYAxis(XYZPlot plot) Configures the axis to be used as the y-axis for the specified plot.voidconfigureAsZAxis(XYZPlot plot) Configures the axis to be used as the z-axis for the specified plot.booleanTests this instance for equality with an arbitrary object.Generates and returns a list of marker data items for the axis.Returns the configured type for the axis.Returns the default range used when theautoAdjustRangeflag istruebut the dataset contains no values.doubleReturns the size of the lower margin that is added by the auto-range calculation, as a percentage of the data range.Returns the marker with the specified key, if there is one.Returns a new map containing the markers assigned to this axis.doubleReturns the minimum length for the axis range when auto-calculated.getRange()Returns the axis range.doubleReturns the tick label factor, a multiplier for the label height to determine the maximum number of tick labels that can be displayed.doubleReturns the tick label offset, the gap between the tick marks and the tick labels (in Java2D units).Returns the orientation for the tick labels.doubleReturns the length of the tick marks (in Java2D units).Returns the paint used to draw the tick marks.Returns the stroke used to draw the tick marks.doubleReturns the size of the upper margin that is added by the auto-range calculation, as a percentage of the data range.booleanReturns the flag that controls whether or not the axis range is automatically updated in response to dataset changes.booleanReturns the flag that determines whether or not the order of values on the axis is inverted.voidreceive(ChartElementVisitor visitor) Receives aChartElementVisitor.voidsetAutoAdjustRange(boolean autoAdjust) Sets the flag that controls whether or not the axis range is automatically updated in response to dataset changes, and sends anAxis3DChangeEventto all registered listeners.voidsetDefaultAutoRange(Range range) Sets the default range used when theautoAdjustRangeflag istruebut the dataset contains no values, and sends anAxis3DChangeEventto all registered listeners.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.voidsetLowerMargin(double margin) Sets the size of the lower margin that will be added by the auto-range calculation and sends anAxis3DChangeEventto all registered listeners.voidsetMarker(String key, ValueMarker marker) Sets the marker for the specified key and sends a change event to all registered listeners.voidsetMinAutoRangeLength(double length) Sets the minimum length for the axis range when it is auto-calculated and sends a change event to all registered listeners.voidsetRange(double min, double max) Sets the axis range and sends anAxis3DChangeEventto all registered listeners.voidSets the axis range (bounds) and sends anAxis3DChangeEventto all registered listeners.voidsetTickLabelFactor(double factor) Sets the tick label factor and sends anAxis3DChangeEventto all registered listeners.voidsetTickLabelOffset(double offset) Sets the tick label offset and sends anAxis3DChangeEventto all registered listeners.voidsetTickLabelOrientation(LabelOrientation orientation) Sets the orientation for the tick labels and sends a change event to all registered listeners.voidsetTickMarkLength(double length) Sets the length of the tick marks and sends anAxis3DChangeEventto all registered listeners.voidsetTickMarkPaint(Paint paint) Sets the paint used to draw the tick marks and sends anAxis3DChangeEventto all registered listeners.voidsetTickMarkStroke(Stroke stroke) Sets the stroke used to draw the tick marks and sends anAxis3DChangeEventto all registered listeners.voidsetUpperMargin(double margin) Sets the size of the upper margin that will be added by the auto-range calculation and sends anAxis3DChangeEventto all registered listeners.protected voidupdateRange(Range range) Updates the axis range (used by the auto-range calculation) without notifying listeners.Methods inherited from class org.jfree.chart3d.axis.AbstractAxis3D
addChangeListener, draw, drawAxisLabel, fireChangeEvent, getLabel, getLabelColor, getLabelFont, getLabelOffset, getLineColor, getLineStroke, getTickLabelColor, getTickLabelFont, getTickLabelsVisible, hashCode, isVisible, markerChanged, notifyListeners, removeChangeListener, setLabel, setLabelColor, setLabelFont, setLabelOffset, setLineColor, setLineStroke, setTickLabelColor, setTickLabelFont, setTickLabelsVisible, setVisibleMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.chart3d.axis.Axis3D
addChangeListener, draw, getLabelColor, getLabelFont, getTickLabelColor, getTickLabelFont, isVisible, removeChangeListener, setLabelColor, setLabelFont, setTickLabelColor, setTickLabelFont, setVisible, translateToWorldMethods inherited from interface org.jfree.chart3d.axis.ValueAxis3D
generateTickData, selectTick
-
Field Details
-
range
The axis range.
-
-
Constructor Details
-
AbstractValueAxis3D
Creates a new axis instance.- Parameters:
label- the axis label (nullpermitted).range- the axis range (nullnot permitted).
-
-
Method Details
-
getConfiguredType
Returns the configured type for the axis.- Specified by:
getConfiguredTypein interfaceValueAxis3D- Returns:
- The configured type (
nullif the axis has not yet been assigned to a plot). - Since:
- 1.3
-
axisStr
Returns a string representing the configured type of the axis.- Specified by:
axisStrin classAbstractAxis3D- Returns:
- A string.
-
getRange
Returns the axis range. You can set the axis range manually or you can rely on the autoAdjustRange feature to set the axis range to match the data being plotted. -
setRange
Sets the axis range (bounds) and sends anAxis3DChangeEventto all registered listeners. -
updateRange
Updates the axis range (used by the auto-range calculation) without notifying listeners.- Parameters:
range- the new range.
-
setRange
Sets the axis range and sends anAxis3DChangeEventto all registered listeners. -
isAutoAdjustRange
Returns the flag that controls whether or not the axis range is automatically updated in response to dataset changes. The default value istrue.- Returns:
- A boolean.
-
setAutoAdjustRange
Sets the flag that controls whether or not the axis range is automatically updated in response to dataset changes, and sends anAxis3DChangeEventto all registered listeners.- Parameters:
autoAdjust- the new flag value.
-
getLowerMargin
Returns the size of the lower margin that is added by the auto-range calculation, as a percentage of the data range. This margin is used to prevent data items from being plotted right at the edges of the chart. The default value is0.05(five percent).- Returns:
- The lower margin.
-
setLowerMargin
Sets the size of the lower margin that will be added by the auto-range calculation and sends anAxis3DChangeEventto all registered listeners.- Parameters:
margin- the margin as a percentage of the data range (0.05 = five percent).- See Also:
-
getUpperMargin
Returns the size of the upper margin that is added by the auto-range calculation, as a percentage of the data range. This margin is used to prevent data items from being plotted right at the edges of the chart. The default value is0.05(five percent).- Returns:
- The upper margin.
-
setUpperMargin
Sets the size of the upper margin that will be added by the auto-range calculation and sends anAxis3DChangeEventto all registered listeners.- Parameters:
margin- the margin as a percentage of the data range (0.05 = five percent).- See Also:
-
getDefaultAutoRange
Returns the default range used when theautoAdjustRangeflag istruebut the dataset contains no values. The default range is(0.0 to 1.0), depending on the context you may want to change this.- Returns:
- The default range (never
null). - See Also:
-
setDefaultAutoRange
Sets the default range used when theautoAdjustRangeflag istruebut the dataset contains no values, and sends anAxis3DChangeEventto all registered listeners.- Parameters:
range- the range (nullnot permitted).- See Also:
-
getMinAutoRangeLength
Returns the minimum length for the axis range when auto-calculated. The default value is 0.001.- Returns:
- The minimum length.
- Since:
- 1.4
-
setMinAutoRangeLength
Sets the minimum length for the axis range when it is auto-calculated and sends a change event to all registered listeners.- Parameters:
length- the new minimum length.- Since:
- 1.4
-
isInverted
Returns the flag that determines whether or not the order of values on the axis is inverted. The default value isfalse.- Specified by:
isInvertedin interfaceAxis3D- 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.- Specified by:
setInvertedin interfaceAxis3D- Parameters:
inverted- the new flag value.- Since:
- 1.5
-
getTickLabelOrientation
Returns the orientation for the tick labels. The default value isLabelOrientation.PARALLEL.- Returns:
- The orientation for the tick labels (never
null). - Since:
- 1.2
-
setTickLabelOrientation
Sets the orientation for the tick labels and sends a change event to all registered listeners. In general,PARALLELis the best setting for X and Z axes, andPERPENDICULARis the best setting for Y axes.- Parameters:
orientation- the orientation (nullnot permitted).- Since:
- 1.2
-
getTickLabelFactor
Returns the tick label factor, a multiplier for the label height to determine the maximum number of tick labels that can be displayed. The default value is1.4.- Returns:
- The tick label factor.
-
setTickLabelFactor
Sets the tick label factor and sends anAxis3DChangeEventto all registered listeners. This should be at least 1.0, higher values will result in larger gaps between the tick marks.- Parameters:
factor- the factor.
-
getTickLabelOffset
Returns the tick label offset, the gap between the tick marks and the tick labels (in Java2D units). The default value is5.0.- Returns:
- The tick label offset.
-
setTickLabelOffset
Sets the tick label offset and sends anAxis3DChangeEventto all registered listeners.- Parameters:
offset- the offset.
-
getTickMarkLength
Returns the length of the tick marks (in Java2D units). The default value is3.0.- Returns:
- The length of the tick marks.
-
setTickMarkLength
Sets the length of the tick marks and sends anAxis3DChangeEventto all registered listeners. You can set this to0.0if you prefer no tick marks to be displayed on the axis.- Parameters:
length- the length (in Java2D units).
-
getTickMarkStroke
Returns the stroke used to draw the tick marks. The default value isBasicStroke(0.5f).- Returns:
- The tick mark stroke (never
null).
-
setTickMarkStroke
Sets the stroke used to draw the tick marks and sends anAxis3DChangeEventto all registered listeners.- Parameters:
stroke- the stroke (nullnot permitted).
-
getTickMarkPaint
Returns the paint used to draw the tick marks. The default value isColor.GRAY.- Returns:
- The tick mark paint (never
null).
-
setTickMarkPaint
Sets the paint used to draw the tick marks and sends anAxis3DChangeEventto all registered listeners.- Parameters:
paint- the paint (nullnot permitted).
-
configureAsValueAxis
Configures the axis to be used as the value axis for the specified plot. This method is used internally, you should not need to call it directly.- Specified by:
configureAsValueAxisin interfaceValueAxis3D- Parameters:
plot- the plot (nullnot permitted).
-
configureAsXAxis
Configures the axis to be used as the x-axis for the specified plot. This method is used internally, you should not need to call it directly.- Specified by:
configureAsXAxisin interfaceValueAxis3D- Parameters:
plot- the plot (nullnot permitted).
-
configureAsYAxis
Configures the axis to be used as the y-axis for the specified plot. This method is used internally, you should not need to call it directly.- Specified by:
configureAsYAxisin interfaceValueAxis3D- Parameters:
plot- the plot (nullnot permitted).
-
configureAsZAxis
Configures the axis to be used as the z-axis for the specified plot. This method is used internally, you should not need to call it directly.- Specified by:
configureAsZAxisin interfaceValueAxis3D- Parameters:
plot- the plot (nullnot permitted).
-
adjustedDataRange
Adjusts the range by adding the lower and upper margins and taking into account any other settings.- Parameters:
range- the range (nullnot permitted).- Returns:
- The adjusted range.
-
getMarker
Returns the marker with the specified key, if there is one.- Specified by:
getMarkerin interfaceValueAxis3D- Parameters:
key- the key (nullnot permitted).- Returns:
- The marker (possibly
null). - Since:
- 1.2
-
setMarker
Sets the marker for the specified key and sends a change event to all registered listeners. If there is an existing marker it is replaced (the axis will no longer listen for change events on the previous marker).- Parameters:
key- the key that identifies the marker (nullnot permitted).marker- the marker (nullpermitted).- Since:
- 1.2
-
getMarkers
Returns a new map containing the markers assigned to this axis.- Returns:
- A map.
- Since:
- 1.2
-
generateMarkerData
Generates and returns a list of marker data items for the axis.- Specified by:
generateMarkerDatain interfaceValueAxis3D- Returns:
- A list of marker data items (never
null).
-
receive
Receives aChartElementVisitor. This method is part of a general mechanism for traversing the chart structure and performing operations on each element in the chart. You will not normally call this method directly.- Specified by:
receivein interfaceChartElement- Specified by:
receivein classAbstractAxis3D- Parameters:
visitor- the visitor (nullnot permitted).- Since:
- 1.2
-
equals
Description copied from class:AbstractAxis3DTests this instance for equality with an arbitrary object.- Overrides:
equalsin classAbstractAxis3D- Parameters:
obj- the object to test against (nullpermitted).- Returns:
- A boolean.
-