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
ModifierConstructorDescriptionprotected
ALcyLspFormatWrapper
(ALcyLspFormat aFormat) Creates a wrapper for the specifiedALcyLspFormat
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canHandleModel
(ILcdModel aModel) Returnstrue
if and only if the given model can be visualized by this format.void
Creates 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 theILcdBalloonContentProvider
s for this format.protected ALcyFormatBarFactory
Creates theALcyFormatBarFactory
that can create a bar to manipulate layers of this format.protected ILcyCustomizerPanelFactory[]
Creates theILcyCustomizerPanelFactory
factories that can createILcyCustomizerPanel
instances for the layers created by the layer factories of this format.protected ALcyWorkspaceObjectCodec[]
Creates theALcyWorkspaceObjectCodec
codecs for theILcyCustomizerPanel
instances for the layers created by the layer factories of this format.Creates the layer factory for this format.protected ILcdLayerMeasureProviderFactory
Creates aILcdLayerMeasureProviderFactory
that can create measure providers for a layer created by the layer factories of this format.protected ALcyLayerSelectionTransferHandler[]
Creates theALcyLayerSelectionTransferHandler
transfer handlers that can transfer the selection of the layers created by the layer factories of this format.CreatesALcyFileTypeDescriptor
s for theILcyLayerStyleCodec
s.Creates theILcyLayerStyleCodec
instances 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 theALcyWorkspaceObjectCodec
s 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 theILcyLucyEnv
backend with which thisALcyLspFormat
is associated.Returns the short prefix of this format that can be used, for instance, to derive keys for aALcyProperties
instance.boolean
isLayerOfFormat
(ILspLayer aLayer) Returnstrue
if 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
- TheALcyLspFormat
to decorate. Must not benull
.
-
-
Method Details
-
getFormat
Returns the wrapped
ALcyLspFormat
.- Returns:
- The wrapped
ALcyLspFormat
. Nevernull
.
-
getShortPrefix
Description copied from class:ALcyLspFormat
Returns the short prefix of this format that can be used, for instance, to derive keys for a
ALcyProperties
instance. This would typically be the short class name of the add-on.- Specified by:
getShortPrefix
in classALcyLspFormat
- Returns:
- The short prefix of this format. Must not be
null
. - See Also:
-
getLongPrefix
Description copied from class:ALcyLspFormat
Returns 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:
getLongPrefix
in classALcyLspFormat
- Returns:
- The long prefix that can be used to generate UID's. Must not be
null
. - See Also:
-
getLucyEnv
Description copied from class:ALcyLspFormat
Returns the
ILcyLucyEnv
backend with which thisALcyLspFormat
is associated.- Specified by:
getLucyEnv
in classALcyLspFormat
- Returns:
- The
ILcyLucyEnv
backend. Must not benull
.
-
canHandleModel
Description copied from class:ALcyLspFormat
Returns
true
if and only if the given model can be visualized by this format.- Specified by:
canHandleModel
in classALcyLspFormat
- Parameters:
aModel
- The model to check- Returns:
true
if and only if the given model can be visualized by this format.
-
isLayerOfFormat
Description copied from class:ALcyLspFormat
Returns
true
if 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 whetheraLayer
is a layer of this format.- Overrides:
isLayerOfFormat
in classALcyLspFormat
- Parameters:
aLayer
- The layer to check- Returns:
true
if and only if the given layer is a layer of this format
-
createAll
public void createAll()Description copied from class:ALcyLspFormat
Creates 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:
createAll
in 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:
createLayerFactory
in classALcyLspFormat
- Returns:
- The
ILspLayerFactory
for 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:
createLayerStyleProviders
in 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
ILcyLayerStyleCodec
instances 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:
createLayerStyleCodecs
in classALcyLspFormat
- Returns:
- an array of
ILcyLayerStyleCodec
instances. Must not benull
. The array may be empty, but must not containnull
. - See Also:
-
createLayerStyleCodecFileTypeDescriptors
Creates
ALcyFileTypeDescriptor
s for theILcyLayerStyleCodec
s. 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:
createLayerStyleCodecFileTypeDescriptors
in classALcyLspFormat
- Returns:
- An array of
ALcyFileTypeDescriptor
instances. Must not benull
and 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
ILcyCustomizerPanelFactory
factories that can createILcyCustomizerPanel
instances 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:
createLayerCustomizerPanelFactories
in classALcyLspFormat
- Returns:
- An array of
ILcyCustomizerPanelFactory
instances. Must not benull
. The array may be empty, but must not containnull
. - See Also:
-
createLayerCustomizerPanelWorkspaceCodecs
Creates the
ALcyWorkspaceObjectCodec
codecs for theILcyCustomizerPanel
instances for the layers created by the layer factories of this format.This implementations returns the instance created by the decorated format.
- Overrides:
createLayerCustomizerPanelWorkspaceCodecs
in classALcyLspFormat
- Returns:
- An array containing the
ALcyWorkspaceObjectCodec
instances. Must not benull
, but may have length0
. Must not containnull
. - See Also:
-
createLayerWorkspaceCodecs
Creates the
ALcyWorkspaceObjectCodec
s 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:
createLayerWorkspaceCodecs
in classALcyLspFormat
- Returns:
- The array of
ALcyWorkspaceObjectCodec
s to encode the state of the layers. May be empty but notnull
. Must not containnull
- See Also:
-
createLayerSelectionTransferHandlers
Creates the
ALcyLayerSelectionTransferHandler
transfer 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:
createLayerSelectionTransferHandlers
in classALcyLspFormat
- Returns:
- An array of
ALcyLayerSelectionTransferHandler
instances. Must not benull
but may have length0
. Must not containnull
. - See Also:
-
createFormatBarFactory
Creates the
ALcyFormatBarFactory
that 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:
createFormatBarFactory
in classALcyLspFormat
- Returns:
- An
ALcyFormatBarFactory
. May benull
.
-
createBalloonContentProviders
Creates the
ILcdBalloonContentProvider
s for this format.The default implementation returns an empty array.
This implementations returns the instance created by the decorated format.
- Overrides:
createBalloonContentProviders
in classALcyLspFormat
- Returns:
- the
ILcdBalloonContentProvider
s for this format. Must not benull
. The array may be empty but must not containnull
. - See Also:
-
createLayerMeasureProviderFactory
Creates a
ILcdLayerMeasureProviderFactory
that 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:
createLayerMeasureProviderFactory
in classALcyLspFormat
- Returns:
- an
ILcdLayerMeasureProviderFactory
instance. Can benull
. - See Also:
-