lt.monarch.chart.chart3D.axis
Class Axis3D

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

public abstract class Axis3D
extends Axis

Base class for all 3D chart axis classes

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  TextOrientation labelType
          An orientation tag for axis labels.
protected  TitlePosition titlePosition
          An orientation tag for axis title position.
protected  TextOrientation titleType
          An orientation tag for axis title.
 
Fields inherited from class lt.monarch.chart.mapper.Axis
isInvertedMapper, mapper, textStyle
 
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
Axis3D(AxisMapper mapper)
          Abstract axis constructor
 
Method Summary
Modifier and Type Method and Description
protected abstract  void drawAxis(AbstractGraphics g, boolean drawLabels)
          Draw axis line and tick of the axis
protected abstract  void drawTitle(AbstractGraphics g, int maxLabelWidth)
          Draws title of the axis
protected  Point3D findFlipPoint(Point3D zero, Point3D max)
          Calculates a flip point for the axis.
protected  Point2D findPerpendicular(Point3D zero, Point3D max, Point2D flipPoint)
          Calculates a proper perpendicular vector to the axis line.
 TextOrientation getLabelType()
          Gets label orientation type
protected abstract  int getPreferedMargin(AbstractGraphics g)
          Non-API method. Returns space required for labels and title.
 TitlePosition getTitlePositoin()
          Gets title position on the axis
 TextOrientation getTitleType()
          Gets title orientation type
 void setLabelType(TextOrientation type)
          Sets label orientation type
 void setTitlePosition(TitlePosition postion)
          Sets title position on the axis
 void setTitleType(TextOrientation type)
          Sets title orientation type
 
Methods inherited from class lt.monarch.chart.mapper.Axis
activate, deactivate, getFont, getMapper, getSortPosition, getStyle, getTextStyle, getTitle, getTitles, getTitleSettings, setTitle, setTitle
 
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

titleType

protected TextOrientation titleType
An orientation tag for axis title.


labelType

protected TextOrientation labelType
An orientation tag for axis labels.


titlePosition

protected TitlePosition titlePosition
An orientation tag for axis title position.

Constructor Detail

Axis3D

public Axis3D(AxisMapper mapper)
Abstract axis constructor

Parameters:
mapper - axis mapper
Method Detail

setTitleType

public void setTitleType(TextOrientation type)
Sets title orientation type

Parameters:
type - title orientation type

getTitleType

public TextOrientation getTitleType()
Gets title orientation type

Returns:
title orientation type

setLabelType

public void setLabelType(TextOrientation type)
Sets label orientation type

Parameters:
type - label orientation type

getLabelType

public TextOrientation getLabelType()
Gets label orientation type

Returns:
label orientation type

setTitlePosition

public void setTitlePosition(TitlePosition postion)
Sets title position on the axis

Parameters:
postion - title position on the axis

getTitlePositoin

public TitlePosition getTitlePositoin()
Gets title position on the axis

Returns:
title position on the axis

getPreferedMargin

protected abstract int getPreferedMargin(AbstractGraphics g)
Non-API method. Returns space required for labels and title.

Returns:
space required for labels and title

drawTitle

protected abstract void drawTitle(AbstractGraphics g,
                                  int maxLabelWidth)
Draws title of the axis

Parameters:
g - graphics context
maxLabelWidth - maximum label width

drawAxis

protected abstract void drawAxis(AbstractGraphics g,
                                 boolean drawLabels)
Draw axis line and tick of the axis

Parameters:
g - graphics context
drawLabels - true if to draw labels

findFlipPoint

protected Point3D findFlipPoint(Point3D zero,
                                Point3D max)
Calculates a flip point for the axis. This point is required for determining the side for labels.

Parameters:
zero - the start point of axis
max - the end point of axis
Returns:
the flip point

findPerpendicular

protected Point2D findPerpendicular(Point3D zero,
                                    Point3D max,
                                    Point2D flipPoint)
Calculates a proper perpendicular vector to the axis line.

Parameters:
zero - the start point of axis
max - the end point of axis
flipPoint - the flip point
Returns:
the perpendicular vector