public class TLcyLspDrawingFormat extends ALcyLspFormatWrapper
ALcyLspFormat
for the TLcyLspDrawingAddOn
. It is responsible for the creation
of all Lightspeed layer related functionality of the drawing add-on:
ALcyLspDomainObjectSupplier
instances, which are the Lightspeed equivalent of the
ALcyDomainObjectSupplier
s.ALcyFormatBarFactory
which typically contains actions to create new shapes, to
change the style, ... (see TLcyLspDrawingFormatBarFactory
).This class keeps track of all the ALcyLspDomainObjectSupplier
instances registered
to the add-on. Adding or removing a certain ALcyLspDomainObjectSupplier
instance is done
through the methods addLspDomainObjectSupplier
and removeLspDomainObjectSupplier
. If you
add an extra ALcyLspDomainObjectSupplier
, make sure to add the matching ALcyDomainObjectSupplier
to the TLcyDrawingFormat
of the TLcyDrawingAddOn
as well.
The layer factory creates ILspLayer
instances that are rendered with
maximum quality
.
This might have a performance impact.
Modifier and Type | Field and Description |
---|---|
static String |
FORMAT_BAR_KEY
Key used for the format bar property in the
ALcyProperties object used in the TLcyLspDrawingToolBarFactory#createGUI method. |
static String |
MAP_COMPONENT_KEY
Key used for the map component property in the
ALcyProperties object used in the TLcyLspDrawingToolBarFactory#createGUI method. |
Constructor and Description |
---|
TLcyLspDrawingFormat(TLcyDrawingFormat aDrawingFormat,
ALcyProperties aProperties,
String aLongPrefix,
String aShortPrefix,
TLcyLspDrawingAddOn aLspDrawingAddOn)
Creates the Lightspeed format for the drawing add-on
|
Modifier and Type | Method and Description |
---|---|
void |
addLspDomainObjectSupplier(ALcyLspDomainObjectSupplier aLspDomainObjectSupplier)
Shortcut for
addLspDomainObjectSupplier(aLspDomainObjectSupplier, ILcyLucyEnv.PRIORITY_DEFAULT) |
void |
addLspDomainObjectSupplier(ALcyLspDomainObjectSupplier aLspDomainObjectSupplier,
int aPriority)
Adds the specified
ALcyLspDomainObjectSupplier to the List of instances that
are used to visualize and edit the domain objects in the Lightspeed view. |
protected ALcyFormatBarFactory |
createFormatBarFactory()
Creates the
ALcyFormatBarFactory that can create a bar to manipulate layers
of this format. |
protected ALcyGUIFactory<Component> |
createGUIFactory()
Creates the factory that creates the content for the
ALcyFormatBar . |
ILspLayerFactory |
createLayerFactory()
Creates the layer factory for this format.
|
protected ALcyLspDomainObjectSupplier |
createLspDomainObjectSupplier(ALcyDomainObjectSupplier aDomainObjectSupplier)
Creates the
ALcyLspDomainObjectSupplier for the specified ALcyDomainObjectSupplier . |
protected ALcyLspShapeSupplier |
createLspShapeSupplier(TLcySLDDomainObjectSupplier aDomainObjectSupplier)
Creates the
ALcyLspShapeSupplier for the specified TLcySLDDomainObjectSupplier . |
TLcyDrawingFormat |
getDrawingFormat()
Returns the associated
TLcyDrawingFormat . |
List<ALcyLspDomainObjectSupplier> |
getLspDomainObjectSuppliers()
Returns an unmodifiable
List of all the ALcyLspDomainObjectSupplier
instances of this format. |
void |
removeLspDomainObjectSupplier(ALcyLspDomainObjectSupplier aLspDomainObjectSupplier)
Removes the specified
ALcyLspDomainObjectSupplier from the collection of instances
that are used to visualize and edit the domain objects in the Lightspeed view |
canHandleModel, createAll, createBalloonContentProviders, createLayerCustomizerPanelFactories, createLayerCustomizerPanelWorkspaceCodecs, createLayerMeasureProviderFactory, createLayerSelectionTransferHandlers, createLayerStyleCodecFileTypeDescriptors, createLayerStyleCodecs, createLayerStyleProviders, createLayerWorkspaceCodecs, getFormat, getLongPrefix, getLucyEnv, getShortPrefix, isLayerOfFormat
checkInitialized, createLayerContextOfFormatFilter, getBalloonContentProviders, getFormatBarFactory, getLayerCustomizerPanelFactories, getLayerCustomizerPanelWorkspaceCodecs, getLayerFactory, getLayerMeasureProviderFactory, getLayerSelectionTransferHandlers, getLayerStyleCodecFileTypeDescriptors, getLayerStyleCodecs, getLayerStyleProviders, getLayerWorkspaceCodecs, toString
public static final String MAP_COMPONENT_KEY
ALcyProperties
object used in the TLcyLspDrawingToolBarFactory#createGUI
method. The value for this key must be an instance of
ILcyLspMapComponent
.public static final String FORMAT_BAR_KEY
ALcyProperties
object used in the TLcyLspDrawingToolBarFactory#createGUI
method. The value for this key must be an instance of
ALcyFormatBar
.public TLcyLspDrawingFormat(TLcyDrawingFormat aDrawingFormat, ALcyProperties aProperties, String aLongPrefix, String aShortPrefix, TLcyLspDrawingAddOn aLspDrawingAddOn)
aDrawingFormat
- The associated GXY drawing format. Must not be null
aProperties
- The ALcyProperties
instance holding the configuration for
this format. Must not be null
.aLongPrefix
- The long prefix of this format. See ALcyLspFormatWrapper.getLongPrefix()
. Must not be
null
.aShortPrefix
- The short prefix of this format. See ALcyLspFormatWrapper.getShortPrefix()
Must not be
null
.public final TLcyDrawingFormat getDrawingFormat()
Returns the associated TLcyDrawingFormat
.
TLcyDrawingFormat
. Never null
public List<ALcyLspDomainObjectSupplier> getLspDomainObjectSuppliers()
Returns an unmodifiable List
of all the ALcyLspDomainObjectSupplier
instances of this format. The order of the suppliers in the list is determined by their
priority.
Collection
of all the associated ALcyLspDomainObjectSupplier
instances. Is never null
and does not contain any
null
-references. It is an unmodifiable List
. The order of the
suppliers in the list is determined by their priority.public void addLspDomainObjectSupplier(ALcyLspDomainObjectSupplier aLspDomainObjectSupplier)
addLspDomainObjectSupplier(aLspDomainObjectSupplier, ILcyLucyEnv.PRIORITY_DEFAULT)
aLspDomainObjectSupplier
- The domain object supplier to add. Must not be null
addLspDomainObjectSupplier(com.luciad.lucy.addons.drawing.lightspeed.ALcyLspDomainObjectSupplier)
public void addLspDomainObjectSupplier(ALcyLspDomainObjectSupplier aLspDomainObjectSupplier, int aPriority)
Adds the specified ALcyLspDomainObjectSupplier
to the List
of instances that
are used to visualize and edit the domain objects in the Lightspeed view. Its position in that
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
.
aLspDomainObjectSupplier
- The ALcyLspDomainObjectSupplier
instance to add. Must
not be null
.aPriority
- The priority of the given ALcyLspDomainObjectSupplier
.
Lower values mean higher priorities. This priority defines the
order of the supplier in the List
of suppliers. If no
specific priority is desired, this value should be ILcyLucyEnv.PRIORITY_DEFAULT
.getLspDomainObjectSuppliers()
,
ILcyLucyEnv.PRIORITY_DEFAULT
,
ILcyLucyEnv.PRIORITY_FALLBACK
public void removeLspDomainObjectSupplier(ALcyLspDomainObjectSupplier aLspDomainObjectSupplier)
Removes the specified ALcyLspDomainObjectSupplier
from the collection of instances
that are used to visualize and edit the domain objects in the Lightspeed view
aLspDomainObjectSupplier
- The ALcyLspDomainObjectSupplier
to remove. If this
supplier was not in the list of suppliers, no action is taken.protected ALcyLspDomainObjectSupplier createLspDomainObjectSupplier(ALcyDomainObjectSupplier aDomainObjectSupplier)
Creates the ALcyLspDomainObjectSupplier
for the specified ALcyDomainObjectSupplier
. The created ALcyLspDomainObjectSupplier
must be able to
visualize and edit the same domain objects as the given ALcyDomainObjectSupplier
. If
the given ALcyDomainObjectSupplier
supports extruded shapes, the ALcyLspDomainObjectSupplier
created by this method must also support these extruded
shapes.
The default implementation will create a TLcyLspSLDDomainObjectSupplier
when aDomainObjectSupplier
is a TLcySLDDomainObjectSupplier
. Similar as in GXY, the TLcyLspSLDDomainObjectSupplier
consists of a geometry part (the ALcyLspShapeSupplier
created in createLspShapeSupplier
) and a part responsible for the styling (the TLcyLspSLDDomainObjectSupplier
). In case you only want to modify the geometry part, it is
recommended to override the createLspShapeSupplier method instead of this method.
aDomainObjectSupplier
- The ALcyDomainObjectSupplier
for which to create the
Lightspeed counterpart. Never null
ALcyLspDomainObjectSupplier
corresponding to the given ALcyDomainObjectSupplier
. May be null
if no Lightspeed support is desired for
the given supplier.createLspShapeSupplier(com.luciad.lucy.addons.drawing.format.TLcySLDDomainObjectSupplier)
protected ALcyLspShapeSupplier createLspShapeSupplier(TLcySLDDomainObjectSupplier aDomainObjectSupplier)
ALcyLspShapeSupplier
for the specified TLcySLDDomainObjectSupplier
.aDomainObjectSupplier
- The TLcySLDDomainObjectSupplier
for which a Lightspeed
shape supplier must be created. Will never be null
ALcyLspShapeSupplier
. May be null
if no Lightspeed support
is desired for the given supplier.createLspDomainObjectSupplier(com.luciad.lucy.addons.drawing.format.ALcyDomainObjectSupplier)
public ILspLayerFactory createLayerFactory()
Creates the layer factory for this format. The default implementation returns null
.
This implementations returns the instance created by the decorated format.
It is the responsibility of this layer factory to create an ILspEditor
, ILspShapeDiscretizer
and ILspStyler
using the available instances created in the
available ALcyLspDomainObjectSupplier
instances.
createLayerFactory
in class ALcyLspFormatWrapper
ILspLayerFactory
for this format. May be null
ALcyLspDomainObjectSupplier.createShapeDiscretizer(com.luciad.view.lightspeed.layer.TLspPaintRepresentation)
,
ALcyLspDomainObjectSupplier.createShapeEditor(com.luciad.view.lightspeed.layer.TLspPaintRepresentation)
,
ALcyLspDomainObjectSupplier.createShapeStyler(com.luciad.view.lightspeed.layer.TLspPaintRepresentationState)
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 TLcyLspDrawingAddOn
for more information.
createFormatBarFactory
in class ALcyLspFormatWrapper
ALcyFormatBarFactory
. May be null
.protected ALcyGUIFactory<Component> createGUIFactory()
ALcyFormatBar
. A
TLcyLspDrawingToolBarFactory
can for example be returned, to create the default
drawing tool bar.ALcyFormatBar
, or null
when no format bar is needed.