lt.monarch.chart.chart3D.series
Class Pie3DSeries

java.lang.Object
  extended by lt.monarch.chart.engine.AbstractChartObject<Tags>
      extended by lt.monarch.chart.AbstractChartSeries<SeriesPaintTags,Projector>
          extended by lt.monarch.chart.chart3D.series.Pie3DSeries
All Implemented Interfaces:
java.io.Serializable, ChartEntity, ChartObject, ChartSeries, StyleEditorEntity

public class Pie3DSeries
extends AbstractChartSeries<SeriesPaintTags,Projector>

Pie series 3D. This series renders pie in 3D space.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  TextStyle<AbstractPaintTags> textStyle
           
 
Fields inherited from class lt.monarch.chart.AbstractChartSeries
metaModel, model, modelValidator, seriesName, seriesTransform, showLegend, showNullValues, symbol, xMapper, yMapper, zMapper
 
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
Pie3DSeries(ArrayDataModel model)
          Line series constructor without a meta data model and default plane mapper is for Cartesian coordinates.
Pie3DSeries(ArrayDataModel model, MetaDataModel metaModel)
          Constructs a new Line series.
Pie3DSeries(ArrayDataModel model, MetaDataModel metaModel, PlaneMapper3D mapper)
          Constructs a new line series
Pie3DSeries(ArrayDataModel model, PlaneMapper3D mapper)
          Line series constructor without a meta data model
 
Method Summary
Modifier and Type Method and Description
 LegendEntry[] createLegendEntries()
          Creates legend entries for the series.
 void draw(AbstractGraphics g)
          Renders chart object on the Graphics context.
 Point3D getCenterPoint()
          Returns the center of pie
 double getInnerRadius()
          Returns the Doughnut inner radius.
 Pie3DLabelAlignment getLabelAlignment()
          Return pie label alignment
 int getLabelAreaMultiplier()
          Returns label area multiplier (used for pie resize and leave label area, pie size is resized by multiplier * series label font size)
 PieLabelFormat getLabelFormat()
          Return label format
 java.lang.String getLabelFormatPattern()
          Returns pattern of label format
 AbstractPie3DLabelsLayouter getLabelLayouter()
          Return label layouter of pie
 PieLegendFormat getLegendFormat()
          Return legend format
 java.lang.String getLegendFormatPattern()
          Returns legend format pattern
 MarkerConstraints[] getMarkerConstraints()
           
 java.lang.Object getMaxValue(DataColumnType valType)
          Note: internal use only! Gets maximum value that is used by series to fit into the chart
 java.lang.Object getMinValue(DataColumnType valType)
          Note: internal use only! Gets minimum value that is used by series to fit into the chart
 int getNumbersLabelPrecision()
          Gets precision of labels values floating point numbers.
 int getNumbersLegendPrecision()
          Gets precision of legend values floating point numbers.
 double getOverallAngle()
          Returns the pie angle, how much angle the pie should occupy
 PaintMode getPaintMode()
          Returns the paint mode of the grid
 double getPieHeight()
          Return pie height
 double getRadius()
          Returns pie series radius.
 double getStartAngle()
          Returns slice start angle of pie chart segment
 Pie3DStrategy<Projector> getStrategy()
          Gets line drawing strategy.
 TextStyle<AbstractPaintTags> getTextStyle()
          Gets series text style object
 void setCenterPoint(Point3D centerPoint)
          Set center of pie chart
 void setExplodeAndShrink(boolean flag)
          Set explode and shrink
 void setInnerRadius(java.lang.Double radius)
          Sets the Doughnut inner radius.
 void setLabelAlignment(Pie3DLabelAlignment alignment)
          Set pie label alignment
 void setLabelAreaMultiplier(int labelAreaMultiplier)
          Specifies label area multiplier (used for pie resize and leave label area, pie size is resized by multiplier * series label font size) Default is 6.
 void setLabelFormat(PieLabelFormat labelFormat)
          Set label format
 void setLabelFormatPattern(java.lang.String labelFormatPattern)
          Set pattern of label format Examples: "%1$.2f, %2$.0f%%, %3$s" 1 - value, 2 - percent, 3 - slice name
 void setLabelLayouter(Pie3DLabelsLayouters layouter)
          Set label layouter of pie
 void setLegendFormat(PieLegendFormat legendFormat)
          Set legend format
 void setLegendFormatPattern(java.lang.String legendFormatPattern)
          Set pattern of legend format Examples: "%1$.2f, %2$.0f%%, %3$s", where: 1 - value, 2 - percent, 3 - slice name
 void setNumbersLabelPrecision(int numbersLabelPrecision)
          Sets floating point numbers precision in the label values.
 void setNumbersLegendPrecision(int numbersLegendPrecision)
          Sets floating point numbers precision in the legend values.
 void setOverallAngle(double angle)
          Specifies the pie angle, how much angle the pie should occupy.
 void setPaintMode(PaintMode paintMode)
          Sets grid painting mode.
 void setPieHeight(double pieHeight)
          Set the pie height
 void setRadius(double radius)
          Sets pie series radius.
 void setStartAngle(double angle)
          Sets start angle of pie chart segment.
 void setStrategy(Pie3DStrategy<Projector> strategy)
          Sets line drawing strategy.
 
Methods inherited from class lt.monarch.chart.AbstractChartSeries
activate, checkDataModelRequirements, createLegendEntry, createLegendSymbol, deactivate, fillEntitySheet, getChartObjectBounds, getDataModel, getDescription, getMetaDataModel, getModelValidator, getName, getNearestChildEntity, getParentEntity, getProjector, getSeriesColor, getShortDescription, getShowNullValues, getSortPosition, getXMapper, getYMapper, getZMapper, handleDataModelChangeEvent, setLegendSymbol, setName, setShowNullValues, setValidateData, showLegend, updateClippingToProjector
 
Methods inherited from class lt.monarch.chart.engine.AbstractChartObject
chart, copy, dispose, finalize, getChart, getPaintStyle, getParent, getStyle, 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
dispose, getChart, getStyle, getStyle, invalidate, isVisible, layout, repaint, repaint, setChart
 
Methods inherited from interface lt.monarch.chart.engine.StyleEditorEntity
getParent, getStyle
 

Field Detail

textStyle

protected TextStyle<AbstractPaintTags> textStyle
Constructor Detail

Pie3DSeries

public Pie3DSeries(ArrayDataModel model,
                   MetaDataModel metaModel,
                   PlaneMapper3D mapper)
Constructs a new line series

Parameters:
model - chart data model
metaModel - meta data model
mapper - mapper, used to map output to a plane in a n-dimensional space

Pie3DSeries

public Pie3DSeries(ArrayDataModel model,
                   PlaneMapper3D mapper)
Line series constructor without a meta data model

Parameters:
model - chart data model
mapper - mapper, used to map output to a plane in a n-dimensional space

Pie3DSeries

public Pie3DSeries(ArrayDataModel model)
Line series constructor without a meta data model and default plane mapper is for Cartesian coordinates.

Parameters:
model - chart data model

Pie3DSeries

public Pie3DSeries(ArrayDataModel model,
                   MetaDataModel metaModel)
Constructs a new Line series. The default plane mapper is used for Cartesian coordinate system.

Parameters:
model - chart data model
metaModel - meta data model
Method Detail

draw

public void draw(AbstractGraphics g)
Description copied from interface: ChartObject
Renders chart object on the Graphics context.

Specified by:
draw in interface ChartObject
Overrides:
draw in class AbstractChartSeries<SeriesPaintTags,Projector>
Parameters:
g - graphics context

getMarkerConstraints

public MarkerConstraints[] getMarkerConstraints()

setStrategy

public void setStrategy(Pie3DStrategy<Projector> strategy)
Sets line drawing strategy. If you want to set your own custom strategy set it directly to the stylesheet, using tag "strategy", e.g. style.setObject("strategy", new MyStrategy());

Parameters:
strategy - drawing strategy

getStrategy

public Pie3DStrategy<Projector> getStrategy()
Gets line drawing strategy.

Returns:
line drawing strategy

setPaintMode

public final void setPaintMode(PaintMode paintMode)
Sets grid painting mode. Possible values are: FILL_PAINT, HATCH_PAINT and GRADIENT_PAINT. FILL_PAINT for single color toFill-painting. GRADIENT_PAINT for cyclic (from start color to center color and from center color to start color) or acyclic (from start color to end color) gradient panel painting. By default the paint mode is set to FILL_PAINT.

Parameters:
paintMode - The paintMode to set.

getPaintMode

public final PaintMode getPaintMode()
Returns the paint mode of the grid

Returns:
Returns the paintMode.

setInnerRadius

public void setInnerRadius(java.lang.Double radius)
Sets the Doughnut inner radius.

Parameters:
radius - doughnut inner radius (in range [0, 0.5]).

getInnerRadius

public double getInnerRadius()
Returns the Doughnut inner radius.

Returns:
Doughnut inner radius.

setRadius

public void setRadius(double radius)
Sets pie series radius.

Parameters:
radius - radius of pie series in range [0,0.5]

getRadius

public double getRadius()
Returns pie series radius.

Returns:
pie radius.

setStartAngle

public void setStartAngle(double angle)
Sets start angle of pie chart segment.

Parameters:
angle - angle [0; 360]

getStartAngle

public double getStartAngle()
Returns slice start angle of pie chart segment

Returns:
startAngle

setOverallAngle

public void setOverallAngle(double angle)
Specifies the pie angle, how much angle the pie should occupy. Default value is 360 degrees.

Parameters:
angle - angle [0; 360]

getOverallAngle

public double getOverallAngle()
Returns the pie angle, how much angle the pie should occupy

Returns:
startAngle

setCenterPoint

public void setCenterPoint(Point3D centerPoint)
Set center of pie chart

Parameters:
centerPoint - point of the center the pie [0,1]

getCenterPoint

public Point3D getCenterPoint()
Returns the center of pie

Returns:
Point3D center of pie

setExplodeAndShrink

public void setExplodeAndShrink(boolean flag)
Set explode and shrink

Parameters:
flag - true, if explode and shrink, otherwise explode, but not shrink

getLabelLayouter

public AbstractPie3DLabelsLayouter getLabelLayouter()
Return label layouter of pie

Returns:
label layouter

setLabelLayouter

public void setLabelLayouter(Pie3DLabelsLayouters layouter)
Set label layouter of pie

Parameters:
layouter - label layouter

getLabelAlignment

public Pie3DLabelAlignment getLabelAlignment()
Return pie label alignment

Returns:
label alignment

setLabelAlignment

public void setLabelAlignment(Pie3DLabelAlignment alignment)
Set pie label alignment

Parameters:
alignment - label alignment

getMaxValue

public java.lang.Object getMaxValue(DataColumnType valType)
Description copied from class: AbstractChartSeries
Note: internal use only! Gets maximum value that is used by series to fit into the chart

Specified by:
getMaxValue in class AbstractChartSeries<SeriesPaintTags,Projector>
Parameters:
valType - data value column
Returns:
maximum value needed

getMinValue

public java.lang.Object getMinValue(DataColumnType valType)
Description copied from class: AbstractChartSeries
Note: internal use only! Gets minimum value that is used by series to fit into the chart

Specified by:
getMinValue in class AbstractChartSeries<SeriesPaintTags,Projector>
Parameters:
valType - data value column
Returns:
minimum value needed

createLegendEntries

public LegendEntry[] createLegendEntries()
Description copied from class: AbstractChartSeries
Creates legend entries for the series.

Specified by:
createLegendEntries in interface ChartSeries
Overrides:
createLegendEntries in class AbstractChartSeries<SeriesPaintTags,Projector>
Returns:
legend entries

getLabelFormatPattern

public java.lang.String getLabelFormatPattern()
Returns pattern of label format

Returns:
the labelFormatPattern

setLabelFormatPattern

public void setLabelFormatPattern(java.lang.String labelFormatPattern)
Set pattern of label format Examples: "%1$.2f, %2$.0f%%, %3$s" 1 - value, 2 - percent, 3 - slice name

Parameters:
labelFormatPattern - the labelFormatPattern to set

getLegendFormatPattern

public java.lang.String getLegendFormatPattern()
Returns legend format pattern

Returns:
the legendFormatPattern

setLegendFormatPattern

public void setLegendFormatPattern(java.lang.String legendFormatPattern)
Set pattern of legend format Examples: "%1$.2f, %2$.0f%%, %3$s", where: 1 - value, 2 - percent, 3 - slice name

Parameters:
legendFormatPattern - the legendFormatPattern to set

getLegendFormat

public PieLegendFormat getLegendFormat()
Return legend format

Returns:
the legendFormat

setLegendFormat

public void setLegendFormat(PieLegendFormat legendFormat)
Set legend format

Parameters:
legendFormat - the legendFormat to set

setLabelFormat

public void setLabelFormat(PieLabelFormat labelFormat)
Set label format

Parameters:
labelFormat - the labelFormat to set

getLabelFormat

public PieLabelFormat getLabelFormat()
Return label format

Returns:
the label format

getNumbersLabelPrecision

public int getNumbersLabelPrecision()
Gets precision of labels values floating point numbers.

Returns:
precision of chart's floating point numbers

setNumbersLabelPrecision

public void setNumbersLabelPrecision(int numbersLabelPrecision)
Sets floating point numbers precision in the label values. If precision is negative then precision will be set to 0.

Parameters:
numbersLabelPrecision - precision of floating point numbers.

getNumbersLegendPrecision

public int getNumbersLegendPrecision()
Gets precision of legend values floating point numbers.

Returns:
precision of chart's floating point numbers

setNumbersLegendPrecision

public void setNumbersLegendPrecision(int numbersLegendPrecision)
Sets floating point numbers precision in the legend values. If precision is negative then precision will be set to 0.

Parameters:
numbersLegendPrecision - precision of floating point numbers.

getTextStyle

public TextStyle<AbstractPaintTags> getTextStyle()
Gets series text style object

Returns:
the style of text object

getPieHeight

public double getPieHeight()
Return pie height

Returns:
the pieHeight

setPieHeight

public void setPieHeight(double pieHeight)
Set the pie height

Parameters:
pieHeight - the pieHeight to set

setLabelAreaMultiplier

public void setLabelAreaMultiplier(int labelAreaMultiplier)
Specifies label area multiplier (used for pie resize and leave label area, pie size is resized by multiplier * series label font size) Default is 6.

Parameters:
labelAreaMultiplier - label area multiplier

getLabelAreaMultiplier

public int getLabelAreaMultiplier()
Returns label area multiplier (used for pie resize and leave label area, pie size is resized by multiplier * series label font size)

Returns:
label area multiplier