Class ALcyShapeSupplierWrapper

java.lang.Object
com.luciad.lucy.addons.drawing.format.ALcyShapeSupplier
com.luciad.lucy.addons.drawing.format.ALcyShapeSupplierWrapper

public abstract class ALcyShapeSupplierWrapper extends ALcyShapeSupplier
ALcyShapeSupplier that delegates to another shape supplier.
Since:
8.2
  • Constructor Details

    • ALcyShapeSupplierWrapper

      public ALcyShapeSupplierWrapper(ALcyShapeSupplier aShapeSupplier)
      Creates an ALcyShapeSupplierWrapper instances which delegates to aShapeSupplier
      Parameters:
      aShapeSupplier - the geometry supplier to delegate to
  • Method Details

    • getGeometrySupplier

      public ALcyShapeSupplier getGeometrySupplier()
      Returns the delegate geometry supplier.
      Returns:
      the delegate geometry supplier.
    • canCreateShape

      public boolean canCreateShape(ILcdModel aForModel)
      Description copied from class: ALcyShapeSupplier
      Indicates whether this supplier can create a shape for the model aForModel
      Overrides:
      canCreateShape in class ALcyShapeSupplier
      Parameters:
      aForModel - The target model, for which this shape supplier should create a shape
      Returns:
      if this supplier can create a shape for this model. The default implementation returns true.
    • createShape

      public ILcdShape createShape(ILcdModel aForModel)
      Description copied from class: ALcyShapeSupplier
      Creates the shape of the domain object. This method is allowed to interact with the UI: it should be able to pop up a dialog asking for details. (eg as is the case with MS2525b) This method is always called from the EDT thread All this means that this method must not be called during workspace decoding or model decoding
      Specified by:
      createShape in class ALcyShapeSupplier
      Parameters:
      aForModel - The ILcdModel for which the shape is created. The implementation of this method can use this model to determine, for instance, the model reference or the ILcdDataModelDescriptor. Never null. The implementation of this method should not insert the created shape in this ILcdModel.
      Returns:
      A new instance of the domain object represented by this domain object supplier implementation. Must not be null.
    • createShapeCustomizerPanelFactories

      public ILcyCustomizerPanelFactory[] createShapeCustomizerPanelFactories()
      Description copied from class: ALcyShapeSupplier

      Returns a ILcyCustomizerPanelFactory that creates ILcyCustomizerPanels for the shapes created by this class.

      The objects set on the customizer panels are instances of TLcyShapeContext. This context also contains a reference to the shape and an ILcdModel, but the shape is not an element of this model.

      Specified by:
      createShapeCustomizerPanelFactories in class ALcyShapeSupplier
      Returns:
      a ILcyCustomizerPanelFactory that creates ILcyCustomizerPanels for the shapes created by this class.
    • createShapePainterProviderContainer

      public TLcyShapePainterProviderContainer createShapePainterProviderContainer()
      Description copied from class: ALcyShapeSupplier
      Creates the painters and editors that can paint and edit the shape returned by ALcyShapeSupplier.createShape(com.luciad.model.ILcdModel). These painters don't have to perform any styling, see TLcyShapePainterProviderContainer for more details.
      Specified by:
      createShapePainterProviderContainer in class ALcyShapeSupplier
      Returns:
      The TLcyShapePainterProviderContainer that can paint the delegate shape. Must not be null.
    • createShapeCodec

      public ALcyShapeCodec createShapeCodec()
      Description copied from class: ALcyShapeSupplier
      Returns a ALcyShapeCodec for shapes which can be handled by this shape supplier
      Specified by:
      createShapeCodec in class ALcyShapeSupplier
      Returns:
      A ALcyShapeCodec for shapes which can be handled by this shape supplier. Must not be null.
    • createXMLSchemaBasedEncoderLibrary

      public ILcdXMLSchemaBasedEncoderLibrary createXMLSchemaBasedEncoderLibrary()
      Description copied from class: ALcyShapeSupplier
      Creates the XML marshaller library which will be used to save shapes to the native format.

      An XML marshaller library should typically implement the following actions:

      • An XML element should be registered for this supplier's XML geometry property type.
      • An XML element should be registered for this supplier's XML geometry type.
      • A type marshaller for the [supplier's shape class, XML geometry property type] pair should be registered.
      • A type marshaller for the [supplier's shape class, XML geometry type] pair should be registered.

      The following code snippet shows a typical implementation for the ILcdXMLSchemaBasedEncoderLibrary.configureEncoder method:

      
         public void configureEncoder( TLcdXMLSchemaBasedEncoder aEncoder ) {
           TLcdXMLSchemaSet schema = aEncoder.getMapping().getSchemaSet();
           schema.registerElement( MY_GEOMETRY_PROPERTY_ELEMENT );
           schema.registerElement( MY_GEOMETRY_ELEMENT );
      
           TLcdXMLTypeMarshallerProvider provider = aEncoder.getTypeMarshallerProvider();
           provider.registerTypeMarshaller( MY_GEOMETRY_PROPERTY_ELEMENT.getType(), MyShape.class, new MyShapePropertyMarshaller( aMarshallerContext ) );
           provider.registerTypeMarshaller( MY_GEOMETRY_ELEMENT.getType(), MyShape.class, new MyShapeMarshaller( aMarshallerContext ) );
         }
       
      Specified by:
      createXMLSchemaBasedEncoderLibrary in class ALcyShapeSupplier
      Returns:
      an XML encoder library that is capable of saving shapes to the native format.
    • createXMLSchemaBasedDecoderLibrary

      public ILcdXMLSchemaBasedDecoderLibrary createXMLSchemaBasedDecoderLibrary()
      Description copied from class: ALcyShapeSupplier
      Creates the XML decoder library which will be used to load shapes from the native format.

      An XML decoder library should typically implement the following actions:

      • An XML element should be registered for this supplier's XML geometry property type.
      • An XML element should be registered for this supplier's XML geometry type.
      • A type unmarshaller for the [supplier's shape class, XML geometry property type] pair should be registered.
      • A type unmarshaller for the [supplier's shape class, XML geometry type] pair should be registered.

      The following code snippet shows a typical implementation for the ILcdXMLSchemaBasedDecoderLibrary.configureDecoder method:

      
         public void configureDecoder( TLcdXMLSchemaBasedDecoder aDecoder ) {
           TLcdXMLSchemaSet schema = aDecoder.getMapping().getSchemaSet();
           schema.registerElement( MY_GEOMETRY_PROPERTY_ELEMENT );
           schema.registerElement( MY_GEOMETRY_ELEMENT );
      
           TLcdXMLTypeUnmarshallerProvider provider = aDecoder.getTypeUnmarshallerProvider();
           provider.registerTypeUnmarshaller( MY_GEOMETRY_PROPERTY_ELEMENT.getType(), MyShape.class, new MyShapePropertyUnmarshaller( aDecoder ) );
           provider.registerTypeUnmarshaller( MY_GEOMETRY_ELEMENT.getType(), MyShape.class, new MyShapeUnmarshaller( aDecoder ) );
         }
       
      Specified by:
      createXMLSchemaBasedDecoderLibrary in class ALcyShapeSupplier
      Returns:
      an XML decoder library that is capable of loading shapes from the native format.
    • getDisplayName

      public String getDisplayName()
      Description copied from class: ALcyShapeSupplier
      Returns the untranslated (US English) display name for this shape
      Overrides:
      getDisplayName in class ALcyShapeSupplier
      Returns:
      The untranslated (US English) display name for this shape
    • getDrawingSymbolizerType

      public TLcyDrawingSymbolizerType getDrawingSymbolizerType()
      Description copied from class: ALcyShapeSupplier
      Returns the symbolizer type that should be used to decide with which style to create new shapes.
      Overrides:
      getDrawingSymbolizerType in class ALcyShapeSupplier
      Returns:
      the symbolizer type that should be used to decide with which style to create new shapes. Must not be null.
    • getShapeID

      public String getShapeID()
      Description copied from class: ALcyShapeSupplier
      Returns the ID of this supplier. Can for example be used to find out which 2D domain object suppliers match with which 3D domain object suppliers.
      Overrides:
      getShapeID in class ALcyShapeSupplier
      Returns:
      the ID of this supplier
      See Also:
    • canHandle

      public boolean canHandle(ILcdShape aShape)
      Description copied from class: ALcyShapeSupplier
      Checks whether this supplier can handle the shape aShape
      Specified by:
      canHandle in class ALcyShapeSupplier
      Parameters:
      aShape - the ILcdShape to check
      Returns:
      true when this shape is capable of handling the shape aShape
    • createDomainObjectConverter

      public ALcyDomainObjectConverter createDomainObjectConverter()
      Description copied from class: ALcyShapeSupplier

      Creates the domain object converter that can convert the shapes of this supplier instance to other shapes or, conversely, import the data of other flavors to the shapes of this supplier.

      The default implementation returns a domain object converter based on the ALcyShapeCodec.
      Overrides:
      createDomainObjectConverter in class ALcyShapeSupplier
      Returns:
      The shape converter of this supplier. Must not be null.