Class TLcyGXYLayerTreeNodeFormatWrapper

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

@Deprecated public class TLcyGXYLayerTreeNodeFormatWrapper extends ALcyFormatWrapper
Deprecated.
This format wrapper provides a layer factory which can handle incoming TLcdModelList and ILcdModelTreeNode instances. The Lightspeed equivalent of this class (TLcyLspLayerTreeNodeFormatWrapper) is not capable of handling TLcdModelList instances, only ILcdModelTreeNode instances. Therefore, if your format uses TLcdModelList instances, it is recommended to use the following wrapper structure in GXY (new TLcyModelListToTreeNodeFormatWrapper( new TLcyGXYLayerTreeNodeFormatWrapper2( format ) )) and the following structure in Lsp (new TLcyLspLayerTreeNodeFormatWrapper( format )). The GXY wrappers will ensure that the TLcdModelList instances are converted to ILcdModelTreeNode instances, which avoids that TLcdModelList instances are passed to the Lightspeed format. Consult the class javadoc of TLcyModelListToTreeNodeFormatWrapper for more information.

This ALcyFormatWrapper adds support for working with ILcdLayerTreeNode's. When a TLcdModelList or an ILcdModelTreeNode is given to its ILcdGXYLayerFactory it automatically creates a matching layer tree node structure. The creation of the layers for the sub-models is left to the delegate ALcyFormat. Consider this model structure:


            ILcdModelTreeNode-A
             |               |
   ILcdModelTreeNode-B     ILcdModel-E
      |            |
 ILcdModel-C  ILcdModel-D
 
A matching structure of ILcdLayerTreeNodes is created. The layer nodes for A and B are created by this wrapper, the creation of the (regular) layers for the models C, D and E are left to the wrapped format.

It also adds workspace support for the layer nodes it creates.

Limitations
It assumes actual data is only present in the leafs of the model structure, not in the nodes itself.

See Also:
  • Constructor Details

    • TLcyGXYLayerTreeNodeFormatWrapper

      public TLcyGXYLayerTreeNodeFormatWrapper(ALcyFormat aFormat)
      Deprecated.
      Creates a layer tree node wrapper for the specified ALcyFormat. Layer tree nodes will be created for all ILcdModelTreeNode and TLcdModelList instances that belong to aFormat (see ALcyFormat.isModelOfFormat(com.luciad.model.ILcdModel)).
      Parameters:
      aFormat - The ALcyFormat to decorate. Must not be null.
    • TLcyGXYLayerTreeNodeFormatWrapper

      public TLcyGXYLayerTreeNodeFormatWrapper(ALcyFormat aFormat, ILcdFilter aModelTreeNodeFilter)
      Deprecated.
      Creates a layer tree node wrapper for the specified ALcyFormat, using the given model filter. Layer tree nodes will be created for all ILcdModelTreeNode and TLcdModelList instances that belong to aFormat (see ALcyFormat.isModelOfFormat(com.luciad.model.ILcdModel)). and pass the given filter.
      Parameters:
      aFormat - The ALcyFormat to decorate. Must not be null.
      aModelTreeNodeFilter - An ILcdFilter that decides for which ILcdModelTreeNode or TLcdModelList instances to create layer tree nodes.
  • Method Details

    • isGXYLayerTreeNodeOfFormat

      public boolean isGXYLayerTreeNodeOfFormat(ILcdGXYLayer aGXYLayer)
      Deprecated.

      Returns true if and only if the given layer is an ILcdLayerTreeNode of the current data format.

      Parameters:
      aGXYLayer - the layer to check
      Returns:
      true if and only if the given layer is an ILcdLayerTreeNode of the current data format.
    • createModelWorkspaceCodecs

      protected ALcyWorkspaceObjectCodec[] createModelWorkspaceCodecs()
      Deprecated.
      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:
    • isModelOfFormat

      public boolean isModelOfFormat(ILcdModel aModel)
      Deprecated.
      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()
      Deprecated.
      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()
      Deprecated.
      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:
    • createGXYLayerNode

      public ILcdLayerTreeNode createGXYLayerNode()
      Deprecated.

      Creates a new TLcdGXYLayerTreeNode.

      If you overwrite it, make sure you're still compatible with the codec

      Returns:
      a new empty TLcyGXYLayerTreeNode which can be encoded/decoded
    • createGXYLayerNode

      public ILcdLayerTreeNode createGXYLayerNode(ILcdModel aModel)
      Deprecated.

      Creates a new TLcdGXYLayerTreeNode with model aModel.

      If you overwrite it, make sure you're still compatible with the codec

      Parameters:
      aModel - the model for the layer node
      Returns:
      a new TLcyGXYLayerTreeNode with model aModel which can be encoded/decoded