lt.monarch.chart.chart2D.series
Class VersusBarStrategy

java.lang.Object
  extended by lt.monarch.chart.chart2D.series.AbstractBarStrategy
      extended by lt.monarch.chart.chart2D.series.BarStrategy
          extended by lt.monarch.chart.chart2D.series.VersusBarStrategy
All Implemented Interfaces:
java.io.Serializable, AbstractStrategy

public class VersusBarStrategy
extends BarStrategy

Versus bar strategy. Draws the actual and comparison value. Comparison value is taken from data models EXTENT field.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  Shape2D auxShape
           
 
Fields inherited from class lt.monarch.chart.chart2D.series.BarStrategy
projectionArea, size
 
Fields inherited from class lt.monarch.chart.chart2D.series.AbstractBarStrategy
avoidLayoutingInvisible, barSpacing, barWidth, baseValue, clipList, colorMapper, dirty, mapper, metaModel, minMaxValues, model, orientation, seriesCount, seriesIndex, seriesSpacing, shape, style, xMapper, yMapper, zoomMultiplier
 
Constructor Summary
Modifier Constructor and Description
protected VersusBarStrategy(boolean overlapping)
           
 
Method Summary
Modifier and Type Method and Description
 void draw(AbstractGraphics g, Projector projector, PlaneMapper mapper, HotSpotMap hotMap, boolean showNullValues, Style style, int seriesCount, int seriesIndex, java.lang.Object baseValue, float barSpacing, float seriesSpacing, AbstractBarSeries barSeries, IndexedClipList clipList, ColorMapper colorMapper)
          Draws the series in the chart area.
 void drawPrimitive(AbstractGraphics g, int index, Projector projector, HotSpotMap hotMap, boolean showNullValues, java.lang.Object baseValue, AbstractBarSeries barSeries)
          Draws one primitive
protected  java.awt.Color getAuxColor(Style style)
           
protected  Rectangle2D getBarBoundaries(int index, java.lang.Object baseValue)
          Transforms the specified bar.
 
Methods inherited from class lt.monarch.chart.chart2D.series.BarStrategy
dispose, drawNoData, finalize, get90DegRotation, getBarBottom, getBarPosition, getBarTop, getBarTransformation, getBarWidth, getBarWidth, getBottomBarTop, getDefaultShape, getLabelCount, getShapeBounds, getTransformation, getZeroValue, getZoomMultiplier, isBarInvisible
 
Methods inherited from class lt.monarch.chart.chart2D.series.AbstractBarStrategy
getMinMaxValues, getModel
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

auxShape

protected Shape2D auxShape
Constructor Detail

VersusBarStrategy

protected VersusBarStrategy(boolean overlapping)
Method Detail

getAuxColor

protected java.awt.Color getAuxColor(Style style)

getBarBoundaries

protected Rectangle2D getBarBoundaries(int index,
                                       java.lang.Object baseValue)
Description copied from class: BarStrategy
Transforms the specified bar. Shifts according to transformation and determines it's top and bottom bounds.

Overrides:
getBarBoundaries in class BarStrategy
Parameters:
index - index of the data point
baseValue - base value
Returns:
returns boundary of the bar

draw

public void draw(AbstractGraphics g,
                 Projector projector,
                 PlaneMapper mapper,
                 HotSpotMap hotMap,
                 boolean showNullValues,
                 Style style,
                 int seriesCount,
                 int seriesIndex,
                 java.lang.Object baseValue,
                 float barSpacing,
                 float seriesSpacing,
                 AbstractBarSeries barSeries,
                 IndexedClipList clipList,
                 ColorMapper colorMapper)
Draws the series in the chart area.

Overrides:
draw in class BarStrategy
Parameters:
g - graphics context
projector - projector instance
mapper - plane mapper
hotMap - hot spot map
showNullValues - boolean value indicating whether to show the null values
style - style object
seriesCount - series count
seriesIndex - series index
baseValue - base value
barSpacing - bar spacing
seriesSpacing - series spacing
barSeries - bar series instance
clipList - clip list
colorMapper - color mapper, which maps colors according to values

drawPrimitive

public void drawPrimitive(AbstractGraphics g,
                          int index,
                          Projector projector,
                          HotSpotMap hotMap,
                          boolean showNullValues,
                          java.lang.Object baseValue,
                          AbstractBarSeries barSeries)
Description copied from class: AbstractBarStrategy
Draws one primitive

Overrides:
drawPrimitive in class BarStrategy
Parameters:
g - graphics context
index - data point index
projector - projector
hotMap - hot spot map
showNullValues - if true show null values
baseValue - base line value
barSeries - bar series instance