|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.jrefinery.chart.Axis
com.jrefinery.chart.ValueAxis
com.jrefinery.chart.NumberAxis
com.jrefinery.chart.HorizontalNumberAxis
com.jrefinery.chart.HorizontalLogarithmicAxis
public class HorizontalLogarithmicAxis
A logartihmic value axis, for values displayed horizontally. Display of negative values is supported (if 'allowNegativesFlag' flag set), as well as positive values arbitrarily close to zero.
| Field Summary | |
|---|---|
protected boolean |
allowNegativesFlag
|
static double |
LOG10_VALUE
|
protected java.text.DecimalFormat |
numberFormatterObj
|
protected boolean |
smallLogFlag
|
| Fields inherited from class com.jrefinery.chart.HorizontalNumberAxis |
|---|
verticalTickLabels |
| Fields inherited from class com.jrefinery.chart.NumberAxis |
|---|
autoRangeIncludesZero, autoRangeMinimumSize, autoRangeStickyZero, DEFAULT_AUTO_RANGE_INCLUDES_ZERO, DEFAULT_AUTO_RANGE_STICKY_ZERO, DEFAULT_LOWER_MARGIN, DEFAULT_MINIMUM_AUTO_RANGE, DEFAULT_TICK_UNIT, DEFAULT_UPPER_MARGIN, inverted, lowerMargin, standardTickUnits, tickUnit, upperMargin |
| Fields inherited from class com.jrefinery.chart.Axis |
|---|
fixedDimension, label, labelFont, labelInsets, labelPaint, listeners, plot, tickLabelFont, tickLabelInsets, tickLabelPaint, tickLabelsVisible, tickMarkStroke, tickMarksVisible, ticks, visible |
| Fields inherited from interface com.jrefinery.chart.AxisConstants |
|---|
DEFAULT_AXIS_LABEL_FONT, DEFAULT_AXIS_LABEL_INSETS, DEFAULT_AXIS_LABEL_PAINT, DEFAULT_TICK_LABEL_FONT, DEFAULT_TICK_LABEL_INSETS, DEFAULT_TICK_LABEL_PAINT, DEFAULT_TICK_STROKE |
| Constructor Summary | |
|---|---|
HorizontalLogarithmicAxis()
Constructs a horizontal logarithmic axis, using default values where necessary. |
|
HorizontalLogarithmicAxis(java.lang.String label)
Constructs a horizontal logarithmic axis, using default values where necessary. |
|
HorizontalLogarithmicAxis(java.lang.String label,
java.awt.Font labelFont,
double minimumAxisValue,
double maximumAxisValue)
Constructs a horizontal logarithmic axis. |
|
HorizontalLogarithmicAxis(java.lang.String label,
java.awt.Font labelFont,
java.awt.Paint labelPaint,
java.awt.Insets labelInsets,
boolean tickLabelsVisible,
java.awt.Font tickLabelFont,
java.awt.Paint tickLabelPaint,
java.awt.Insets tickLabelInsets,
boolean verticalTickLabels,
boolean tickMarksVisible,
java.awt.Stroke tickMarkStroke,
boolean autoRange,
boolean autoRangeIncludesZero,
boolean autoRangeStickyZero,
java.lang.Number autoRangeMinimum,
double minimumAxisValue,
double maximumAxisValue,
boolean inverted,
boolean autoTickUnitSelection,
NumberTickUnit tickUnit,
boolean gridLinesVisible,
java.awt.Stroke gridStroke,
java.awt.Paint gridPaint,
boolean crosshairVisible,
double crosshairValue,
java.awt.Stroke crosshairStroke,
java.awt.Paint crosshairPaint,
boolean allowNegativesFlag)
Constructs a horizontal number axis. |
|
| Method Summary | |
|---|---|
double |
adjustedLog10(double val)
Returns an adjusted log10 value for graphing purposes. |
void |
autoAdjustRange()
Rescales the axis to ensure that all data is visible. |
void |
refreshTicks(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D drawArea,
java.awt.geom.Rectangle2D plotArea)
Calculates the positions of the tick labels for the axis, storing the results in the tick label list (ready for drawing). |
void |
setRange(Range range)
Overridden version that calls original and then sets up flag for log axis processing. |
protected void |
setupSmallLogFlag()
Sets up flag for log axis processing. |
protected double |
switchedLog10(double val)
Returns the log10 value, depending on if values between 0 and 1 are being plotted. |
double |
translateJava2DtoValue(float java2DValue,
java.awt.geom.Rectangle2D plotArea)
Converts a coordinate in Java2D space to the corresponding data value, assuming that the axis runs along one edge of the specified plotArea. |
double |
translateValueToJava2D(double value,
java.awt.geom.Rectangle2D plotArea)
Converts a data value to a coordinate in Java2D space, assuming that the axis runs along one edge of the specified plotArea. |
| Methods inherited from class com.jrefinery.chart.HorizontalNumberAxis |
|---|
configure, draw, getVerticalTickLabels, isCompatiblePlot, reserveAxisArea, reserveHeight, setVerticalTickLabels |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double LOG10_VALUE
protected final boolean allowNegativesFlag
protected boolean smallLogFlag
protected final java.text.DecimalFormat numberFormatterObj
| Constructor Detail |
|---|
public HorizontalLogarithmicAxis()
public HorizontalLogarithmicAxis(java.lang.String label)
label - The axis label (null permitted).
public HorizontalLogarithmicAxis(java.lang.String label,
java.awt.Font labelFont,
double minimumAxisValue,
double maximumAxisValue)
label - The axis label (null permitted).labelFont - The font for displaying the axis label.minimumAxisValue - The lowest value shown on the axis.maximumAxisValue - The highest value shown on the axis.
public HorizontalLogarithmicAxis(java.lang.String label,
java.awt.Font labelFont,
java.awt.Paint labelPaint,
java.awt.Insets labelInsets,
boolean tickLabelsVisible,
java.awt.Font tickLabelFont,
java.awt.Paint tickLabelPaint,
java.awt.Insets tickLabelInsets,
boolean verticalTickLabels,
boolean tickMarksVisible,
java.awt.Stroke tickMarkStroke,
boolean autoRange,
boolean autoRangeIncludesZero,
boolean autoRangeStickyZero,
java.lang.Number autoRangeMinimum,
double minimumAxisValue,
double maximumAxisValue,
boolean inverted,
boolean autoTickUnitSelection,
NumberTickUnit tickUnit,
boolean gridLinesVisible,
java.awt.Stroke gridStroke,
java.awt.Paint gridPaint,
boolean crosshairVisible,
double crosshairValue,
java.awt.Stroke crosshairStroke,
java.awt.Paint crosshairPaint,
boolean allowNegativesFlag)
label - The axis label.labelFont - The font for displaying the axis label.labelPaint - The paint used to draw the axis label.labelInsets - Determines the amount of blank space around the label.tickMarksVisible - Flag indicating whether or not tick labels are visible.tickLabelFont - The font used to display tick labels.tickLabelPaint - The paint used to draw tick labels.tickLabelInsets - Determines the amount of blank space around tick labels.showTickMarks - Flag indicating whether or not tick marks are visible.tickMarkStroke - The stroke used to draw tick marks (if visible).autoRange - Flag indicating whether or not the axis is automatically scaled to fit the
data.autoRangeIncludesZero - A flag indicating whether or not zero *must* be displayed on
axis.autoRangeMinimum - The smallest automatic range allowed.minimumAxisValue - The lowest value shown on the axis.maximumAxisValue - The highest value shown on the axis.inverted - A flag indicating whether the axis is normal or inverted (inverted means
running from positive to negative).autoTickUnitSelection - A flag indicating whether or not the tick units are
selected automatically.tickUnit - The tick unit.showGridLines - Flag indicating whether or not grid lines are visible for this axis.gridStroke - The pen/brush used to display grid lines (if visible).gridPaint - The color used to display grid lines (if visible).crosshairValue - The value at which to draw an optional crosshair (null permitted).crosshairStroke - The pen/brush used to draw the crosshair.crosshairPaint - The color used to draw the crosshair.allowNegativesFlag - true to allow plotting of negative values;
false if all positive values, thus allowing values less than 1.0 and
arbitrarily close to zero to be plotted correctly.| Method Detail |
|---|
public void setRange(Range range)
setRange in class ValueAxisrange - The new range.protected void setupSmallLogFlag()
public double translateValueToJava2D(double value,
java.awt.geom.Rectangle2D plotArea)
translateValueToJava2D in class HorizontalNumberAxisdataValue - the data value.plotArea - the area for plotting the data.
public double translateJava2DtoValue(float java2DValue,
java.awt.geom.Rectangle2D plotArea)
translateJava2DtoValue in class HorizontalNumberAxisjava2DValue - the coordinate in Java2D space.plotArea - the area in which the data is plotted.
public void autoAdjustRange()
autoAdjustRange in class HorizontalNumberAxis
public void refreshTicks(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D drawArea,
java.awt.geom.Rectangle2D plotArea)
refreshTicks in class HorizontalNumberAxisg2 - The graphics device.drawArea - The area in which the plot and the axes should be drawn.plotArea - The area in which the plot should be drawn.protected double switchedLog10(double val)
public double adjustedLog10(double val)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||