com.jrefinery.chart
Class HorizontalNumberAxis3D

java.lang.Object
  |
  +--com.jrefinery.chart.Axis
        |
        +--com.jrefinery.chart.ValueAxis
              |
              +--com.jrefinery.chart.NumberAxis
                    |
                    +--com.jrefinery.chart.HorizontalNumberAxis
                          |
                          +--com.jrefinery.chart.HorizontalNumberAxis3D
All Implemented Interfaces:
AxisConstants, HorizontalAxis

public class HorizontalNumberAxis3D
extends HorizontalNumberAxis

A horizontal axis that displays numerical values, and has a 3D-effect.

Author:
TL

Field Summary
static double DEFAULT_EFFECT_3D
          The default 3D-effect (in pixels).
 
Fields inherited from class com.jrefinery.chart.NumberAxis
DEFAULT_AUTO_RANGE_INCLUDES_ZERO, DEFAULT_AUTO_RANGE_STICKY_ZERO, DEFAULT_TICK_UNIT
 
Fields inherited from class com.jrefinery.chart.ValueAxis
DEFAULT_AUTO_RANGE, DEFAULT_AUTO_RANGE_MINIMUM_SIZE, DEFAULT_CROSSHAIR_PAINT, DEFAULT_CROSSHAIR_STROKE, DEFAULT_CROSSHAIR_VISIBLE, DEFAULT_GRID_LINE_PAINT, DEFAULT_GRID_LINE_STROKE, DEFAULT_LOWER_BOUND, DEFAULT_LOWER_MARGIN, DEFAULT_RANGE, DEFAULT_UPPER_BOUND, DEFAULT_UPPER_MARGIN, MAXIMUM_TICK_COUNT
 
Fields inherited from class com.jrefinery.chart.Axis
fixedDimension, label, labelFont, labelInsets, labelPaint, plot, tickLabelFont, tickLabelInsets, tickLabelPaint, tickLabelsVisible, tickMarkPaint, 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_PAINT, DEFAULT_TICK_STROKE
 
Constructor Summary
HorizontalNumberAxis3D()
          Constructs a HorizontalNumberAxis3D, with no label and default attributes.
HorizontalNumberAxis3D(java.lang.String label)
          Constructs a horizontal number axis, using default attribute values where necessary.
HorizontalNumberAxis3D(java.lang.String label, java.awt.Font labelFont, double lowerBound, double upperBound)
          Constructs a horizontal number axis, using default attribute values where necessary.
HorizontalNumberAxis3D(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, java.awt.Paint tickMarkPaint, boolean autoRange, java.lang.Number autoRangeMinimumSize, boolean autoRangeIncludesZero, boolean autoRangeStickyZero, double lowerBound, double upperBound, boolean inverted, boolean autoTickUnitSelection, NumberTickUnit tickUnit, boolean gridLinesVisible, java.awt.Stroke gridStroke, java.awt.Paint gridPaint, double anchorValue, boolean crosshairVisible, double crosshairValue, java.awt.Stroke crosshairStroke, java.awt.Paint crosshairPaint, double effect3d)
          Constructs a horizontal number axis.
 
Method Summary
 void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D drawArea, java.awt.geom.Rectangle2D plotArea)
          Draws the axis on a Java 2D graphics device (such as the screen or a printer).
 double getEffect3d()
          Return axis 3d deep along 'Z' axis.
protected  boolean isCompatiblePlot(Plot plot)
          Returns true if a plot is compatible with the axis, and false otherwise.
 java.awt.geom.Rectangle2D reserveAxisArea(java.awt.Graphics2D g2, Plot plot, java.awt.geom.Rectangle2D drawArea, double reservedWidth)
          Returns area in which the axis will be displayed.
 double reserveHeight(java.awt.Graphics2D g2, Plot plot, java.awt.geom.Rectangle2D drawArea)
          Returns the height required to draw the axis in the specified draw area.
 
Methods inherited from class com.jrefinery.chart.HorizontalNumberAxis
autoAdjustRange, configure, getMarkerBand, getVerticalTickLabels, refreshTicks, selectAutoTickUnit, setMarkerBand, setVerticalTickLabels, translateJava2DtoValue, translateValueToJava2D
 
Methods inherited from class com.jrefinery.chart.NumberAxis
autoRangeIncludesZero, autoRangeStickyZero, calculateHighestVisibleTickValue, calculateLowestVisibleTickValue, calculateVisibleTickCount, createIntegerTickUnits, createIntegerTickUnits, createStandardTickUnits, createStandardTickUnits, getTickUnit, isInverted, setAutoRangeIncludesZero, setAutoRangeStickyZero, setInverted, setTickUnit, setTickUnitAttribute
 
Methods inherited from class com.jrefinery.chart.ValueAxis
centerRange, getAnchorValue, getAutoRangeMinimumSize, getAutoTickIndex, getCrosshairPaint, getCrosshairStroke, getCrosshairValue, getFixedAutoRange, getGridPaint, getGridStroke, getLowerMargin, getMaximumAxisValue, getMinimumAxisValue, getRange, getStandardTickUnits, getUpperMargin, isAutoRange, isAutoTickUnitSelection, isCrosshairLockedOnData, isCrosshairVisible, isGridLinesVisible, resizeRange, resizeRange, setAnchoredRange, setAnchorValue, setAnchorValueAttribute, setAutoRange, setAutoRangeAttribute, setAutoRangeMinimumSize, setAutoRangeMinimumSizeAttribute, setAutoTickIndex, setAutoTickUnitSelection, setAutoTickUnitSelectionAttribute, setCrosshairLockedOnData, setCrosshairPaint, setCrosshairStroke, setCrosshairValue, setCrosshairValue, setCrosshairValueAttribute, setCrosshairVisible, setFixedAutoRange, setGridLinesVisible, setGridPaint, setGridStroke, setLowerMargin, setMaximumAxisValue, setMinimumAxisValue, setRange, setRange, setRangeAboutValue, setRangeAttribute, setStandardTickUnits, setUpperMargin
 
Methods inherited from class com.jrefinery.chart.Axis
addChangeListener, getFixedDimension, getLabel, getLabelFont, getLabelInsets, getLabelPaint, getMaxTickLabelWidth, getPlot, getTickLabelFont, getTickLabelInsets, getTickLabelPaint, getTickMarkPaint, getTickMarkStroke, isTickLabelsVisible, isTickMarksVisible, isVisible, notifyListeners, removeChangeListener, setFixedDimension, setLabel, setLabelFont, setLabelInsets, setLabelPaint, setPlot, setTickLabelFont, setTickLabelInsets, setTickLabelPaint, setTickLabelsVisible, setTickMarkPaint, setTickMarkStroke, setTickMarksVisible, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_EFFECT_3D

public static final double DEFAULT_EFFECT_3D
The default 3D-effect (in pixels).
Constructor Detail

HorizontalNumberAxis3D

public HorizontalNumberAxis3D()
Constructs a HorizontalNumberAxis3D, with no label and default attributes.

HorizontalNumberAxis3D

public HorizontalNumberAxis3D(java.lang.String label)
Constructs a horizontal number axis, using default attribute values where necessary.
Parameters:
label - The axis label (null permitted).

HorizontalNumberAxis3D

public HorizontalNumberAxis3D(java.lang.String label,
                              java.awt.Font labelFont,
                              double lowerBound,
                              double upperBound)
Constructs a horizontal number axis, using default attribute values where necessary.
Parameters:
label - the axis label (null permitted).
labelFont - the font for displaying the axis label.
lowerBound - the lowest value shown on the axis.
upperBound - the highest value shown on the axis.

HorizontalNumberAxis3D

public HorizontalNumberAxis3D(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,
                              java.awt.Paint tickMarkPaint,
                              boolean autoRange,
                              java.lang.Number autoRangeMinimumSize,
                              boolean autoRangeIncludesZero,
                              boolean autoRangeStickyZero,
                              double lowerBound,
                              double upperBound,
                              boolean inverted,
                              boolean autoTickUnitSelection,
                              NumberTickUnit tickUnit,
                              boolean gridLinesVisible,
                              java.awt.Stroke gridStroke,
                              java.awt.Paint gridPaint,
                              double anchorValue,
                              boolean crosshairVisible,
                              double crosshairValue,
                              java.awt.Stroke crosshairStroke,
                              java.awt.Paint crosshairPaint,
                              double effect3d)
Constructs a horizontal number axis.
Parameters:
label - the axis label (null permitted).
labelFont - the font for displaying the axis label.
labelPaint - the color used to draw the axis label.
labelInsets - the blank space around the axis label.
tickLabelsVisible - flag indicating whether or not the tick labels are visible.
tickLabelFont - font for displaying the tick labels.
tickLabelPaint - the color used to display the tick labels.
tickLabelInsets - the blank space around the tick labels.
verticalTickLabels - a flag indicating whether tick labels are drawn vertically.
tickMarksVisible - a flag indicating whether or not tick marks are visible.
tickMarkStroke - the stroke used to draw tick marks (if visible).
tickMarkPaint - the paint used to draw tick marks (if visible).
autoRange - a flag indicating whether or not the axis range is automatically determined to fit the data.
autoRangeMinimumSize - the smallest range allowed when the axis range is calculated to fit the data.
autoRangeIncludesZero - a flag indicating whether the axis range *must* include zero.
autoRangeStickyZero - a flag controlling the axis margins around zero.
lowerBound - the lowest value shown on the axis.
upperBound - 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 value is automatically selected from the range of standard tick units.
tickUnit - the tick unit.
gridLinesVisible - flag indicating whether grid lines are visible for this axis.
gridStroke - the Stroke used to display grid lines (if visible).
gridPaint - the Paint used to display grid lines (if visible).
anchorValue - the anchor value.
crosshairVisible - whether to show a crosshair.
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.
effect3d - the 3D-effect (in pixels).
Method Detail

getEffect3d

public double getEffect3d()
Return axis 3d deep along 'Z' axis.
Returns:
the 3D-effect (in pixels).

draw

public void draw(java.awt.Graphics2D g2,
                 java.awt.geom.Rectangle2D drawArea,
                 java.awt.geom.Rectangle2D plotArea)
Draws the axis on a Java 2D graphics device (such as the screen or a printer).
Overrides:
draw in class HorizontalNumberAxis
Parameters:
g2 - the graphics device.
drawArea - the area within which the chart should be drawn.
plotArea - the area within which the plot should be drawn (a subset of the drawArea).

reserveHeight

public double reserveHeight(java.awt.Graphics2D g2,
                            Plot plot,
                            java.awt.geom.Rectangle2D drawArea)
Returns the height required to draw the axis in the specified draw area.
Overrides:
reserveHeight in class HorizontalNumberAxis
Parameters:
g2 - the graphics device.
plot - the plot that the axis belongs to.
drawArea - the area within which the plot should be drawn.
Returns:
the height required to draw the axis in the specified draw area.

reserveAxisArea

public java.awt.geom.Rectangle2D reserveAxisArea(java.awt.Graphics2D g2,
                                                 Plot plot,
                                                 java.awt.geom.Rectangle2D drawArea,
                                                 double reservedWidth)
Returns area in which the axis will be displayed.
Overrides:
reserveAxisArea in class HorizontalNumberAxis
Parameters:
g2 - the graphics device.
plot - a reference to the plot.
drawArea - the area within which the plot and axes should be drawn.
reservedWidth - the space already reserved for the vertical axis.
Returns:
area in which the axis will be displayed.

isCompatiblePlot

protected boolean isCompatiblePlot(Plot plot)
Returns true if a plot is compatible with the axis, and false otherwise.

For this axis, the requirement is that the plot implements the HorizontalValuePlot interface.

Overrides:
isCompatiblePlot in class HorizontalNumberAxis
Parameters:
plot - the plot.
Returns:
true if a plot is compatible with the axis.