public class LogAxis3D extends AbstractValueAxis3D implements ValueAxis3D
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_SMALLEST_VALUE
The default value for the smallest value attribute.
|
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 |
|---|
LogAxis3D(java.lang.String label)
Creates a new log axis with a default base of 10.
|
| Modifier and Type | Method and Description |
|---|---|
protected Range |
adjustedDataRange(Range range)
Adjusts the range by adding the lower and upper margins on the
logarithmic range.
|
double |
calculateLog(double value)
Calculates the log of the given
value, using the current base. |
double |
calculateValue(double log)
Calculates the value from a given log value.
|
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Point2D startPt,
java.awt.geom.Point2D endPt,
java.awt.geom.Point2D opposingPt,
java.util.List<TickData> tickData,
RenderingInfo info,
boolean hinting)
Draws the axis.
|
boolean |
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.
|
java.util.List<TickData> |
generateTickData(double tickUnit)
Generates tick data for the axis, assuming the specified tick unit
(a log increment in this case).
|
double |
getBase()
Returns the logarithmic base value.
|
java.text.NumberFormat |
getBaseFormatter()
Returns the formatter used for the log base value when it is displayed
in tick labels.
|
java.lang.String |
getBaseSymbol()
Returns the base symbol, used in tick labels for the axis.
|
double |
getSmallestValue()
Returns the smallest positive data value that will be represented on
the axis.
|
java.text.Format |
getTickLabelFormatter()
Returns the tick label formatter.
|
TickSelector |
getTickSelector()
Returns the tick selector 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 standard tick unit on the logarithmic range.
|
void |
setBase(double base)
Sets the logarithmic base value and sends an
Axis3DChangeEvent
to all registered listeners. |
void |
setBaseFormatter(java.text.NumberFormat formatter)
Sets the formatter for the log base value and sends an
Axis3DChangeEvent to all registered listeners. |
void |
setBaseSymbol(java.lang.String symbol)
Sets the base symbol and sends an
Axis3DChangeEvent to all
registered listeners. |
void |
setRange(double min,
double max)
Sets the range for the axis.
|
void |
setRange(Range range)
Sets the range for the axis.
|
void |
setSmallestValue(double smallestValue)
Sets the smallest positive data value that will be represented on the
axis and sends an
Axis3DChangeEvent to all registered listeners. |
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)
Translates a data value to a world coordinate, assuming that the axis
begins at the origin and has the specified length.
|
protected void |
updateRange(Range range)
Updates the axis range (used by the auto-range calculation) without
notifying listeners.
|
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, setTickLabelFactor, setTickLabelOffset, setTickLabelOrientation, setTickMarkLength, setTickMarkPaint, setTickMarkStroke, setUpperMarginaddChangeListener, 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, setTickLabelColor, setTickLabelFont, setVisiblereceivepublic static final double DEFAULT_SMALLEST_VALUE
public LogAxis3D(java.lang.String label)
label - the axis label (null permitted).public double getBase()
10.public void setBase(double base)
Axis3DChangeEvent
to all registered listeners.base - the base value.public java.lang.String getBaseSymbol()
null, the tick labels will display the numerical base value.
The default value is null.null).public void setBaseSymbol(java.lang.String symbol)
Axis3DChangeEvent to all
registered listeners. If you set this to null, the tick labels
will display a numerical representation of the base value.symbol - the base symbol (null permitted).public java.text.NumberFormat getBaseFormatter()
NumberFormat("0").null).public void setBaseFormatter(java.text.NumberFormat formatter)
Axis3DChangeEvent to all registered listeners.formatter - the formatter (null not permitted).public double getSmallestValue()
0.0 up to this value.public void setSmallestValue(double smallestValue)
Axis3DChangeEvent to all registered listeners.smallestValue - the value (must be positive).public TickSelector getTickSelector()
null).public void setTickSelector(TickSelector selector)
Axis3DChangeEvent to all
registered listeners.selector - the selector (null permitted).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.0").null).public void setTickLabelFormatter(java.text.Format formatter)
Axis3DChangeEvent to all registered listeners.formatter - the formatter (null not permitted).public void setRange(Range range)
setRange in interface Axis3DsetRange in class AbstractValueAxis3Drange - the range (nul not permitted).public void setRange(double min, double max)
setRange in interface Axis3DsetRange in class AbstractValueAxis3Dmin - the lower bound for the range.max - the upper bound for the range.protected void updateRange(Range range)
AbstractValueAxis3DupdateRange in class AbstractValueAxis3Drange - the new range.public final double calculateLog(double value)
value, using the current base.value - the value (negatives not permitted).calculateValue(double),
getBase()public final double calculateValue(double log)
log - the log value.calculateLog(double),
getBase()public double translateToWorld(double value, double length)
translateToWorld in interface Axis3Dvalue - the data value.length - the axis length in world coordinates.public void draw(java.awt.Graphics2D g2, java.awt.geom.Point2D startPt, java.awt.geom.Point2D endPt, java.awt.geom.Point2D opposingPt, java.util.List<TickData> tickData, RenderingInfo info, boolean hinting)
draw in interface Axis3Ddraw in class AbstractAxis3Dg2 - the graphics target (null not permitted).startPt - the starting point.endPt - the ending point.opposingPt - an opposing point (labels will be on the other side
of the line).tickData - the tick data (including anchor points calculated by
the 3D engine).info - an object to be populated with rendering info
(null permitted).hinting - perform element hinting?protected Range adjustedDataRange(Range range)
adjustedDataRange in class AbstractValueAxis3Drange - the range (nul not permitted).public double selectTick(java.awt.Graphics2D g2, java.awt.geom.Point2D pt0, java.awt.geom.Point2D pt1, java.awt.geom.Point2D opposingPt)
selectTick in interface ValueAxis3Dg2 - the graphics target (null not permitted).pt0 - the starting point.pt1 - the ending point.opposingPt - an opposing point.public java.util.List<TickData> generateTickData(double tickUnit)
generateTickData in interface ValueAxis3DtickUnit - the tick unit.public int hashCode()
AbstractAxis3DhashCode in class AbstractAxis3Dpublic boolean equals(java.lang.Object obj)
AbstractAxis3Dequals in class AbstractValueAxis3Dobj - the object to test against (null permitted).