Class TLcyCompositeFileTypeDescriptor

java.lang.Object
com.luciad.lucy.model.ALcyFileTypeDescriptor
com.luciad.lucy.model.TLcyCompositeFileTypeDescriptor

public class TLcyCompositeFileTypeDescriptor extends ALcyFileTypeDescriptor
Composite implementation (see composite design pattern) of ALcyFileTypeDescriptor. It keeps a list of associated ALcyFileTypeDescriptors. When it is asked if it includes a filename, it loops over its associated ALcyFileTypeDescriptors to find a suitable ALcyFileTypeDescriptor.
  • Constructor Details

    • TLcyCompositeFileTypeDescriptor

      public TLcyCompositeFileTypeDescriptor(String aDisplayName)
      Creates a new TLcyCompositeFileTypeDescriptor with the given display name.
      Parameters:
      aDisplayName - The display name for this descriptor.
  • Method Details

    • addFileTypeDescriptor

      public void addFileTypeDescriptor(ALcyFileTypeDescriptor aDescriptor)
      Adds the given ALcyFileTypeDescriptor to this composite descriptor.
      Parameters:
      aDescriptor - The descriptor to be added.
      See Also:
    • removeFileTypeDescriptor

      public void removeFileTypeDescriptor(ALcyFileTypeDescriptor aDescriptor)
      Removes the given ALcyFileTypeDescriptor from this composite descriptor.
      Parameters:
      aDescriptor - The descriptor to be removed.
      See Also:
    • getFileTypeDescriptorCount

      public int getFileTypeDescriptorCount()
      Gets the number of ALcyFileTypeDescriptors in this composite descriptor.
      Returns:
      the number of ALcyFileTypeDescriptors in this composite descriptor.
      See Also:
    • getFileTypeDescriptor

      public ALcyFileTypeDescriptor getFileTypeDescriptor(int aIndex)
      Gets the ALcyFileTypeDescriptor at the given position in the list.
      Parameters:
      aIndex - the index to retrieve the ALcyFileTypeDescriptor for.
      Returns:
      the ALcyFileTypeDescriptor at the given position in the list.
      See Also:
    • getDisplayName

      public String getDisplayName()
      Description copied from class: ALcyFileTypeDescriptor
      Returns the display name of this file type descriptor. This message will be displayed to a user, f.i. in a file type combo box of a file chooser.
      Specified by:
      getDisplayName in class ALcyFileTypeDescriptor
      Returns:
      The display name.
    • includes

      public boolean includes(String aFileName)
      Description copied from class: ALcyFileTypeDescriptor
      Returns true if the given filename is included in this file type descriptor. Most likely, implementations will check if the given filename ends with a known extension (f.i. if it ends with '.txt' or so)
      Specified by:
      includes in class ALcyFileTypeDescriptor
      Parameters:
      aFileName - The filename to test for validity.
      Returns:
      True if the filename is accepted, false otherwise.
    • getDefaultExtension

      public String getDefaultExtension()
      Returns null.
      Specified by:
      getDefaultExtension in class ALcyFileTypeDescriptor
      Returns:
      null.