lt.monarch.chart.spc
Class DotPlotChart

java.lang.Object
  extended by lt.monarch.chart.AbstractView<PaintTags>
      extended by lt.monarch.chart.AbstractChart<PaintTags,GeneralProjector>
          extended by lt.monarch.chart.MultiSeriesChartBase<ChartPaintTags,Projector2D>
              extended by lt.monarch.chart.chart2D.Chart2D
                  extended by lt.monarch.chart.spc.SpcChart
                      extended by lt.monarch.chart.spc.DotPlotChart
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Chart<Projector2D>, ChartEntity, StyleEditorEntity, View

public class DotPlotChart
extends SpcChart

SPC chart - Data Plot Chart. Default orientation is Vertical. Dot plot chart

See Also:
Serialized Form

Nested Class Summary
Modifier and Type Class and Description
protected static class DotPlotChart.UComparator
          Compare two doubles
 
Field Summary
Modifier and Type Field and Description
protected  DotPlotValuesCalculator calc
           
protected  boolean chartInitialized
           
protected  ChartObject[] chartObjects
           
protected  java.util.Comparator<java.lang.Object> comparator
           
protected  java.util.ArrayList<ChartDataModel> models
           
protected  Orientation orientation
           
protected  java.util.ArrayList<LineSeries> series
           
protected  AbstractMarker seriesMarker
           
protected  int size
           
protected  AxisMapper xMapper
           
protected  AxisMapper yMapper
           
 
Fields inherited from class lt.monarch.chart.spc.SpcChart
bottomAxis, dataModel, grid, leftAxis, rightAxis
 
Fields inherited from class lt.monarch.chart.chart2D.Chart2D
projector
 
Fields inherited from class lt.monarch.chart.AbstractChart
draftMode, locale, plugins
 
Fields inherited from class lt.monarch.chart.AbstractView
layoutInvalid, paintStyle, style
 
Constructor Summary
Constructor and Description
DotPlotChart()
          Constructs dot plot chart with empty data model and vertical orientation
DotPlotChart(ChartDataModel dataModel)
          Constructs dot plot chart with the given data model and vertical orientation
DotPlotChart(ChartDataModel dataModel, Orientation orientation)
          Constructs dot plot chart with the given data model and orientation
DotPlotChart(Orientation orientation)
          Constructs dot plot chart with empty data model and given orientation
 
Method Summary
Modifier and Type Method and Description
protected  LineSeries createSingleSeries(ChartDataModel data)
          Creates single LineSeries object
protected  LabelAxisMapper getLabelAxisMapper()
          Return label axis mapper
protected  MathAxisMapper getMathAxisMapper()
          Return math axis mapper
 Orientation getOrientation()
          Return orientations.
 java.util.List<LineSeries> getSeries()
          Returns list of chart series.
 AbstractMarker getSeriesMarker()
          Returns marker used for all series in dot plot chart
protected  void prepareDataModel(ChartDataModel data, Orientation orientation)
           
 void setDataModel(ChartDataModel dataModel)
          Assigns input data model to the chart.
 void setOrientation(Orientation orientation)
          Set Orientation.
 void setSeriesMarker(AbstractMarker marker)
          Sets marker that will be used for all series in dot plot chart
protected  void updateChart()
          Redraws chart
protected  void updateMappers()
          Updates chart axes mappers
protected  void updateSeries()
          Generate all LineSeries
protected  boolean validate(ChartDataModel dataModel)
          Validate data model
 
Methods inherited from class lt.monarch.chart.spc.SpcChart
getBottomAxis, getDataModel, getGrid, getLeftAxis, getMax, getMax, getMin, getMin, getRightAxis, resetDataModel, setNoData, setNoData, trim
 
Methods inherited from class lt.monarch.chart.chart2D.Chart2D
addBottomXAxis, addLeftYAxis, addRightYAxis, addTopXAxis, addXAxis, addYAxis, dispose, finalize, getBreakLine, getChartAreaMargin, getMinAxisWidth, getProjector, getStackedXAxisMargin, getStackedYAxisMargin, getXAxes, getYAxes, layout, paintChart, projector, removeBottomXAxis, removeLeftYAxis, removeRightYAxis, removeTopXAxis, removeXAxis, removeYAxis, setBottomXAxis, setBreakLine, setChartAreaMargin, setLeftYAxis, setMinAxisWidth, setRightYAxis, setStackedBottomXAxisProportion, setStackedLeftYAxisProportion, setStackedRightYAxisProportion, setStackedTopXAxisProportion, setStackedXAxisMargin, setStackedXAxisProportion, setStackedYAxisMargin, setStackedYAxisProportion, setTopXAxis, setXAxis, setXAxis, setYAxis, setYAxis
 
Methods inherited from class lt.monarch.chart.MultiSeriesChartBase
activate, addObject, createLegendEntries, deactivate, findObject, getContainingObjects, getObjects, layoutObjects, removeObject, replaceObject, reset, setObjects, shiftObjects
 
Methods inherited from class lt.monarch.chart.AbstractChart
addPlugin, disableDrafMode, enableDraftMode, fillEntitySheet, getDescription, getLocale, getParentEntity, getPlugins, getShortDescription, invalidate, isDraftMode, paint, removePlugin, removePlugins, setDraftMode, setLocale
 
Methods inherited from class lt.monarch.chart.AbstractView
addViewListener, clone, container, getAlignmentX, getAlignmentY, getBounds, getChartObjectBounds, getContainer, getGraphicsType, getHeight, getMaximumSize, getMinimumSize, getPaintMode, getPaintStyle, getParent, getPreferredSize, getSize, getSize, getStyle, getStyle, getWidth, getX, getY, isLayoutValid, removeViewListener, render, repaint, repaint, setAlignmentX, setAlignmentY, setBounds, setBounds, setContainer, setLocation, setMaximumSize, setMinimumSize, setPaintMode, setPreferredSize, setSize, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface lt.monarch.chart.engine.View
addViewListener, clone, container, getAlignmentX, getAlignmentY, getBounds, getGraphicsType, getHeight, getMaximumSize, getMinimumSize, getPreferredSize, getSize, getSize, getStyle, getWidth, getX, getY, removeViewListener, render, repaint, repaint, setAlignmentX, setAlignmentY, setBounds, setBounds, setContainer, setLocation, setMaximumSize, setMinimumSize, setPreferredSize, setSize, validate
 

Field Detail

calc

protected DotPlotValuesCalculator calc

orientation

protected Orientation orientation

comparator

protected java.util.Comparator<java.lang.Object> comparator

chartInitialized

protected boolean chartInitialized

series

protected java.util.ArrayList<LineSeries> series

models

protected java.util.ArrayList<ChartDataModel> models

chartObjects

protected ChartObject[] chartObjects

yMapper

protected AxisMapper yMapper

xMapper

protected AxisMapper xMapper

seriesMarker

protected AbstractMarker seriesMarker

size

protected int size
Constructor Detail

DotPlotChart

public DotPlotChart()
             throws DataFormatException
Constructs dot plot chart with empty data model and vertical orientation

Throws:
DataFormatException

DotPlotChart

public DotPlotChart(ChartDataModel dataModel)
             throws DataFormatException
Constructs dot plot chart with the given data model and vertical orientation

Parameters:
dataModel -
Throws:
DataFormatException

DotPlotChart

public DotPlotChart(Orientation orientation)
             throws DataFormatException
Constructs dot plot chart with empty data model and given orientation

Throws:
DataFormatException

DotPlotChart

public DotPlotChart(ChartDataModel dataModel,
                    Orientation orientation)
             throws DataFormatException
Constructs dot plot chart with the given data model and orientation

Parameters:
dataModel - data model
orientation - chart's orientation
Throws:
DataFormatException
Method Detail

setDataModel

public void setDataModel(ChartDataModel dataModel)
                  throws DataFormatException
Description copied from class: SpcChart
Assigns input data model to the chart. After assigning the data, chart is redrawn.

Overrides:
setDataModel in class SpcChart
Parameters:
dataModel - chat input data model.
Throws:
DataFormatException

updateChart

protected void updateChart()
                    throws DataFormatException
Description copied from class: SpcChart
Redraws chart

Overrides:
updateChart in class SpcChart
Throws:
DataFormatException

getSeries

public java.util.List<LineSeries> getSeries()
Returns list of chart series.

Returns:
list of line series (scatter strategy).
Throws:
DataFormatException

updateSeries

protected void updateSeries()
                     throws DataFormatException
Generate all LineSeries

Throws:
DataFormatException

createSingleSeries

protected LineSeries createSingleSeries(ChartDataModel data)
Creates single LineSeries object

Parameters:
data - ChartDataModel
Returns:

prepareDataModel

protected void prepareDataModel(ChartDataModel data,
                                Orientation orientation)

updateMappers

protected void updateMappers()
Updates chart axes mappers


getLabelAxisMapper

protected LabelAxisMapper getLabelAxisMapper()
Return label axis mapper

Returns:

getMathAxisMapper

protected MathAxisMapper getMathAxisMapper()
Return math axis mapper

Returns:

validate

protected boolean validate(ChartDataModel dataModel)
Validate data model

Parameters:
dataModel - - Chart Data Model
Returns:
if true, data model is compatible. If false, data model is incompatible.

getOrientation

public Orientation getOrientation()
Return orientations. Possible values is horizontal and vertical.

Returns:
orientation

setOrientation

public void setOrientation(Orientation orientation)
                    throws DataFormatException
Set Orientation.

Parameters:
orientation - - Orientation
Throws:
DataFormatException

getSeriesMarker

public AbstractMarker getSeriesMarker()
Returns marker used for all series in dot plot chart

Returns:

setSeriesMarker

public void setSeriesMarker(AbstractMarker marker)
Sets marker that will be used for all series in dot plot chart

Parameters:
marker -