All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.text.DefaultEditorKit
java.lang.Object
|
+----com.sun.java.swing.text.EditorKit
|
+----com.sun.java.swing.text.DefaultEditorKit
- public class DefaultEditorKit
- extends EditorKit
This is the set of things needed by a text component
to be a reasonably functioning editor for some type
of text document. This implementation provides a default
implementation which treats text as plain text and
provides a minimal set of actions for simple editor.
-
backwardAction
- Name of the Action for moving the caret
logically backward one position.
-
beepAction
- Name of the action to create a beep
-
beginAction
- Name of the Action for moving the caret
to the begining of the document.
-
beginParagraphAction
- Name of the Action for moving the caret
to the begin of the paragraph
-
copyAction
- Name of the action to copy the selected region
and place the contents into the system clipboard.
-
cutAction
- Name of the action to cut the selected region
and place the contents into the system clipboard.
-
deleteNextCharAction
- Name of the action to delete the character of content that
follows the current caret position.
-
deletePrevCharAction
- Name of the action to delete the character of content that
precedes the current caret position.
-
downAction
- Name of the Action for moving the caret
logically downward one position.
-
endAction
- Name of the Action for moving the caret
to the end of the document.
-
endParagraphAction
- Name of the Action for moving the caret
to the end of the paragraph
-
forwardAction
- Name of the Action for moving the caret
logically forward one position.
-
insertBreakAction
- Name of the action to place a line/paragraph break into
the document.
-
insertContentAction
- Name of the action to place content into the associated
document.
-
pageDownAction
- Name of the action to page down vertically.
-
pageUpAction
- Name of the action to page up vertically.
-
pasteAction
- Name of the action to paste the contents of the
system clipboard into the selected region, or before the
caret if nothing is selected.
-
readOnlyAction
- Name of the action to set the editor into read-only
mode.
-
selectionBackwardAction
- Name of the Action for extending the selection
by moving the caret logically backward one position.
-
selectionForwardAction
- Name of the Action for extending the selection
by moving the caret logically forward one position.
-
upAction
- Name of the Action for moving the caret
logically upward one position.
-
writableAction
- Name of the action to set the editor into writeable
mode.
-
DefaultEditorKit()
-
-
createDefaultDocument()
- Create an uninitialized text storage model
that is appropriate for this type of editor.
-
getActions()
- Fetch the set of commands that can be used
on a text component that is using a model and
view produced by this kit.
-
getViewFactory()
- Fetch a factory that is suitable for producing
views of any models that are produced by this
kit.
-
read(Reader, Object)
- Create and initialize a model from the given
stream which is expected to be in a format appropriate
for this kind of editor.
-
write(Writer, Document)
- Save the model to the given stream in a format that is
appropriate for this kind of editor.
insertContentAction
public static final String insertContentAction
- Name of the action to place content into the associated
document. If there is a selection, it is removed before
the new content is added.
insertBreakAction
public static final String insertBreakAction
- Name of the action to place a line/paragraph break into
the document. If there is a selection, it is removed before
the break is added.
deletePrevCharAction
public static final String deletePrevCharAction
- Name of the action to delete the character of content that
precedes the current caret position.
deleteNextCharAction
public static final String deleteNextCharAction
- Name of the action to delete the character of content that
follows the current caret position.
readOnlyAction
public static final String readOnlyAction
- Name of the action to set the editor into read-only
mode.
writableAction
public static final String writableAction
- Name of the action to set the editor into writeable
mode.
cutAction
public static final String cutAction
- Name of the action to cut the selected region
and place the contents into the system clipboard.
- See Also:
- cut
copyAction
public static final String copyAction
- Name of the action to copy the selected region
and place the contents into the system clipboard.
- See Also:
- copy
pasteAction
public static final String pasteAction
- Name of the action to paste the contents of the
system clipboard into the selected region, or before the
caret if nothing is selected.
- See Also:
- paste
beepAction
public static final String beepAction
- Name of the action to create a beep
pageUpAction
public static final String pageUpAction
- Name of the action to page up vertically.
pageDownAction
public static final String pageDownAction
- Name of the action to page down vertically.
forwardAction
public static final String forwardAction
- Name of the Action for moving the caret
logically forward one position.
- See Also:
- getActions
backwardAction
public static final String backwardAction
- Name of the Action for moving the caret
logically backward one position.
- See Also:
- getActions
selectionForwardAction
public static final String selectionForwardAction
- Name of the Action for extending the selection
by moving the caret logically forward one position.
- See Also:
- getActions
selectionBackwardAction
public static final String selectionBackwardAction
- Name of the Action for extending the selection
by moving the caret logically backward one position.
- See Also:
- getActions
upAction
public static final String upAction
- Name of the Action for moving the caret
logically upward one position.
- See Also:
- getActions
downAction
public static final String downAction
- Name of the Action for moving the caret
logically downward one position.
- See Also:
- getActions
endParagraphAction
public static final String endParagraphAction
- Name of the Action for moving the caret
to the end of the paragraph
- See Also:
- getActions
beginParagraphAction
public static final String beginParagraphAction
- Name of the Action for moving the caret
to the begin of the paragraph
- See Also:
- getActions
beginAction
public static final String beginAction
- Name of the Action for moving the caret
to the begining of the document.
- See Also:
- getActions
endAction
public static final String endAction
- Name of the Action for moving the caret
to the end of the document.
- See Also:
- getActions
DefaultEditorKit
public DefaultEditorKit()
getViewFactory
public ViewFactory getViewFactory()
- Fetch a factory that is suitable for producing
views of any models that are produced by this
kit. The default is to have the UI produce the
factory, so this method has no implementation.
- Overrides:
- getViewFactory in class EditorKit
getActions
public Action[] getActions()
- Fetch the set of commands that can be used
on a text component that is using a model and
view produced by this kit.
- Overrides:
- getActions in class EditorKit
createDefaultDocument
public Document createDefaultDocument()
- Create an uninitialized text storage model
that is appropriate for this type of editor.
- Overrides:
- createDefaultDocument in class EditorKit
read
public Document read(Reader in,
Object desc) throws IOException
- Create and initialize a model from the given
stream which is expected to be in a format appropriate
for this kind of editor. This is implemented to read
plain text.
- Parameters:
- in - The stream to read from
- desc - An object describing the stream. This
might be a string, a File, a URL, etc. Some kinds
of documents (such as html for example) might be
able to make use of this information.
- Overrides:
- read in class EditorKit
write
public void write(Writer out,
Document doc) throws IOException
- Save the model to the given stream in a format that is
appropriate for this kind of editor. This is implemented to
write plain text.
- Overrides:
- write in class EditorKit
All Packages Class Hierarchy This Package Previous Next Index