com.steema.teechart.axis
Class Axes

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.axis.Axes

public class Axes
extends TeeBase

Title: Axes class

Description: Accesses list of all TChart Axes. Includes Custom and Depth Axes

Copyright (c) 2005-2012 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL

Example:
 public void actionPerformed(ActionEvent e) {
        Object source = e.getSource();
        if (source == editButton) {
            if (myChart.getAxes().getCustom().size()==0) {
                DialogFactory.showModal(myChart.getAxes().getLeft());
            } else {
                DialogFactory.showModal(myChart.getAxes().getCustom().getAxis(0));
            }
        }
    }

    public void itemStateChanged(ItemEvent e) {
        Object source = e.getItemSelectable();
        boolean isSelected = (e.getStateChange() == ItemEvent.SELECTED);
        if (source == showButton) {
            for (int t=0; t < myChart.getAxes().getCustom().size(); t++) {
                myChart.getAxes().getCustom().getAxis(t).setVisible(isSelected);
            }
        }
    }


Field Summary
protected  CustomAxes custom
           
protected  DepthAxis depth
           
protected  DepthAxis depthTop
           
static int STANDARD_AXES
           
 
Fields inherited from class com.steema.teechart.TeeBase
chart, InternalUse
 
Constructor Summary
Axes()
           
Axes(IBaseChart c)
           
 
Method Summary
 void adjustMaxMin()
          Calls adjustMaxMin method of all axes and custom axes
protected  Axis checkAxis(Axis a)
           
static Axis createNewAxis(IBaseChart chart)
           
 void doZoom(int x0, int y0, int x1, int y1)
           
 void draw()
          This method paints the complete Axis (Ticks, Grid, Labels, Title)
using the Axis.ParentChart.Canvas.
 void draw(IGraphics3D g)
           
 Axis getAxis(int index)
          Accesses indexed axis
 Axis getBottom()
          Determines the Labels and formatting attributes of Bottom Chart side.
 int getCount()
          Returns the number of axes.
 CustomAxes getCustom()
          Accesses the Custom axes List.
 DepthAxis getDepth()
          Accesses characteristics of the Depth Axis, or z axis as it is also known.
 Axis getDepthTop()
          Returns the Depth chart axis located at the left-top edge of chart.
 boolean getDrawBehind()
          Draws axes behind or in front of Series.
 Axis getLeft()
          Determines the Labels and formatting attributes of Left Chart side.
 Axis getRight()
          Determines the Labels and formatting attributes of Right Chart side.
 Axis getTop()
          Determines the Labels and formatting attributes of Top Chart side.
 boolean getVisible()
          Shows or hides the five Chart Axes at once.
 int indexOf(Axis a)
          Obtains the index of a given axis in the axes collection.
 void internalCalcPositions()
           
 void setBottom(Axis value)
          Determines the Labels and formatting attributes of Bottom Chart side.
 void setChart(IBaseChart value)
          Chart associated with this object.
 void setCustom(CustomAxes value)
          Accesses the Custom axes List.
 void setDepth(DepthAxis value)
          Accesses characteristics of the Depth Axis, or z axis as it is also known.
 void setDepthTop(DepthAxis value)
          Sets the Depth chart axis located at the left-top edge of chart.
 void setDrawBehind(boolean value)
          Draws axes behind the Series when true.
 void setLeft(Axis value)
          Determines the Labels and formatting attributes of Left Chart side.
 void setRight(Axis value)
          Determines the Labels and formatting attributes of Right Chart side.
 void setTop(Axis value)
          Determines the Labels and formatting attributes of Top Chart side.
 void setVisible(boolean value)
          Determines whether all five Chart Axes are visible or not.
 java.lang.String[] stringItems()
           
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STANDARD_AXES

public static final int STANDARD_AXES
See Also:
Constant Field Values

custom

protected CustomAxes custom

depth

protected DepthAxis depth

depthTop

protected DepthAxis depthTop
Constructor Detail

Axes

public Axes()

Axes

public Axes(IBaseChart c)
Method Detail

createNewAxis

public static Axis createNewAxis(IBaseChart chart)

stringItems

public java.lang.String[] stringItems()

indexOf

public int indexOf(Axis a)
Obtains the index of a given axis in the axes collection.

Parameters:
a - Axis
Returns:
int

getAxis

public Axis getAxis(int index)
Accesses indexed axis

Parameters:
index - int
Returns:
Axis

getCount

public int getCount()
Returns the number of axes.

Returns:
int Number of axes

getDrawBehind

public boolean getDrawBehind()
Draws axes behind or in front of Series.
Enables/disables the painting of the Axes before the Series.
When false, the Axes will appear over the Chart Series.
Default value: true

Returns:
boolean

setDrawBehind

public void setDrawBehind(boolean value)
Draws axes behind the Series when true.

Parameters:
value - boolean

doZoom

public void doZoom(int x0,
                   int y0,
                   int x1,
                   int y1)

checkAxis

protected Axis checkAxis(Axis a)

getCustom

public CustomAxes getCustom()
Accesses the Custom axes List.

Returns:
CustomAxes

setCustom

public void setCustom(CustomAxes value)
Accesses the Custom axes List.

Parameters:
value - CustomAxes

adjustMaxMin

public void adjustMaxMin()
Calls adjustMaxMin method of all axes and custom axes


internalCalcPositions

public void internalCalcPositions()

getLeft

public Axis getLeft()
Determines the Labels and formatting attributes of Left Chart side.
It also controls where Series points will be placed.
Every TChart class has five Axes: Left, Top, Right, Bottom and z depth.

Returns:
Axis

setLeft

public void setLeft(Axis value)
Determines the Labels and formatting attributes of Left Chart side.
It also controls where Series points will be placed.
Every TChart class has five Axes: Left, Top, Right, Bottom and z depth.

Parameters:
value - Axis

getTop

public Axis getTop()
Determines the Labels and formatting attributes of Top Chart side.
It also controls where Series points will be placed.
Every TChart class has five Axes: Left, Top, Right, Bottom and z depth. The Top is pre-defined to be:
Horizontal = true
OtherSide = true

Returns:
Axis
See Also:
Axis

setTop

public void setTop(Axis value)
Determines the Labels and formatting attributes of Top Chart side.
It also controls where Series points will be placed.
Every TChart class has five Axes: Left, Top, Right, Bottom and z depth. The Top is pre-defined to be:
Horizontal = true
OtherSide = true

Parameters:
value - Axis

getRight

public Axis getRight()
Determines the Labels and formatting attributes of Right Chart side.
It also controls where Series points will be placed.
Every TChart class has five Axes: Left, Top, Right, Bottom and z depth.

Returns:
Axis
See Also:
Axis

setRight

public void setRight(Axis value)
Determines the Labels and formatting attributes of Right Chart side.
It also controls where Series points will be placed.
Every TChart class has five Axes: Left, Top, Right, Bottom and z depth.

Parameters:
value - Axis

getBottom

public Axis getBottom()
Determines the Labels and formatting attributes of Bottom Chart side.
It also controls where Series points will be placed.
Every TChart class has five Axes: Left, Top, Right, Bottom and z depth.

Returns:
Axis
See Also:
Axis

setBottom

public void setBottom(Axis value)
Determines the Labels and formatting attributes of Bottom Chart side.
It also controls where Series points will be placed.
Every TChart class has five Axes: Left, Top, Right, Bottom and z depth.

Parameters:
value - Axis

getDepth

public DepthAxis getDepth()
Accesses characteristics of the Depth Axis, or z axis as it is also known.
Every TChart class has five Axes: Left, Top, Right, Bottom and z depth.

Returns:
Axis
See Also:
Axis

setDepth

public void setDepth(DepthAxis value)
Accesses characteristics of the Depth Axis, or z axis as it is also known.
Every TChart class has five Axes: Left, Top, Right, Bottom and z depth.

Parameters:
value - DepthAxis

getDepthTop

public Axis getDepthTop()
Returns the Depth chart axis located at the left-top edge of chart.

Returns:
Axis

setDepthTop

public void setDepthTop(DepthAxis value)
Sets the Depth chart axis located at the left-top edge of chart.

Parameters:
value - DepthAxis

getVisible

public boolean getVisible()
Shows or hides the five Chart Axes at once.
Each Axis will be drawn depending also on their Visible property.
Default value: true

Returns:
boolean

setVisible

public void setVisible(boolean value)
Determines whether all five Chart Axes are visible or not.

Parameters:
value - boolean

setChart

public void setChart(IBaseChart value)
Description copied from class: TeeBase
Chart associated with this object.

Overrides:
setChart in class TeeBase
Parameters:
value - IBaseChart

draw

public void draw()
This method paints the complete Axis (Ticks, Grid, Labels, Title)
using the Axis.ParentChart.Canvas.
Normally you do not need to call the Draw method directly.


draw

public void draw(IGraphics3D g)