lt.monarch.chart.chart3D.series
Class AbstractPie3DLabelsLayouter

java.lang.Object
  extended by lt.monarch.chart.chart3D.series.AbstractPie3DLabelsLayouter
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Pie3DLabelsAutoLayouter, Pie3DLabelsInsideLayouter, Pie3DLabelsOutsideLayouter

public abstract class AbstractPie3DLabelsLayouter
extends java.lang.Object
implements java.io.Serializable

Abstract pie labels layouter class. It defines what methods the pie labels layouter should implement and implements common methods for all layouter in it.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  Pie3DLabelAlignment labelAlignment
           
protected  java.util.ArrayList<Pie3DSliceLabelEntry> pieLabelList
           
 
Constructor Summary
Constructor and Description
AbstractPie3DLabelsLayouter()
           
 
Method Summary
Modifier and Type Method and Description
protected  Point3D calculateLabelPosition(double radius, double angle, Point3D center, double height)
          Calculate label position in pie charts
 Pie3DLabelAlignment getPieLabelAlignment()
          Gets alignment type of pie labels
protected  boolean isPieDifficult()
          If labels angle is smaller minAngle, than pie is difficult
abstract  void layout(java.util.ArrayList<Pie3DSliceLabelEntry> labelList, Projector projector)
           
 void setPieLabelAlignment(Pie3DLabelAlignment alignment)
          Sets alignment type of pie labels
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pieLabelList

protected java.util.ArrayList<Pie3DSliceLabelEntry> pieLabelList

labelAlignment

protected Pie3DLabelAlignment labelAlignment
Constructor Detail

AbstractPie3DLabelsLayouter

public AbstractPie3DLabelsLayouter()
Method Detail

setPieLabelAlignment

public void setPieLabelAlignment(Pie3DLabelAlignment alignment)
Sets alignment type of pie labels

Parameters:
alignment - alignment type

getPieLabelAlignment

public Pie3DLabelAlignment getPieLabelAlignment()
Gets alignment type of pie labels

Returns:
alignment type

calculateLabelPosition

protected Point3D calculateLabelPosition(double radius,
                                         double angle,
                                         Point3D center,
                                         double height)
Calculate label position in pie charts

Parameters:
radius - radius of pie
angle - angle of slice
center - point of the pie
Returns:
calculated point

isPieDifficult

protected boolean isPieDifficult()
If labels angle is smaller minAngle, than pie is difficult

Returns:
true, if pie is difficult

layout

public abstract void layout(java.util.ArrayList<Pie3DSliceLabelEntry> labelList,
                            Projector projector)
Parameters:
labelList - list of labels
projector - projector of charts