|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.swtchart.internal.axis.Axis
public class Axis
An axis.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.swtchart.IAxis |
|---|
IAxis.Direction, IAxis.Position |
| Field Summary | |
|---|---|
static double |
DEFAULT_LOG_SCALE_MAX
the default maximum value of log scale range |
static double |
DEFAULT_LOG_SCALE_MIN
the default minimum value of log scale range |
static double |
DEFAULT_MAX
the default maximum value of range |
static double |
DEFAULT_MIN
the default minimum value of range |
static int |
MARGIN
the margin in pixels |
| Constructor Summary | |
|---|---|
Axis(int id,
IAxis.Direction direction,
Chart chart)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addDisposeListener(IDisposeListener listener)
Adds the dispose listener. |
void |
adjustRange()
Adjusts the axis range to the series belonging to the axis, so that all series are completely shown. |
void |
adjustRange(boolean update)
Adjusts the axis range to the series belonging to the axis. |
protected void |
dispose()
Disposes the resources. |
void |
enableCategory(boolean enabled)
Enables category. |
void |
enableLogScale(boolean enabled)
Enables the log scale. |
java.lang.String[] |
getCategorySeries()
Gets the category series. |
double |
getDataCoordinate(int pixelCoordinate)
Gets the data coordinate corresponding to the given pixel coordinate on plot area. |
double |
getDataCoordinate(int pixelCoordinate,
double lower,
double upper)
Gets the data coordinate corresponding to the given pixel coordinate on plot area. |
IAxis.Direction |
getDirection()
Gets the axis direction. |
IGrid |
getGrid()
Gets the grid. |
int |
getId()
Gets the axis id. |
int |
getNumRisers()
Gets the number of risers per category. |
int |
getPixelCoordinate(double dataCoordinate)
Gets the pixel coordinate corresponding to the given data coordinate. |
int |
getPixelCoordinate(double dataCoordinate,
double lower,
double upper)
Gets the pixel coordinate corresponding to the given data coordinate. |
IAxis.Position |
getPosition()
Gets the axis position. |
Range |
getRange()
Gets the axis range. |
AxisTick |
getTick()
Gets the axis tick. |
ITitle |
getTitle()
Gets the axis title. |
boolean |
isCategoryEnabled()
Gets the state indicating if category is enabled. |
boolean |
isDateEnabled()
Gets the state indicating if date is enabled. |
boolean |
isHorizontalAxis()
Checks if the axis is horizontal. |
boolean |
isLogScaleEnabled()
Gets the state indicating if log scale is enabled. |
boolean |
isValidCategoryAxis()
Gets the state indicating if the axis is valid category axis. |
void |
refresh()
Refreshes the cache. |
void |
scrollDown()
Scrolls up the axis. |
void |
scrollUp()
Scrolls up the axis. |
void |
setCategorySeries(java.lang.String[] series)
Sets the category series. |
void |
setNumRisers(int numRisers)
Sets the number of risers per category. |
void |
setPosition(IAxis.Position position)
Sets the axis position. |
void |
setRange(Range range)
Sets the axis range. |
void |
setRange(Range range,
boolean update)
Sets the axis range. |
void |
updateLayoutData()
Updates the layout data. |
void |
zoomIn()
Zooms in the axis. |
void |
zoomIn(double coordinate)
Zooms in the axis at the given coordinate. |
void |
zoomOut()
Zooms out the axis. |
void |
zoomOut(double coordinate)
Zooms out the axis at the given coordinate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MARGIN
public static final double DEFAULT_MIN
public static final double DEFAULT_MAX
public static final double DEFAULT_LOG_SCALE_MIN
public static final double DEFAULT_LOG_SCALE_MAX
| Constructor Detail |
|---|
public Axis(int id,
IAxis.Direction direction,
Chart chart)
id - the axis indexdirection - the axis direction (X or Y)chart - the chart| Method Detail |
|---|
public int getId()
IAxisAn axis id is automatically assigned when axis is created.
getId in interface IAxispublic IAxis.Direction getDirection()
IAxisThe axis direction is set when axis is created, and won't be changed.
getDirection in interface IAxispublic IAxis.Position getPosition()
IAxis
getPosition in interface IAxispublic void setPosition(IAxis.Position position)
IAxis
setPosition in interface IAxisposition - the axis positionpublic void setRange(Range range)
IAxis
setRange in interface IAxisrange - the axis range
public void setRange(Range range,
boolean update)
range - the axis rangeupdate - true if updating the chart layoutpublic Range getRange()
IAxis
getRange in interface IAxispublic ITitle getTitle()
IAxis
getTitle in interface IAxispublic AxisTick getTick()
IAxis
getTick in interface IAxis
public void enableLogScale(boolean enabled)
throws java.lang.IllegalStateException
IAxis
enableLogScale in interface IAxisenabled - true if enabling log scales
java.lang.IllegalStateException - if minimum value of series belonging to this axis is less
than zero.public boolean isLogScaleEnabled()
IAxis
isLogScaleEnabled in interface IAxispublic IGrid getGrid()
IAxis
getGrid in interface IAxispublic void adjustRange()
IAxis
adjustRange in interface IAxispublic void adjustRange(boolean update)
update - true if updating chart layoutpublic void zoomIn()
IAxis
zoomIn in interface IAxispublic void zoomIn(double coordinate)
IAxis
zoomIn in interface IAxiscoordinate - the coordinatepublic void zoomOut()
IAxis
zoomOut in interface IAxispublic void zoomOut(double coordinate)
IAxis
zoomOut in interface IAxiscoordinate - the coordinatepublic void scrollUp()
IAxis
scrollUp in interface IAxispublic void scrollDown()
IAxis
scrollDown in interface IAxispublic boolean isCategoryEnabled()
IAxis
isCategoryEnabled in interface IAxispublic boolean isValidCategoryAxis()
public void enableCategory(boolean enabled)
IAxis
enableCategory in interface IAxisenabled - true if enabling categorypublic void setCategorySeries(java.lang.String[] series)
IAxis
setCategorySeries in interface IAxisseries - the category seriespublic java.lang.String[] getCategorySeries()
IAxis
getCategorySeries in interface IAxispublic int getPixelCoordinate(double dataCoordinate)
IAxis
getPixelCoordinate in interface IAxisdataCoordinate - the data coordinate
public int getPixelCoordinate(double dataCoordinate,
double lower,
double upper)
dataCoordinate - the data coordinatelower - the min value of rangeupper - the max value of range
public double getDataCoordinate(int pixelCoordinate)
IAxis
getDataCoordinate in interface IAxispixelCoordinate - the pixel coordinate on plot area
public double getDataCoordinate(int pixelCoordinate,
double lower,
double upper)
pixelCoordinate - the pixel coordinate on plot arealower - the min value of rangeupper - the max value of range
public void setNumRisers(int numRisers)
numRisers - the number of risers per categorypublic int getNumRisers()
public boolean isHorizontalAxis()
protected void dispose()
public void addDisposeListener(IDisposeListener listener)
IAxis
addDisposeListener in interface IAxislistener - the dispose listenerpublic void updateLayoutData()
public void refresh()
public boolean isDateEnabled()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||