|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.chart2D.series.AbstractBarStrategy
lt.monarch.chart.chart2D.series.BarStrategy
public class BarStrategy extends AbstractBarStrategy
Bar drawing strategy. This strategy draws all bars.
| Modifier and Type | Field and Description |
|---|---|
protected Rectangle2D |
projectionArea
Projection area |
protected int |
size
Data model 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 and Description |
|---|
BarStrategy()
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Disposes the object |
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)
No data painter |
protected void |
drawNoData(AbstractGraphics g,
int index,
Projector projector,
boolean showNullValues,
java.lang.Object x,
java.lang.Object y,
HotSpotMap hotMap)
Draws no data bar |
void |
drawPrimitive(AbstractGraphics g,
int index,
Projector projector,
HotSpotMap hotMap,
boolean showNullValues,
java.lang.Object baseValue,
AbstractBarSeries barSeries)
Draws one primitive |
protected void |
finalize()
|
protected static Transformation |
get90DegRotation()
Get t Transformation with 90 degree counter clockwise rotation. |
double |
getBarBottom(int index,
java.lang.Object baseValue)
Gets bottom bar position |
protected Rectangle2D |
getBarBoundaries(int index,
java.lang.Object baseValue)
Transforms the specified bar. |
double |
getBarPosition(int index)
Gets bar position, where the bar should stand. |
double |
getBarTop(int index)
Gets bar top position |
protected Transformation |
getBarTransformation(int size,
double barWidth)
Returns bar transformation matrix |
protected double |
getBarWidth()
Returns general bar width for all bars. |
double |
getBarWidth(int index)
Gets bar width from the style sheet. |
protected double |
getBottomBarTop(int index,
DataColumnType dataColumn,
AxisMapper mapper,
java.lang.Object baseValue)
Determines the bar position |
Shape2D |
getDefaultShape()
Returns the default strategy shape |
protected int |
getLabelCount(AxisMapper mapper)
Returns label count on the axis |
protected Rectangle2D |
getShapeBounds()
Get bounds of bar shape. |
protected Transformation |
getTransformation(Orientation orientation,
double barWidth)
Gets the transformation for series |
protected double |
getZeroValue(AxisMapper mapper)
Gets mapped zero value if possible to map |
protected double |
getZoomMultiplier(AxisMapper mapper)
Returns zoom multiplier |
protected boolean |
isBarInvisible(int size,
double val)
Checks if the bar is visible |
| 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 |
|---|
protected int size
protected Rectangle2D projectionArea
| Constructor Detail |
|---|
public BarStrategy()
| Method Detail |
|---|
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)
draw in class AbstractBarStrategyg - graphics contextprojector - projector instancemapper - plane mapperhotMap - hot spot mapshowNullValues - boolean value indicating whether to show the null valuesstyle - style objectseriesCount - series countseriesIndex - series indexbaseValue - base valuebarSpacing - bar spacingseriesSpacing - series spacingbarSeries - bar series instanceclipList - clip listcolorMapper - color mapper, which maps colors according to values
public void drawPrimitive(AbstractGraphics g,
int index,
Projector projector,
HotSpotMap hotMap,
boolean showNullValues,
java.lang.Object baseValue,
AbstractBarSeries barSeries)
AbstractBarStrategy
drawPrimitive in class AbstractBarStrategyg - graphics contextindex - data point indexprojector - projectorhotMap - hot spot mapshowNullValues - if true show null valuesbaseValue - base line valuebarSeries - bar series instanceprotected static Transformation get90DegRotation()
Transformation with 90 degree counter clockwise rotation.
Transformationprotected Rectangle2D getShapeBounds()
Rectangle2D with bar shape bounds.
protected Rectangle2D getBarBoundaries(int index,
java.lang.Object baseValue)
getBarBoundaries in class AbstractBarStrategyindex - index of the data pointbaseValue - base valuepublic double getBarWidth(int index)
index - data point indexpublic double getBarPosition(int index)
AbstractBarStrategy
getBarPosition in class AbstractBarStrategyindex - data point indexpublic double getBarTop(int index)
AbstractBarStrategy
getBarTop in class AbstractBarStrategyindex - data point indexprotected double getZeroValue(AxisMapper mapper)
mapper - mapper
public double getBarBottom(int index,
java.lang.Object baseValue)
AbstractBarStrategy
getBarBottom in class AbstractBarStrategyindex - index of data pointbaseValue - base line value
protected void drawNoData(AbstractGraphics g,
int index,
Projector projector,
boolean showNullValues,
java.lang.Object x,
java.lang.Object y,
HotSpotMap hotMap)
g - graphics contextindex - index of the barprojector - projectorshowNullValues - boolean value if to show null valuesx - x valuey - y valuehotMap - hot spot map
protected double getBottomBarTop(int index,
DataColumnType dataColumn,
AxisMapper mapper,
java.lang.Object baseValue)
index - bar indexdataColumn - data column in the data modelmapper - axis mapper
protected boolean isBarInvisible(int size,
double val)
size - size of the data modelval - value of the bar
protected Transformation getBarTransformation(int size,
double barWidth)
size - size of the data modelbarWidth - bar width
protected Transformation getTransformation(Orientation orientation,
double barWidth)
protected double getBarWidth()
AbstractBarStrategy
getBarWidth in class AbstractBarStrategyprotected int getLabelCount(AxisMapper mapper)
mapper - axis mapperprotected double getZoomMultiplier(AxisMapper mapper)
mapper - axis mapper to calculate the zoompublic void dispose()
AbstractBarStrategy
dispose in class AbstractBarStrategy
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic Shape2D getDefaultShape()
AbstractBarStrategy
getDefaultShape in class AbstractBarStrategy
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||