lt.monarch.chart.chart2D.axis
Class LabelSettings

java.lang.Object
  extended by lt.monarch.chart.style.AbstractStyle<AxisTextPaintTags>
      extended by lt.monarch.chart.chart2D.axis.LabelSettings
All Implemented Interfaces:
java.io.Serializable

public class LabelSettings
extends AbstractStyle<AxisTextPaintTags>

Axis label settings

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
 
Fields inherited from class lt.monarch.chart.style.AbstractStyle
dirty
 
Constructor Summary
Modifier Constructor and Description
protected LabelSettings(Style style)
           
 
Method Summary
Modifier and Type Method and Description
 LinearLabelLayouter getLabelLayouter()
          Gets the layouter value
 int getLabelOffset()
          Gets label offset from the ticks
 float getRelativeLabelPosition()
          Gets the relative label shift value
 double getRotationAngle()
          Returns current axis labels rotation angle in radians
 double getRotationAngle(int level)
          Returns current axis labels rotation angle in radians
 TextPaintMode getTextPaintMode()
          Gets axis labels painting mode
 void setLabelLayouter(LinearLabelLayouter layouter)
          Sets the layouter value
 void setLabelOffset(int offset)
          Sets the label offset from the ticks
 void setRelativeLabelPosition(float position)
          Sets relative labels position in range [-1;1].
 void setRotationAngle(double theta)
          Sets axis label rotation angle.
 void setRotationAngle(int level, double theta)
          Sets axis label rotation angle.
 void setTextPaintMode(TextPaintMode mode)
          Sets axis labels painting mode.
 
Methods inherited from class lt.monarch.chart.style.AbstractStyle
dispose, finalize
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelSettings

protected LabelSettings(Style style)
Method Detail

setLabelOffset

public void setLabelOffset(int offset)
Sets the label offset from the ticks

Parameters:
offset - label offset from the ticks

getLabelOffset

public int getLabelOffset()
Gets label offset from the ticks

Returns:
label offset from the ticks

getLabelLayouter

public LinearLabelLayouter getLabelLayouter()
Gets the layouter value

Returns:
the layouter value

setLabelLayouter

public void setLabelLayouter(LinearLabelLayouter layouter)
Sets the layouter value

Parameters:
layouter - the layouter value

setRotationAngle

public void setRotationAngle(double theta)
                      throws java.lang.IllegalArgumentException
Sets axis label rotation angle.

Parameters:
theta - labels rotation angle in radians
Throws:
java.lang.IllegalArgumentException - if theta < -Math.PI / 2.0d or theta > Math.PI / 2.0d

setRotationAngle

public void setRotationAngle(int level,
                             double theta)
                      throws java.lang.IllegalArgumentException
Sets axis label rotation angle.

Parameters:
level - specifies level for which sets rotation angle (0 - default)
theta - labels rotation angle in radians
Throws:
java.lang.IllegalArgumentException - if theta < -Math.PI / 2.0d or theta > Math.PI / 2.0d or level < 0

getRotationAngle

public double getRotationAngle()
Returns current axis labels rotation angle in radians

Returns:
the rotation angle of axis labels

getRotationAngle

public double getRotationAngle(int level)
Returns current axis labels rotation angle in radians

Parameters:
level - specifies level for which sets rotation angle (0 - default)
Returns:
the rotation angle of axis labels

setTextPaintMode

public void setTextPaintMode(TextPaintMode mode)
Sets axis labels painting mode.

Parameters:
mode - labels painting mode.

getTextPaintMode

public TextPaintMode getTextPaintMode()
Gets axis labels painting mode

Returns:
labels painting mode.

setRelativeLabelPosition

public void setRelativeLabelPosition(float position)
Sets relative labels position in range [-1;1]. When -1 tick is on label right, when 0 tick is on label center, when 1 tick is on label left.

Parameters:
position - relative label position in range [-1;1]

getRelativeLabelPosition

public float getRelativeLabelPosition()
Gets the relative label shift value

Returns:
the relative label shift value