public class TLcyModelListToTreeNodeFormatWrapper extends ALcyFormatWrapper
This wrapper ensures that every TLcdModelList
created by the delegate format is
converted to an ILcdModelTreeNode
before the it is passed to the
rest of the Lucy application. This happens when using model
decoders or model factories
. This is needed to visualize
data in a Lightspeed view that uses a model decoder that creates TLcdModelList
instances.
This wrapper converts instances of TLcdModelList
to instances of
ILcdModelTreeNode
. This is often
necessary to display the model in a ILcdLayerTreeNode
.
Model lists are wrapped after decoding a model using the model decoder, or after creating a model using the model factory. Model list wrappers are unwrapped when using the model encoder
.
Notes:
ALcyDataSourceHandler
allows TLcdModelList
instances to enter
the Lucy application. In that case, Lightspeed visualization is not supported.TLcyGXYLayerTreeNodeFormatWrapper2
when adding GXY visualization support, or with TLcyLspLayerTreeNodeFormatWrapper
when
adding Lightspeed visualization support.TLcyGXYLayerTreeNodeFormatWrapper
.TLcyGXYLayerTreeNodeFormatWrapper2
,
TLcyLspLayerTreeNodeFormatWrapper
Constructor and Description |
---|
TLcyModelListToTreeNodeFormatWrapper(ALcyFormat aFormat)
Creates a model list to tree node wrapper for the specified
ALcyFormat . |
Modifier and Type | Method and Description |
---|---|
protected ILcdModelDecoder[] |
createModelDecoders()
Creates the
ILcdModelDecoder decoders for this data format. |
protected ILcyCustomizerPanelFactory[] |
createModelEncoderCustomizerPanelFactories()
Creates the
ILcyCustomizerPanelFactory instances for the
ILcdModelEncoder instances created by this class. |
protected ILcdModelEncoder[] |
createModelEncoders()
Creates the model encoders for this data format.
|
protected ILcdModelFactory |
createModelFactory()
Creates the
ILcdModelFactory for this data format. |
protected ALcyWorkspaceObjectCodec[] |
createModelWorkspaceCodecs()
Creates the
ALcyWorkspaceObjectCodec codecs that can encode and decode the
ILcdModel instances produces by the model decoders of this format. |
boolean |
isModelOfFormat(ILcdModel aModel)
Returns true if and only if the given model is a model of the current data format.
|
createAll, createAsynchronousPaintHintProvider, createBalloonContentProviders, createDataPropertyValueCustomizerPanelFactories, createDataSourceHandlerFileTypeDescriptorGroups, createDataSourceHandlerFileTypeDescriptors, createDataSourceHandlers, createDefaultModelDescriptorFactories, createDomainObjectCustomizerPanelFactories, createDomainObjectCustomizerPanelWorkspaceCodecs, createDomainObjectWorkspaceCodecs, createFormatBarFactory, createGXYLayerCustomizerPanelFactories, createGXYLayerCustomizerPanelWorkspaceCodecs, createGXYLayerDecoderFileTypeDescriptors, createGXYLayerDecoders, createGXYLayerEncoderFileTypeDescriptors, createGXYLayerEncoders, createGXYLayerFactory, createGXYLayerSelectionTransferHandlers, createGXYLayerStyleProvider, createGXYLayerTypeProvider, createGXYLayerWorkspaceCodecs, createLabelPlacementHintProvider, createLayerHeightProviderFactory, createLayerMeasureProviderFactory, createModelContentTypeProvider, createModelCustomizerPanelFactories, createModelCustomizerPanelWorkspaceCodecs, createModelDecoderFileTypeDescriptorGroups, createModelDecoderFileTypeDescriptors, createModelEncoderCustomizerPanelWorkspaceCodecs, createModelEncoderFileTypeDescriptors, createModelHeightProviderFactory, createModelMeasureProviderFactory, createModelMetaDataCustomizerPanelFactories, createModelMetaDataCustomizerPanelWorkspaceCodecs, getFormat, getLongPrefix, getLucyEnv, getShortPrefix, isGXYLayerOfFormat
createGXYLayerOfFormatFilter, createLayerContextOfFormatFilter, createModelContextOfFormatFilter, createModelOfFormatFilter, getAsynchronousPaintHintProvider, getBalloonContentProviders, getDataPropertyValueCustomizerPanelFactories, getDataSourceHandlerFileTypeDescriptorGroups, getDataSourceHandlerFileTypeDescriptors, getDataSourceHandlers, getDefaultModelDescriptorFactories, getDomainObjectCustomizerPanelFactories, getDomainObjectCustomizerPanelWorkspaceCodecs, getDomainObjectWorkspaceCodecs, getFormatBarFactory, getGXYLayerCustomizerPanelFactories, getGXYLayerCustomizerPanelWorkspaceCodecs, getGXYLayerDecoderFileTypeDescriptors, getGXYLayerDecoders, getGXYLayerEncoderFileTypeDescriptors, getGXYLayerEncoders, getGXYLayerFactory, getGXYLayerSelectionTransferHandlers, getGXYLayerStyleProvider, getGXYLayerTypeProvider, getGXYLayerWorkspaceCodecs, getLabelPlacementHintProvider, getLayerHeightProviderFactory, getLayerMeasureProviderFactory, getModelContentTypeProvider, getModelCustomizerPanelFactories, getModelCustomizerPanelWorkspaceCodecs, getModelDecoderFileTypeDescriptorGroups, getModelDecoderFileTypeDescriptors, getModelDecoders, getModelEncoderCustomizerPanelFactories, getModelEncoderCustomizerPanelWorkspaceCodecs, getModelEncoderFileTypeDescriptors, getModelEncoders, getModelFactory, getModelHeightProviderFactory, getModelMeasureProviderFactory, getModelMetaDataCustomizerPanelFactories, getModelMetaDataCustomizerPanelWorkspaceCodecs, getModelWorkspaceCodecs, toString
public TLcyModelListToTreeNodeFormatWrapper(ALcyFormat aFormat)
ALcyFormat
.
If the model decoders
or the model factory
of the passed format returns a TLcdModelList
, it will be adapted to an instance of
ILcdModelTreeNode
.aFormat
- The ALcyFormat
to decorate. Must not be null
.protected ILcdModelDecoder[] createModelDecoders()
ALcyFormat
Creates the ILcdModelDecoder
decoders for this data format.
It's also the responsibility of this method to make sure that the given lucy environment listens to status events from the decoder. This method should not register the decoder to the lucy env.
Note that TLcdStatusInputStreamFactory
might be useful to implement this
method.
createModelDecoders
in class ALcyFormatWrapper
ILcdModelDecoder
(or multiple) for this data format. Must not be
null
, but the array may have length 0
.TLcdStatusInputStreamFactory
protected ILcdModelFactory createModelFactory()
ALcyFormat
Creates the ILcdModelFactory
for this data format. All newly created models of
the add-on are expected to be constructed through this factory.
createModelFactory
in class ALcyFormatWrapper
ILcdModelFactory
for this data format. May be null
.public boolean isModelOfFormat(ILcdModel aModel)
ALcyFormat
isModelOfFormat
in class ALcyFormatWrapper
aModel
- The model to check.true
if and only if the given model is a model of the current data
format.protected ILcdModelEncoder[] createModelEncoders()
ALcyFormat
Creates the model encoders for this data format. It is the responsibility of this method to ensure that the given lucy environment listens to status events from the encoder. This method should not register the encoder to the lucy env.
Note that TLcdStatusOutputStreamFactory
might be useful to implement this
method.
createModelEncoders
in class ALcyFormatWrapper
ILcdModelEncoder
instances. Must not be null
, but
may have length 0
. Must not contain null
.TLcdStatusOutputStreamFactory
protected ILcyCustomizerPanelFactory[] createModelEncoderCustomizerPanelFactories()
ALcyFormat
Creates the ILcyCustomizerPanelFactory
instances for the
ILcdModelEncoder
instances created by this class.
The created ILcyCustomizerPanel
s should work with instances of TLcyModelEncoderContext
in their
setObject
method.
Hint: When overriding this method, you should also consider overriding ALcyFormat.createModelEncoderCustomizerPanelWorkspaceCodecs()
.
This is needed if your ILcyCustomizerPanel
s need to store any specific state in the workspace.
createModelEncoderCustomizerPanelFactories
in class ALcyFormatWrapper
ILcyCustomizerPanelFactory
instances. Must not be
null
but may have length 0
. Must not contain
null
.TLcySafeGuardFormatWrapper
protected ALcyWorkspaceObjectCodec[] createModelWorkspaceCodecs()
ALcyFormat
Creates the ALcyWorkspaceObjectCodec
codecs that can encode and decode the
ILcdModel
instances produces by the model decoders of this format.
createModelWorkspaceCodecs
in class ALcyFormatWrapper
ALcyWorkspaceObjectCodec
instances. Must not be
null
, but may have length 0
. Must not contain
null
.TLcySafeGuardFormatWrapper