GNU Classpath (0.95) | |
Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
javax.swing.text.EditorKit
javax.swing.text.DefaultEditorKit
public class DefaultEditorKit
extends EditorKit
EditorKit
. This EditorKit
a plain text Document
and several commands that together
make up a basic editor, like cut / copy + paste.
Nested Class Summary | |
static class |
|
static class |
|
static class |
|
static class |
|
static class |
|
static class |
|
static class |
|
static class |
|
Field Summary | |
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
Constructor Summary | |
|
Method Summary | |
Caret |
|
Document |
|
Action[] |
|
String |
|
ViewFactory |
|
void |
|
void | |
void |
|
void |
Methods inherited from class javax.swing.text.EditorKit | |
clone , createCaret , createDefaultDocument , deinstall , getActions , getContentType , getViewFactory , install , read , read , write , write |
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public static final String EndOfLineStringProperty
When a document is read and an CRLF is encountered, then we add a property with this name and a value of "\r\n".
- Field Value:
- "__EndOfLine__"
public static final String backwardAction
The name of theAction
that moves the caret one character backwards.
- Field Value:
- "caret-backward"
- See Also:
getActions()
public static final String beepAction
The name of theAction
that creates a beep in the speaker.
- Field Value:
- "beep"
- See Also:
getActions()
public static final String beginAction
The name of theAction
that moves the caret to the beginning of theDocument
.
- Field Value:
- "caret-begin"
- See Also:
getActions()
public static final String beginLineAction
The name of theAction
that moves the caret to the beginning of the current line.
- Field Value:
- "caret-begin-line"
- See Also:
getActions()
public static final String beginParagraphAction
The name of theAction
that moves the caret to the beginning of the current paragraph.
- Field Value:
- "caret-begin-paragraph"
- See Also:
getActions()
public static final String beginWordAction
The name of theAction
that moves the caret to the beginning of the current word.
- Field Value:
- "caret-begin-word"
- See Also:
getActions()
public static final String copyAction
The name of theAction
that copies the selected content into the system clipboard.
- Field Value:
- "copy-to-clipboard"
- See Also:
getActions()
public static final String cutAction
The name of theAction
that copies the selected content into the system clipboard and removes the selection.
- Field Value:
- "cut-to-clipboard"
- See Also:
getActions()
public static final String defaultKeyTypedAction
The name of theAction
that is performed by default if a key is typed and there is no keymap entry.
- Field Value:
- "default-typed"
- See Also:
getActions()
public static final String deleteNextCharAction
The name of theAction
that deletes the character that follows the current caret position.
- Field Value:
- "delete-next"
- See Also:
getActions()
public static final String deletePrevCharAction
The name of theAction
that deletes the character that precedes the current caret position.
- Field Value:
- "delete-previous"
- See Also:
getActions()
public static final String downAction
The name of theAction
that moves the caret one line down.
- Field Value:
- "caret-down"
- See Also:
getActions()
public static final String endAction
The name of theAction
that moves the caret to the end of theDocument
.
- Field Value:
- "caret-end"
- See Also:
getActions()
public static final String endLineAction
The name of theAction
that moves the caret to the end of the current line.
- Field Value:
- "caret-end-line"
- See Also:
getActions()
public static final String endParagraphAction
The name of theAction
that moves the caret to the end of the current paragraph.
- Field Value:
- "caret-end-paragraph"
- See Also:
getActions()
public static final String endWordAction
The name of theAction
that moves the caret to the end of the current word.
- Field Value:
- "caret-end-word"
- See Also:
getActions()
public static final String forwardAction
The name of theAction
that moves the caret one character forward.
- Field Value:
- "caret-forward"
- See Also:
getActions()
public static final String insertBreakAction
The name of theAction
that inserts a line break.
- Field Value:
- "insert-break"
- See Also:
getActions()
public static final String insertContentAction
The name of theAction
that inserts some content.
- Field Value:
- "insert-content"
- See Also:
getActions()
public static final String insertTabAction
The name of theAction
that inserts a TAB.
- Field Value:
- "insert-tab"
- See Also:
getActions()
public static final String nextWordAction
The name of theAction
that moves the caret to the beginning of the next word.
- Field Value:
- "caret-next-word"
- See Also:
getActions()
public static final String pageDownAction
The name of theAction
that moves the caret one page down.
- Field Value:
- "page-down"
- See Also:
getActions()
public static final String pageUpAction
The name of theAction
that moves the caret one page up.
- Field Value:
- "page-up"
- See Also:
getActions()
public static final String pasteAction
The name of theAction
that copies content from the system clipboard into the document.
- Field Value:
- "paste-from-clipboard"
- See Also:
getActions()
public static final String previousWordAction
The name of theAction
that moves the caret to the beginning of the previous word.
- Field Value:
- "caret-previous-word"
- See Also:
getActions()
public static final String readOnlyAction
The name of theAction
that sets the editor in read only mode.
- Field Value:
- "set-read-only"
- See Also:
getActions()
public static final String selectAllAction
The name of theAction
that selects the whole document.
- Field Value:
- "select-all"
- See Also:
getActions()
public static final String selectLineAction
The name of theAction
that selects the line around the caret.
- Field Value:
- "select-line"
- See Also:
getActions()
public static final String selectParagraphAction
The name of theAction
that selects the paragraph around the caret.
- Field Value:
- "select-paragraph"
- See Also:
getActions()
public static final String selectWordAction
The name of theAction
that selects the word around the caret.
- Field Value:
- "select-word"
- See Also:
getActions()
public static final String selectionBackwardAction
The name of theAction
that moves the caret one character backwards, possibly extending the current selection.
- Field Value:
- "selection-backward"
- See Also:
getActions()
public static final String selectionBeginAction
The name of theAction
that moves the caret to the beginning of the document, possibly extending the current selection.
- Field Value:
- "selection-begin"
- See Also:
getActions()
public static final String selectionBeginLineAction
The name of theAction
that moves the caret to the beginning of the current line, possibly extending the current selection.
- Field Value:
- "selection-begin-line"
- See Also:
getActions()
public static final String selectionBeginParagraphAction
The name of theAction
that moves the caret to the beginning of the current paragraph, possibly extending the current selection.
- Field Value:
- "selection-begin-paragraph"
- See Also:
getActions()
public static final String selectionBeginWordAction
The name of theAction
that moves the caret to the beginning of the current word, possibly extending the current selection.
- Field Value:
- "selection-begin-word"
- See Also:
getActions()
public static final String selectionDownAction
The name of theAction
that moves the caret one line down, possibly extending the current selection.
- Field Value:
- "selection-down"
- See Also:
getActions()
public static final String selectionEndAction
The name of theAction
that moves the caret to the end of the document, possibly extending the current selection.
- Field Value:
- "selection-end"
- See Also:
getActions()
public static final String selectionEndLineAction
The name of theAction
that moves the caret to the end of the current line, possibly extending the current selection.
- Field Value:
- "selection-end-line"
- See Also:
getActions()
public static final String selectionEndParagraphAction
The name of theAction
that moves the caret to the end of the current paragraph, possibly extending the current selection.
- Field Value:
- "selection-end-paragraph"
- See Also:
getActions()
public static final String selectionEndWordAction
The name of theAction
that moves the caret to the end of the current word, possibly extending the current selection.
- Field Value:
- "selection-end-word"
- See Also:
getActions()
public static final String selectionForwardAction
The name of theAction
that moves the caret one character forwards, possibly extending the current selection.
- Field Value:
- "selection-forward"
- See Also:
getActions()
public static final String selectionNextWordAction
The name of theAction
that moves the caret to the beginning of the next word, possibly extending the current selection.
- Field Value:
- "selection-next-word"
- See Also:
getActions()
public static final String selectionPreviousWordAction
The name of theAction
that moves the caret to the beginning of the previous word, possibly extending the current selection.
- Field Value:
- "selection-previous-word"
- See Also:
getActions()
public static final String selectionUpAction
The name of theAction
that moves the caret one line up, possibly extending the current selection.
- Field Value:
- "selection-up"
- See Also:
getActions()
public static final String upAction
The name of theAction
that moves the caret one line up.
- Field Value:
- "caret-up"
- See Also:
getActions()
public static final String writableAction
The name of theAction
that sets the editor in read-write mode.
- Field Value:
- "set-writable"
- See Also:
getActions()
public Caret createCaret()
- Overrides:
- createCaret in interface EditorKit
- Returns:
- the
Caret
for thisEditorKit
public Document createDefaultDocument()
- Overrides:
- createDefaultDocument in interface EditorKit
- Returns:
- the default
Document
that thisEditorKit
supports
public Action[] getActions()
Returns theAction
s supported by thisEditorKit
.
- Overrides:
- getActions in interface EditorKit
- Returns:
- the
Action
s supported by thisEditorKit
public String getContentType()
Returns the content type that thisEditorKit
supports. TheDefaultEditorKit
supports the content typetext/plain
.
- Overrides:
- getContentType in interface EditorKit
- Returns:
- the content type that this
EditorKit
supports
public ViewFactory getViewFactory()
Returns aViewFactory
that is able to createView
s for theElement
s that are used in thisEditorKit
's model. This returns null which lets the UI of the text component supplyView
s.
- Overrides:
- getViewFactory in interface EditorKit
- Returns:
- a
ViewFactory
that is able to createView
s for theElement
s that are used in thisEditorKit
's model
public void read(InputStream in, Document document, int offset) throws BadLocationException, IOException
Reads a document of the supported content type from anInputStream
into the actualDocument
object.
- Parameters:
in
- the stream from which to read the documentdocument
- the document model into which the content is readoffset
- the offset inside to document where the content is inserted
- Throws:
BadLocationException
- ifoffset
is an invalid location insidedocument
IOException
- if something goes wrong while reading fromin
public void read(Reader in, Document document, int offset) throws BadLocationException, IOException
- Parameters:
in
- the reader from which to read the documentdocument
- the document model into which the content is readoffset
- the offset inside to document where the content is inserted
- Throws:
BadLocationException
- ifoffset
is an invalid location insidedocument
IOException
- if something goes wrong while reading fromin
public void write(OutputStream out, Document document, int offset, int len) throws BadLocationException, IOException
Writes theDocument
(or a fragment of theDocument
) to anOutputStream
in the supported content type format.
- Parameters:
out
- the stream to write todocument
- the document that should be written outoffset
- the beginning offset from where to writelen
- the length of the fragment to write
- Throws:
BadLocationException
- ifoffset
oroffset + len
is an invalid location insidedocument
IOException
- if something goes wrong while writing toout
public void write(Writer out, Document document, int offset, int len) throws BadLocationException, IOException
Writes theDocument
(or a fragment of theDocument
) to aWriter
in the supported content type format.
- Parameters:
out
- the writer to write todocument
- the document that should be written outoffset
- the beginning offset from where to writelen
- the length of the fragment to write
- Throws:
BadLocationException
- ifoffset
is an invalid location insidedocument
.IOException
- if something goes wrong while writing toout
GNU Classpath (0.95) |