com.steema.teechart.axis
Class Axes

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.axis.Axes
All Implemented Interfaces:
java.io.Serializable

public class Axes
extends TeeBase

Title: Axes class

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

Copyright (c) 2005-2008 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);
            }
        }
    }

See Also:
Serialized Form

Field Summary
protected  CustomAxes custom
           
protected  DepthAxis depth
           
protected  DepthAxis depthTop
           
static int STANDARD_AXES
           
 
Fields inherited from class com.steema.teechart.TeeBase
chart
 
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()
           
 void draw(IGraphics3D g)
           
 Axis getAxis(int index)
          Accesses indexed axis
 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.
 int getCount()
          Returns the number of axes.
 CustomAxes getCustom()
          Accesses the Custom axes List.
 Axis 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.
 Axis getDepthTop()
           
 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
 Axis getLeft()
          Determines the Labels and formatting attributes of Left Chart side.
It also controls where Series points will be placed.
 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.
 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.
 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
 int indexOf(Axis a)
           
 void internalCalcPositions()
           
 void setBottom(Axis value)
           
 void setChart(IBaseChart value)
          Chart associated with this object.
 void setCustom(CustomAxes value)
           
 void setDepth(DepthAxis value)
           
 void setDepthTop(DepthAxis value)
           
 void setDrawBehind(boolean value)
          Draws axes behind the Series when true.
 void setLeft(Axis value)
           
 void setRight(Axis value)
           
 void setTop(Axis value)
           
 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, 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)

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)

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)

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)

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)

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)

getDepth

public Axis 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)

getDepthTop

public Axis getDepthTop()

setDepthTop

public void setDepthTop(DepthAxis value)

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()

draw

public void draw(IGraphics3D g)