Class TLcyShapePainterProviderContainer
java.lang.Object
com.luciad.lucy.addons.drawing.format.TLcyShapePainterProviderContainer
- All Implemented Interfaces:
ILcdCloneable
,Cloneable
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 );
- Since:
- 8.2
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ILcdGXYPainterStyle
EmptyILcdGXYPainterStyle
that does nothing. -
Constructor Summary
ConstructorDescriptionTLcyShapePainterProviderContainer
(ILcdGXYPainterProvider aStrokePainterProvider, ILcdGXYPainterProvider aFillPainterProvider, ILcdGXYPainterProvider aPointPainterProvider, ILcdGXYPainterProvider aTextPainterProvider, ILcdGXYPainterProvider aRasterPainterProvider, ILcdGXYEditorProvider aStrokeEditorProvider, ILcdGXYEditorProvider aFillEditorProvider, ILcdGXYEditorProvider aPointEditorProvider, ILcdGXYEditorProvider aTextEditorProvider, ILcdGXYEditorProvider aRasterEditorProvider) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionclone()
MakesObject.clone()
public.static ILcdGXYPainterStyle
createSelectionLineStyle
(ALcyProperties aProperties) Creates an empty style, which only applies the default selection color to the object when inILcdGXYPainter.SELECTED
mode.Returns the fill editor provider passed as an argument in the constructor.Returns the fill painter provider passed as an argument in the constructor.Returns the point editor provider passed as an argument in the constructor.Returns the point painter provider passed as an argument in the constructor.Returns the raster editor provider passed as an argument in the constructor.Returns the raster painter provider passed as an argument in the constructor.Returns the stroke editor provider passed as an argument in the constructor.Returns the stroke painter provider passed as an argument in the constructor.Returns the text editor provider passed as an argument in the constructor.Returns the text painter provider passed as an argument in the constructor.
-
Field Details
-
EMPTY_STYLE
EmptyILcdGXYPainterStyle
that does nothing. Please refer to the class comment for more information.
-
-
Constructor Details
-
TLcyShapePainterProviderContainer
public TLcyShapePainterProviderContainer(ILcdGXYPainterProvider aStrokePainterProvider, ILcdGXYPainterProvider aFillPainterProvider, ILcdGXYPainterProvider aPointPainterProvider, ILcdGXYPainterProvider aTextPainterProvider, ILcdGXYPainterProvider aRasterPainterProvider, ILcdGXYEditorProvider aStrokeEditorProvider, ILcdGXYEditorProvider aFillEditorProvider, ILcdGXYEditorProvider aPointEditorProvider, ILcdGXYEditorProvider aTextEditorProvider, ILcdGXYEditorProvider aRasterEditorProvider) Default constructor. The SLD styling mechanism needs different painters: one for painting strokes, one for painting icons, ... . The painter providers passed as parameter in this constructor are passed to the SLD styling mechanism for this purpose.- Parameters:
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 painters
-
-
Method Details
-
createSelectionLineStyle
Creates an empty style, which only applies the default selection color to the object when inILcdGXYPainter.SELECTED
mode. This style is useful as the line style of the painters returned by this class.- Parameters:
aProperties
- the properties that are used to parse the style from (e.g. configuration file).- Returns:
- an empty style, which only applies the default selection color to the object when in
SELECTED
mode
-
getStrokePainterProvider
Returns the stroke painter provider passed as an argument in the constructor.- Returns:
- the stroke painter provider passed as an argument in the constructor.
-
getFillPainterProvider
Returns the fill painter provider passed as an argument in the constructor.- Returns:
- the fill painter provider passed as an argument in the constructor.
-
getPointPainterProvider
Returns the point painter provider passed as an argument in the constructor.- Returns:
- the point painter provider passed as an argument in the constructor.
-
getTextPainterProvider
Returns the text painter provider passed as an argument in the constructor.- Returns:
- the text painter provider passed as an argument in the constructor.
-
getRasterPainterProvider
Returns the raster painter provider passed as an argument in the constructor.- Returns:
- the raster painter provider passed as an argument in the constructor.
-
getStrokeEditorProvider
Returns the stroke editor provider passed as an argument in the constructor.- Returns:
- the stroke editor provider passed as an argument in the constructor.
-
getFillEditorProvider
Returns the fill editor provider passed as an argument in the constructor.- Returns:
- the fill editor provider passed as an argument in the constructor.
-
getPointEditorProvider
Returns the point editor provider passed as an argument in the constructor.- Returns:
- the point editor provider passed as an argument in the constructor.
-
getTextEditorProvider
Returns the text editor provider passed as an argument in the constructor.- Returns:
- the text editor provider passed as an argument in the constructor.
-
getRasterEditorProvider
Returns the raster editor provider passed as an argument in the constructor.- Returns:
- the raster editor provider passed as an argument in the constructor.
-
clone
Description copied from interface:ILcdCloneable
Makes
When for example extending fromObject.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 ); } }
- Specified by:
clone
in interfaceILcdCloneable
- Overrides:
clone
in classObject
- See Also:
-