lt.monarch.chart.mapper
Class Axis

java.lang.Object
  extended by lt.monarch.chart.engine.AbstractChartObject<AxisPaintTags>
      extended by lt.monarch.chart.mapper.Axis
All Implemented Interfaces:
java.io.Serializable, ChartObject, StyleEditorEntity
Direct Known Subclasses:
Axis2D, Axis3D

public abstract class Axis
extends AbstractChartObject<AxisPaintTags>

Base implementation of Axis. Axis is graphical representation of a coordinate axis of a chart.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  boolean isInvertedMapper
           
protected  AxisMapper mapper
          An associated axis mapper, which defines the axis value type.
protected  TextStyle<AxisTextPaintTags> textStyle
          Text style
 
Fields inherited from class lt.monarch.chart.engine.AbstractChartObject
AXIS_SORT_POSITION, BREAK_LINE_POSITION, DEFAULT_SORT_POSITION, GRID_SORT_POSITION, MARKER_SERIES_SORT_POSITION, MARKERS_SORT_POSITION, paintStyle, SERIES_SORT_POSITION, sortPosition, style
 
Constructor Summary
Constructor and Description
Axis(AxisMapper mapper)
          Sole constructor.
 
Method Summary
Modifier and Type Method and Description
protected  void activate()
          Activates axis.
protected  void deactivate()
          Deactivates axis.
 java.awt.Font getFont(AxisTextPaintTags tag)
           
 AxisMapper getMapper()
          Returns the axis mapper for this axis.
 int getSortPosition()
          Returns chart object paint order index.
 AbstractStyle getStyle(StyleType styleType)
          Gets style object for the stylesheet attributes specified by style type.
 TextStyle<AxisTextPaintTags> getTextStyle()
          Gets text style object
 java.lang.String getTitle()
          Returns the title for axis.
 java.util.List<AxisTitle> getTitles()
           
 TitleSettings getTitleSettings()
           
 void setTitle(int titleNr, AxisTitle title)
           
 void setTitle(java.lang.String text)
          Sets title of the axis.
 
Methods inherited from class lt.monarch.chart.engine.AbstractChartObject
chart, copy, dispose, finalize, getChart, getChartObjectBounds, getPaintStyle, getParent, getStyle, invalidate, isVisible, layout, repaint, repaint, setChart, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface lt.monarch.chart.engine.ChartObject
draw
 

Field Detail

isInvertedMapper

protected boolean isInvertedMapper

mapper

protected final AxisMapper mapper
An associated axis mapper, which defines the axis value type.


textStyle

protected TextStyle<AxisTextPaintTags> textStyle
Text style

Constructor Detail

Axis

public Axis(AxisMapper mapper)
Sole constructor. (For invocation by subclass constructors).

Parameters:
mapper - the axis mapper
Method Detail

getSortPosition

public int getSortPosition()
Description copied from interface: ChartObject
Returns chart object paint order index.

Specified by:
getSortPosition in interface ChartObject
Overrides:
getSortPosition in class AbstractChartObject<AxisPaintTags>
Returns:
object paint order index

activate

protected void activate()
Activates axis.

Overrides:
activate in class AbstractChartObject<AxisPaintTags>

deactivate

protected void deactivate()
Deactivates axis.

Overrides:
deactivate in class AbstractChartObject<AxisPaintTags>

getMapper

public AxisMapper getMapper()
Returns the axis mapper for this axis.

Returns:
axis mapper

setTitle

public void setTitle(int titleNr,
                     AxisTitle title)

getTitles

public java.util.List<AxisTitle> getTitles()

setTitle

public void setTitle(java.lang.String text)
Sets title of the axis.

Parameters:
text - axis title

getTitle

public java.lang.String getTitle()
Returns the title for axis.

Returns:
string axis title

getTitleSettings

public TitleSettings getTitleSettings()

getTextStyle

public TextStyle<AxisTextPaintTags> getTextStyle()
Gets text style object

Returns:
the text style object

getFont

public java.awt.Font getFont(AxisTextPaintTags tag)

getStyle

public AbstractStyle getStyle(StyleType styleType)
Description copied from interface: ChartObject
Gets style object for the stylesheet attributes specified by style type.

Specified by:
getStyle in interface ChartObject
Specified by:
getStyle in interface StyleEditorEntity
Overrides:
getStyle in class AbstractChartObject<AxisPaintTags>
Parameters:
styleType - style type attributes
Returns:
the style object