public interface TextEditorService
Modifier and Type | Method and Description |
---|---|
void |
addMimeType(String mimeType,
Icon icon)
Associates a given icon with a mime-type.
|
List |
editors()
Get a list of all active editors.
|
TextEditor |
getCurrentEditor()
Get the "current" text editor.
|
Icon |
getIconForMimeType(String mimeType)
Retrieve the icon for a mime-type
|
void |
show(File f,
String mimeType)
Show a file in an editor window
|
void |
show(Reader reader,
String mimeType,
String title)
Show text read from a Reader in an editor
|
void |
show(String text,
String mimeType,
String title)
Show the given text in a new editor window
|
void |
show(URL url,
String mimeType)
Show a file from an URL in an editor window
|
void show(String text, String mimeType, String title)
text
- The text to displaymimeType
- The mime-type to be associated with the editortitle
- The title for the editorvoid show(File f, String mimeType) throws IOException
f
- The file to showmimeType
- The mime-type for the fileIOException
- If there is a problem reading the file.void show(URL url, String mimeType) throws IOException
url
- The URL of the filemimeType
- The mime-type for the fileIOException
- If there is a problem reading the file.void show(Reader reader, String mimeType, String title) throws IOException
reader
- The reader to read from.mimeType
- The mime-type to associate with the read texttitle
- The title for the editor windowIOException
- If there is a problem reading from the Reader.void addMimeType(String mimeType, Icon icon)
mimeType
- The mime-typeicon
- The associated iconIcon getIconForMimeType(String mimeType)
mimeType
- The mime-type to search fornull
if none exists.TextEditor getCurrentEditor()
null
if none is selectedList editors()
TextEditor
Copyright © 2016. All rights reserved.