public class Axes extends TeeBase
Title: Axes class
Description: Accesses list of all TChart Axes. Includes Custom and Depth Axes
Copyright (c) 2005-2019 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); } } }
Modifier and Type | Field and Description |
---|---|
protected CustomAxes |
custom |
protected DepthAxis |
depth |
protected DepthAxis |
depthTop |
static int |
STANDARD_AXES |
chart, InternalUse
Constructor and Description |
---|
Axes() |
Axes(IBaseChart c) |
Modifier and Type | Method and Description |
---|---|
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. Normally you do not need to call the Draw method directly. |
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.
|
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. |
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.
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)
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.
It also controls where Series points will be placed. Every TChart class has five Axes: Left, Top, Right, Bottom and z depth. |
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.
Every TChart class has five Axes: Left, Top, Right, Bottom and z depth. |
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.
It also controls where Series points will be placed. |
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. |
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. |
void |
setVisible(boolean value)
Determines whether all five Chart Axes are visible or not.
|
java.lang.String[] |
stringItems() |
getChart, invalidate, setBooleanProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
public static final int STANDARD_AXES
protected CustomAxes custom
protected DepthAxis depth
protected DepthAxis depthTop
public Axes()
public Axes(IBaseChart c)
public static Axis createNewAxis(IBaseChart chart)
public java.lang.String[] stringItems()
public int indexOf(Axis a)
a
- Axispublic Axis getAxis(int index)
index
- intpublic int getCount()
public boolean getDrawBehind()
public void setDrawBehind(boolean value)
value
- booleanpublic void doZoom(int x0, int y0, int x1, int y1)
public CustomAxes getCustom()
public void setCustom(CustomAxes value)
value
- CustomAxespublic void adjustMaxMin()
public void internalCalcPositions()
public Axis getLeft()
public void setLeft(Axis value)
value
- Axispublic Axis getTop()
Axis
public void setTop(Axis value)
value
- Axispublic Axis getRight()
Axis
public void setRight(Axis value)
value
- Axispublic Axis getBottom()
Axis
public void setBottom(Axis value)
value
- Axispublic DepthAxis getDepth()
Axis
public void setDepth(DepthAxis value)
value
- DepthAxispublic Axis getDepthTop()
public void setDepthTop(DepthAxis value)
value
- DepthAxispublic boolean getVisible()
public void setVisible(boolean value)
value
- booleanpublic void setChart(IBaseChart value)
TeeBase
public void draw()
public void draw(IGraphics3D g)