jcckit.plot
Class BarFactory
java.lang.Object
|
+--jcckit.plot.AbstractSymbolFactory
|
+--jcckit.plot.BarFactory
- All Implemented Interfaces:
- SymbolFactory
- public class BarFactory
- extends AbstractSymbolFactory
A factory of bars. The bars are Rectangles
.
Depending on the configuration parameters the bars can be
horizontal or vertical. Bars of several curves can be side by side or
stacked.
- Author:
- Franz-Josef Elmer
Field Summary |
static java.lang.String |
HORIZONTAL_BARS_KEY
Configuration parameter key. |
static java.lang.String |
STACKED_KEY
Configuration parameter key. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STACKED_KEY
public static final java.lang.String STACKED_KEY
- Configuration parameter key.
HORIZONTAL_BARS_KEY
public static final java.lang.String HORIZONTAL_BARS_KEY
- Configuration parameter key.
BarFactory
public BarFactory(ConfigParameters config)
- Creates an instance from the specfied configuration parameters.
Key & Default Value | Type | Mandatory |
Description |
horizontalBars = false |
boolean | no |
If true horizontal bars will be drawn. Otherwise
vertical bars are drawn. |
stacked = false |
boolean | no |
If true the bars of several curves will be
stacked. |
In addition the configuration parameters of the
constructor of the superclass AbstractSymbolFactory
apply.
createSymbol
protected Symbol createSymbol(GraphPoint point,
GraphicAttributes attributes,
Hint hintForNextPoint,
Hint hintFromPreviousCurve)
- Creates a bar at the specified point.
If hintFromPreviousCurve
is not an instance of
PositionHint
the values of
origin and position will be (0,0).
- Overrides:
createSymbol
in class AbstractSymbolFactory
- Parameters:
hintFromPreviousCurve
- Hint from previous curve. Will be used
to calculate symbol shape and hint for the next curve.
createLegendSymbol
public GraphicalElement createLegendSymbol(GraphPoint centerPosition,
double size)
- Creates a symbol for the legend at the specified position.
- Overrides:
createLegendSymbol
in class AbstractSymbolFactory
- Parameters:
centerPosition
- Center position of the symbol.size
- The size of the symbol.
createPlainSymbol
protected GraphicalElement createPlainSymbol(GraphPoint centerPosition,
double size,
GraphicAttributes attributes)
- Returns null because this method isn't needed but has to be
implemented.
- Overrides:
createPlainSymbol
in class AbstractSymbolFactory
- Following copied from class:
jcckit.plot.AbstractSymbolFactory
- Parameters:
centerPosition
- Center position of the symbol.size
- The size of the symbol.attributes
- The attributes of the symbol.