Java Statistical Classes

jsc.swt.plot2d
Class HorizontalAxis

java.lang.Object
  |
  +--jsc.swt.plot2d.Axis
        |
        +--jsc.swt.plot2d.HorizontalAxis
All Implemented Interfaces:
PlotObject

public class HorizontalAxis
extends Axis

This class represents a horizontal axis drawn on a plot. The axis consists of a horizontal line, its label, vertical tick marks and their value labels.

Version:
1.0
Author:
A. J. Bertie.

Field Summary
 
Fields inherited from class jsc.swt.plot2d.Axis
axisLabel, axisLine, axisModel, paintLabels, tickCount, tickLabels, tickMarks
 
Constructor Summary
HorizontalAxis()
          Creates a default horizontal axis with minimum 0, maximum 1 and tick marks at 0 and 1.
HorizontalAxis(AxisModel axisModel, double y)
          Creates the horizontal axis using the given AxisModel data structure and ordinate.
HorizontalAxis(AxisModel axisModel, double y, Color axisColour, Stroke axisStroke, int tickSize, Font axisLabelFont, Font tickLabelFont)
          Creates the horizontal axis using the given AxisModel data structure, ordinate, graphical attributes and fonts.
HorizontalAxis(AxisModel axisModel, double y, Color axisColour, Stroke axisStroke, int tickSize, Stroke tickStroke, Color axisLabelColour, Font axisLabelFont, Color tickLabelColour, Font tickLabelFont)
          Creates the horizontal axis using the given AxisModel data structure, ordinate, graphical attributes and fonts.
 
Method Summary
 HorizontalAxis setModel(AxisModel axisModel)
          Given a new model, returns a horizontal axis with the same graphical attributes as this axis.
 
Methods inherited from class jsc.swt.plot2d.Axis
contains, draw, getAxisColour, getAxisLabel, getAxisLabelColour, getAxisLabelFont, getAxisLine, getAxisStroke, getMax, getMin, getModel, getTickCount, getTickLabel, getTickLabelColour, getTickLabelFont, getTickMark, getTickSize, getTickStroke, setPaintLabels
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HorizontalAxis

public HorizontalAxis()
Creates a default horizontal axis with minimum 0, maximum 1 and tick marks at 0 and 1. This may be convenient as a dummy axis in constructors. Default graphical attributes and fonts are used.


HorizontalAxis

public HorizontalAxis(AxisModel axisModel,
                      double y)
Creates the horizontal axis using the given AxisModel data structure and ordinate. The y parameter is the ordinate on the vertical axis through which this horizontal axis is drawn. Default graphical attributes and fonts are used.

Parameters:
axisModel - the axis data structure.
y - the ordinate of the axis.

HorizontalAxis

public HorizontalAxis(AxisModel axisModel,
                      double y,
                      Color axisColour,
                      Stroke axisStroke,
                      int tickSize,
                      Font axisLabelFont,
                      Font tickLabelFont)
Creates the horizontal axis using the given AxisModel data structure, ordinate, graphical attributes and fonts. The y parameter is the ordinate on the vertical axis through which this horizontal axis is drawn.

Parameters:
axisModel - the axis data structure.
y - the ordinate of the axis.
axisColour - the colour of the axis, tick marks and labels.
axisStroke - the pen style of the axis and tick marks.
tickSize - the length of the tick mark in pixels.
axisLabelFont - the font of the axis label.
tickLabelFont - the font of the tick mark labels.

HorizontalAxis

public HorizontalAxis(AxisModel axisModel,
                      double y,
                      Color axisColour,
                      Stroke axisStroke,
                      int tickSize,
                      Stroke tickStroke,
                      Color axisLabelColour,
                      Font axisLabelFont,
                      Color tickLabelColour,
                      Font tickLabelFont)
Creates the horizontal axis using the given AxisModel data structure, ordinate, graphical attributes and fonts. The y parameter is the ordinate on the vertical axis through which this horizontal axis is drawn.

Parameters:
axisModel - the axis data structure.
y - the ordinate of the axis.
axisColour - the colour of the axis and and tick marks.
axisStroke - the pen style of the axis.
tickSize - the length of the tick mark in pixels.
tickStroke - the pen style of the tick marks.
axisLabelColour - the colour of the axis label.
axisLabelFont - the font of the axis label.
tickLabelColour - the colour of the tick mark labels.
tickLabelFont - the font of the tick mark labels.
Method Detail

setModel

public HorizontalAxis setModel(AxisModel axisModel)
Given a new model, returns a horizontal axis with the same graphical attributes as this axis. This method can be used to rescale the axis.

Parameters:
axisModel - the new axis data structure.
Returns:
the rescaled horizontal axis .

Java Statistical Classes

Copyright © Andrew James Bertie, 2005, all rights reserved. Updated 12th Aug 2005