public class NumberAxis3D extends AbstractValueAxis3D implements ValueAxis3D, java.io.Serializable
ValueAxis3D).
In a CategoryPlot3D the value axis (the vertical one) is numerical,
and in an XYZPlot all the axes (x, y and z) are numerical - for
all these cases an instance of this class can be used.
rangeDEFAULT_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 |
|---|
NumberAxis3D(java.lang.String label)
Creates a new axis with the specified label and default attributes.
|
NumberAxis3D(java.lang.String label,
Range range)
Creates a new axis with the specified label and range.
|
| Modifier and Type | Method and Description |
|---|---|
protected Range |
adjustedDataRange(Range range)
Adjusts the range by adding the lower and upper margins and taking into
account also the
autoRangeStickyZero flag. |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Point2D pt0,
java.awt.geom.Point2D pt1,
java.awt.geom.Point2D opposingPt,
java.util.List<TickData> tickData,
RenderingInfo info,
boolean hinting)
Draws the axis to the supplied graphics target (
g2, with the
specified starting and ending points for the line. |
boolean |
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.
|
java.util.List<TickData> |
generateTickData(double tickUnit)
Generates a list of tick data items for the specified tick unit.
|
boolean |
getAutoRangeIncludesZero()
Returns the flag that determines whether or not the auto range
mechanism should force zero to be included in the range.
|
boolean |
getAutoRangeStickyZero()
Returns the flag that controls the behaviour of the auto range
mechanism when zero falls into the axis margins.
|
java.text.Format |
getTickLabelFormatter()
Returns the tick label formatter.
|
TickSelector |
getTickSelector()
Returns the tick selector, an object that is responsible for choosing
standard tick units for the axis.
|
double |
getTickSize()
Returns the tick size (to be used when the tick selector is
null). |
int |
hashCode()
Returns a hash code for this instance.
|
double |
selectTick(java.awt.Graphics2D g2,
java.awt.geom.Point2D pt0,
java.awt.geom.Point2D pt1,
java.awt.geom.Point2D opposingPt)
Selects a tick size that is appropriate for drawing the axis from
pt0 to pt1. |
void |
setAutoRangeIncludeZero(boolean include)
Sets the flag that controls whether or not the auto range mechanism
should force zero to be included in the axis range, and sends an
Axis3DChangeEvent to all registered listeners. |
void |
setAutoRangeStickyZero(boolean sticky)
Sets the flag that controls the behaviour of the auto range mechanism
when zero falls into the axis margins.
|
void |
setTickLabelFormatter(java.text.Format formatter)
Sets the formatter for the tick labels and sends an
Axis3DChangeEvent to all registered listeners. |
void |
setTickSelector(TickSelector selector)
Sets the tick selector and sends an
Axis3DChangeEvent to all
registered listeners. |
void |
setTickSize(double tickSize)
Sets the tick size and sends an
Axis3DChangeEvent to all
registered listeners. |
double |
translateToWorld(double value,
double length)
Converts a data value to world coordinates, taking into account the
current axis range (assumes the world axis is zero-based and has the
specified length).
|
axisStr, configureAsValueAxis, configureAsXAxis, configureAsYAxis, configureAsZAxis, generateMarkerData, getConfiguredType, getDefaultAutoRange, getLowerMargin, getMarker, getMarkers, getMinAutoRangeLength, getRange, getTickLabelFactor, getTickLabelOffset, getTickLabelOrientation, getTickMarkLength, getTickMarkPaint, getTickMarkStroke, getUpperMargin, isAutoAdjustRange, isInverted, receive, setAutoAdjustRange, setDefaultAutoRange, setInverted, setLowerMargin, setMarker, setMinAutoRangeLength, setRange, setRange, setTickLabelFactor, setTickLabelOffset, setTickLabelOrientation, setTickMarkLength, setTickMarkPaint, setTickMarkStroke, setUpperMargin, updateRangeaddChangeListener, drawAxisLabel, fireChangeEvent, getLabel, getLabelColor, getLabelFont, getLabelOffset, getLineColor, getLineStroke, getTickLabelColor, getTickLabelFont, getTickLabelsVisible, isVisible, markerChanged, notifyListeners, removeChangeListener, setLabel, setLabelColor, setLabelFont, setLabelOffset, setLineColor, setLineStroke, setTickLabelColor, setTickLabelFont, setTickLabelsVisible, setVisibleclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitconfigureAsValueAxis, configureAsXAxis, configureAsYAxis, configureAsZAxis, generateMarkerData, getConfiguredType, getMarkeraddChangeListener, getLabelColor, getLabelFont, getRange, getTickLabelColor, getTickLabelFont, isInverted, isVisible, removeChangeListener, setInverted, setLabelColor, setLabelFont, setRange, setRange, setTickLabelColor, setTickLabelFont, setVisiblereceivepublic NumberAxis3D(java.lang.String label)
label - the axis label (null permitted).public NumberAxis3D(java.lang.String label, Range range)
label - the axis label (null permitted).range - the range (null not permitted).public boolean getAutoRangeIncludesZero()
false.public void setAutoRangeIncludeZero(boolean include)
Axis3DChangeEvent to all registered listeners.include - the new flag value.public boolean getAutoRangeStickyZero()
true.setAutoRangeStickyZero(boolean)public void setAutoRangeStickyZero(boolean sticky)
true, when
zero is in the axis margin the axis range is truncated at zero. If
false, there is no special treatment.sticky - the new flag value.public TickSelector getTickSelector()
NumberTickSelector.setTickSelector(TickSelector)public void setTickSelector(TickSelector selector)
Axis3DChangeEvent to all
registered listeners.selector - the selector (null permitted).getTickSelector()public double getTickSize()
null).public void setTickSize(double tickSize)
Axis3DChangeEvent to all
registered listeners.tickSize - the new tick size.public java.text.Format getTickLabelFormatter()
DecimalFormat("0.00").null).public void setTickLabelFormatter(java.text.Format formatter)
Axis3DChangeEvent to all registered listeners.formatter - the formatter (null not permitted).protected Range adjustedDataRange(Range range)
autoRangeStickyZero flag.adjustedDataRange in class AbstractValueAxis3Drange - the range (null not permitted).public void draw(java.awt.Graphics2D g2, java.awt.geom.Point2D pt0, java.awt.geom.Point2D pt1, java.awt.geom.Point2D opposingPt, java.util.List<TickData> tickData, RenderingInfo info, boolean hinting)
g2, with the
specified starting and ending points for the line. This method is used
internally, you should not need to call it directly.draw in interface Axis3Ddraw in class AbstractAxis3Dg2 - the graphics target (null not permitted).pt0 - the starting point (null not permitted).pt1 - the ending point (null not permitted).opposingPt - an opposing point (to determine which side of the
axis line the labels should appear, null not permitted).tickData - tick details (null not permitted).info - an object to be populated with rendering info
(null permitted).hinting - perform element hinting?public double translateToWorld(double value, double length)
translateToWorld in interface Axis3Dvalue - the data value (in axis units).length - the length of the (zero based) world axis.public double selectTick(java.awt.Graphics2D g2, java.awt.geom.Point2D pt0, java.awt.geom.Point2D pt1, java.awt.geom.Point2D opposingPt)
pt0 to pt1.selectTick in interface ValueAxis3Dg2 - the graphics target (null not permitted).pt0 - the starting point for the axis.pt1 - the ending point for the axis.opposingPt - a point on the opposite side of the line from where
the labels should be drawn.public java.util.List<TickData> generateTickData(double tickUnit)
tickUnit is Double.NaN, then tick data is
generated for just the bounds of the axis.generateTickData in interface ValueAxis3DtickUnit - the tick unit.null).public boolean equals(java.lang.Object obj)
equals in class AbstractValueAxis3Dobj - the object to test against (null permitted).public int hashCode()
hashCode in class AbstractAxis3D