Class TLcyShapePainterProviderContainer

java.lang.Object
com.luciad.lucy.addons.drawing.format.TLcyShapePainterProviderContainer
All Implemented Interfaces:
ILcdCloneable, Cloneable

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 );
 

Since:
8.2
See Also:
  • Field Details

    • EMPTY_STYLE

      public static final ILcdGXYPainterStyle EMPTY_STYLE
      Empty ILcdGXYPainterStyle 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 painters
      aFillPainterProvider - a painter provider for fill painters
      aPointPainterProvider - a painter provider for point painters
      aTextPainterProvider - a painter provider for text painters
      aRasterPainterProvider - a painter provider for raster painters
      aStrokeEditorProvider - a editor provider for stroke painters
      aFillEditorProvider - a editor provider for fill painters
      aPointEditorProvider - a editor provider for point painters
      aTextEditorProvider - a editor provider for text painters
      aRasterEditorProvider - a editor provider for raster painters
  • Method Details

    • createSelectionLineStyle

      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. 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

      public ILcdGXYPainterProvider 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

      public ILcdGXYPainterProvider 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

      public ILcdGXYPainterProvider 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

      public ILcdGXYPainterProvider 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

      public ILcdGXYPainterProvider 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

      public ILcdGXYEditorProvider 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

      public ILcdGXYEditorProvider 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

      public ILcdGXYEditorProvider 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

      public ILcdGXYEditorProvider 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

      public ILcdGXYEditorProvider 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

      public Object clone()
      Description copied from interface: ILcdCloneable

      Makes Object.clone() public.

      When for example extending from 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 interface ILcdCloneable
      Overrides:
      clone in class Object
      See Also: