|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.annotation.wordfreak.io.TextFileFormat
| Field Summary | |
static java.lang.String |
SGM_EXTENSION
|
static java.lang.String |
TXT_EXTENSION
|
| Constructor Summary | |
TextFileFormat()
|
|
| Method Summary | |
void |
addProgressListener(ProgressListener pl)
|
java.lang.String |
getExtension()
Returns the default file extension for files in this format. |
javax.swing.filechooser.FileFilter |
getFileFilter()
Returns the file filter for this file format. |
java.lang.String |
getFormatName()
Returns the name of the file format. |
javax.swing.Icon |
getIcon(boolean gold,
boolean loaded,
boolean loading)
Returns an icon to be displayed with files of this type. |
static SourceFileFormat |
getInstance()
|
boolean |
handlesFile(java.lang.String af)
Returns true if this can open the file specified by af. |
java.lang.String |
read(java.lang.String source,
java.lang.String encoding)
Reads the source file specified by the parameter source. |
void |
removeProgressListener(ProgressListener pl)
|
void |
setOtherFileFormats(java.util.List otherFileFormats)
|
void |
write(AnnotationFile af,
java.io.Writer out)
Writes the contents of the AnnotationFile to the Writer specified by out. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String TXT_EXTENSION
public static final java.lang.String SGM_EXTENSION
| Constructor Detail |
public TextFileFormat()
| Method Detail |
public static SourceFileFormat getInstance()
public javax.swing.Icon getIcon(boolean gold,
boolean loaded,
boolean loading)
FileFormat
getIcon in interface FileFormatgold - true if this is a gold file.loaded - true if this file has been loaded.loading - true if this file is loading.
public void setOtherFileFormats(java.util.List otherFileFormats)
public java.lang.String read(java.lang.String source,
java.lang.String encoding)
SourceFileFormatsource.
read in interface SourceFileFormatsource - the name of the file which contains the source.encoding - the encoding which should be used to read the source file.
public void write(AnnotationFile af,
java.io.Writer out)
throws java.io.IOException
FileFormatout. This method should not close the Writer.
write in interface FileFormataf - the annotation file.out - the Writer to which the file should be written.
java.io.IOExceptionpublic javax.swing.filechooser.FileFilter getFileFilter()
FileFormat
getFileFilter in interface FileFormatpublic java.lang.String getFormatName()
FileFormat
getFormatName in interface FileFormatpublic java.lang.String getExtension()
FileFormat
getExtension in interface FileFormatpublic boolean handlesFile(java.lang.String af)
FileFormataf.
handlesFile in interface FileFormataf, false otherwise.public void addProgressListener(ProgressListener pl)
addProgressListener in interface FileFormatpublic void removeProgressListener(ProgressListener pl)
removeProgressListener in interface FileFormat
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||