public class TLcyDrawingFormat extends ALcyFormatWrapper
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:
ILcdShape
by passing the call to
the appropriate ALcyDomainObjectSupplier
ALcyDomainObjectConverter
The last function of this class is the creation of a ILcdGXYLayerFactory
for the default drawing model.
ALcyDomainObjectSupplier
Modifier and Type | Field and Description |
---|---|
static String |
ARC_BAND_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling arc bands.
|
static String |
ARC_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling arcs.
|
static String |
BOUNDS_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling bounds.
|
static String |
BUFFER_3D_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling 3D buffers.
|
static String |
BUFFER_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling buffers.
|
static String |
CIRCLE_BY_3_POINTS_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling circles.
|
static String |
CIRCLE_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling circles.
|
static String |
CIRCULAR_ARC_BY_3_POINTS_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling circular arcs by 3 points.
|
static String |
CIRCULAR_ARC_BY_BULGE_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling circular arcs by bulge.
|
static String |
CIRCULAR_ARC_BY_CENTER_POINT_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling circular arcs by center point.
|
static String |
COMPLEX_POLYGON_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling complex polygons.
|
static String |
COMPOSITE_CURVE_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling composite curves.
|
static String |
COMPOSITE_RING_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling composite curves.
|
static String |
DOME_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling domes.
|
static String |
ELLIPSE_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling ellipses.
|
static String |
FORMAT_BAR_KEY
Key used for the format bar property in the ALcyProperties object used
in the
ALcyDrawingToolBarFactory.createGUI(com.luciad.lucy.util.properties.ALcyProperties)
method. |
static String |
GROUP_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling groups.
|
static String |
MAP_COMPONENT_KEY
Key used for the mapcomponent property in the ALcyProperties object used
in the
ALcyDrawingToolBarFactory.createGUI(com.luciad.lucy.util.properties.ALcyProperties)
method. |
static String |
MERIDIAN_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling meridians.
|
static String |
NORTH_ARROW_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling north arrows.
|
static String |
PARALLEL_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling parallels.
|
static String |
POINT_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling points.
|
static String |
POLYGON_3D_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling 3D polygons.
|
static String |
POLYGON_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling polygons.
|
static String |
POLYLINE_3D_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling 3D polylines.
|
static String |
POLYLINE_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling polylines.
|
static String |
RHUMB_POLYGON_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling rhumb polygons.
|
static String |
RHUMB_POLYLINE_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling rhumb polylines.
|
static String |
SPHERE_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling spheres.
|
static String |
TEXT_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling textshapes.
|
static String |
VARIABLE_BUFFER_3D_DOMAIN_OBJECT_ID
Unique ID of the domain object supplier, capable of handling variable buffers.
|
Constructor and Description |
---|
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.
|
TLcyDrawingFormat(TLcyDrawingAddOn aDrawingAddOn)
Construct a drawing format which supports drawing models, which are encoded/decoded
in/from an extension of OGC's GML.
|
Modifier and Type | Method and Description |
---|---|
void |
addDomainObjectSupplier(ALcyDomainObjectSupplier aDomainObjectSupplier)
Shortcut for
addDomainObjectSupplier( aDomainObjectSupplier,
ILcyLucyEnv.PRIORITY_DEFAULT ); . |
void |
addDomainObjectSupplier(ALcyDomainObjectSupplier aDomainObjectSupplier,
int aPriority)
Adds the specified
ALcyDomainObjectSupplier to the List of
suppliers that are used to create, paint and encode/decode domain objects in the Drawing
layers. |
void |
createAll()
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 the
ALcyDomainObjectSupplier for the specified ID. |
protected ALcyFormatBarFactory |
createFormatBarFactory()
Creates the
ALcyFormatBarFactory that can create a bar to manipulate layers
of this format. |
protected ALcyShapeSupplier |
createGeometrySupplier(String aDomainObjectID)
Creates the
ALcyShapeSupplier for the given domain object ID. |
protected ALcyGUIFactory<Component> |
createGUIFactory()
Creates the factory that creates the content for the
ALcyFormatBar . |
ALcyDomainObjectConverter |
getDomainObjectConverter()
The default implementation returns a composite shape converter, which will automatically loop
over all the shape converters of the registered domain object suppliers.
|
ALcyDomainObjectSupplier |
getDomainObjectSupplier(int aIndex)
Returns the
ALcyDomainObjectSupplier at index aIndex . |
int |
getDomainObjectSupplierCount()
Returns the number of registered domain object suppliers.
|
List<ALcyDomainObjectSupplier> |
getDomainObjectSuppliers()
Returns a list containing all the registered
ALcyDomainObjectSupplier instances. |
ALcyDomainObjectSupplier |
getDomainObjectSupplierWithID(String aDomainObjectID)
Retrieve a domain object supplier by its unique ID.
|
ALcyProperties |
getProperties()
Returns the
ALcyProperties holding the configuration of this format. |
protected boolean |
isExtrusionSupported(String aDomainObjectID)
Returns
true if extrusion is supported by default. |
boolean |
removeDomainObjectSupplier(ALcyDomainObjectSupplier aDomainObjectSupplier)
Removes a domain object supplier.
|
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
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
public static final String MAP_COMPONENT_KEY
ALcyDrawingToolBarFactory.createGUI(com.luciad.lucy.util.properties.ALcyProperties)
method. The value for this key must be an instance of ILcyMapComponent.public static final String FORMAT_BAR_KEY
ALcyDrawingToolBarFactory.createGUI(com.luciad.lucy.util.properties.ALcyProperties)
method. The value for this key must be an instanceof ALcyFormatBar.public static final String GROUP_DOMAIN_OBJECT_ID
public static final String MERIDIAN_DOMAIN_OBJECT_ID
public static final String PARALLEL_DOMAIN_OBJECT_ID
public static final String NORTH_ARROW_DOMAIN_OBJECT_ID
public static final String POINT_DOMAIN_OBJECT_ID
public static final String POLYGON_DOMAIN_OBJECT_ID
public static final String COMPLEX_POLYGON_DOMAIN_OBJECT_ID
public static final String POLYGON_3D_DOMAIN_OBJECT_ID
public static final String RHUMB_POLYGON_DOMAIN_OBJECT_ID
public static final String POLYLINE_DOMAIN_OBJECT_ID
public static final String POLYLINE_3D_DOMAIN_OBJECT_ID
public static final String RHUMB_POLYLINE_DOMAIN_OBJECT_ID
public static final String SPHERE_DOMAIN_OBJECT_ID
public static final String TEXT_DOMAIN_OBJECT_ID
public static final String ELLIPSE_DOMAIN_OBJECT_ID
public static final String DOME_DOMAIN_OBJECT_ID
public static final String CIRCLE_DOMAIN_OBJECT_ID
public static final String CIRCLE_BY_3_POINTS_DOMAIN_OBJECT_ID
public static final String BUFFER_DOMAIN_OBJECT_ID
public static final String BUFFER_3D_DOMAIN_OBJECT_ID
public static final String VARIABLE_BUFFER_3D_DOMAIN_OBJECT_ID
public static final String BOUNDS_DOMAIN_OBJECT_ID
public static final String ARC_DOMAIN_OBJECT_ID
public static final String ARC_BAND_DOMAIN_OBJECT_ID
public static final String CIRCULAR_ARC_BY_3_POINTS_DOMAIN_OBJECT_ID
public static final String CIRCULAR_ARC_BY_BULGE_DOMAIN_OBJECT_ID
public static final String CIRCULAR_ARC_BY_CENTER_POINT_DOMAIN_OBJECT_ID
public static final String COMPOSITE_CURVE_DOMAIN_OBJECT_ID
public static final String COMPOSITE_RING_DOMAIN_OBJECT_ID
public TLcyDrawingFormat(TLcyDrawingAddOn aDrawingAddOn)
aDrawingAddOn
- the drawing addon to register this format topublic TLcyDrawingFormat(ILcyLucyEnv aLucyEnv, TLcyDrawingAddOn aDrawingAddOn, ALcyProperties aProperties)
aLucyEnv
- the Lucy environment in which the backend is pluggedaDrawingAddOn
- the drawing addon to register this format toaProperties
- the Lucy propertiespublic void createAll()
createAll
in class ALcyFormatWrapper
protected ALcyDomainObjectSupplier createDomainObjectSupplier(String aDomainObjectID)
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, ...
aDomainObjectID
- The domain object ID for which to create a domain object supplier. One of the constants in this class
that end with ID
.ALcyDomainObjectSupplier
that provides the support for the shape identified
by aID
. May be null
.isExtrusionSupported(String)
protected boolean isExtrusionSupported(String aDomainObjectID)
true
if extrusion is supported by default.aDomainObjectID
- The domain object ID for which to check if extrusion is supported. One of the constants in
this class that end with ID
.true
if extrusion is supported by default for the given domain object ID,
false
otherwise.protected ALcyShapeSupplier createGeometrySupplier(String aDomainObjectID)
ALcyShapeSupplier
for the given domain object ID.aDomainObjectID
- The domain object ID for which to create an ALcyShapeSupplier
.ALcyShapeSupplier
.ALcyShapeSupplierWrapper
public void addDomainObjectSupplier(ALcyDomainObjectSupplier aDomainObjectSupplier)
Shortcut for addDomainObjectSupplier( aDomainObjectSupplier,
ILcyLucyEnv.PRIORITY_DEFAULT );
.
aDomainObjectSupplier
- The ALcyDomainObjectSupplier
to add. Must not be
null
.addDomainObjectSupplier(ALcyDomainObjectSupplier, int)
public void addDomainObjectSupplier(ALcyDomainObjectSupplier aDomainObjectSupplier, int aPriority)
Adds the specified ALcyDomainObjectSupplier
to the List
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 the List
.
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.
aDomainObjectSupplier
- The ALcyDomainObjectSupplier
to add. Must not be
null
.aPriority
- The priority of the given supplier. The lower the value, the
higher the priority of the supplier and the earlier it is in the
List
. If no specific priority is desired, this value
should be ILcyLucyEnv.PRIORITY_DEFAULT
.IllegalStateException
- when calling this method after this format has been plugged in.NullPointerException
- when the specified ALcyDomainObjectSupplier
is
null
.getDomainObjectSuppliers()
,
ILcyLucyEnv.PRIORITY_DEFAULT
,
ILcyLucyEnv.PRIORITY_FALLBACK
public boolean removeDomainObjectSupplier(ALcyDomainObjectSupplier aDomainObjectSupplier)
aDomainObjectSupplier
- The domain object supplier to remove.true
if the domain object supplier was actually removedpublic int getDomainObjectSupplierCount()
public ALcyDomainObjectSupplier getDomainObjectSupplier(int aIndex)
ALcyDomainObjectSupplier
at index aIndex
.aIndex
- the index of the domain object supplier to be retrievedALcyDomainObjectSupplier
at index aIndex
public List<ALcyDomainObjectSupplier> getDomainObjectSuppliers()
ALcyDomainObjectSupplier
instances.ALcyDomainObjectSupplier
instances.public ALcyDomainObjectConverter 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
public ALcyDomainObjectSupplier getDomainObjectSupplierWithID(String aDomainObjectID)
aDomainObjectID
- the unique ID of the shape supportALcyDomainObjectSupplier
with ID aDomainObjectID
, or null
when no such domain object supplier is registered to this class.public ALcyProperties getProperties()
Returns the ALcyProperties
holding the configuration of this format.
ALcyProperties
holding the configuration. Never null
.protected ALcyFormatBarFactory 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 the TLcyDrawingAddOn
for more information.
createFormatBarFactory
in class ALcyFormatWrapper
ALcyFormatBarFactory
. May be null
.TLcySafeGuardFormatWrapper
protected ALcyGUIFactory<Component> createGUIFactory()
ALcyFormatBar
.
A TLcyDrawingToolBarFactory
can for example be returned, to create the default
drawing tool bar.ALcyFormatBar
.