public abstract class AbstractValueAxis3D extends AbstractAxis3D implements ValueAxis3D, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected Range |
range
The axis range.
|
DEFAULT_LABEL_COLOR, DEFAULT_LABEL_FONT, DEFAULT_LABEL_OFFSET, DEFAULT_LINE_COLOR, DEFAULT_LINE_STROKE, DEFAULT_TICK_LABEL_COLOR, DEFAULT_TICK_LABEL_FONT| Constructor and Description |
|---|
AbstractValueAxis3D(java.lang.String label,
Range range)
Creates a new axis instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract Range |
adjustedDataRange(Range range)
Adjusts the range by adding the lower and upper margins and taking into
account any other settings.
|
protected java.lang.String |
axisStr()
Returns a string representing the configured type of the axis.
|
void |
configureAsValueAxis(CategoryPlot3D plot)
Configures the axis to be used as the value axis for the specified
plot.
|
void |
configureAsXAxis(XYZPlot plot)
Configures the axis to be used as the x-axis for the specified plot.
|
void |
configureAsYAxis(XYZPlot plot)
Configures the axis to be used as the y-axis for the specified plot.
|
void |
configureAsZAxis(XYZPlot plot)
Configures the axis to be used as the z-axis for the specified plot.
|
boolean |
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.
|
java.util.List<MarkerData> |
generateMarkerData()
Generates and returns a list of marker data items for the axis.
|
ValueAxis3DType |
getConfiguredType()
Returns the configured type for the axis.
|
Range |
getDefaultAutoRange()
Returns the default range used when the
autoAdjustRange
flag is true but the dataset contains no values. |
double |
getLowerMargin()
Returns the size of the lower margin that is added by the auto-range
calculation, as a percentage of the data range.
|
ValueMarker |
getMarker(java.lang.String key)
Returns the marker with the specified key, if there is one.
|
java.util.Map<java.lang.String,ValueMarker> |
getMarkers()
Returns a new map containing the markers assigned to this axis.
|
double |
getMinAutoRangeLength()
Returns the minimum length for the axis range when auto-calculated.
|
Range |
getRange()
Returns the axis range.
|
double |
getTickLabelFactor()
Returns the tick label factor, a multiplier for the label height to
determine the maximum number of tick labels that can be displayed.
|
double |
getTickLabelOffset()
Returns the tick label offset, the gap between the tick marks and the
tick labels (in Java2D units).
|
LabelOrientation |
getTickLabelOrientation()
Returns the orientation for the tick labels.
|
double |
getTickMarkLength()
Returns the length of the tick marks (in Java2D units).
|
java.awt.Paint |
getTickMarkPaint()
Returns the paint used to draw the tick marks.
|
java.awt.Stroke |
getTickMarkStroke()
Returns the stroke used to draw the tick marks.
|
double |
getUpperMargin()
Returns the size of the upper margin that is added by the auto-range
calculation, as a percentage of the data range.
|
boolean |
isAutoAdjustRange()
Returns the flag that controls whether or not the axis range is
automatically updated in response to dataset changes.
|
boolean |
isInverted()
Returns the flag that determines whether or not the order of values on
the axis is inverted.
|
void |
receive(ChartElementVisitor visitor)
Receives a
ChartElementVisitor. |
void |
setAutoAdjustRange(boolean autoAdjust)
Sets the flag that controls whether or not the axis range is
automatically updated in response to dataset changes, and sends an
Axis3DChangeEvent to all registered listeners. |
void |
setDefaultAutoRange(Range range)
Sets the default range used when the
autoAdjustRange
flag is true but the dataset contains no values, and sends
an Axis3DChangeEvent to all registered listeners. |
void |
setInverted(boolean inverted)
Sets the flag that determines whether or not the order of values on the
axis is inverted, and sends an
Axis3DChangeEvent to all
registered listeners. |
void |
setLowerMargin(double margin)
Sets the size of the lower margin that will be added by the auto-range
calculation and sends an
Axis3DChangeEvent to all registered
listeners. |
void |
setMarker(java.lang.String key,
ValueMarker marker)
Sets the marker for the specified key and sends a change event to
all registered listeners.
|
void |
setMinAutoRangeLength(double length)
Sets the minimum length for the axis range when it is auto-calculated
and sends a change event to all registered listeners.
|
void |
setRange(double min,
double max)
Sets the axis range and sends an
Axis3DChangeEvent to all
registered listeners. |
void |
setRange(Range range)
Sets the axis range (bounds) and sends an
Axis3DChangeEvent to
all registered listeners. |
void |
setTickLabelFactor(double factor)
Sets the tick label factor and sends an
Axis3DChangeEvent
to all registered listeners. |
void |
setTickLabelOffset(double offset)
Sets the tick label offset and sends an
Axis3DChangeEvent to
all registered listeners. |
void |
setTickLabelOrientation(LabelOrientation orientation)
Sets the orientation for the tick labels and sends a change event to
all registered listeners.
|
void |
setTickMarkLength(double length)
Sets the length of the tick marks and sends an
Axis3DChangeEvent
to all registered listeners. |
void |
setTickMarkPaint(java.awt.Paint paint)
Sets the paint used to draw the tick marks and sends an
Axis3DChangeEvent to all registered listeners. |
void |
setTickMarkStroke(java.awt.Stroke stroke)
Sets the stroke used to draw the tick marks and sends an
Axis3DChangeEvent to all registered listeners. |
void |
setUpperMargin(double margin)
Sets the size of the upper margin that will be added by the auto-range
calculation and sends an
Axis3DChangeEvent to all registered
listeners. |
protected void |
updateRange(Range range)
Updates the axis range (used by the auto-range calculation) without
notifying listeners.
|
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, setVisibleclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgenerateTickData, selectTickaddChangeListener, draw, getLabelColor, getLabelFont, getTickLabelColor, getTickLabelFont, isVisible, removeChangeListener, setLabelColor, setLabelFont, setTickLabelColor, setTickLabelFont, setVisible, translateToWorldpublic AbstractValueAxis3D(java.lang.String label, Range range)
label - the axis label (null permitted).range - the axis range (null not permitted).public ValueAxis3DType getConfiguredType()
getConfiguredType in interface ValueAxis3Dnull if the axis has not yet
been assigned to a plot).protected java.lang.String axisStr()
axisStr in class AbstractAxis3Dpublic Range getRange()
public void setRange(Range range)
Axis3DChangeEvent to
all registered listeners.protected void updateRange(Range range)
range - the new range.public void setRange(double min, double max)
Axis3DChangeEvent to all
registered listeners.public boolean isAutoAdjustRange()
true.public void setAutoAdjustRange(boolean autoAdjust)
Axis3DChangeEvent to all registered listeners.autoAdjust - the new flag value.public double getLowerMargin()
0.05 (five percent).public void setLowerMargin(double margin)
Axis3DChangeEvent to all registered
listeners.margin - the margin as a percentage of the data range
(0.05 = five percent).setUpperMargin(double)public double getUpperMargin()
0.05 (five percent).public void setUpperMargin(double margin)
Axis3DChangeEvent to all registered
listeners.margin - the margin as a percentage of the data range
(0.05 = five percent).setLowerMargin(double)public Range getDefaultAutoRange()
autoAdjustRange
flag is true but the dataset contains no values. The
default range is (0.0 to 1.0), depending on the context
you may want to change this.null).setDefaultAutoRange(com.orsoncharts.Range)public void setDefaultAutoRange(Range range)
autoAdjustRange
flag is true but the dataset contains no values, and sends
an Axis3DChangeEvent to all registered listeners.range - the range (null not permitted).getDefaultAutoRange()public double getMinAutoRangeLength()
public void setMinAutoRangeLength(double length)
length - the new minimum length.public boolean isInverted()
false.isInverted in interface Axis3Dpublic void setInverted(boolean inverted)
Axis3DChangeEvent to all
registered listeners.setInverted in interface Axis3Dinverted - the new flag value.public LabelOrientation getTickLabelOrientation()
LabelOrientation.PARALLEL.null).public void setTickLabelOrientation(LabelOrientation orientation)
PARALLEL is the
best setting for X and Z axes, and PERPENDICULAR is the
best setting for Y axes.orientation - the orientation (null not permitted).public double getTickLabelFactor()
1.4.public void setTickLabelFactor(double factor)
Axis3DChangeEvent
to all registered listeners. This should be at least 1.0, higher values
will result in larger gaps between the tick marks.factor - the factor.public double getTickLabelOffset()
5.0.public void setTickLabelOffset(double offset)
Axis3DChangeEvent to
all registered listeners.offset - the offset.public double getTickMarkLength()
3.0.public void setTickMarkLength(double length)
Axis3DChangeEvent
to all registered listeners. You can set this to 0.0 if
you prefer no tick marks to be displayed on the axis.length - the length (in Java2D units).public java.awt.Stroke getTickMarkStroke()
BasicStroke(0.5f).null).public void setTickMarkStroke(java.awt.Stroke stroke)
Axis3DChangeEvent to all registered listeners.stroke - the stroke (null not permitted).public java.awt.Paint getTickMarkPaint()
Color.GRAY.null).public void setTickMarkPaint(java.awt.Paint paint)
Axis3DChangeEvent to all registered listeners.paint - the paint (null not permitted).public void configureAsValueAxis(CategoryPlot3D plot)
configureAsValueAxis in interface ValueAxis3Dplot - the plot (null not permitted).public void configureAsXAxis(XYZPlot plot)
configureAsXAxis in interface ValueAxis3Dplot - the plot (null not permitted).public void configureAsYAxis(XYZPlot plot)
configureAsYAxis in interface ValueAxis3Dplot - the plot (null not permitted).public void configureAsZAxis(XYZPlot plot)
configureAsZAxis in interface ValueAxis3Dplot - the plot (null not permitted).protected abstract Range adjustedDataRange(Range range)
range - the range (null not permitted).public ValueMarker getMarker(java.lang.String key)
getMarker in interface ValueAxis3Dkey - the key (null not permitted).null).public void setMarker(java.lang.String key, ValueMarker marker)
key - the key that identifies the marker (null not
permitted).marker - the marker (null permitted).public java.util.Map<java.lang.String,ValueMarker> getMarkers()
public java.util.List<MarkerData> generateMarkerData()
generateMarkerData in interface ValueAxis3Dnull).public void receive(ChartElementVisitor visitor)
ChartElementVisitor. 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.receive in interface ChartElementreceive in class AbstractAxis3Dvisitor - the visitor (null not permitted).public boolean equals(java.lang.Object obj)
AbstractAxis3Dequals in class AbstractAxis3Dobj - the object to test against (null permitted).