public class TLcyShapePainterProviderContainer extends Object implements ILcdCloneable
This class is a container for the painter/editor providers that are needed for SLD. The SLD
styling mechanism needs different painters: one for painting the outline strokes, one for
painting the fill, one for painting points, ... . Note that the painters/editors that are
provided here must NOT change the styling, that is taken care of by SLD. This means the returned
painters should not change the settings of the Graphics
before they paint.
For example, if an
TLcdGXYPointListPainter
is used to draw polylines, it should be set up like this:
TLcdGXYPointListPainter painter = new TLcdGXYPointListPainter(TLcdGXYPointListPainter.POLYLINE);
painter.setLineStyle( createSelectionLineStyle( aProperties ) );
painter.setFillStyle( EMPTY_STYLE );
TLcdSLDSymbolizerPainterFactory
Modifier and Type | Field and Description |
---|---|
static ILcdGXYPainterStyle |
EMPTY_STYLE
Empty
ILcdGXYPainterStyle that does nothing. |
Constructor and Description |
---|
TLcyShapePainterProviderContainer(ILcdGXYPainterProvider aStrokePainterProvider,
ILcdGXYPainterProvider aFillPainterProvider,
ILcdGXYPainterProvider aPointPainterProvider,
ILcdGXYPainterProvider aTextPainterProvider,
ILcdGXYPainterProvider aRasterPainterProvider,
ILcdGXYEditorProvider aStrokeEditorProvider,
ILcdGXYEditorProvider aFillEditorProvider,
ILcdGXYEditorProvider aPointEditorProvider,
ILcdGXYEditorProvider aTextEditorProvider,
ILcdGXYEditorProvider aRasterEditorProvider)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Makes
Object.clone() public. |
static ILcdGXYPainterStyle |
createSelectionLineStyle(ALcyProperties aProperties)
Creates an empty style, which only applies the default selection color to the object when in
ILcdGXYPainter.SELECTED mode. |
ILcdGXYEditorProvider |
getFillEditorProvider()
Returns the fill editor provider passed as an argument in the constructor.
|
ILcdGXYPainterProvider |
getFillPainterProvider()
Returns the fill painter provider passed as an argument in the constructor.
|
ILcdGXYEditorProvider |
getPointEditorProvider()
Returns the point editor provider passed as an argument in the constructor.
|
ILcdGXYPainterProvider |
getPointPainterProvider()
Returns the point painter provider passed as an argument in the constructor.
|
ILcdGXYEditorProvider |
getRasterEditorProvider()
Returns the raster editor provider passed as an argument in the constructor.
|
ILcdGXYPainterProvider |
getRasterPainterProvider()
Returns the raster painter provider passed as an argument in the constructor.
|
ILcdGXYEditorProvider |
getStrokeEditorProvider()
Returns the stroke editor provider passed as an argument in the constructor.
|
ILcdGXYPainterProvider |
getStrokePainterProvider()
Returns the stroke painter provider passed as an argument in the constructor.
|
ILcdGXYEditorProvider |
getTextEditorProvider()
Returns the text editor provider passed as an argument in the constructor.
|
ILcdGXYPainterProvider |
getTextPainterProvider()
Returns the text painter provider passed as an argument in the constructor.
|
public static final ILcdGXYPainterStyle EMPTY_STYLE
ILcdGXYPainterStyle
that does nothing. Please refer to the class comment
for more information.public TLcyShapePainterProviderContainer(ILcdGXYPainterProvider aStrokePainterProvider, ILcdGXYPainterProvider aFillPainterProvider, ILcdGXYPainterProvider aPointPainterProvider, ILcdGXYPainterProvider aTextPainterProvider, ILcdGXYPainterProvider aRasterPainterProvider, ILcdGXYEditorProvider aStrokeEditorProvider, ILcdGXYEditorProvider aFillEditorProvider, ILcdGXYEditorProvider aPointEditorProvider, ILcdGXYEditorProvider aTextEditorProvider, ILcdGXYEditorProvider aRasterEditorProvider)
aStrokePainterProvider
- a painter provider for stroke paintersaFillPainterProvider
- a painter provider for fill paintersaPointPainterProvider
- a painter provider for point paintersaTextPainterProvider
- a painter provider for text paintersaRasterPainterProvider
- a painter provider for raster paintersaStrokeEditorProvider
- a editor provider for stroke paintersaFillEditorProvider
- a editor provider for fill paintersaPointEditorProvider
- a editor provider for point paintersaTextEditorProvider
- a editor provider for text paintersaRasterEditorProvider
- a editor provider for raster painterspublic static ILcdGXYPainterStyle createSelectionLineStyle(ALcyProperties aProperties)
ILcdGXYPainter.SELECTED
mode. This style is useful as the line style of
the painters returned by this class.aProperties
- the properties that are used to parse the style from (e.g. configuration
file).SELECTED
modepublic ILcdGXYPainterProvider getStrokePainterProvider()
public ILcdGXYPainterProvider getFillPainterProvider()
public ILcdGXYPainterProvider getPointPainterProvider()
public ILcdGXYPainterProvider getTextPainterProvider()
public ILcdGXYPainterProvider getRasterPainterProvider()
public ILcdGXYEditorProvider getStrokeEditorProvider()
public ILcdGXYEditorProvider getFillEditorProvider()
public ILcdGXYEditorProvider getPointEditorProvider()
public ILcdGXYEditorProvider getTextEditorProvider()
public ILcdGXYEditorProvider getRasterEditorProvider()
public Object clone()
ILcdCloneable
Makes Object.clone()
public.
java.lang.Object
, it can be implemented like this:
public Object clone() {
try {
return super.clone();
} catch ( CloneNotSupportedException e ) {
// Cannot happen: extends from Object and implements Cloneable (see also Object.clone)
throw new RuntimeException( e );
}
}
clone
in interface ILcdCloneable
clone
in class Object
Object.clone()