public class TLcyFileTypeDescriptor extends ALcyFileTypeDescriptor
Constructor and Description |
---|
TLcyFileTypeDescriptor(String aDisplayName,
String[] aExtensions)
Creates a new TLcyFileTypeDescriptor with the given display name and extensions.
|
Modifier and Type | Method and Description |
---|---|
String |
getDefaultExtension()
Returns the first extension of the associated list of extensions.
|
String |
getDisplayName()
Returns the previously set display name appended with (*.ext1, *.ext2, ...,
*.extN) where ext1 ... extN are the associated extensions.
|
String |
getExtension(int aIndex)
Returns the extension at the given index.
|
int |
getExtensionCount()
Returns the number of associated extensions.
|
boolean |
includes(String aFileName)
Returns true if the given filename ends with '.ext1' or '.ext2' or ... or '.extN'.
|
void |
setDisplayName(String aDisplayName)
Sets the display name to be used.
|
toString
public TLcyFileTypeDescriptor(String aDisplayName, String[] aExtensions)
aDisplayName
- The display name for this descriptor.aExtensions
- The list of valid extensions, where the first extension is used as
the default extension. The extensions do not include the dot (.)public String getDisplayName()
getDisplayName
in class ALcyFileTypeDescriptor
public void setDisplayName(String aDisplayName)
aDisplayName
- The new display name.public int getExtensionCount()
public String getDefaultExtension()
getDefaultExtension
in class ALcyFileTypeDescriptor
public String getExtension(int aIndex)
aIndex
- The index to retrieve the extension for.public boolean includes(String aFileName)
includes
in class ALcyFileTypeDescriptor
aFileName
- The filename to test.