Class ALcyLspFormatWrapper
- Direct Known Subclasses:
TLcyLspDrawingFormat,TLcyLspLayerTreeNodeFormatWrapper,TLcyLspSafeGuardFormatWrapper,TLcyLspTransformingModelFormatWrapper
Convenience class to wrap an ALcyLspFormat: one only has to overwrite those
methods that are required. This is also known as the decorator design pattern.
Note that wrapping an abstract class can be cumbersome because methods might be added to the
abstract class in a newer version of the API. The advantage of extending from this
ALcyLspFormatWrapper is that if methods are ever added to
ALcyLspFormat, they will also be added here.
- Since:
- 2012.0
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedALcyLspFormatWrapper(ALcyLspFormat aFormat) Creates a wrapper for the specifiedALcyLspFormat. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandleModel(ILcdModel aModel) Returnstrueif and only if the given model can be visualized by this format.voidCreates all the instances of the concepts of this class by calling all the abstractcreate<Concept>methods, and performs some validity checks on the created values.protected ILcdBalloonContentProvider[]Creates theILcdBalloonContentProviders for this format.protected ALcyFormatBarFactoryCreates theALcyFormatBarFactorythat can create a bar to manipulate layers of this format.protected ILcyCustomizerPanelFactory[]Creates theILcyCustomizerPanelFactoryfactories that can createILcyCustomizerPanelinstances for the layers created by the layer factories of this format.protected ALcyWorkspaceObjectCodec[]Creates theALcyWorkspaceObjectCodeccodecs for theILcyCustomizerPanelinstances for the layers created by the layer factories of this format.Creates the layer factory for this format.protected ILcdLayerMeasureProviderFactoryCreates aILcdLayerMeasureProviderFactorythat can create measure providers for a layer created by the layer factories of this format.protected ALcyLayerSelectionTransferHandler[]Creates theALcyLayerSelectionTransferHandlertransfer handlers that can transfer the selection of the layers created by the layer factories of this format.CreatesALcyFileTypeDescriptors for theILcyLayerStyleCodecs.Creates theILcyLayerStyleCodecinstances which can encode/decode the style of the layers created by the layer factory of this format.Creates the style provider instances that can retrieve and encode the style of the layers created by the layer factory of this format.Creates theALcyWorkspaceObjectCodecs that can encode the state of the layers created by the layer factory of this format.Returns the wrappedALcyLspFormat.Returns the long prefix of this format that can be used, for instance, to derive UID's.Returns theILcyLucyEnvbackend with which thisALcyLspFormatis associated.Returns the short prefix of this format that can be used, for instance, to derive keys for aALcyPropertiesinstance.booleanisLayerOfFormat(ILspLayer aLayer) Returnstrueif and only if the given layer is a layer of this format.Methods inherited from class com.luciad.lucy.format.lightspeed.ALcyLspFormat
checkInitialized, createLayerContextOfFormatFilter, getBalloonContentProviders, getFormatBarFactory, getLayerCustomizerPanelFactories, getLayerCustomizerPanelWorkspaceCodecs, getLayerFactory, getLayerMeasureProviderFactory, getLayerSelectionTransferHandlers, getLayerStyleCodecFileTypeDescriptors, getLayerStyleCodecs, getLayerStyleProviders, getLayerWorkspaceCodecs, toString
-
Constructor Details
-
ALcyLspFormatWrapper
Creates a wrapper for the specified
ALcyLspFormat.- Parameters:
aFormat- TheALcyLspFormatto decorate. Must not benull.
-
-
Method Details
-
getFormat
Returns the wrapped
ALcyLspFormat.- Returns:
- The wrapped
ALcyLspFormat. Nevernull.
-
getShortPrefix
Description copied from class:ALcyLspFormatReturns the short prefix of this format that can be used, for instance, to derive keys for a
ALcyPropertiesinstance. This would typically be the short class name of the add-on.- Specified by:
getShortPrefixin classALcyLspFormat- Returns:
- The short prefix of this format. Must not be
null. - See Also:
-
getLongPrefix
Description copied from class:ALcyLspFormatReturns the long prefix of this format that can be used, for instance, to derive UID's. Typically this would be the fully qualified name of the add-on.
- Specified by:
getLongPrefixin classALcyLspFormat- Returns:
- The long prefix that can be used to generate UID's. Must not be
null. - See Also:
-
getLucyEnv
Description copied from class:ALcyLspFormatReturns the
ILcyLucyEnvbackend with which thisALcyLspFormatis associated.- Specified by:
getLucyEnvin classALcyLspFormat- Returns:
- The
ILcyLucyEnvbackend. Must not benull.
-
canHandleModel
Description copied from class:ALcyLspFormatReturns
trueif and only if the given model can be visualized by this format.- Specified by:
canHandleModelin classALcyLspFormat- Parameters:
aModel- The model to check- Returns:
trueif and only if the given model can be visualized by this format.
-
isLayerOfFormat
Description copied from class:ALcyLspFormatReturns
trueif and only if the given layer is a layer of this format.The default implementation uses the
ALcyLspFormat.canHandleModel(com.luciad.model.ILcdModel)to determine whetheraLayeris a layer of this format.- Overrides:
isLayerOfFormatin classALcyLspFormat- Parameters:
aLayer- The layer to check- Returns:
trueif and only if the given layer is a layer of this format
-
createAll
public void createAll()Description copied from class:ALcyLspFormatCreates all the instances of the concepts of this class by calling all the abstract
create<Concept>methods, and performs some validity checks on the created values. All created instances can later on be retrieved by calling the appropriateget<Concept>methods.- Overrides:
createAllin classALcyLspFormat
-
createLayerFactory
Creates the layer factory for this format. The default implementation returns
null.This implementations returns the instance created by the decorated format.
- Specified by:
createLayerFactoryin classALcyLspFormat- Returns:
- The
ILspLayerFactoryfor this format. May benull - See Also:
-
createLayerStyleProviders
Creates the style provider instances that can retrieve and encode the style of the layers created by the layer factory of this format.
The default implementation returns an empty array.
This implementations returns the instance created by the decorated format.
- Overrides:
createLayerStyleProvidersin classALcyLspFormat- Returns:
- The style provider to retrieve and encode the style of the layers. Must not be
null. The array may be empty, but must not containnull. - See Also:
-
createLayerStyleCodecs
Creates the
ILcyLayerStyleCodecinstances which can encode/decode the style of the layers created by the layer factory of this format.The default implementation returns an empty array.
This implementations returns the instance created by the decorated format.
- Overrides:
createLayerStyleCodecsin classALcyLspFormat- Returns:
- an array of
ILcyLayerStyleCodecinstances. Must not benull. The array may be empty, but must not containnull. - See Also:
-
createLayerStyleCodecFileTypeDescriptors
Creates
ALcyFileTypeDescriptors for theILcyLayerStyleCodecs. The length of the returned array must be equal to that ofALcyLspFormat.createLayerStyleCodecs().The default implementation returns a zero-length array.
This implementations returns the instance created by the decorated format.
- Overrides:
createLayerStyleCodecFileTypeDescriptorsin classALcyLspFormat- Returns:
- An array of
ALcyFileTypeDescriptorinstances. Must not benulland its length must be equal to the length of the array of layer style encoders created by this format. May containnull. - See Also:
-
createLayerCustomizerPanelFactories
Creates the
ILcyCustomizerPanelFactoryfactories that can createILcyCustomizerPanelinstances for the layers created by the layer factories of this format.The default implementation returns a zero-length array.
If you're looking for the fall back behavior when no factories are registered, see
TLcyLspLayerCustomizerAddOn. If you want to customize the behavior for this format only, seeTLcyLspStyledLayerCustomizerPanelFactory.This implementations returns the instance created by the decorated format.
- Overrides:
createLayerCustomizerPanelFactoriesin classALcyLspFormat- Returns:
- An array of
ILcyCustomizerPanelFactoryinstances. Must not benull. The array may be empty, but must not containnull. - See Also:
-
createLayerCustomizerPanelWorkspaceCodecs
Creates the
ALcyWorkspaceObjectCodeccodecs for theILcyCustomizerPanelinstances for the layers created by the layer factories of this format.This implementations returns the instance created by the decorated format.
- Overrides:
createLayerCustomizerPanelWorkspaceCodecsin classALcyLspFormat- Returns:
- An array containing the
ALcyWorkspaceObjectCodecinstances. Must not benull, but may have length0. Must not containnull. - See Also:
-
createLayerWorkspaceCodecs
Creates the
ALcyWorkspaceObjectCodecs that can encode the state of the layers created by the layer factory of this format.The default implementation returns an array with a single codec which uses the layer factory and the layer style codecs of the format.
This implementations returns the instance created by the decorated format.
- Overrides:
createLayerWorkspaceCodecsin classALcyLspFormat- Returns:
- The array of
ALcyWorkspaceObjectCodecs to encode the state of the layers. May be empty but notnull. Must not containnull - See Also:
-
createLayerSelectionTransferHandlers
Creates the
ALcyLayerSelectionTransferHandlertransfer handlers that can transfer the selection of the layers created by the layer factories of this format.The default implementation returns a zero-length array.
This implementations returns the instance created by the decorated format.
- Overrides:
createLayerSelectionTransferHandlersin classALcyLspFormat- Returns:
- An array of
ALcyLayerSelectionTransferHandlerinstances. Must not benullbut may have length0. Must not containnull. - See Also:
-
createFormatBarFactory
Creates the
ALcyFormatBarFactorythat can create a bar to manipulate layers of this format.The default implementation returns
null.This implementations returns the instance created by the decorated format.
- Overrides:
createFormatBarFactoryin classALcyLspFormat- Returns:
- An
ALcyFormatBarFactory. May benull.
-
createBalloonContentProviders
Creates the
ILcdBalloonContentProviders for this format.The default implementation returns an empty array.
This implementations returns the instance created by the decorated format.
- Overrides:
createBalloonContentProvidersin classALcyLspFormat- Returns:
- the
ILcdBalloonContentProviders for this format. Must not benull. The array may be empty but must not containnull. - See Also:
-
createLayerMeasureProviderFactory
Creates a
ILcdLayerMeasureProviderFactorythat can create measure providers for a layer created by the layer factories of this format.The default implementation returns
null.This implementations returns the instance created by the decorated format.
- Overrides:
createLayerMeasureProviderFactoryin classALcyLspFormat- Returns:
- an
ILcdLayerMeasureProviderFactoryinstance. Can benull. - See Also:
-