lt.monarch.chart.chart2D.series
Class BubbleSeries

java.lang.Object
  extended by lt.monarch.chart.engine.AbstractChartObject<Tags>
      extended by lt.monarch.chart.AbstractChartSeries<Tags,ChartProjector>
          extended by lt.monarch.chart.chart2D.series.MarkerDecorableSeries<SeriesPaintTags,Projector2D>
              extended by lt.monarch.chart.chart2D.series.BubbleSeries
All Implemented Interfaces:
java.io.Serializable, AbstractMarkerSeries, ChartEntity, ChartObject, ChartSeries, StyleEditorEntity

public class BubbleSeries
extends MarkerDecorableSeries<SeriesPaintTags,Projector2D>

Bubble series.

See Also:
Serialized Form

Nested Class Summary
Modifier and Type Class and Description
 
Nested classes/interfaces inherited from class lt.monarch.chart.chart2D.series.MarkerDecorableSeries
MarkerDecorableSeries.MarkerEntity
 
Field Summary
Modifier and Type Field and Description
protected  PlaneMapper mapper
          the plane mapper
protected  java.util.Map<DataColumnType,MinMaxValues> minMaxValues
          Minimum and Maximum values
protected  ArrayDataModel model
          Chart data model
protected  Point2D planePoint
          Plane point
protected  GeneralPoint tempPoint
          Temporary projection point
 
Fields inherited from class lt.monarch.chart.chart2D.series.MarkerDecorableSeries
baseValue, colorMapper, markerPainter, markers, pseudoModel
 
Fields inherited from class lt.monarch.chart.AbstractChartSeries
metaModel, 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
BubbleSeries(ArrayDataModel model, AxisMapper xMapper, AxisMapper yMapper)
          Bubble series constructor without a meta data model and default plane mapper is for Cartesian coordinates.
BubbleSeries(ArrayDataModel model, MetaDataModel metaModel, AxisMapper xMapper, AxisMapper yMapper)
          Constructs a new Bubble series.
BubbleSeries(ArrayDataModel model, MetaDataModel metaModel, PlaneMapper mapper, AxisMapper xMapper, AxisMapper yMapper)
          Constructs a new Bubble series
BubbleSeries(ArrayDataModel model, PlaneMapper mapper, AxisMapper xMapper, AxisMapper yMapper)
          Bubble series constructor without a meta data model
 
Method Summary
Modifier and Type Method and Description
 void draw(AbstractGraphics g)
          Renders chart object on the Graphics context.
 double getBubbleRadius(double value, Projector prj)
          Maps value from data model to bubble radius.
 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
protected  Point2D projectPoint(Projector projector, GeneralPoint ptt, Point2D planePoint, double x, double y)
          Projects the point
 void setBubblesRadiusRange(double min, double max)
          Sets bubble radius variation range.
 void setPrimitive(Shapes primitive)
          Sets primitive of the bubble shape
 
Methods inherited from class lt.monarch.chart.chart2D.series.MarkerDecorableSeries
addMarker, addMarker, addMarker, calculateNullValue, copy, dataConstraintExtraction, drawMarkers, drawMarkers, generateConstaint, getBaseValue, getColorMapper, getKeyType, getMarkerConstraints, getMarkers, getMarkerStyle, getPaintMode, getPointForConstraint, getSortPosition, layout, mapMinMaxValue, removeMarker, setBaseValue, setColorMapper, setPaintMode
 
Methods inherited from class lt.monarch.chart.AbstractChartSeries
activate, checkDataModelRequirements, createLegendEntries, createLegendEntry, createLegendSymbol, deactivate, fillEntitySheet, getChartObjectBounds, getDataModel, getDescription, getMetaDataModel, getModelValidator, getName, getNearestChildEntity, getParentEntity, getProjector, getSeriesColor, getShortDescription, getShowNullValues, 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, 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, repaint, repaint, setChart
 
Methods inherited from interface lt.monarch.chart.engine.StyleEditorEntity
getParent, getStyle
 

Field Detail

tempPoint

protected GeneralPoint tempPoint
Temporary projection point


planePoint

protected Point2D planePoint
Plane point


minMaxValues

protected java.util.Map<DataColumnType,MinMaxValues> minMaxValues
Minimum and Maximum values


mapper

protected PlaneMapper mapper
the plane mapper


model

protected ArrayDataModel model
Chart data model

Constructor Detail

BubbleSeries

public BubbleSeries(ArrayDataModel model,
                    MetaDataModel metaModel,
                    PlaneMapper mapper,
                    AxisMapper xMapper,
                    AxisMapper yMapper)
Constructs a new Bubble series

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

BubbleSeries

public BubbleSeries(ArrayDataModel model,
                    PlaneMapper mapper,
                    AxisMapper xMapper,
                    AxisMapper yMapper)
Bubble 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
xMapper - x axis mapper
yMapper - y axis mapper

BubbleSeries

public BubbleSeries(ArrayDataModel model,
                    AxisMapper xMapper,
                    AxisMapper yMapper)
Bubble series constructor without a meta data model and default plane mapper is for Cartesian coordinates.

Parameters:
model - chart data model
xMapper - x axis mapper
yMapper - y axis mapper

BubbleSeries

public BubbleSeries(ArrayDataModel model,
                    MetaDataModel metaModel,
                    AxisMapper xMapper,
                    AxisMapper yMapper)
Constructs a new Bubble series. The default plane mapper is used for Cartesian coordinate system.

Parameters:
model - chart data model
metaModel - meta data model
xMapper - x axis mapper
yMapper - y axis mapper
Method Detail

getBubbleRadius

public double getBubbleRadius(double value,
                              Projector prj)
Maps value from data model to bubble radius. it is calculated in proportional way

Parameters:
value - value from data model to be mapped to bubble radius
prj - projector of chart
Returns:
bubble radius for the specified double value

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 MarkerDecorableSeries<SeriesPaintTags,Projector2D>
Parameters:
g - graphics context

projectPoint

protected Point2D projectPoint(Projector projector,
                               GeneralPoint ptt,
                               Point2D planePoint,
                               double x,
                               double y)
Projects the point

Parameters:
projector - projector
ptt - template point
planePoint - template point to map plane coordinates
x - x coordinate to map
y - y coordinate to map

setBubblesRadiusRange

public void setBubblesRadiusRange(double min,
                                  double max)
Sets bubble radius variation range.

Parameters:
min - lower range bound
max - upper range bound

setPrimitive

public void setPrimitive(Shapes primitive)
Sets primitive of the bubble shape

Parameters:
primitive - bubble shape primitive

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

Overrides:
getMaxValue in class MarkerDecorableSeries<SeriesPaintTags,Projector2D>
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

Overrides:
getMinValue in class MarkerDecorableSeries<SeriesPaintTags,Projector2D>
Parameters:
valType - data value column
Returns:
minimum value needed