public abstract class ALcyLspFormatWrapper extends ALcyLspFormat
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.
Modifier | Constructor and Description |
---|---|
protected |
ALcyLspFormatWrapper(ALcyLspFormat aFormat)
Creates a wrapper for the specified
ALcyLspFormat . |
Modifier and Type | Method and Description |
---|---|
boolean |
canHandleModel(ILcdModel aModel)
Returns
true if and only if the given model can be visualized by this format. |
void |
createAll()
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. |
protected ILcdBalloonContentProvider[] |
createBalloonContentProviders()
Creates the
ILcdBalloonContentProvider s for this format. |
protected ALcyFormatBarFactory |
createFormatBarFactory()
Creates the
ALcyFormatBarFactory that can create a bar to manipulate layers of
this format. |
protected ILcyCustomizerPanelFactory[] |
createLayerCustomizerPanelFactories()
Creates the
ILcyCustomizerPanelFactory factories that can create
ILcyCustomizerPanel instances for the layers created by the layer factories of
this format. |
protected ALcyWorkspaceObjectCodec[] |
createLayerCustomizerPanelWorkspaceCodecs()
Creates the
ALcyWorkspaceObjectCodec codecs for the
ILcyCustomizerPanel instances for the layers created by the layer factories of
this format. |
ILspLayerFactory |
createLayerFactory()
Creates the layer factory for this format.
|
protected ILcdLayerMeasureProviderFactory |
createLayerMeasureProviderFactory()
Creates a
ILcdLayerMeasureProviderFactory that can create measure providers for
a layer created by the layer factories of this format. |
protected ALcyLayerSelectionTransferHandler[] |
createLayerSelectionTransferHandlers()
Creates the
ALcyLayerSelectionTransferHandler transfer handlers that can
transfer the selection of the layers created by the layer factories of this format. |
ALcyFileTypeDescriptor[] |
createLayerStyleCodecFileTypeDescriptors()
Creates
ALcyFileTypeDescriptor s for the ILcyLayerStyleCodec s. |
ILcyLayerStyleCodec[] |
createLayerStyleCodecs()
Creates the
ILcyLayerStyleCodec instances which can encode/decode the style of
the layers created by the layer factory of this format. |
ILcyLayerStyleProvider[] |
createLayerStyleProviders()
Creates the style provider instances that can retrieve and encode the style of the layers
created by the layer factory of this format.
|
ALcyWorkspaceObjectCodec[] |
createLayerWorkspaceCodecs()
Creates the
ALcyWorkspaceObjectCodec s that can encode the state of the layers
created by the layer factory of this format. |
ALcyLspFormat |
getFormat()
Returns the wrapped
ALcyLspFormat . |
String |
getLongPrefix()
Returns the long prefix of this format that can be used, for instance, to derive UID's.
|
ILcyLucyEnv |
getLucyEnv()
Returns the
ILcyLucyEnv backend with which this ALcyLspFormat is
associated. |
String |
getShortPrefix()
Returns the short prefix of this format that can be used, for instance, to derive keys for a
ALcyProperties instance. |
boolean |
isLayerOfFormat(ILspLayer aLayer)
Returns
true if and only if the given layer is a layer of this format. |
checkInitialized, createLayerContextOfFormatFilter, getBalloonContentProviders, getFormatBarFactory, getLayerCustomizerPanelFactories, getLayerCustomizerPanelWorkspaceCodecs, getLayerFactory, getLayerMeasureProviderFactory, getLayerSelectionTransferHandlers, getLayerStyleCodecFileTypeDescriptors, getLayerStyleCodecs, getLayerStyleProviders, getLayerWorkspaceCodecs, toString
protected ALcyLspFormatWrapper(ALcyLspFormat aFormat)
Creates a wrapper for the specified ALcyLspFormat
.
aFormat
- The ALcyLspFormat
to decorate. Must not be null
.public ALcyLspFormat getFormat()
Returns the wrapped ALcyLspFormat
.
ALcyLspFormat
. Never null
.public String getShortPrefix()
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.
getShortPrefix
in class ALcyLspFormat
null
.ALcyTool.getShortPrefix(Class)
public String getLongPrefix()
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.
getLongPrefix
in class ALcyLspFormat
null
.ALcyTool.getLongPrefix(Class)
public ILcyLucyEnv getLucyEnv()
ALcyLspFormat
Returns the ILcyLucyEnv
backend with which this ALcyLspFormat
is
associated.
getLucyEnv
in class ALcyLspFormat
ILcyLucyEnv
backend. Must not be null
.public boolean canHandleModel(ILcdModel aModel)
ALcyLspFormat
Returns true
if and only if the given model can be visualized by this format.
canHandleModel
in class ALcyLspFormat
aModel
- The model to checktrue
if and only if the given model can be visualized by this format.public boolean isLayerOfFormat(ILspLayer aLayer)
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 whether aLayer
is a layer of this format.
isLayerOfFormat
in class ALcyLspFormat
aLayer
- The layer to checktrue
if and only if the given layer is a layer of this formatpublic void createAll()
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 appropriate
get<Concept>
methods.
createAll
in class ALcyLspFormat
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.
createLayerFactory
in class ALcyLspFormat
ILspLayerFactory
for this format. May be null
ALcyLspFormat.getLayerFactory()
public ILcyLayerStyleProvider[] 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.
createLayerStyleProviders
in class ALcyLspFormat
null
. The array may be empty, but must not contain null
.ALcyLspFormat.getLayerStyleProviders()
public ILcyLayerStyleCodec[] 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.
createLayerStyleCodecs
in class ALcyLspFormat
ILcyLayerStyleCodec
instances. Must not be null
.
The array may be empty, but must not contain null
.ALcyLspFormat.getLayerStyleCodecs()
,
ALcyLspFormat.createLayerStyleCodecFileTypeDescriptors()
public ALcyFileTypeDescriptor[] createLayerStyleCodecFileTypeDescriptors()
Creates ALcyFileTypeDescriptor
s for the ILcyLayerStyleCodec
s. The
length of the returned array must be equal to that of ALcyLspFormat.createLayerStyleCodecs()
.
The default implementation returns a zero-length array.
This implementations returns the instance created by the decorated format.
createLayerStyleCodecFileTypeDescriptors
in class ALcyLspFormat
ALcyFileTypeDescriptor
instances. Must not be null
and its length must be equal to the length of the array of layer style encoders created
by this format. May contain null
.ALcyLspFormat.createLayerStyleCodecs()
,
ALcyLspFormat.getLayerStyleCodecFileTypeDescriptors()
protected ILcyCustomizerPanelFactory[] createLayerCustomizerPanelFactories()
Creates the ILcyCustomizerPanelFactory
factories that can create
ILcyCustomizerPanel
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, see
TLcyLspStyledLayerCustomizerPanelFactory
.
This implementations returns the instance created by the decorated format.
createLayerCustomizerPanelFactories
in class ALcyLspFormat
ILcyCustomizerPanelFactory
instances. Must not be
null
. The array may be empty, but must not contain null
.ALcyLspFormat.getLayerCustomizerPanelFactories()
protected ALcyWorkspaceObjectCodec[] createLayerCustomizerPanelWorkspaceCodecs()
Creates the ALcyWorkspaceObjectCodec
codecs for the
ILcyCustomizerPanel
instances for the layers created by the layer factories of
this format.
This implementations returns the instance created by the decorated format.
createLayerCustomizerPanelWorkspaceCodecs
in class ALcyLspFormat
ALcyWorkspaceObjectCodec
instances. Must not be
null
, but may have length 0
. Must not contain
null
.ALcyLspFormat.getLayerCustomizerPanelWorkspaceCodecs()
public ALcyWorkspaceObjectCodec[] 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.
createLayerWorkspaceCodecs
in class ALcyLspFormat
ALcyWorkspaceObjectCodec
s to encode the state of the layers.
May be empty but not null
. Must not contain null
ALcyLspFormat.getLayerWorkspaceCodecs()
protected ALcyLayerSelectionTransferHandler[] 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.
createLayerSelectionTransferHandlers
in class ALcyLspFormat
ALcyLayerSelectionTransferHandler
instances. Must not be
null
but may have length 0
. Must not contain
null
.ALcyLspFormat.getLayerSelectionTransferHandlers()
protected ALcyFormatBarFactory 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.
createFormatBarFactory
in class ALcyLspFormat
ALcyFormatBarFactory
. May be null
.protected ILcdBalloonContentProvider[] 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.
createBalloonContentProviders
in class ALcyLspFormat
ILcdBalloonContentProvider
s for this format. Must not be
null
. The array may be empty but must not contain null
.ALcyLspFormat.getBalloonContentProviders()
protected ILcdLayerMeasureProviderFactory 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.
createLayerMeasureProviderFactory
in class ALcyLspFormat
ILcdLayerMeasureProviderFactory
instance. Can be null
.ALcyLspFormat.getLayerMeasureProviderFactory()