lt.monarch.chart.chart3D.series
Class AbstractBar3DStrategy<ChartProjector extends Projector>

java.lang.Object
  extended by lt.monarch.chart.chart3D.series.AbstractBar3DStrategy<ChartProjector>
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Bar3DStrategy

public abstract class AbstractBar3DStrategy<ChartProjector extends Projector>
extends java.lang.Object
implements java.io.Serializable

Abstract drawing strategy. Should be used as a strategy patter in series for the series drawing customization.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  float barSpacing
          Bar spacing
protected  double barWidth
          Bar width
protected  java.lang.Object baseValue
          Base value
protected  IndexedClipList clipList
          Deprecated. 
protected  ColorMapper colorMapper
          Color mapper
protected  boolean dirty
          True, if dirty, otherwise -false
protected  PlaneMapper mapper
          Plane mapper (for polar, or Cartesian coordinates)
protected  MetaDataModel metaModel
          Meta data model
protected  java.util.Map<DataColumnType,MinMaxValues> minMaxValues
          Minimum and Maximum values
protected  ArrayDataModel model
          Bar data model
protected  Orientation orientation
          Bar orientation
protected  int seriesCount
          Series count
protected  int seriesIndex
          Series index
protected  float seriesSpacing
          Series spacing
protected  Shape3D shape
          Stores the shape to paint
protected  Style style
          Bar style
protected  AxisMapper xMapper
          X axis mapper
protected  AxisMapper yMapper
          Y axis mapper
protected  AxisMapper zMapper
          Z axis mapper
protected  double zoomMultiplier
          Zoom multiplier
 
Constructor Summary
Constructor and Description
AbstractBar3DStrategy()
           
 
Method Summary
Modifier and Type Method and Description
abstract  void dispose()
          Disposes the object
 void draw(AbstractGraphics g, ChartProjector projector, PlaneMapper mapper, HotSpotMap hotMap, boolean showNullValues, Style style, int seriesCount, int seriesIndex, java.lang.Object baseValue, float barSpacing, float seriesSpacing, AbstractBarSeries<ChartProjector> barSeries, IndexedClipList clipList, ColorMapper colorMapper)
          Draws the series in the chart area.
abstract  void drawPrimitive(AbstractGraphics g, int index, ChartProjector projector, HotSpotMap hotMap, boolean showNullValues, java.lang.Object baseValue, AbstractBarSeries barSeries)
          Draws one primitive
abstract  double getBarBottom(int index, java.lang.Object baseValue)
          Gets bottom bar position
protected abstract  Rectangle2D getBarBoundaries(int index, java.lang.Object baseValue)
          Transforms the specified bar.
abstract  double getBarPosition(int index)
          Gets bar position, where the bar should stand.
abstract  double getBarTop(int index)
          Gets bar top position
protected abstract  double getBarWidth()
          Returns general bar width for all bars.
abstract  Shape2D getDefaultShape()
          Returns the default strategy shape
protected  java.util.Map<DataColumnType,MinMaxValues> getMinMaxValues()
          Gets the minMaxValues value
 void setShape(Shape3D<?> shape)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xMapper

protected AxisMapper xMapper
X axis mapper


yMapper

protected AxisMapper yMapper
Y axis mapper


zMapper

protected AxisMapper zMapper
Z axis mapper


mapper

protected PlaneMapper mapper
Plane mapper (for polar, or Cartesian coordinates)


model

protected ArrayDataModel model
Bar data model


metaModel

protected MetaDataModel metaModel
Meta data model


style

protected Style style
Bar style


seriesCount

protected int seriesCount
Series count


seriesIndex

protected int seriesIndex
Series index


seriesSpacing

protected float seriesSpacing
Series spacing


barSpacing

protected float barSpacing
Bar spacing


barWidth

protected double barWidth
Bar width


orientation

protected Orientation orientation
Bar orientation


zoomMultiplier

protected double zoomMultiplier
Zoom multiplier


clipList

@Deprecated
protected IndexedClipList clipList
Deprecated. 
Clip list


shape

protected Shape3D shape
Stores the shape to paint


baseValue

protected java.lang.Object baseValue
Base value


colorMapper

protected ColorMapper colorMapper
Color mapper


minMaxValues

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


dirty

protected boolean dirty
True, if dirty, otherwise -false

Constructor Detail

AbstractBar3DStrategy

public AbstractBar3DStrategy()
Method Detail

setShape

public void setShape(Shape3D<?> shape)

draw

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

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 abstract void drawPrimitive(AbstractGraphics g,
                                   int index,
                                   ChartProjector projector,
                                   HotSpotMap hotMap,
                                   boolean showNullValues,
                                   java.lang.Object baseValue,
                                   AbstractBarSeries barSeries)
Draws one primitive

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

dispose

public abstract void dispose()
Disposes the object


getDefaultShape

public abstract Shape2D getDefaultShape()
Returns the default strategy shape

Returns:
default strategy shape

getBarBottom

public abstract double getBarBottom(int index,
                                    java.lang.Object baseValue)
Gets bottom bar position

Parameters:
index - index of data point
baseValue - base line value
Returns:
bar bottom position

getBarTop

public abstract double getBarTop(int index)
Gets bar top position

Parameters:
index - data point index
Returns:
bar top position

getBarPosition

public abstract double getBarPosition(int index)
Gets bar position, where the bar should stand. If vertical then x coordinate, if horizontal y coordinate

Parameters:
index - data point index
Returns:
bar position

getBarBoundaries

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

Parameters:
index - index of the data point
baseValue - base value

getBarWidth

protected abstract double getBarWidth()
Returns general bar width for all bars. This method works only when mappers have been set.

Returns:
normalized bar width value

getMinMaxValues

protected java.util.Map<DataColumnType,MinMaxValues> getMinMaxValues()
Gets the minMaxValues value

Returns:
the minMaxValues value