public abstract class ALcyShapeSupplier extends Object
Provides the shape specific functionality to a
TLcySLDDomainObjectSupplier
. This shape specific functionality consists of:
ILcdShape
for specific ILcdModel
sALcyShapeCodec
ILcyCustomizerPanelFactory
which can create a GUI element, allowing
the user to change the specific properties of the shape.Constructor and Description |
---|
ALcyShapeSupplier(String aShapeID,
String aDisplayName,
TLcyDrawingSymbolizerType aDrawingSymbolizerType,
ALcyProperties aProperties)
Creates a new
ALcyShapeSupplier . |
Modifier and Type | Method and Description |
---|---|
boolean |
canCreateShape(ILcdModel aForModel)
Indicates whether this supplier can create a shape for the model
aForModel |
abstract boolean |
canHandle(ILcdShape aShape)
Checks whether this supplier can handle the shape
aShape |
ALcyDomainObjectConverter |
createDomainObjectConverter()
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.
|
abstract ILcdShape |
createShape(ILcdModel aForModel)
Creates the shape of the domain object.
|
abstract ALcyShapeCodec |
createShapeCodec()
Returns a
ALcyShapeCodec for shapes which can be handled by this shape supplier |
abstract ILcyCustomizerPanelFactory[] |
createShapeCustomizerPanelFactories()
Returns a ILcyCustomizerPanelFactory that creates ILcyCustomizerPanels for the shapes
created by this class.
|
abstract TLcyShapePainterProviderContainer |
createShapePainterProviderContainer()
Creates the painters and editors that can paint and edit the shape returned by
createShape(com.luciad.model.ILcdModel) . |
abstract ILcdXMLSchemaBasedDecoderLibrary |
createXMLSchemaBasedDecoderLibrary()
Creates the XML decoder library which will be used to load shapes from the native
format.
|
abstract ILcdXMLSchemaBasedEncoderLibrary |
createXMLSchemaBasedEncoderLibrary()
Creates the XML marshaller library which will be used to save shapes to the native
format.
|
String |
getDisplayName()
Returns the untranslated (US English) display name for this shape
|
TLcyDrawingSymbolizerType |
getDrawingSymbolizerType()
Returns the symbolizer type that should be used to decide with which style to create new
shapes.
|
ALcyProperties |
getProperties()
Returns the
ALcyProperties holding the configuration of this shape supplier. |
String |
getShapeID()
Returns the ID of this supplier.
|
public ALcyShapeSupplier(String aShapeID, String aDisplayName, TLcyDrawingSymbolizerType aDrawingSymbolizerType, ALcyProperties aProperties)
ALcyShapeSupplier
.aShapeID
- Unique ID of this ALcyShapeSupplier
. It is also used as the
domain object ID of the TLcySLDDomainObjectSupplier
.aDisplayName
- The untranslated (US English) display name for this shapeaDrawingSymbolizerType
- a type-safe enumeration. The symbolizer type that should be used to decide with which style new shapes will be created.aProperties
- The ALcyProperties
holding the configuration of this shape supplier.
Must not be null
.public boolean canCreateShape(ILcdModel aForModel)
aForModel
aForModel
- The target model, for which this shape supplier should create a shapetrue
.public abstract ILcdShape createShape(ILcdModel aForModel)
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
.null
.public abstract boolean canHandle(ILcdShape aShape)
aShape
aShape
- the ILcdShape
to checktrue
when this shape is capable of handling the shape aShape
public abstract ILcdXMLSchemaBasedEncoderLibrary createXMLSchemaBasedEncoderLibrary()
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 ) );
}
public abstract ILcdXMLSchemaBasedDecoderLibrary createXMLSchemaBasedDecoderLibrary()
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 ) );
}
public abstract ILcyCustomizerPanelFactory[] createShapeCustomizerPanelFactories()
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.
public abstract TLcyShapePainterProviderContainer createShapePainterProviderContainer()
createShape(com.luciad.model.ILcdModel)
. These painters don't have to perform
any styling, see TLcyShapePainterProviderContainer
for more details.TLcyShapePainterProviderContainer
that can paint the delegate shape. Must not
be null
.public abstract ALcyShapeCodec createShapeCodec()
ALcyShapeCodec
for shapes which can be handled by this shape supplierALcyShapeCodec
for shapes which can be handled by this shape supplier. Must not be null
.public String getShapeID()
ALcyDomainObjectSupplier.getDomainObjectID()
public String getDisplayName()
public TLcyDrawingSymbolizerType getDrawingSymbolizerType()
null
.public ALcyDomainObjectConverter createDomainObjectConverter()
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
.null
.public ALcyProperties getProperties()
Returns the ALcyProperties
holding the configuration of this shape supplier.
ALcyProperties
holding the configuration. Never null
.