All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class MSBChart.Axis

java.lang.Object
   |
   +----MSBChart.ChartComponent
           |
           +----MSBChart.Axis

public class Axis
extends ChartComponent

The axis is made of:

Example:

// create axis
MSBChart.Axis XAxis=new Axis(Axis.HORIZONTAL,new Scale());
MSBChart.Axis YAxis=new Axis(Axis.VERTICAL,new Scale());
XAxis.scale.min=0;
YAxis.scale.min=0;
YAxis.scaleTickInterval=1;
XAxis.scaleTickInterval=1;
String[] lbls={"June","July","Aug.","Sept.","Oct.","Nov.","Dec."};
XAxis.tickLabels=lbls;


Variable Index

 o bigTickInterval
 o bigTickPixels
 o bigTicksGrid
 o ceroAxis
 o CEROAXIS_LINE
 o CEROAXIS_NO
 o CEROAXIS_SCALE
 o ceroAxisStyle
 o DescColor
 o DescFont
 o gridStyle
 o HORIZONTAL
 o IntegerScale
 o orientation
 o peerAxis
 o plot
 o scale
 o scaleTickInterval
 o style
 o tickAtBase
 o tickLabels
 o tickPixels
 o VERTICAL

Constructor Index

 o Axis(int, Scale)

Method Index

 o draw(Graphics, Axis)

Variables

 o HORIZONTAL
 public static final int HORIZONTAL
 o VERTICAL
 public static final int VERTICAL
 o CEROAXIS_LINE
 public static final int CEROAXIS_LINE
 o CEROAXIS_NO
 public static final int CEROAXIS_NO
 o CEROAXIS_SCALE
 public static final int CEROAXIS_SCALE
 o IntegerScale
 public boolean IntegerScale
if true the labels will be display as integer values. That's "1" instead of "1.0".
 o scale
 public Scale scale
scale assigned to the axis.
 
 o bigTicksGrid
 public boolean bigTicksGrid

if true the grid will be displayed only for the big ticks. If false (default) will be displayed for all ticks.

Example of grid:
 
 o scaleTickInterval
 public int scaleTickInterval

A value of 100 means that the ticks will be displayed in intervals of 100. That's, first tick at scale.min , second at scale.min+100 third at scale.min+200...

 
 o bigTickInterval
 public int bigTickInterval
A value of 5 means that a big tick will be displayed after 4 small ticks.
 
 o tickPixels
 public int tickPixels
length of the line used to draw ticks.
 o bigTickPixels
 public int bigTickPixels
length of the line used to draw big ticks.
 
 o plot
 public Plotter plot
internal use.
 
 o peerAxis
 public Axis peerAxis
internal use.
 
 o ceroAxis
 public int ceroAxis

displays a cero axis if there are negative values in the chart. Valid values are CEROAXIS_NO, CEROAXIS_LINE and CEROAXIS_SCALE.

 

 o ceroAxisStyle
 public LineStyle ceroAxisStyle
style of the cero axis.
 o tickAtBase
 public boolean tickAtBase
if true draws the first tick at scale.min. If false at scale.min+ scaleTickInterval.
 
 o style
 public LineStyle style
Style of the axis.
 
 o gridStyle
 public LineStyle gridStyle
Style of the grid. If null (default) no grid is displayed.
 
 o orientation
 public int orientation
orientation of the axis. Valid values are VERTICAL or HORIZONTAL.
 o DescColor
 public Color DescColor
Color of the text used to display the labels.
 o DescFont
 public Font DescFont
Font of the text used to display the labels.
 o tickLabels
 public String tickLabels[]
Labels display at big ticks. If null the scale value will be used.
 

Constructors

 o Axis
 public Axis(int o,
             Scale s)
creates an axis with an orientation and scale.

Methods

 o draw
 public void draw(Graphics g,
                  Axis peerAxis)
draws the axis.

All Packages  Class Hierarchy  This Package  Previous  Next  Index