Package org.swtchart.internal.axis
Class AxisTick
- java.lang.Object
-
- org.swtchart.internal.axis.AxisTick
-
-
Field Summary
-
Fields inherited from interface org.swtchart.IAxisTick
MIN_GRID_STEP_HINT
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AxisTickLabels
getAxisTickLabels()
Gets the axis tick labels.AxisTickMarks
getAxisTickMarks()
Gets the axis tick marks.Rectangle
getBounds()
Gets the bounds of axis tick.Font
getFont()
Gets the font for tick labels.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(Font font)
Sets the font for tick labels.void
setForeground(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.protected void
updateLayoutData()
Updates the tick layout.void
updateTick(int length)
Updates the tick around per 64 pixel.
-
-
-
Method Detail
-
getAxisTickMarks
public AxisTickMarks getAxisTickMarks()
Gets the axis tick marks.- Returns:
- the axis tick marks
-
getAxisTickLabels
public AxisTickLabels getAxisTickLabels()
Gets the axis tick labels.- Returns:
- the axis tick labels
-
setForeground
public void setForeground(Color color)
Description copied from interface:IAxisTick
Sets the foreground color of axis tick.- Specified by:
setForeground
in interfaceIAxisTick
- Parameters:
color
- the foreground color of axis tick
-
getForeground
public Color getForeground()
Description copied from interface:IAxisTick
Gets the foreground color of axis tick.- Specified by:
getForeground
in interfaceIAxisTick
- Returns:
- the foreground color of axis tick
-
setFont
public void setFont(Font font)
Description copied from interface:IAxisTick
Sets the font for tick labels.
-
getFont
public Font getFont()
Description copied from interface:IAxisTick
Gets the font for tick labels.
-
isVisible
public boolean isVisible()
Description copied from interface:IAxisTick
Gets the state indicating if tick marks are visible.
-
setVisible
public void setVisible(boolean isVisible)
Description copied from interface:IAxisTick
Sets the state indicating if tick marks are visible.- Specified by:
setVisible
in interfaceIAxisTick
- Parameters:
isVisible
- true to make the tick marks visible
-
getTickMarkStepHint
public int getTickMarkStepHint()
Description copied from interface:IAxisTick
Gets the tick mark step hint in pixels.- Specified by:
getTickMarkStepHint
in interfaceIAxisTick
- Returns:
- the tick mark step hint in pixels
-
setTickMarkStepHint
public void setTickMarkStepHint(int tickMarkStepHint)
Description copied from interface:IAxisTick
Sets the tick mark step hint in pixels.- Specified by:
setTickMarkStepHint
in interfaceIAxisTick
- Parameters:
tickMarkStepHint
- the tick mark step hint with pixels (> IAxisTick.MIN_GRID_STEP_HINT)
-
getTickLabelAngle
public int getTickLabelAngle()
Description copied from interface:IAxisTick
Gets the tick label angle.- Specified by:
getTickLabelAngle
in interfaceIAxisTick
- Returns:
- the tick label angle in degree
-
setTickLabelAngle
public void setTickLabelAngle(int angle)
Description copied from interface:IAxisTick
Sets the tick label angle.- Specified by:
setTickLabelAngle
in interfaceIAxisTick
- 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
public void setFormat(java.text.Format format)
Description copied from interface:IAxisTick
Sets the format for axis tick label. DecimalFormat and DateFormat should be used for double[] series and Date[] series respectively.
-
getFormat
public java.text.Format getFormat()
Description copied from interface:IAxisTick
Gets the format for axis tick label.
-
getBounds
public Rectangle getBounds()
Description copied from interface:IAxisTick
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.
-
getTickLabelValues
public double[] getTickLabelValues()
Description copied from interface:IAxisTick
Gets the tick label values.- Specified by:
getTickLabelValues
in interfaceIAxisTick
- Returns:
- the tick label values
-
updateTick
public void updateTick(int length)
Updates the tick around per 64 pixel.- Parameters:
length
- the axis length
-
updateLayoutData
protected void updateLayoutData()
Updates the tick layout.
-
-