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.


Variable Index

 o backwardAction
Name of the Action for moving the caret logically backward one position.
 o beepAction
Name of the action to create a beep
 o beginAction
Name of the Action for moving the caret to the begining of the document.
 o beginParagraphAction
Name of the Action for moving the caret to the begin of the paragraph
 o copyAction
Name of the action to copy the selected region and place the contents into the system clipboard.
 o cutAction
Name of the action to cut the selected region and place the contents into the system clipboard.
 o deleteNextCharAction
Name of the action to delete the character of content that follows the current caret position.
 o deletePrevCharAction
Name of the action to delete the character of content that precedes the current caret position.
 o downAction
Name of the Action for moving the caret logically downward one position.
 o endAction
Name of the Action for moving the caret to the end of the document.
 o endParagraphAction
Name of the Action for moving the caret to the end of the paragraph
 o forwardAction
Name of the Action for moving the caret logically forward one position.
 o insertBreakAction
Name of the action to place a line/paragraph break into the document.
 o insertContentAction
Name of the action to place content into the associated document.
 o pageDownAction
Name of the action to page down vertically.
 o pageUpAction
Name of the action to page up vertically.
 o 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.
 o readOnlyAction
Name of the action to set the editor into read-only mode.
 o selectionBackwardAction
Name of the Action for extending the selection by moving the caret logically backward one position.
 o selectionForwardAction
Name of the Action for extending the selection by moving the caret logically forward one position.
 o upAction
Name of the Action for moving the caret logically upward one position.
 o writableAction
Name of the action to set the editor into writeable mode.

Constructor Index

 o DefaultEditorKit()

Method Index

 o createDefaultDocument()
Create an uninitialized text storage model that is appropriate for this type of editor.
 o 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.
 o getViewFactory()
Fetch a factory that is suitable for producing views of any models that are produced by this kit.
 o 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.
 o write(Writer, Document)
Save the model to the given stream in a format that is appropriate for this kind of editor.

Variables

 o 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.

 o 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.

 o deletePrevCharAction
 public static final String deletePrevCharAction
Name of the action to delete the character of content that precedes the current caret position.

 o deleteNextCharAction
 public static final String deleteNextCharAction
Name of the action to delete the character of content that follows the current caret position.

 o readOnlyAction
 public static final String readOnlyAction
Name of the action to set the editor into read-only mode.

 o writableAction
 public static final String writableAction
Name of the action to set the editor into writeable mode.

 o 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
 o 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
 o 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
 o beepAction
 public static final String beepAction
Name of the action to create a beep

 o pageUpAction
 public static final String pageUpAction
Name of the action to page up vertically.

 o pageDownAction
 public static final String pageDownAction
Name of the action to page down vertically.

 o forwardAction
 public static final String forwardAction
Name of the Action for moving the caret logically forward one position.

See Also:
getActions
 o backwardAction
 public static final String backwardAction
Name of the Action for moving the caret logically backward one position.

See Also:
getActions
 o 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
 o 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
 o upAction
 public static final String upAction
Name of the Action for moving the caret logically upward one position.

See Also:
getActions
 o downAction
 public static final String downAction
Name of the Action for moving the caret logically downward one position.

See Also:
getActions
 o endParagraphAction
 public static final String endParagraphAction
Name of the Action for moving the caret to the end of the paragraph

See Also:
getActions
 o beginParagraphAction
 public static final String beginParagraphAction
Name of the Action for moving the caret to the begin of the paragraph

See Also:
getActions
 o beginAction
 public static final String beginAction
Name of the Action for moving the caret to the begining of the document.

See Also:
getActions
 o endAction
 public static final String endAction
Name of the Action for moving the caret to the end of the document.

See Also:
getActions

Constructors

 o DefaultEditorKit
 public DefaultEditorKit()

Methods

 o 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
 o 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
 o createDefaultDocument
 public Document createDefaultDocument()
Create an uninitialized text storage model that is appropriate for this type of editor.

Overrides:
createDefaultDocument in class EditorKit
 o 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
 o 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