Class TLcyLspDrawingFormat
ALcyLspFormat
for the TLcyLspDrawingAddOn
. It is responsible for the creation
of all Lightspeed layer related functionality of the drawing add-on:
- The layer factory and layer workspace support.
- The
ALcyLspDomainObjectSupplier
instances, which are the Lightspeed equivalent of theALcyDomainObjectSupplier
s. - The
ALcyFormatBarFactory
which typically contains actions to create new shapes, to change the style, ... (seeTLcyLspDrawingFormatBarFactory
).
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.
- Since:
- 2012.1
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Key used for the format bar property in theALcyProperties
object used in theTLcyLspDrawingToolBarFactory#createGUI
method.static final String
Key used for the map component property in theALcyProperties
object used in theTLcyLspDrawingToolBarFactory#createGUI
method. -
Constructor Summary
ConstructorDescriptionTLcyLspDrawingFormat
(TLcyDrawingFormat aDrawingFormat, ALcyProperties aProperties, String aLongPrefix, String aShortPrefix, TLcyLspDrawingAddOn aLspDrawingAddOn) Creates the Lightspeed format for the drawing add-on -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLspDomainObjectSupplier
(ALcyLspDomainObjectSupplier aLspDomainObjectSupplier) Shortcut foraddLspDomainObjectSupplier(aLspDomainObjectSupplier, ILcyLucyEnv.PRIORITY_DEFAULT)
void
addLspDomainObjectSupplier
(ALcyLspDomainObjectSupplier aLspDomainObjectSupplier, int aPriority) Adds the specifiedALcyLspDomainObjectSupplier
to theList
of instances that are used to visualize and edit the domain objects in the Lightspeed view.protected ALcyFormatBarFactory
Creates theALcyFormatBarFactory
that can create a bar to manipulate layers of this format.protected ALcyGUIFactory
<Component> Creates the factory that creates the content for theALcyFormatBar
.Creates the layer factory for this format.protected ALcyLspDomainObjectSupplier
createLspDomainObjectSupplier
(ALcyDomainObjectSupplier aDomainObjectSupplier) Creates theALcyLspDomainObjectSupplier
for the specifiedALcyDomainObjectSupplier
.protected ALcyLspShapeSupplier
createLspShapeSupplier
(TLcySLDDomainObjectSupplier aDomainObjectSupplier) Creates theALcyLspShapeSupplier
for the specifiedTLcySLDDomainObjectSupplier
.final TLcyDrawingFormat
Returns the associatedTLcyDrawingFormat
.Returns an unmodifiableList
of all theALcyLspDomainObjectSupplier
instances of this format.void
removeLspDomainObjectSupplier
(ALcyLspDomainObjectSupplier aLspDomainObjectSupplier) Removes the specifiedALcyLspDomainObjectSupplier
from the collection of instances that are used to visualize and edit the domain objects in the Lightspeed viewMethods inherited from class com.luciad.lucy.format.lightspeed.ALcyLspFormatWrapper
canHandleModel, createAll, createBalloonContentProviders, createLayerCustomizerPanelFactories, createLayerCustomizerPanelWorkspaceCodecs, createLayerMeasureProviderFactory, createLayerSelectionTransferHandlers, createLayerStyleCodecFileTypeDescriptors, createLayerStyleCodecs, createLayerStyleProviders, createLayerWorkspaceCodecs, getFormat, getLongPrefix, getLucyEnv, getShortPrefix, isLayerOfFormat
Methods inherited from class com.luciad.lucy.format.lightspeed.ALcyLspFormat
checkInitialized, createLayerContextOfFormatFilter, getBalloonContentProviders, getFormatBarFactory, getLayerCustomizerPanelFactories, getLayerCustomizerPanelWorkspaceCodecs, getLayerFactory, getLayerMeasureProviderFactory, getLayerSelectionTransferHandlers, getLayerStyleCodecFileTypeDescriptors, getLayerStyleCodecs, getLayerStyleProviders, getLayerWorkspaceCodecs, toString
-
Field Details
-
MAP_COMPONENT_KEY
Key used for the map component property in theALcyProperties
object used in theTLcyLspDrawingToolBarFactory#createGUI
method. The value for this key must be an instance ofILcyLspMapComponent
.- See Also:
-
FORMAT_BAR_KEY
Key used for the format bar property in theALcyProperties
object used in theTLcyLspDrawingToolBarFactory#createGUI
method. The value for this key must be an instance ofALcyFormatBar
.- See Also:
-
-
Constructor Details
-
TLcyLspDrawingFormat
public TLcyLspDrawingFormat(TLcyDrawingFormat aDrawingFormat, ALcyProperties aProperties, String aLongPrefix, String aShortPrefix, TLcyLspDrawingAddOn aLspDrawingAddOn) Creates the Lightspeed format for the drawing add-on- Parameters:
aDrawingFormat
- The associated GXY drawing format. Must not benull
aProperties
- TheALcyProperties
instance holding the configuration for this format. Must not benull
.aLongPrefix
- The long prefix of this format. SeeALcyLspFormatWrapper.getLongPrefix()
. Must not benull
.aShortPrefix
- The short prefix of this format. SeeALcyLspFormatWrapper.getShortPrefix()
Must not benull
.
-
-
Method Details
-
getDrawingFormat
Returns the associated
TLcyDrawingFormat
.- Returns:
- the associated
TLcyDrawingFormat
. Nevernull
-
getLspDomainObjectSuppliers
Returns an unmodifiable
List
of all theALcyLspDomainObjectSupplier
instances of this format. The order of the suppliers in the list is determined by their priority.- Returns:
- The
Collection
of all the associatedALcyLspDomainObjectSupplier
instances. Is nevernull
and does not contain anynull
-references. It is an unmodifiableList
. The order of the suppliers in the list is determined by their priority.
-
addLspDomainObjectSupplier
Shortcut foraddLspDomainObjectSupplier(aLspDomainObjectSupplier, ILcyLucyEnv.PRIORITY_DEFAULT)
- Parameters:
aLspDomainObjectSupplier
- The domain object supplier to add. Must not benull
- See Also:
-
addLspDomainObjectSupplier
public void addLspDomainObjectSupplier(ALcyLspDomainObjectSupplier aLspDomainObjectSupplier, int aPriority) Adds the specified
ALcyLspDomainObjectSupplier
to theList
of instances that are used to visualize and edit the domain objects in the Lightspeed view. Its position in thatList
is determined by the given priority value: the lower the value, the more important the supplier and the earlier the supplier comes in theList
.- Parameters:
aLspDomainObjectSupplier
- TheALcyLspDomainObjectSupplier
instance to add. Must not benull
.aPriority
- The priority of the givenALcyLspDomainObjectSupplier
. Lower values mean higher priorities. This priority defines the order of the supplier in theList
of suppliers. If no specific priority is desired, this value should beILcyLucyEnv.PRIORITY_DEFAULT
.- See Also:
-
removeLspDomainObjectSupplier
Removes the specified
ALcyLspDomainObjectSupplier
from the collection of instances that are used to visualize and edit the domain objects in the Lightspeed view- Parameters:
aLspDomainObjectSupplier
- TheALcyLspDomainObjectSupplier
to remove. If this supplier was not in the list of suppliers, no action is taken.
-
createLspDomainObjectSupplier
protected ALcyLspDomainObjectSupplier createLspDomainObjectSupplier(ALcyDomainObjectSupplier aDomainObjectSupplier) Creates the
ALcyLspDomainObjectSupplier
for the specifiedALcyDomainObjectSupplier
. The createdALcyLspDomainObjectSupplier
must be able to visualize and edit the same domain objects as the givenALcyDomainObjectSupplier
. If the givenALcyDomainObjectSupplier
supports extruded shapes, theALcyLspDomainObjectSupplier
created by this method must also support these extruded shapes.The default implementation will create a
TLcyLspSLDDomainObjectSupplier
whenaDomainObjectSupplier
is aTLcySLDDomainObjectSupplier
. Similar as in GXY, theTLcyLspSLDDomainObjectSupplier
consists of a geometry part (theALcyLspShapeSupplier
created increateLspShapeSupplier
) and a part responsible for the styling (theTLcyLspSLDDomainObjectSupplier
). In case you only want to modify the geometry part, it is recommended to override the createLspShapeSupplier method instead of this method.- Parameters:
aDomainObjectSupplier
- TheALcyDomainObjectSupplier
for which to create the Lightspeed counterpart. Nevernull
- Returns:
- The
ALcyLspDomainObjectSupplier
corresponding to the givenALcyDomainObjectSupplier
. May benull
if no Lightspeed support is desired for the given supplier. - See Also:
-
createLspShapeSupplier
protected ALcyLspShapeSupplier createLspShapeSupplier(TLcySLDDomainObjectSupplier aDomainObjectSupplier) Creates theALcyLspShapeSupplier
for the specifiedTLcySLDDomainObjectSupplier
.- Parameters:
aDomainObjectSupplier
- TheTLcySLDDomainObjectSupplier
for which a Lightspeed shape supplier must be created. Will never benull
- Returns:
- The created
ALcyLspShapeSupplier
. May benull
if no Lightspeed support is desired for the given supplier. - See Also:
-
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
andILspStyler
using the available instances created in the availableALcyLspDomainObjectSupplier
instances.- Overrides:
createLayerFactory
in classALcyLspFormatWrapper
- Returns:
- The
ILspLayerFactory
for this format. May benull
- See Also:
-
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 theTLcyLspDrawingAddOn
for more information.- Overrides:
createFormatBarFactory
in classALcyLspFormatWrapper
- Returns:
- An
ALcyFormatBarFactory
. May benull
.
-
createGUIFactory
Creates the factory that creates the content for theALcyFormatBar
. ATLcyLspDrawingToolBarFactory
can for example be returned, to create the default drawing tool bar.- Returns:
- the factory that creates the content for the
ALcyFormatBar
, ornull
when no format bar is needed.
-