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
ConstructorsConstructorDescriptionALcyShapeSupplierWrapper(ALcyShapeSupplier aShapeSupplier) Creates anALcyShapeSupplierWrapperinstances which delegates toaShapeSupplier -
Method Summary
Modifier and TypeMethodDescriptionbooleancanCreateShape(ILcdModel aForModel) Indicates whether this supplier can create a shape for the modelaForModelbooleanChecks whether this supplier can handle the shapeaShapeCreates 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 aALcyShapeCodecfor 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 anALcyShapeSupplierWrapperinstances 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:ALcyShapeSupplierIndicates whether this supplier can create a shape for the modelaForModel- Overrides:
canCreateShapein 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:ALcyShapeSupplierCreates 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:
createShapein classALcyShapeSupplier- Parameters:
aForModel- TheILcdModelfor 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:ALcyShapeSupplierReturns 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:
createShapeCustomizerPanelFactoriesin classALcyShapeSupplier- Returns:
- a ILcyCustomizerPanelFactory that creates ILcyCustomizerPanels for the shapes created by this class.
-
createShapePainterProviderContainer
Description copied from class:ALcyShapeSupplierCreates 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, seeTLcyShapePainterProviderContainerfor more details.- Specified by:
createShapePainterProviderContainerin classALcyShapeSupplier- Returns:
- The
TLcyShapePainterProviderContainerthat can paint the delegate shape. Must not benull.
-
createShapeCodec
Description copied from class:ALcyShapeSupplierReturns aALcyShapeCodecfor shapes which can be handled by this shape supplier- Specified by:
createShapeCodecin classALcyShapeSupplier- Returns:
- A
ALcyShapeCodecfor shapes which can be handled by this shape supplier. Must not benull.
-
createXMLSchemaBasedEncoderLibrary
Description copied from class:ALcyShapeSupplierCreates 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.configureEncodermethod: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:
createXMLSchemaBasedEncoderLibraryin classALcyShapeSupplier- Returns:
- an XML encoder library that is capable of saving shapes to the native format.
-
createXMLSchemaBasedDecoderLibrary
Description copied from class:ALcyShapeSupplierCreates 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.configureDecodermethod: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:
createXMLSchemaBasedDecoderLibraryin classALcyShapeSupplier- Returns:
- an XML decoder library that is capable of loading shapes from the native format.
-
getDisplayName
Description copied from class:ALcyShapeSupplierReturns the untranslated (US English) display name for this shape- Overrides:
getDisplayNamein classALcyShapeSupplier- Returns:
- The untranslated (US English) display name for this shape
-
getDrawingSymbolizerType
Description copied from class:ALcyShapeSupplierReturns the symbolizer type that should be used to decide with which style to create new shapes.- Overrides:
getDrawingSymbolizerTypein 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:ALcyShapeSupplierReturns 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:
getShapeIDin classALcyShapeSupplier- Returns:
- the ID of this supplier
- See Also:
-
canHandle
Description copied from class:ALcyShapeSupplierChecks whether this supplier can handle the shapeaShape- Specified by:
canHandlein classALcyShapeSupplier- Parameters:
aShape- theILcdShapeto check- Returns:
truewhen this shape is capable of handling the shapeaShape
-
createDomainObjectConverter
Description copied from class:ALcyShapeSupplierCreates 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:
createDomainObjectConverterin classALcyShapeSupplier- Returns:
- The shape converter of this supplier. Must not be
null.
-