com.jrefinery.chart
Class HorizontalNumberAxis3D

java.lang.Object
  extended by com.jrefinery.chart.Axis
      extended by com.jrefinery.chart.ValueAxis
          extended by com.jrefinery.chart.NumberAxis
              extended by com.jrefinery.chart.HorizontalNumberAxis
                  extended by com.jrefinery.chart.HorizontalNumberAxis3D
All Implemented Interfaces:
AxisConstants, HorizontalAxis

public class HorizontalNumberAxis3D
extends HorizontalNumberAxis

A horizontal axis that displays numerical values.

See Also:
XYPlot

Field Summary
static double DEFAULT_EFFECT_3D
          The default 3D-effect (in pixels).
protected  boolean verticalTickLabels
          A flag indicating whether or not tick labels are drawn vertically.
 
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.ValueAxis
anchorValue, autoRange, autoTickIndex, autoTickUnitSelection, crosshairLockedOnData, crosshairPaint, crosshairStroke, crosshairValue, crosshairVisible, DEFAULT_AUTO_RANGE, DEFAULT_CROSSHAIR_PAINT, DEFAULT_CROSSHAIR_STROKE, DEFAULT_CROSSHAIR_VISIBLE, DEFAULT_GRID_LINE_PAINT, DEFAULT_GRID_LINE_STROKE, DEFAULT_MAXIMUM_AXIS_VALUE, DEFAULT_MINIMUM_AXIS_VALUE, fixedAutoRange, gridLinesVisible, gridPaint, gridStroke, maximumRangeLength, minimumRangeLength, range
 
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
HorizontalNumberAxis3D()
          Constructs a HorizontalNumberAxis3D, with no label and default attributes.
HorizontalNumberAxis3D(java.lang.String label)
          Constructs a horizontal number axis, using default values where necessary.
HorizontalNumberAxis3D(java.lang.String label, java.awt.Font labelFont, double minimumAxisValue, double maximumAxisValue)
          Constructs a horizontal number axis.
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, boolean autoRange, boolean autoRangeIncludesZero, boolean autoRangeStickyZero, java.lang.Number autoRangeMinimumSize, 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, 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 plot 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, getVerticalTickLabels, refreshTicks, setVerticalTickLabels, translateJava2DtoValue, translateValueToJava2D
 
Methods inherited from class com.jrefinery.chart.NumberAxis
autoRangeIncludesZero, autoRangeStickyZero, calculateHighestVisibleTickValue, calculateLowestVisibleTickValue, calculateVisibleTickCount, getAutoRangeMinimumSize, getLowerMargin, getStandardTickUnits, getTickUnit, getUpperMargin, isInverted, setAutoRangeIncludesZero, setAutoRangeMinimumSize, setAutoRangeStickyZero, setInverted, setLowerMargin, setStandardTickUnits, setTickUnit, setUpperMargin
 
Methods inherited from class com.jrefinery.chart.ValueAxis
centerRange, getAnchorValue, getCrosshairPaint, getCrosshairStroke, getCrosshairValue, getFixedAutoRange, getGridPaint, getGridStroke, getMaximumAxisValue, getMinimumAxisValue, getRange, isAutoRange, isAutoTickUnitSelection, isCrosshairLockedOnData, isCrosshairVisible, isGridLinesVisible, resizeRange, resizeRange, setAnchoredRange, setAnchorValue, setAutoRange, setAutoTickUnitSelection, setCrosshairLockedOnData, setCrosshairPaint, setCrosshairStroke, setCrosshairValue, setCrosshairVisible, setFixedAutoRange, setGridLinesVisible, setGridPaint, setGridStroke, setMaximumAxisValue, setMinimumAxisValue, setRange, setRange, setRangeAboutValue
 
Methods inherited from class com.jrefinery.chart.Axis
addChangeListener, getFixedDimension, getLabel, getLabelFont, getLabelInsets, getLabelPaint, getMaxTickLabelWidth, getPlot, getTickLabelFont, getTickLabelInsets, getTickLabelPaint, getTickMarkStroke, isTickLabelsVisible, isTickMarksVisible, isVisible, notifyListeners, removeChangeListener, setFixedDimension, setLabel, setLabelFont, setLabelInsets, setLabelPaint, setPlot, setTickLabelFont, setTickLabelInsets, setTickLabelPaint, setTickLabelsVisible, setTickMarkStroke, setTickMarksVisible, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

verticalTickLabels

protected boolean verticalTickLabels
A flag indicating whether or not tick labels are drawn vertically.


DEFAULT_EFFECT_3D

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

See Also:
Constant Field Values
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 values where necessary.

Parameters:
label - The axis label.

HorizontalNumberAxis3D

public HorizontalNumberAxis3D(java.lang.String label,
                              java.awt.Font labelFont,
                              double minimumAxisValue,
                              double maximumAxisValue)
Constructs a horizontal number axis.

Parameters:
label - The axis label.
labelFont - The font for displaying the axis label.
minimumAxisValue - The lowest value shown on the axis.
maximumAxisValue - 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,
                              boolean autoRange,
                              boolean autoRangeIncludesZero,
                              boolean autoRangeStickyZero,
                              java.lang.Number autoRangeMinimumSize,
                              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,
                              double effect3d)
Constructs a horizontal number axis.

Parameters:
label - The axis label.
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 or not tick labels are drawn vertically.
tickMarksVisible - 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 range is automatically determined to fit the data.
autoRangeIncludesZero - A flag indicating whether or not the axis range *must* include zero.
autoRangeMinimum - The smallest axis range permitted (avoids problems with a 'zero' range).
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).
autoTickUnit - 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 or not 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).
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.
Method Detail

getEffect3d

public double getEffect3d()
Return axis 3d deep along 'Z' axis.


draw

public void draw(java.awt.Graphics2D g2,
                 java.awt.geom.Rectangle2D drawArea,
                 java.awt.geom.Rectangle2D plotArea)
Draws the plot 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.

Specified by:
reserveHeight in interface HorizontalAxis
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;

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.

Specified by:
reserveAxisArea in interface HorizontalAxis
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;

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 the plot is compatible with the axis, and false otherwise.


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.