Class TLcyDrawingFormat
This class keeps track of all the ALcyDomainObjectSupplier
instances registered to
the addon. Adding or removing a certain ALcyDomainObjectSupplier
instance is done calling the methods addDomainObjectSupplier(ALcyDomainObjectSupplier)
and
removeDomainObjectSupplier(ALcyDomainObjectSupplier)
.
A specific ALcyDomainObjectSupplier
instance can be retrieved by passing the unique ID to
the getDomainObjectSupplierWithID(String)
method. The IDs of the default domain object suppliers are available through
the public fields of this class.
Since this class knows of all the domain object suppliers it can be used to:
- Create a domain object model for a specific
ILcdShape
by passing the call to the appropriateALcyDomainObjectSupplier
- Convert a shape by providing a
ALcyDomainObjectConverter
- Providing the correct model encoders and decoders
The last function of this class is the creation of a ILcdGXYLayerFactory
for the default drawing model.
- Since:
- 8.2
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Unique ID of the domain object supplier, capable of handling arc bands.static final String
Unique ID of the domain object supplier, capable of handling arcs.static final String
Unique ID of the domain object supplier, capable of handling bounds.static final String
Unique ID of the domain object supplier, capable of handling 3D buffers.static final String
Unique ID of the domain object supplier, capable of handling buffers.static final String
Unique ID of the domain object supplier, capable of handling circles.static final String
Unique ID of the domain object supplier, capable of handling circles.static final String
Unique ID of the domain object supplier, capable of handling circular arcs by 3 points.static final String
Unique ID of the domain object supplier, capable of handling circular arcs by bulge.static final String
Unique ID of the domain object supplier, capable of handling circular arcs by center point.static final String
Unique ID of the domain object supplier, capable of handling complex polygons.static final String
Unique ID of the domain object supplier, capable of handling composite curves.static final String
Unique ID of the domain object supplier, capable of handling composite curves.static final String
Unique ID of the domain object supplier, capable of handling domes.static final String
Unique ID of the domain object supplier, capable of handling ellipses.static final String
Key used for the format bar property in the ALcyProperties object used in theALcyDrawingToolBarFactory.createGUI(com.luciad.lucy.util.properties.ALcyProperties)
method.static final String
Unique ID of the domain object supplier, capable of handling groups.static final String
Key used for the mapcomponent property in the ALcyProperties object used in theALcyDrawingToolBarFactory.createGUI(com.luciad.lucy.util.properties.ALcyProperties)
method.static final String
Unique ID of the domain object supplier, capable of handling meridians.static final String
Unique ID of the domain object supplier, capable of handling north arrows.static final String
Unique ID of the domain object supplier, capable of handling parallels.static final String
Unique ID of the domain object supplier, capable of handling points.static final String
Unique ID of the domain object supplier, capable of handling 3D polygons.static final String
Unique ID of the domain object supplier, capable of handling polygons.static final String
Unique ID of the domain object supplier, capable of handling 3D polylines.static final String
Unique ID of the domain object supplier, capable of handling polylines.static final String
Unique ID of the domain object supplier, capable of handling rhumb polygons.static final String
Unique ID of the domain object supplier, capable of handling rhumb polylines.static final String
Unique ID of the domain object supplier, capable of handling spheres.static final String
Unique ID of the domain object supplier, capable of handling textshapes.static final String
Unique ID of the domain object supplier, capable of handling variable buffers. -
Constructor Summary
ConstructorDescriptionTLcyDrawingFormat
(TLcyDrawingAddOn aDrawingAddOn) Construct a drawing format which supports drawing models, which are encoded/decoded in/from an extension of OGC's GML.TLcyDrawingFormat
(ILcyLucyEnv aLucyEnv, TLcyDrawingAddOn aDrawingAddOn, ALcyProperties aProperties) Construct a drawing format which supports drawing models, which are encoded/decoded in/from an extension of OGC's GML. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDomainObjectSupplier
(ALcyDomainObjectSupplier aDomainObjectSupplier) Shortcut foraddDomainObjectSupplier( aDomainObjectSupplier, ILcyLucyEnv.PRIORITY_DEFAULT );
.void
addDomainObjectSupplier
(ALcyDomainObjectSupplier aDomainObjectSupplier, int aPriority) Adds the specifiedALcyDomainObjectSupplier
to theList
of suppliers that are used to create, paint and encode/decode domain objects in the Drawing layers.void
This method will initialize the domain object customizers and as such adding domain object suppliers is no longer possible.protected ALcyDomainObjectSupplier
createDomainObjectSupplier
(String aDomainObjectID) Creates theALcyDomainObjectSupplier
for the specified ID.protected ALcyFormatBarFactory
Creates theALcyFormatBarFactory
that can create a bar to manipulate layers of this format.protected ALcyShapeSupplier
createGeometrySupplier
(String aDomainObjectID) Creates theALcyShapeSupplier
for the given domain object ID.protected ALcyGUIFactory
<Component> Creates the factory that creates the content for theALcyFormatBar
.The default implementation returns a composite shape converter, which will automatically loop over all the shape converters of the registered domain object suppliers.getDomainObjectSupplier
(int aIndex) Returns theALcyDomainObjectSupplier
at indexaIndex
.int
Returns the number of registered domain object suppliers.Returns a list containing all the registeredALcyDomainObjectSupplier
instances.getDomainObjectSupplierWithID
(String aDomainObjectID) Retrieve a domain object supplier by its unique ID.Returns theALcyProperties
holding the configuration of this format.protected boolean
isExtrusionSupported
(String aDomainObjectID) Returnstrue
if extrusion is supported by default.boolean
removeDomainObjectSupplier
(ALcyDomainObjectSupplier aDomainObjectSupplier) Removes a domain object supplier.Methods inherited from class com.luciad.lucy.format.ALcyFormatWrapper
createAsynchronousPaintHintProvider, createBalloonContentProviders, createDataPropertyValueCustomizerPanelFactories, createDataSourceHandlerFileTypeDescriptorGroups, createDataSourceHandlerFileTypeDescriptors, createDataSourceHandlers, createDefaultModelDescriptorFactories, createDomainObjectCustomizerPanelFactories, createDomainObjectCustomizerPanelWorkspaceCodecs, createDomainObjectWorkspaceCodecs, createGXYLayerCustomizerPanelFactories, createGXYLayerCustomizerPanelWorkspaceCodecs, createGXYLayerDecoderFileTypeDescriptors, createGXYLayerDecoders, createGXYLayerEncoderFileTypeDescriptors, createGXYLayerEncoders, createGXYLayerFactory, createGXYLayerSelectionTransferHandlers, createGXYLayerStyleProvider, createGXYLayerTypeProvider, createGXYLayerWorkspaceCodecs, createLabelPlacementHintProvider, createLayerHeightProviderFactory, createLayerMeasureProviderFactory, createModelContentTypeProvider, createModelCustomizerPanelFactories, createModelCustomizerPanelWorkspaceCodecs, createModelDecoderFileTypeDescriptorGroups, createModelDecoderFileTypeDescriptors, createModelDecoders, createModelEncoderCustomizerPanelFactories, createModelEncoderCustomizerPanelWorkspaceCodecs, createModelEncoderFileTypeDescriptors, createModelEncoders, createModelFactory, createModelHeightProviderFactory, createModelMeasureProviderFactory, createModelMetaDataCustomizerPanelFactories, createModelMetaDataCustomizerPanelWorkspaceCodecs, createModelWorkspaceCodecs, getFormat, getLongPrefix, getLucyEnv, getShortPrefix, isGXYLayerOfFormat, isModelOfFormat
Methods inherited from class com.luciad.lucy.format.ALcyFormat
createGXYLayerOfFormatFilter, createLayerContextOfFormatFilter, createModelContextOfFormatFilter, createModelOfFormatFilter, getAsynchronousPaintHintProvider, getBalloonContentProviders, getDataPropertyValueCustomizerPanelFactories, getDataSourceHandlerFileTypeDescriptorGroups, getDataSourceHandlerFileTypeDescriptors, getDataSourceHandlers, getDefaultModelDescriptorFactories, getDomainObjectCustomizerPanelFactories, getDomainObjectCustomizerPanelWorkspaceCodecs, getDomainObjectWorkspaceCodecs, getFormatBarFactory, getGXYLayerCustomizerPanelFactories, getGXYLayerCustomizerPanelWorkspaceCodecs, getGXYLayerDecoderFileTypeDescriptors, getGXYLayerDecoders, getGXYLayerEncoderFileTypeDescriptors, getGXYLayerEncoders, getGXYLayerFactory, getGXYLayerSelectionTransferHandlers, getGXYLayerStyleProvider, getGXYLayerTypeProvider, getGXYLayerWorkspaceCodecs, getLabelPlacementHintProvider, getLayerHeightProviderFactory, getLayerMeasureProviderFactory, getModelContentTypeProvider, getModelCustomizerPanelFactories, getModelCustomizerPanelWorkspaceCodecs, getModelDecoderFileTypeDescriptorGroups, getModelDecoderFileTypeDescriptors, getModelDecoders, getModelEncoderCustomizerPanelFactories, getModelEncoderCustomizerPanelWorkspaceCodecs, getModelEncoderFileTypeDescriptors, getModelEncoders, getModelFactory, getModelHeightProviderFactory, getModelMeasureProviderFactory, getModelMetaDataCustomizerPanelFactories, getModelMetaDataCustomizerPanelWorkspaceCodecs, getModelWorkspaceCodecs, toString
-
Field Details
-
MAP_COMPONENT_KEY
Key used for the mapcomponent property in the ALcyProperties object used in theALcyDrawingToolBarFactory.createGUI(com.luciad.lucy.util.properties.ALcyProperties)
method. The value for this key must be an instance of ILcyMapComponent.- See Also:
-
FORMAT_BAR_KEY
Key used for the format bar property in the ALcyProperties object used in theALcyDrawingToolBarFactory.createGUI(com.luciad.lucy.util.properties.ALcyProperties)
method. The value for this key must be an instanceof ALcyFormatBar.- See Also:
-
GROUP_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling groups.- See Also:
-
MERIDIAN_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling meridians.- See Also:
-
PARALLEL_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling parallels.- See Also:
-
NORTH_ARROW_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling north arrows.- See Also:
-
POINT_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling points.- See Also:
-
POLYGON_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling polygons.- See Also:
-
COMPLEX_POLYGON_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling complex polygons.- See Also:
-
POLYGON_3D_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling 3D polygons.- See Also:
-
RHUMB_POLYGON_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling rhumb polygons.- See Also:
-
POLYLINE_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling polylines.- See Also:
-
POLYLINE_3D_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling 3D polylines.- See Also:
-
RHUMB_POLYLINE_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling rhumb polylines.- See Also:
-
SPHERE_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling spheres.- See Also:
-
TEXT_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling textshapes.- See Also:
-
ELLIPSE_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling ellipses.- See Also:
-
DOME_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling domes.- See Also:
-
CIRCLE_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling circles.- See Also:
-
CIRCLE_BY_3_POINTS_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling circles.- See Also:
-
BUFFER_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling buffers.- See Also:
-
BUFFER_3D_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling 3D buffers.- See Also:
-
VARIABLE_BUFFER_3D_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling variable buffers.- See Also:
-
BOUNDS_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling bounds.- See Also:
-
ARC_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling arcs.- See Also:
-
ARC_BAND_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling arc bands.- See Also:
-
CIRCULAR_ARC_BY_3_POINTS_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling circular arcs by 3 points.- See Also:
-
CIRCULAR_ARC_BY_BULGE_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling circular arcs by bulge.- See Also:
-
CIRCULAR_ARC_BY_CENTER_POINT_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling circular arcs by center point.- See Also:
-
COMPOSITE_CURVE_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling composite curves.- See Also:
-
COMPOSITE_RING_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling composite curves.- See Also:
-
-
Constructor Details
-
TLcyDrawingFormat
Construct a drawing format which supports drawing models, which are encoded/decoded in/from an extension of OGC's GML.- Parameters:
aDrawingAddOn
- the drawing addon to register this format to
-
TLcyDrawingFormat
public TLcyDrawingFormat(ILcyLucyEnv aLucyEnv, TLcyDrawingAddOn aDrawingAddOn, ALcyProperties aProperties) Construct a drawing format which supports drawing models, which are encoded/decoded in/from an extension of OGC's GML.- Parameters:
aLucyEnv
- the Lucy environment in which the backend is pluggedaDrawingAddOn
- the drawing addon to register this format toaProperties
- the Lucy properties
-
-
Method Details
-
createAll
public void createAll()This method will initialize the domain object customizers and as such adding domain object suppliers is no longer possible.- Overrides:
createAll
in classALcyFormatWrapper
-
createDomainObjectSupplier
Creates the
ALcyDomainObjectSupplier
for the specified ID. This support instance is responsible for providing all 2D support for the specified shape: painters and editors, customizer panels, XML encoders, ...- Parameters:
aDomainObjectID
- The domain object ID for which to create a domain object supplier. One of the constants in this class that end withID
.- Returns:
- The
ALcyDomainObjectSupplier
that provides the support for the shape identified byaID
. May benull
. - See Also:
-
isExtrusionSupported
Returnstrue
if extrusion is supported by default.- Parameters:
aDomainObjectID
- The domain object ID for which to check if extrusion is supported. One of the constants in this class that end withID
.- Returns:
true
if extrusion is supported by default for the given domain object ID,false
otherwise.
-
createGeometrySupplier
Creates theALcyShapeSupplier
for the given domain object ID.- Parameters:
aDomainObjectID
- The domain object ID for which to create anALcyShapeSupplier
.- Returns:
- The created
ALcyShapeSupplier
. - See Also:
-
addDomainObjectSupplier
Shortcut for
addDomainObjectSupplier( aDomainObjectSupplier, ILcyLucyEnv.PRIORITY_DEFAULT );
.- Parameters:
aDomainObjectSupplier
- TheALcyDomainObjectSupplier
to add. Must not benull
.- See Also:
-
addDomainObjectSupplier
Adds the specified
ALcyDomainObjectSupplier
to theList
of suppliers that are used to create, paint and encode/decode domain objects in the Drawing layers.The position of this supplier in the
List
is determined by the given priority value: the lower the value, the more important the supplier and the earlier the supplier comes in theList
.This method should be called before this format is plugged into the Lucy backend. This means you need to create an extension of this format class in order to add a supplier.
- Parameters:
aDomainObjectSupplier
- TheALcyDomainObjectSupplier
to add. Must not benull
.aPriority
- The priority of the given supplier. The lower the value, the higher the priority of the supplier and the earlier it is in theList
. If no specific priority is desired, this value should beILcyLucyEnv.PRIORITY_DEFAULT
.- Throws:
IllegalStateException
- when calling this method after this format has been plugged in.NullPointerException
- when the specifiedALcyDomainObjectSupplier
isnull
.- See Also:
-
removeDomainObjectSupplier
Removes a domain object supplier. This operation should only be executed during initialization of add-ons, before any drawing layer is constructed.- Parameters:
aDomainObjectSupplier
- The domain object supplier to remove.- Returns:
true
if the domain object supplier was actually removed
-
getDomainObjectSupplierCount
public int getDomainObjectSupplierCount()Returns the number of registered domain object suppliers.- Returns:
- the number of registered domain object suppliers
-
getDomainObjectSupplier
Returns theALcyDomainObjectSupplier
at indexaIndex
.- Parameters:
aIndex
- the index of the domain object supplier to be retrieved- Returns:
- the
ALcyDomainObjectSupplier
at indexaIndex
-
getDomainObjectSuppliers
Returns a list containing all the registeredALcyDomainObjectSupplier
instances.- Returns:
- a list containing all the registered
ALcyDomainObjectSupplier
instances.
-
getDomainObjectConverter
The default implementation returns a composite shape converter, which will automatically loop over all the shape converters of the registered domain object suppliers.
See alsoTLcyCompositeDomainObjectConverter
- Returns:
- by default a composite domain object converter
-
getDomainObjectSupplierWithID
Retrieve a domain object supplier by its unique ID.- Parameters:
aDomainObjectID
- the unique ID of the shape support- Returns:
- the
ALcyDomainObjectSupplier
with IDaDomainObjectID
, ornull
when no such domain object supplier is registered to this class.
-
getProperties
Returns the
ALcyProperties
holding the configuration of this format.- Returns:
- The
ALcyProperties
holding the configuration. Nevernull
.
-
createFormatBarFactory
Creates the
ALcyFormatBarFactory
that can create a bar to manipulate layers of this format.Normally you do not need to override this method. If you want to customize the contents of the format bars for drawing layers, it is easier to override the
createGUIFactory()
method instead. Consult the class javadoc of theTLcyDrawingAddOn
for more information.- Overrides:
createFormatBarFactory
in classALcyFormatWrapper
- Returns:
- An
ALcyFormatBarFactory
. May benull
. - See Also:
-
createGUIFactory
Creates the factory that creates the content for theALcyFormatBar
. ATLcyDrawingToolBarFactory
can for example be returned, to create the default drawing tool bar.- Returns:
- the factory that creates the content for the
ALcyFormatBar
.
-