Package org.swtchart
Interface IAxisTick
-
- All Known Implementing Classes:
AxisTick
public interface IAxisTick
An axis tick.
-
-
Field Summary
Fields Modifier and Type Field Description static double
MIN_GRID_STEP_HINT
the minimum grid step hint
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.eclipse.swt.graphics.Rectangle
getBounds()
Gets the bounds of axis tick.org.eclipse.swt.graphics.Font
getFont()
Gets the font for tick labels.org.eclipse.swt.graphics.Color
getForeground()
Gets the foreground color of axis tick.java.text.Format
getFormat()
Gets the format for axis tick label.int
getTickLabelAngle()
Gets the tick label angle.double[]
getTickLabelValues()
Gets the tick label values.int
getTickMarkStepHint()
Gets the tick mark step hint in pixels.boolean
isVisible()
Gets the state indicating if tick marks are visible.void
setFont(org.eclipse.swt.graphics.Font font)
Sets the font for tick labels.void
setForeground(org.eclipse.swt.graphics.Color color)
Sets the foreground color of axis tick.void
setFormat(java.text.Format format)
Sets the format for axis tick label.void
setTickLabelAngle(int angle)
Sets the tick label angle.void
setTickMarkStepHint(int tickMarkStepHint)
Sets the tick mark step hint in pixels.void
setVisible(boolean isVisible)
Sets the state indicating if tick marks are visible.
-
-
-
Field Detail
-
MIN_GRID_STEP_HINT
static final double MIN_GRID_STEP_HINT
the minimum grid step hint- See Also:
- Constant Field Values
-
-
Method Detail
-
setForeground
void setForeground(org.eclipse.swt.graphics.Color color)
Sets the foreground color of axis tick.- Parameters:
color
- the foreground color of axis tick
-
getForeground
org.eclipse.swt.graphics.Color getForeground()
Gets the foreground color of axis tick.- Returns:
- the foreground color of axis tick
-
setFont
void setFont(org.eclipse.swt.graphics.Font font)
Sets the font for tick labels.- Parameters:
font
- the font for tick labels
-
getFont
org.eclipse.swt.graphics.Font getFont()
Gets the font for tick labels.- Returns:
- the font for tick labels
-
isVisible
boolean isVisible()
Gets the state indicating if tick marks are visible.- Returns:
- true if tick marks are visible
-
setVisible
void setVisible(boolean isVisible)
Sets the state indicating if tick marks are visible.- Parameters:
isVisible
- true to make the tick marks visible
-
getTickMarkStepHint
int getTickMarkStepHint()
Gets the tick mark step hint in pixels.- Returns:
- the tick mark step hint in pixels
-
setTickMarkStepHint
void setTickMarkStepHint(int tickMarkStepHint)
Sets the tick mark step hint in pixels.- Parameters:
tickMarkStepHint
- the tick mark step hint with pixels (> IAxisTick.MIN_GRID_STEP_HINT)
-
getTickLabelAngle
int getTickLabelAngle()
Gets the tick label angle.- Returns:
- the tick label angle in degree
-
setTickLabelAngle
void setTickLabelAngle(int angle)
Sets the tick label angle.- Parameters:
angle
- the angle in degree between 0 and 90. The default value is 0. If setting 0, tick labels are horizontally shown. If setting 90, tick labels are vertically shown.
-
setFormat
void setFormat(java.text.Format format)
Sets the format for axis tick label. DecimalFormat and DateFormat should be used for double[] series and Date[] series respectively.- Parameters:
format
- the format
-
getFormat
java.text.Format getFormat()
Gets the format for axis tick label.- Returns:
- the format
-
getBounds
org.eclipse.swt.graphics.Rectangle getBounds()
Gets the bounds of axis tick.This method is typically used for mouse listener to check whether mouse cursor is on axis tick. Mouse listener can be added to Chart.
- Returns:
- the bounds of axis tick.
-
getTickLabelValues
double[] getTickLabelValues()
Gets the tick label values.- Returns:
- the tick label values
-
-