Class TLcyModelListToTreeNodeFormatWrapper

java.lang.Object
com.luciad.lucy.format.ALcyFormat
com.luciad.lucy.format.ALcyFormatWrapper
com.luciad.lucy.format.TLcyModelListToTreeNodeFormatWrapper

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:

Since:
2013.0
See Also:
  • Constructor Details

    • TLcyModelListToTreeNodeFormatWrapper

      public TLcyModelListToTreeNodeFormatWrapper(ALcyFormat aFormat)
      Creates a model list to tree node wrapper for the specified 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.
      Parameters:
      aFormat - The ALcyFormat to decorate. Must not be null.
  • Method Details

    • createModelDecoders

      protected ILcdModelDecoder[] createModelDecoders()
      Description copied from class: 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.

      Overrides:
      createModelDecoders in class ALcyFormatWrapper
      Returns:
      The ILcdModelDecoder (or multiple) for this data format. Must not be null, but the array may have length 0.
      See Also:
    • createModelFactory

      protected ILcdModelFactory createModelFactory()
      Description copied from class: ALcyFormat

      Creates the ILcdModelFactory for this data format. All newly created models of the add-on are expected to be constructed through this factory.

      Overrides:
      createModelFactory in class ALcyFormatWrapper
      Returns:
      The ILcdModelFactory for this data format. May be null.
    • isModelOfFormat

      public boolean isModelOfFormat(ILcdModel aModel)
      Description copied from class: ALcyFormat
      Returns true if and only if the given model is a model of the current data format.
      Overrides:
      isModelOfFormat in class ALcyFormatWrapper
      Parameters:
      aModel - The model to check.
      Returns:
      true if and only if the given model is a model of the current data format.
    • createModelEncoders

      protected ILcdModelEncoder[] createModelEncoders()
      Description copied from class: 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.

      Overrides:
      createModelEncoders in class ALcyFormatWrapper
      Returns:
      An array of ILcdModelEncoder instances. Must not be null, but may have length 0. Must not contain null.
      See Also:
    • createModelEncoderCustomizerPanelFactories

      protected ILcyCustomizerPanelFactory[] createModelEncoderCustomizerPanelFactories()
      Description copied from class: ALcyFormat

      Creates the ILcyCustomizerPanelFactory instances for the ILcdModelEncoder instances created by this class.

      The created ILcyCustomizerPanels 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 ILcyCustomizerPanels need to store any specific state in the workspace.

      Overrides:
      createModelEncoderCustomizerPanelFactories in class ALcyFormatWrapper
      Returns:
      An array of ILcyCustomizerPanelFactory instances. Must not be null but may have length 0. Must not contain null.
      See Also:
    • createModelWorkspaceCodecs

      protected ALcyWorkspaceObjectCodec[] createModelWorkspaceCodecs()
      Description copied from class: ALcyFormat

      Creates the ALcyWorkspaceObjectCodec codecs that can encode and decode the ILcdModel instances produces by the model decoders of this format.

      Overrides:
      createModelWorkspaceCodecs in class ALcyFormatWrapper
      Returns:
      An array containing the ALcyWorkspaceObjectCodec instances. Must not be null, but may have length 0. Must not contain null.
      See Also: