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
ALcyLspDomainObjectSupplierinstances, which are the Lightspeed equivalent of theALcyDomainObjectSuppliers. - The
ALcyFormatBarFactorywhich 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
FieldsModifier and TypeFieldDescriptionstatic final StringKey used for the format bar property in theALcyPropertiesobject used in theTLcyLspDrawingToolBarFactory#createGUImethod.static final StringKey used for the map component property in theALcyPropertiesobject used in theTLcyLspDrawingToolBarFactory#createGUImethod. -
Constructor Summary
ConstructorsConstructorDescriptionTLcyLspDrawingFormat(TLcyDrawingFormat aDrawingFormat, ALcyProperties aProperties, String aLongPrefix, String aShortPrefix, TLcyLspDrawingAddOn aLspDrawingAddOn) Creates the Lightspeed format for the drawing add-on -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLspDomainObjectSupplier(ALcyLspDomainObjectSupplier aLspDomainObjectSupplier) Shortcut foraddLspDomainObjectSupplier(aLspDomainObjectSupplier, ILcyLucyEnv.PRIORITY_DEFAULT)voidaddLspDomainObjectSupplier(ALcyLspDomainObjectSupplier aLspDomainObjectSupplier, int aPriority) Adds the specifiedALcyLspDomainObjectSupplierto theListof instances that are used to visualize and edit the domain objects in the Lightspeed view.protected ALcyFormatBarFactoryCreates theALcyFormatBarFactorythat 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 ALcyLspDomainObjectSuppliercreateLspDomainObjectSupplier(ALcyDomainObjectSupplier aDomainObjectSupplier) Creates theALcyLspDomainObjectSupplierfor the specifiedALcyDomainObjectSupplier.protected ALcyLspShapeSuppliercreateLspShapeSupplier(TLcySLDDomainObjectSupplier aDomainObjectSupplier) Creates theALcyLspShapeSupplierfor the specifiedTLcySLDDomainObjectSupplier.final TLcyDrawingFormatReturns the associatedTLcyDrawingFormat.Returns an unmodifiableListof all theALcyLspDomainObjectSupplierinstances of this format.voidremoveLspDomainObjectSupplier(ALcyLspDomainObjectSupplier aLspDomainObjectSupplier) Removes the specifiedALcyLspDomainObjectSupplierfrom 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, isLayerOfFormatMethods 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 theALcyPropertiesobject used in theTLcyLspDrawingToolBarFactory#createGUImethod. The value for this key must be an instance ofILcyLspMapComponent.- See Also:
-
FORMAT_BAR_KEY
Key used for the format bar property in theALcyPropertiesobject used in theTLcyLspDrawingToolBarFactory#createGUImethod. 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 benullaProperties- TheALcyPropertiesinstance 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
Listof all theALcyLspDomainObjectSupplierinstances of this format. The order of the suppliers in the list is determined by their priority.- Returns:
- The
Collectionof all the associatedALcyLspDomainObjectSupplierinstances. Is nevernulland 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
ALcyLspDomainObjectSupplierto theListof instances that are used to visualize and edit the domain objects in the Lightspeed view. Its position in thatListis 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- TheALcyLspDomainObjectSupplierinstance 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 theListof suppliers. If no specific priority is desired, this value should beILcyLucyEnv.PRIORITY_DEFAULT.- See Also:
-
removeLspDomainObjectSupplier
Removes the specified
ALcyLspDomainObjectSupplierfrom the collection of instances that are used to visualize and edit the domain objects in the Lightspeed view- Parameters:
aLspDomainObjectSupplier- TheALcyLspDomainObjectSupplierto remove. If this supplier was not in the list of suppliers, no action is taken.
-
createLspDomainObjectSupplier
protected ALcyLspDomainObjectSupplier createLspDomainObjectSupplier(ALcyDomainObjectSupplier aDomainObjectSupplier) Creates the
ALcyLspDomainObjectSupplierfor the specifiedALcyDomainObjectSupplier. The createdALcyLspDomainObjectSuppliermust be able to visualize and edit the same domain objects as the givenALcyDomainObjectSupplier. If the givenALcyDomainObjectSuppliersupports extruded shapes, theALcyLspDomainObjectSuppliercreated by this method must also support these extruded shapes.The default implementation will create a
TLcyLspSLDDomainObjectSupplierwhenaDomainObjectSupplieris aTLcySLDDomainObjectSupplier. Similar as in GXY, theTLcyLspSLDDomainObjectSupplierconsists of a geometry part (theALcyLspShapeSuppliercreated 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- TheALcyDomainObjectSupplierfor which to create the Lightspeed counterpart. Nevernull- Returns:
- The
ALcyLspDomainObjectSuppliercorresponding to the givenALcyDomainObjectSupplier. May benullif no Lightspeed support is desired for the given supplier. - See Also:
-
createLspShapeSupplier
protected ALcyLspShapeSupplier createLspShapeSupplier(TLcySLDDomainObjectSupplier aDomainObjectSupplier) Creates theALcyLspShapeSupplierfor the specifiedTLcySLDDomainObjectSupplier.- Parameters:
aDomainObjectSupplier- TheTLcySLDDomainObjectSupplierfor which a Lightspeed shape supplier must be created. Will never benull- Returns:
- The created
ALcyLspShapeSupplier. May benullif 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,ILspShapeDiscretizerandILspStylerusing the available instances created in the availableALcyLspDomainObjectSupplierinstances.- Overrides:
createLayerFactoryin classALcyLspFormatWrapper- Returns:
- The
ILspLayerFactoryfor this format. May benull - See Also:
-
createFormatBarFactory
Creates the
ALcyFormatBarFactorythat 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 theTLcyLspDrawingAddOnfor more information.- Overrides:
createFormatBarFactoryin classALcyLspFormatWrapper- Returns:
- An
ALcyFormatBarFactory. May benull.
-
createGUIFactory
Creates the factory that creates the content for theALcyFormatBar. ATLcyLspDrawingToolBarFactorycan for example be returned, to create the default drawing tool bar.- Returns:
- the factory that creates the content for the
ALcyFormatBar, ornullwhen no format bar is needed.
-