public abstract class AbstractSymbolFactory extends Object implements SymbolFactory
SymbolFactories.
Subclasses have to implement createPlainSymbol().| Modifier and Type | Field and Description |
|---|---|
protected GraphicAttributes |
_attributes
Attributes of all symbols.
|
protected double |
_size
Size of all symbols.
|
ATTRIBUTES_KEY, DEFAULT_SIZE, SIZE_KEY| Constructor and Description |
|---|
AbstractSymbolFactory(ConfigParameters config)
Creates an instance from the specified configuration parameters.
|
| Modifier and Type | Method and Description |
|---|---|
GraphicalElement |
createLegendSymbol(GraphPoint centerPosition,
double size)
Creates a symbol for the legend at the specified position.
|
protected abstract GraphicalElement |
createPlainSymbol(GraphPoint centerPosition,
double size,
GraphicAttributes attributes)
Creates the graphical element of the plain symbol.
|
protected Symbol |
createSymbol(GraphPoint point,
GraphicAttributes attributes,
Hint hintForNextPoint,
Hint hintFromPreviousCurve)
Creates a symbol.
|
Symbol |
createSymbol(GraphPoint point,
Hint hintFromPreviousPoint,
Hint hintFromPreviousCurve)
Creates a symbol.
|
protected final double _size
protected final GraphicAttributes _attributes
public AbstractSymbolFactory(ConfigParameters config)
| Key & Default Value | Type | Mandatory | Description |
|---|---|---|---|
| size = 0.01 | double | no | Size of the symbol in device-independent units. |
| attributes | ConfigParameters | no | Configuration parameters for the attributes of the symbol.
className has to be a class which is an instance of
GraphicAttributes. |
public Symbol createSymbol(GraphPoint point, Hint hintFromPreviousPoint, Hint hintFromPreviousCurve)
AttributesHint.
Calls createSymbol(GraphPoint, GraphicAttributes, Hint, Hint).createSymbol in interface SymbolFactorypoint - Symbol position.hintFromPreviousPoint - Hint from the previous point.hintFromPreviousCurve - Hint from the previous curve.protected Symbol createSymbol(GraphPoint point, GraphicAttributes attributes, Hint hintForNextPoint, Hint hintFromPreviousCurve)
createPlainSymbol().point - Symbol position.attributes - Symbol attributes.hintForNextPoint - Hint for the next point. Will be delivered
unchanged in the return Symbol object.hintFromPreviousCurve - Hint from the previous curve.
Will be delivered unchanged in the return Symbol object.
Subclasses may override this behavior.public GraphicalElement createLegendSymbol(GraphPoint centerPosition, double size)
createPlainSymbol()createLegendSymbol in interface SymbolFactorycenterPosition - Center position of the symbol.size - The size of the symbol. Will be ignored because the value
given in the constructor will be used.protected abstract GraphicalElement createPlainSymbol(GraphPoint centerPosition, double size, GraphicAttributes attributes)
centerPosition - Center position of the symbol.size - The size of the symbol.attributes - The attributes of the symbol.Copyright © 2016. All Rights Reserved.