Class ALcyLspFormatWrapper

java.lang.Object
com.luciad.lucy.format.lightspeed.ALcyLspFormat
com.luciad.lucy.format.lightspeed.ALcyLspFormatWrapper
Direct Known Subclasses:
TLcyLspDrawingFormat, TLcyLspLayerTreeNodeFormatWrapper, TLcyLspSafeGuardFormatWrapper, TLcyLspTransformingModelFormatWrapper

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.

Since:
2012.0
  • Constructor Details

    • ALcyLspFormatWrapper

      protected ALcyLspFormatWrapper(ALcyLspFormat aFormat)

      Creates a wrapper for the specified ALcyLspFormat.

      Parameters:
      aFormat - The ALcyLspFormat to decorate. Must not be null.
  • Method Details

    • getFormat

      public ALcyLspFormat getFormat()

      Returns the wrapped ALcyLspFormat.

      Returns:
      The wrapped ALcyLspFormat. Never null.
    • getShortPrefix

      public String 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 class ALcyLspFormat
      Returns:
      The short prefix of this format. Must not be null.
      See Also:
    • getLongPrefix

      public String 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 class ALcyLspFormat
      Returns:
      The long prefix that can be used to generate UID's. Must not be null.
      See Also:
    • getLucyEnv

      public ILcyLucyEnv getLucyEnv()
      Description copied from class: ALcyLspFormat

      Returns the ILcyLucyEnv backend with which this ALcyLspFormat is associated.

      Specified by:
      getLucyEnv in class ALcyLspFormat
      Returns:
      The ILcyLucyEnv backend. Must not be null.
    • canHandleModel

      public boolean canHandleModel(ILcdModel aModel)
      Description copied from class: ALcyLspFormat

      Returns true if and only if the given model can be visualized by this format.

      Specified by:
      canHandleModel in class ALcyLspFormat
      Parameters:
      aModel - The model to check
      Returns:
      true if and only if the given model can be visualized by this format.
    • isLayerOfFormat

      public boolean isLayerOfFormat(ILspLayer aLayer)
      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 whether aLayer is a layer of this format.

      Overrides:
      isLayerOfFormat in class ALcyLspFormat
      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 appropriate get<Concept> methods.

      Overrides:
      createAll in class ALcyLspFormat
    • createLayerFactory

      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.

      Specified by:
      createLayerFactory in class ALcyLspFormat
      Returns:
      The ILspLayerFactory for this format. May be null
      See Also:
    • createLayerStyleProviders

      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.

      Overrides:
      createLayerStyleProviders in class ALcyLspFormat
      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 contain null.
      See Also:
    • createLayerStyleCodecs

      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.

      Overrides:
      createLayerStyleCodecs in class ALcyLspFormat
      Returns:
      an array of ILcyLayerStyleCodec instances. Must not be null. The array may be empty, but must not contain null.
      See Also:
    • createLayerStyleCodecFileTypeDescriptors

      public ALcyFileTypeDescriptor[] createLayerStyleCodecFileTypeDescriptors()

      Creates ALcyFileTypeDescriptors for the ILcyLayerStyleCodecs. 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.

      Overrides:
      createLayerStyleCodecFileTypeDescriptors in class ALcyLspFormat
      Returns:
      An array of 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.
      See Also:
    • createLayerCustomizerPanelFactories

      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.

      Overrides:
      createLayerCustomizerPanelFactories in class ALcyLspFormat
      Returns:
      An array of ILcyCustomizerPanelFactory instances. Must not be null. The array may be empty, but must not contain null.
      See Also:
    • createLayerCustomizerPanelWorkspaceCodecs

      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.

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

      public ALcyWorkspaceObjectCodec[] createLayerWorkspaceCodecs()

      Creates the ALcyWorkspaceObjectCodecs 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 class ALcyLspFormat
      Returns:
      The array of ALcyWorkspaceObjectCodecs to encode the state of the layers. May be empty but not null. Must not contain null
      See Also:
    • createLayerSelectionTransferHandlers

      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.

      Overrides:
      createLayerSelectionTransferHandlers in class ALcyLspFormat
      Returns:
      An array of ALcyLayerSelectionTransferHandler instances. Must not be null but may have length 0. Must not contain null.
      See Also:
    • createFormatBarFactory

      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.

      Overrides:
      createFormatBarFactory in class ALcyLspFormat
      Returns:
      An ALcyFormatBarFactory. May be null.
    • createBalloonContentProviders

      protected ILcdBalloonContentProvider[] createBalloonContentProviders()

      Creates the ILcdBalloonContentProviders for this format.

      The default implementation returns an empty array.

      This implementations returns the instance created by the decorated format.

      Overrides:
      createBalloonContentProviders in class ALcyLspFormat
      Returns:
      the ILcdBalloonContentProviders for this format. Must not be null. The array may be empty but must not contain null.
      See Also:
    • createLayerMeasureProviderFactory

      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.

      Overrides:
      createLayerMeasureProviderFactory in class ALcyLspFormat
      Returns:
      an ILcdLayerMeasureProviderFactory instance. Can be null.
      See Also: