Class ALcyShapeSupplierWrapper
java.lang.Object
com.luciad.lucy.addons.drawing.format.ALcyShapeSupplier
com.luciad.lucy.addons.drawing.format.ALcyShapeSupplierWrapper
ALcyShapeSupplier
that delegates to another shape supplier.- Since:
- 8.2
-
Constructor Summary
ConstructorDescriptionALcyShapeSupplierWrapper
(ALcyShapeSupplier aShapeSupplier) Creates anALcyShapeSupplierWrapper
instances which delegates toaShapeSupplier
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canCreateShape
(ILcdModel aForModel) Indicates whether this supplier can create a shape for the modelaForModel
boolean
Checks whether this supplier can handle the shapeaShape
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.createShape
(ILcdModel aForModel) Creates the shape of the domain object.Returns aALcyShapeCodec
for shapes which can be handled by this shape supplierReturns a ILcyCustomizerPanelFactory that creates ILcyCustomizerPanels for the shapes created by this class.Creates the painters and editors that can paint and edit the shape returned byALcyShapeSupplier.createShape(com.luciad.model.ILcdModel)
.Creates the XML decoder library which will be used to load shapes from the native format.Creates the XML marshaller library which will be used to save shapes to the native format.Returns the untranslated (US English) display name for this shapeReturns the symbolizer type that should be used to decide with which style to create new shapes.Returns the delegate geometry supplier.Returns the ID of this supplier.Methods inherited from class com.luciad.lucy.addons.drawing.format.ALcyShapeSupplier
getProperties
-
Constructor Details
-
ALcyShapeSupplierWrapper
Creates anALcyShapeSupplierWrapper
instances which delegates toaShapeSupplier
- Parameters:
aShapeSupplier
- the geometry supplier to delegate to
-
-
Method Details
-
getGeometrySupplier
Returns the delegate geometry supplier.- Returns:
- the delegate geometry supplier.
-
canCreateShape
Description copied from class:ALcyShapeSupplier
Indicates whether this supplier can create a shape for the modelaForModel
- Overrides:
canCreateShape
in classALcyShapeSupplier
- 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
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 classALcyShapeSupplier
- Parameters:
aForModel
- TheILcdModel
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. Nevernull
. The implementation of this method should not insert the created shape in thisILcdModel
.- Returns:
- A new instance of the domain object represented by this domain object supplier implementation.
Must not be
null
.
-
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 classALcyShapeSupplier
- Returns:
- a ILcyCustomizerPanelFactory that creates ILcyCustomizerPanels for the shapes created by this class.
-
createShapePainterProviderContainer
Description copied from class:ALcyShapeSupplier
Creates the painters and editors that can paint and edit the shape returned byALcyShapeSupplier.createShape(com.luciad.model.ILcdModel)
. These painters don't have to perform any styling, seeTLcyShapePainterProviderContainer
for more details.- Specified by:
createShapePainterProviderContainer
in classALcyShapeSupplier
- Returns:
- The
TLcyShapePainterProviderContainer
that can paint the delegate shape. Must not benull
.
-
createShapeCodec
Description copied from class:ALcyShapeSupplier
Returns aALcyShapeCodec
for shapes which can be handled by this shape supplier- Specified by:
createShapeCodec
in classALcyShapeSupplier
- Returns:
- A
ALcyShapeCodec
for shapes which can be handled by this shape supplier. Must not benull
.
-
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.
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 classALcyShapeSupplier
- Returns:
- an XML encoder library that is capable of saving shapes to the native format.
-
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.
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 classALcyShapeSupplier
- Returns:
- an XML decoder library that is capable of loading shapes from the native format.
-
getDisplayName
Description copied from class:ALcyShapeSupplier
Returns the untranslated (US English) display name for this shape- Overrides:
getDisplayName
in classALcyShapeSupplier
- Returns:
- The untranslated (US English) display name for this shape
-
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 classALcyShapeSupplier
- Returns:
- the symbolizer type that should be used to decide with which style to create new
shapes. Must not be
null
.
-
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 classALcyShapeSupplier
- Returns:
- the ID of this supplier
- See Also:
-
canHandle
Description copied from class:ALcyShapeSupplier
Checks whether this supplier can handle the shapeaShape
- Specified by:
canHandle
in classALcyShapeSupplier
- Parameters:
aShape
- theILcdShape
to check- Returns:
true
when this shape is capable of handling the shapeaShape
-
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 theALcyShapeCodec
.- Overrides:
createDomainObjectConverter
in classALcyShapeSupplier
- Returns:
- The shape converter of this supplier. Must not be
null
.
-