org.swtchart.internal.axis
Class AxisTickLabels

java.lang.Object
  extended by org.swtchart.internal.axis.AxisTickLabels

public class AxisTickLabels
extends java.lang.Object

Axis tick labels.


Constructor Summary
protected AxisTickLabels(Chart chart, Axis axis)
          Constructor.
 
Method Summary
protected  void dispose()
          Disposes the resources.
protected  Rectangle getBounds()
          Gets the bounds on chart panel.
protected  Font getFont()
          Gets the font.
protected  Color getForeground()
          Gets the foreground color.
protected  java.text.Format getFormat()
          Gets the format for axis tick label.
 ChartLayoutData getLayoutData()
          Gets the layout data.
 java.util.ArrayList<java.lang.Integer> getTickLabelPositions()
          Gets the tick label positions.
protected  java.util.ArrayList<java.lang.Double> getTickLabelValues()
          Gets the tick label values.
 void paintControl(PaintEvent e)
           
 void setBounds(int x, int y, int width, int height)
          Sets the bounds on chart panel.
protected  void setFont(Font font)
          Sets the font.
 void setForeground(Color color)
          Sets the foreground color.
protected  void setFormat(java.text.Format format)
          Sets the format for axis tick label.
protected  void update(int length)
          Updates the tick labels.
protected  void updateLayoutData()
          Updates the tick labels layout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AxisTickLabels

protected AxisTickLabels(Chart chart,
                         Axis axis)
Constructor.

Parameters:
chart - the chart
axis - the axis
Method Detail

setForeground

public void setForeground(Color color)
Sets the foreground color.

Parameters:
color - the foreground color

getForeground

protected Color getForeground()
Gets the foreground color.

Returns:
the foreground color

update

protected void update(int length)
Updates the tick labels.

Parameters:
length - the axis length

getTickLabelPositions

public java.util.ArrayList<java.lang.Integer> getTickLabelPositions()
Gets the tick label positions.

Returns:
the tick label positions

getTickLabelValues

protected java.util.ArrayList<java.lang.Double> getTickLabelValues()
Gets the tick label values.

Returns:
the tick label values

setFont

protected void setFont(Font font)
Sets the font.

Parameters:
font - the font

getFont

protected Font getFont()
Gets the font.

Returns:
the font

getLayoutData

public ChartLayoutData getLayoutData()
Gets the layout data.

Returns:
the layout data

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Sets the bounds on chart panel.

Parameters:
x - the x coordinate
y - the y coordinate
width - the width
height - the height

getBounds

protected Rectangle getBounds()
Gets the bounds on chart panel.

Returns:
the bounds on chart panel

dispose

protected void dispose()
Disposes the resources.


updateLayoutData

protected void updateLayoutData()
Updates the tick labels layout.


paintControl

public void paintControl(PaintEvent e)

setFormat

protected void setFormat(java.text.Format format)
Sets the format for axis tick label. DecimalFormat and DateFormat should be used for double[] series and Data[] series respectively.

If null is set, default format will be used.

Parameters:
format - the format

getFormat

protected java.text.Format getFormat()
Gets the format for axis tick label.

Returns:
the format