Package com.luciad.lucy.model
Class TLcyFilterFileTypeDescriptor
java.lang.Object
com.luciad.lucy.model.ALcyFileTypeDescriptor
com.luciad.lucy.model.TLcyFilterFileTypeDescriptor
Implementation of ALcyFileTypeDescriptor that allows a list of valid
filters (*.ext or prefix*). A filename is accepted if the filter applies,
and the displayname is appended with the filter list (*.ext1, *.ext2, ... )
-
Constructor Summary
ConstructorsConstructorDescriptionTLcyFilterFileTypeDescriptor
(String aDisplayName, String[] aFilters, String aDefaultExtension) Creates a new TLcyFilterFileTypeDescriptor with the given display name, filters and default extension. -
Method Summary
Modifier and TypeMethodDescriptionReturns the default extension of this FileTypeDescriptor.Returns the previously set display name appended with the filter list (*.ext1, prefix2*, *.ext2, prefix1*, ...boolean
Returns true if the given filename applies to one of the filters.Methods inherited from class com.luciad.lucy.model.ALcyFileTypeDescriptor
toString
-
Constructor Details
-
TLcyFilterFileTypeDescriptor
public TLcyFilterFileTypeDescriptor(String aDisplayName, String[] aFilters, String aDefaultExtension) Creates a new TLcyFilterFileTypeDescriptor with the given display name, filters and default extension.- Parameters:
aDisplayName
- The display name for this descriptor.aFilters
- The list of valid filters, example (*.ext or prefix*)aDefaultExtension
- The default extension. The extension does not include the dot (.)
-
-
Method Details
-
getDisplayName
Returns the previously set display name appended with the filter list (*.ext1, prefix2*, *.ext2, prefix1*, ... ).- Specified by:
getDisplayName
in classALcyFileTypeDescriptor
- Returns:
- The display name appended with the known filters.
-
getDefaultExtension
Returns the default extension of this FileTypeDescriptor.- Specified by:
getDefaultExtension
in classALcyFileTypeDescriptor
- Returns:
- the default extension of this FileTypeDescriptor.
-
includes
Returns true if the given filename applies to one of the filters.- Specified by:
includes
in classALcyFileTypeDescriptor
- Parameters:
aFileName
- The filename to test.- Returns:
- True if the filename is correct, false otherwise.
-