| 
 |   | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
  |
  +--javax.swing.text.EditorKit
        |
        +--javax.swing.text.DefaultEditorKit
Safe: 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 a simple editor.
line.separator, is defined to be
 platform-dependent, either "\n", "\r", or "\r\n".  There is also
 a property defined in DefaultEditorKit, called
 EndOfLineStringProperty,
 which is defined automatically when a document is loaded, to be
 the first occurrence of any of the newline characters.
 When a document is loaded, EndOfLineStringProperty
 is set appropriately, and when the document is written back out, the
 EndOfLineStringProperty is used.  But while the document
 is in memory, the "\n" character is used to define a
 newline, regardless of how the newline is defined when
 the document is on disk.  Therefore, for searching purposes,
 "\n" should always be used.  When a new document is created,
 and the EndOfLineStringProperty has not been defined,
 it will use the System property when writing out the
 document.
 Note that EndOfLineStringProperty is set
 on the Document using the get/setProperty
 methods.  Subclasses may override this behavior.
 
| Field Summary | |
| static String | backwardActionSuppressed: Name of the Action for moving the caret logically backward one position. | 
| static String | beepActionSuppressed: Name of the action to create a beep. | 
| static String | beginActionSuppressed: Name of the Actionfor moving the caret 
 to the beginning of the document. | 
| static String | beginLineActionSuppressed: Name of the Actionfor moving the caret 
 to the beginning of a line. | 
| static String | beginParagraphActionSuppressed: Name of the Actionfor moving the caret 
 to the beginning of a paragraph. | 
| static String | beginWordActionSuppressed: Name of the Actionfor moving the caret 
 to the beginning of a word. | 
| static String | copyActionSuppressed: Name of the action to copy the selected region and place the contents into the system clipboard. | 
| static String | cutActionSuppressed: Name of the action to cut the selected region and place the contents into the system clipboard. | 
| private static Action[] | defaultActions | 
| static String | defaultKeyTypedActionSuppressed: Name of the action that is executed by default if a key typed event is received and there is no keymap entry. | 
| static String | deleteNextCharActionSuppressed: Name of the action to delete the character of content that follows the current caret position. | 
| static String | deletePrevCharActionSuppressed: Name of the action to delete the character of content that precedes the current caret position. | 
| static String | downActionSuppressed: Name of the Action for moving the caret logically downward one position. | 
| static String | endActionSuppressed: Name of the Actionfor moving the caret 
 to the end of the document. | 
| static String | endLineActionSuppressed: Name of the Actionfor moving the caret 
 to the end of a line. | 
| static String | EndOfLineStringPropertySuppressed: When reading a document if a CRLF is encountered a property with this name is added and the value will be "\r\n". | 
| static String | endParagraphActionSuppressed: Name of the Actionfor moving the caret 
 to the end of a paragraph. | 
| static String | endWordActionSuppressed: Name of the Action for moving the caret to the end of a word. | 
| static String | forwardActionSuppressed: Name of the Action for moving the caret logically forward one position. | 
| static String | insertBreakActionSuppressed: Name of the action to place a line/paragraph break into the document. | 
| static String | insertContentActionSuppressed: Name of the action to place content into the associated document. | 
| static String | insertTabActionSuppressed: Name of the action to place a tab character into the document. | 
| static String | nextWordActionSuppressed: Name of the Actionfor moving the caret to the
 beginning of the next word. | 
| static String | pageDownActionSuppressed: Name of the action to page down vertically. | 
| static String | pageUpActionSuppressed: Name of the action to page up vertically. | 
| static String | pasteActionSuppressed: Name of the action to paste the contents of the system clipboard into the selected region, or before the caret if nothing is selected. | 
| static String | previousWordActionSuppressed: Name of the Actionfor moving the caret to the
 beginning of the previous word. | 
| static String | readOnlyActionSuppressed: Name of the action to set the editor into read-only mode. | 
| static String | selectAllActionSuppressed: Name of the Action for selecting the entire document | 
| static String | selectionBackwardActionSuppressed: Name of the Action for extending the selection by moving the caret logically backward one position. | 
| static String | selectionBeginActionSuppressed: Name of the Actionfor moving the caret 
 to the beginning of the document. | 
| static String | selectionBeginLineActionSuppressed: Name of the Actionfor moving the caret 
 to the beginning of a line, extending the selection. | 
| static String | selectionBeginParagraphActionSuppressed: Name of the Actionfor moving the caret 
 to the beginning of a paragraph, extending the selection. | 
| static String | selectionBeginWordActionSuppressed: Name of the Actionfor moving the caret 
 to the beginning of a word, extending the selection. | 
| static String | selectionDownActionSuppressed: Name of the Action for moving the caret logically downward one position, extending the selection. | 
| static String | selectionEndActionSuppressed: Name of the Action for moving the caret to the end of the document. | 
| static String | selectionEndLineActionSuppressed: Name of the Actionfor moving the caret 
 to the end of a line, extending the selection. | 
| static String | selectionEndParagraphActionSuppressed: Name of the Actionfor moving the caret 
 to the end of a paragraph, extending the selection. | 
| static String | selectionEndWordActionSuppressed: Name of the Action for moving the caret to the end of a word, extending the selection. | 
| static String | selectionForwardActionSuppressed: Name of the Action for extending the selection by moving the caret logically forward one position. | 
| static String | selectionNextWordActionSuppressed: Name of the Actionfor moving the selection to the
 beginning of the next word, extending the selection. | 
| (package private) static String | selectionPageDownActionName of the action to page down vertically, and move the selection. | 
| (package private) static String | selectionPageLeftActionName of the action to page left horizontally, and move the selection. | 
| (package private) static String | selectionPageRightActionName of the action to page right horizontally, and move the selection. | 
| (package private) static String | selectionPageUpActionName of the action to page up vertically, and move the selection. | 
| static String | selectionPreviousWordActionSuppressed: Name of the Actionfor moving the selection to the
 beginning of the previous word, extending the selection. | 
| static String | selectionUpActionSuppressed: Name of the Action for moving the caret logically upward one position, extending the selection. | 
| static String | selectLineActionSuppressed: Name of the Action for selecting a line around the caret. | 
| static String | selectParagraphActionSuppressed: Name of the Action for selecting a paragraph around the caret. | 
| static String | selectWordActionSuppressed: Name of the Action for selecting a word around the caret. | 
| (package private) static String | toggleComponentOrientationActionName of the Action for toggling the component's orientation. | 
| (package private) static String | unselectActionName of the Action for removing selection | 
| static String | upActionSuppressed: Name of the Action for moving the caret logically upward one position. | 
| static String | writableActionSuppressed: Name of the action to set the editor into writeable mode. | 
| Constructor Summary | |
| DefaultEditorKit()Enabled: default constructor for DefaultEditorKit | |
| Method Summary | |
|  Caret | createCaret()Enabled: Fetches a caret that can navigate through views produced by the associated ViewFactory. | 
|  Document | createDefaultDocument()Enabled: Creates an uninitialized text storage model (PlainDocument) that is appropriate for this type of editor. | 
|  Action[] | getActions()Suppressed: Fetches the set of commands that can be used on a text component that is using a model and view produced by this kit. | 
|  String | getContentType()Enabled: Gets the MIME type of the data that this kit represents support for. | 
| (package private)  MutableAttributeSet | getInputAttributes()Gets the input attributes for the pane. | 
|  ViewFactory | getViewFactory()Enabled: Fetches a factory that is suitable for producing views of any models that are produced by this kit. | 
|  void | read(InputStream in,
     Document doc,
     int pos)Enabled: Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler. | 
|  void | read(Reader in,
     Document doc,
     int pos)Enabled: Inserts content from the given stream, which will be treated as plain text. | 
|  void | write(OutputStream out,
      Document doc,
      int pos,
      int len)Enabled: Writes content from a document to the given stream in a format appropriate for this kind of content handler. | 
|  void | write(Writer out,
      Document doc,
      int pos,
      int len)Enabled: Writes content from a document to the given stream as plain text. | 
| Methods inherited from class javax.swing.text.EditorKit | 
| clone, deinstall, install | 
| Methods inherited from class java.lang.Object | 
| equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
public static final String EndOfLineStringProperty
public static final String insertContentAction
getActions()public static final String insertBreakAction
getActions()public static final String insertTabAction
getActions()public static final String deletePrevCharAction
getActions()public static final String deleteNextCharAction
getActions()public static final String readOnlyAction
getActions()public static final String writableAction
getActions()public static final String cutAction
JTextComponent.cut(), 
getActions()public static final String copyAction
JTextComponent.copy(), 
getActions()public static final String pasteAction
JTextComponent.paste(), 
getActions()public static final String beepAction
getActions()public static final String pageUpAction
getActions()public static final String pageDownAction
getActions()static final String selectionPageUpAction
getActions()static final String selectionPageDownAction
getActions()static final String selectionPageLeftAction
getActions()static final String selectionPageRightAction
getActions()public static final String forwardAction
getActions()public static final String backwardAction
getActions()public static final String selectionForwardAction
getActions()public static final String selectionBackwardAction
getActions()public static final String upAction
getActions()public static final String downAction
getActions()public static final String selectionUpAction
getActions()public static final String selectionDownAction
getActions()public static final String beginWordAction
Action for moving the caret 
 to the beginning of a word.
getActions()public static final String endWordAction
getActions()public static final String selectionBeginWordAction
Action for moving the caret 
 to the beginning of a word, extending the selection.
getActions()public static final String selectionEndWordAction
getActions()public static final String previousWordAction
Action for moving the caret to the
 beginning of the previous word.
getActions()public static final String nextWordAction
Action for moving the caret to the
 beginning of the next word.
getActions()public static final String selectionPreviousWordAction
Action for moving the selection to the
 beginning of the previous word, extending the selection.
getActions()public static final String selectionNextWordAction
Action for moving the selection to the
 beginning of the next word, extending the selection.
getActions()public static final String beginLineAction
Action for moving the caret 
 to the beginning of a line.
getActions()public static final String endLineAction
Action for moving the caret 
 to the end of a line.
getActions()public static final String selectionBeginLineAction
Action for moving the caret 
 to the beginning of a line, extending the selection.
getActions()public static final String selectionEndLineAction
Action for moving the caret 
 to the end of a line, extending the selection.
getActions()public static final String beginParagraphAction
Action for moving the caret 
 to the beginning of a paragraph.
getActions()public static final String endParagraphAction
Action for moving the caret 
 to the end of a paragraph.
getActions()public static final String selectionBeginParagraphAction
Action for moving the caret 
 to the beginning of a paragraph, extending the selection.
getActions()public static final String selectionEndParagraphAction
Action for moving the caret 
 to the end of a paragraph, extending the selection.
getActions()public static final String beginAction
Action for moving the caret 
 to the beginning of the document.
getActions()public static final String endAction
Action for moving the caret 
 to the end of the document.
getActions()public static final String selectionBeginAction
Action for moving the caret 
 to the beginning of the document.
getActions()public static final String selectionEndAction
getActions()public static final String selectWordAction
getActions()public static final String selectLineAction
getActions()public static final String selectParagraphAction
getActions()public static final String selectAllAction
getActions()static final String unselectAction
getActions()static final String toggleComponentOrientationAction
getActions()public static final String defaultKeyTypedAction
getActions()private static final Action[] defaultActions
| Constructor Detail | 
public DefaultEditorKit()
| Method Detail | 
public String getContentType()
text/plain.
getContentType in class EditorKitpublic ViewFactory getViewFactory()
getViewFactory in class EditorKitpublic Action[] getActions()
getActions in class EditorKitpublic Caret createCaret()
createCaret in class EditorKitpublic Document createDefaultDocument()
createDefaultDocument in class EditorKit
public void read(InputStream in,
                 Document doc,
                 int pos)
          throws IOException,
                 BadLocationException
read in class EditorKitin - The stream to read fromdoc - The destination for the insertion.pos - The location in the document to place the
   content >= 0.
IOException
BadLocationException
public void write(OutputStream out,
                  Document doc,
                  int pos,
                  int len)
           throws IOException,
                  BadLocationException
write in class EditorKitout - The stream to write todoc - The source for the write.pos - The location in the document to fetch the
   content >= 0.len - The amount to write out >= 0.
IOException
BadLocationExceptionMutableAttributeSet getInputAttributes()
public void read(Reader in,
                 Document doc,
                 int pos)
          throws IOException,
                 BadLocationException
read in class EditorKitin - The stream to read fromdoc - The destination for the insertion.pos - The location in the document to place the
   content >= 0.
IOException
BadLocationException
public void write(Writer out,
                  Document doc,
                  int pos,
                  int len)
           throws IOException,
                  BadLocationException
write in class EditorKitout - The stream to write todoc - The source for the write.pos - The location in the document to fetch the
   content from >= 0.len - The amount to write out >= 0.
IOException
BadLocationException| 
 |   | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
