lt.monarch.chart.spc
Class BarChart

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.BarChart
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Chart<Projector2D>, ChartEntity, StyleEditorEntity, View

public class BarChart
extends SpcChart

Bar chart

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  BarSeries bar
           
protected  ChartDataModel barsModel
           
protected  LinePlotValuesCalculator calc
           
protected  java.lang.Double lsl
           
protected  VerticalMarkerLine lslMarkerLine
           
protected  VerticalMarkerLine meanMarkerLine
           
protected  java.text.NumberFormat nf
           
protected  java.lang.Double usl
           
protected  VerticalMarkerLine uslMarkerLine
           
protected  MathAxisMapper xMapper
           
protected  MathAxisMapper yMapperLeft
           
protected  MathAxisMapper yMapperRight
           
 
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
BarChart(ChartDataModel dataModel)
          Constructs a Bar chart from the supplied data model without LSL and USL lines.
BarChart(ChartDataModel dataModel, java.lang.Double lsl, java.lang.Double usl)
          Constructs a Bar chart from the supplied data model with LSL and USL lines.
 
Method Summary
Modifier and Type Method and Description
protected  lt.monarch.chart.spc.ChartBounds getBounds(java.util.LinkedList<ChartDataInfo> items)
           
 java.lang.Double getLsl()
          Returns lower specification limit
 VerticalMarkerLine getLslMarkerLine()
          Returns lower specification limit marker line use setVisible(false) to hide it.
 BarSeries getSeries()
          Returns BarSeries
 java.lang.Double getUsl()
          Returns upper specification limit
 VerticalMarkerLine getUslMarkerLine()
          Returns upper specification limit marker line Use setVisible(false) to hide it.
 void setChartData(ChartDataModel dataModel, java.lang.Double lsl, java.lang.Double usl)
          Sets bar chart data with LSL and USL lines
 void setLsl(java.lang.Double lsl)
          Sets lower specification limit
 void setUsl(java.lang.Double usl)
          Sets upper specification limit
protected  void updateAxes()
          Creates chart axes on chart creation.
protected  void updateChart()
          Redraws chart
protected  void updateGrid()
          Creates chart grid on chart creation.
protected  void updateLslMarkerLine()
          Creates lower specification level marker line on chart creation or updates it on chart data model change.
protected  void updateMappers(lt.monarch.chart.spc.ChartBounds bounds, int dataCount)
          Creates axes mappers on chart creation or updates them on chart data model change.
protected  void updateSeries()
          Creates Bar series on chart creation.
protected  void updateUslMarkerLine()
          Creates upper specification level marker line on chart creation or updates it on chart data model change.
 
Methods inherited from class lt.monarch.chart.spc.SpcChart
getBottomAxis, getDataModel, getGrid, getLeftAxis, getMax, getMax, getMin, getMin, getRightAxis, resetDataModel, setDataModel, 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 LinePlotValuesCalculator calc

bar

protected BarSeries bar

xMapper

protected MathAxisMapper xMapper

yMapperLeft

protected MathAxisMapper yMapperLeft

yMapperRight

protected MathAxisMapper yMapperRight

barsModel

protected ChartDataModel barsModel

uslMarkerLine

protected VerticalMarkerLine uslMarkerLine

lslMarkerLine

protected VerticalMarkerLine lslMarkerLine

meanMarkerLine

protected VerticalMarkerLine meanMarkerLine

nf

protected java.text.NumberFormat nf

lsl

protected java.lang.Double lsl

usl

protected java.lang.Double usl
Constructor Detail

BarChart

public BarChart(ChartDataModel dataModel)
         throws DataFormatException
Constructs a Bar chart from the supplied data model without LSL and USL lines.

Parameters:
dataModel - data model
Throws:
DataFormatException

BarChart

public BarChart(ChartDataModel dataModel,
                java.lang.Double lsl,
                java.lang.Double usl)
         throws DataFormatException
Constructs a Bar chart from the supplied data model with LSL and USL lines.

Parameters:
dataModel - data model
lsl - LSL value
usl - USL value
Throws:
DataFormatException
Method Detail

setChartData

public void setChartData(ChartDataModel dataModel,
                         java.lang.Double lsl,
                         java.lang.Double usl)
                  throws DataFormatException
Sets bar chart data with LSL and USL lines

Parameters:
dataModel - histogram data
lsl - LSL value
usl - USL value
Throws:
DataFormatException

getSeries

public BarSeries getSeries()
Returns BarSeries


getUslMarkerLine

public VerticalMarkerLine getUslMarkerLine()
Returns upper specification limit marker line Use setVisible(false) to hide it.


getLslMarkerLine

public VerticalMarkerLine getLslMarkerLine()
Returns lower specification limit marker line use setVisible(false) to hide it.


updateChart

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

Overrides:
updateChart in class SpcChart
Throws:
DataFormatException

getBounds

protected lt.monarch.chart.spc.ChartBounds getBounds(java.util.LinkedList<ChartDataInfo> items)

getLsl

public java.lang.Double getLsl()
Returns lower specification limit


setLsl

public void setLsl(java.lang.Double lsl)
            throws DataFormatException
Sets lower specification limit

Throws:
DataFormatException

getUsl

public java.lang.Double getUsl()
Returns upper specification limit


setUsl

public void setUsl(java.lang.Double usl)
            throws DataFormatException
Sets upper specification limit

Throws:
DataFormatException

updateMappers

protected void updateMappers(lt.monarch.chart.spc.ChartBounds bounds,
                             int dataCount)
Creates axes mappers on chart creation or updates them on chart data model change.


updateLslMarkerLine

protected void updateLslMarkerLine()
Creates lower specification level marker line on chart creation or updates it on chart data model change.


updateUslMarkerLine

protected void updateUslMarkerLine()
Creates upper specification level marker line on chart creation or updates it on chart data model change.


updateGrid

protected void updateGrid()
Creates chart grid on chart creation.


updateAxes

protected void updateAxes()
Creates chart axes on chart creation.


updateSeries

protected void updateSeries()
Creates Bar series on chart creation.