javax.swing.text
Class DefaultEditorKit

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.text.EditorKit sample code for javax.swing.text.EditorKit definition code for javax.swing.text.EditorKit 
      extended by javax.swing.text.DefaultEditorKit
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable
Direct Known Subclasses:
StyledEditorKit sample code for javax.swing.text.StyledEditorKit definition code for javax.swing.text.StyledEditorKit

public class DefaultEditorKit
extends EditorKit sample code for javax.swing.text.EditorKit definition code for javax.swing.text.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 a simple editor.

Newlines
There are two properties which deal with newlines. The system property, 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.

See Also:
Serialized Form

Nested Class Summary
static class DefaultEditorKit.BeepAction sample code for javax.swing.text.DefaultEditorKit.BeepAction definition code for javax.swing.text.DefaultEditorKit.BeepAction
          Creates a beep.
static class DefaultEditorKit.CopyAction sample code for javax.swing.text.DefaultEditorKit.CopyAction definition code for javax.swing.text.DefaultEditorKit.CopyAction
          Copies the selected region and place its contents into the system clipboard.
static class DefaultEditorKit.CutAction sample code for javax.swing.text.DefaultEditorKit.CutAction definition code for javax.swing.text.DefaultEditorKit.CutAction
          Cuts the selected region and place its contents into the system clipboard.
static class DefaultEditorKit.DefaultKeyTypedAction sample code for javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction definition code for javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction
          The action that is executed by default if a key typed event is received and there is no keymap entry.
static class DefaultEditorKit.InsertBreakAction sample code for javax.swing.text.DefaultEditorKit.InsertBreakAction definition code for javax.swing.text.DefaultEditorKit.InsertBreakAction
          Places a line/paragraph break into the document.
static class DefaultEditorKit.InsertContentAction sample code for javax.swing.text.DefaultEditorKit.InsertContentAction definition code for javax.swing.text.DefaultEditorKit.InsertContentAction
          Places content into the associated document.
static class DefaultEditorKit.InsertTabAction sample code for javax.swing.text.DefaultEditorKit.InsertTabAction definition code for javax.swing.text.DefaultEditorKit.InsertTabAction
          Places a tab character into the document.
static class DefaultEditorKit.PasteAction sample code for javax.swing.text.DefaultEditorKit.PasteAction definition code for javax.swing.text.DefaultEditorKit.PasteAction
          Pastes the contents of the system clipboard into the selected region, or before the caret if nothing is selected.
 
Field Summary
static String sample code for java.lang.String definition code for java.lang.String backwardAction sample code for javax.swing.text.DefaultEditorKit.backwardAction definition code for javax.swing.text.DefaultEditorKit.backwardAction
          Name of the Action for moving the caret logically backward one position.
static String sample code for java.lang.String definition code for java.lang.String beepAction sample code for javax.swing.text.DefaultEditorKit.beepAction definition code for javax.swing.text.DefaultEditorKit.beepAction
          Name of the action to create a beep.
static String sample code for java.lang.String definition code for java.lang.String beginAction sample code for javax.swing.text.DefaultEditorKit.beginAction definition code for javax.swing.text.DefaultEditorKit.beginAction
          Name of the Action for moving the caret to the beginning of the document.
static String sample code for java.lang.String definition code for java.lang.String beginLineAction sample code for javax.swing.text.DefaultEditorKit.beginLineAction definition code for javax.swing.text.DefaultEditorKit.beginLineAction
          Name of the Action for moving the caret to the beginning of a line.
static String sample code for java.lang.String definition code for java.lang.String beginParagraphAction sample code for javax.swing.text.DefaultEditorKit.beginParagraphAction definition code for javax.swing.text.DefaultEditorKit.beginParagraphAction
          Name of the Action for moving the caret to the beginning of a paragraph.
static String sample code for java.lang.String definition code for java.lang.String beginWordAction sample code for javax.swing.text.DefaultEditorKit.beginWordAction definition code for javax.swing.text.DefaultEditorKit.beginWordAction
          Name of the Action for moving the caret to the beginning of a word.
static String sample code for java.lang.String definition code for java.lang.String copyAction sample code for javax.swing.text.DefaultEditorKit.copyAction definition code for javax.swing.text.DefaultEditorKit.copyAction
          Name of the action to copy the selected region and place the contents into the system clipboard.
static String sample code for java.lang.String definition code for java.lang.String cutAction sample code for javax.swing.text.DefaultEditorKit.cutAction definition code for javax.swing.text.DefaultEditorKit.cutAction
          Name of the action to cut the selected region and place the contents into the system clipboard.
static String sample code for java.lang.String definition code for java.lang.String defaultKeyTypedAction sample code for javax.swing.text.DefaultEditorKit.defaultKeyTypedAction definition code for javax.swing.text.DefaultEditorKit.defaultKeyTypedAction
          Name of the action that is executed by default if a key typed event is received and there is no keymap entry.
static String sample code for java.lang.String definition code for java.lang.String deleteNextCharAction sample code for javax.swing.text.DefaultEditorKit.deleteNextCharAction definition code for javax.swing.text.DefaultEditorKit.deleteNextCharAction
          Name of the action to delete the character of content that follows the current caret position.
static String sample code for java.lang.String definition code for java.lang.String deletePrevCharAction sample code for javax.swing.text.DefaultEditorKit.deletePrevCharAction definition code for javax.swing.text.DefaultEditorKit.deletePrevCharAction
          Name of the action to delete the character of content that precedes the current caret position.
static String sample code for java.lang.String definition code for java.lang.String downAction sample code for javax.swing.text.DefaultEditorKit.downAction definition code for javax.swing.text.DefaultEditorKit.downAction
          Name of the Action for moving the caret logically downward one position.
static String sample code for java.lang.String definition code for java.lang.String endAction sample code for javax.swing.text.DefaultEditorKit.endAction definition code for javax.swing.text.DefaultEditorKit.endAction
          Name of the Action for moving the caret to the end of the document.
static String sample code for java.lang.String definition code for java.lang.String endLineAction sample code for javax.swing.text.DefaultEditorKit.endLineAction definition code for javax.swing.text.DefaultEditorKit.endLineAction
          Name of the Action for moving the caret to the end of a line.
static String sample code for java.lang.String definition code for java.lang.String EndOfLineStringProperty sample code for javax.swing.text.DefaultEditorKit.EndOfLineStringProperty definition code for javax.swing.text.DefaultEditorKit.EndOfLineStringProperty
          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 sample code for java.lang.String definition code for java.lang.String endParagraphAction sample code for javax.swing.text.DefaultEditorKit.endParagraphAction definition code for javax.swing.text.DefaultEditorKit.endParagraphAction
          Name of the Action for moving the caret to the end of a paragraph.
static String sample code for java.lang.String definition code for java.lang.String endWordAction sample code for javax.swing.text.DefaultEditorKit.endWordAction definition code for javax.swing.text.DefaultEditorKit.endWordAction
          Name of the Action for moving the caret to the end of a word.
static String sample code for java.lang.String definition code for java.lang.String forwardAction sample code for javax.swing.text.DefaultEditorKit.forwardAction definition code for javax.swing.text.DefaultEditorKit.forwardAction
          Name of the Action for moving the caret logically forward one position.
static String sample code for java.lang.String definition code for java.lang.String insertBreakAction sample code for javax.swing.text.DefaultEditorKit.insertBreakAction definition code for javax.swing.text.DefaultEditorKit.insertBreakAction
          Name of the action to place a line/paragraph break into the document.
static String sample code for java.lang.String definition code for java.lang.String insertContentAction sample code for javax.swing.text.DefaultEditorKit.insertContentAction definition code for javax.swing.text.DefaultEditorKit.insertContentAction
          Name of the action to place content into the associated document.
static String sample code for java.lang.String definition code for java.lang.String insertTabAction sample code for javax.swing.text.DefaultEditorKit.insertTabAction definition code for javax.swing.text.DefaultEditorKit.insertTabAction
          Name of the action to place a tab character into the document.
static String sample code for java.lang.String definition code for java.lang.String nextWordAction sample code for javax.swing.text.DefaultEditorKit.nextWordAction definition code for javax.swing.text.DefaultEditorKit.nextWordAction
          Name of the Action for moving the caret to the beginning of the next word.
static String sample code for java.lang.String definition code for java.lang.String pageDownAction sample code for javax.swing.text.DefaultEditorKit.pageDownAction definition code for javax.swing.text.DefaultEditorKit.pageDownAction
          Name of the action to page down vertically.
static String sample code for java.lang.String definition code for java.lang.String pageUpAction sample code for javax.swing.text.DefaultEditorKit.pageUpAction definition code for javax.swing.text.DefaultEditorKit.pageUpAction
          Name of the action to page up vertically.
static String sample code for java.lang.String definition code for java.lang.String pasteAction sample code for javax.swing.text.DefaultEditorKit.pasteAction definition code for javax.swing.text.DefaultEditorKit.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.
static String sample code for java.lang.String definition code for java.lang.String previousWordAction sample code for javax.swing.text.DefaultEditorKit.previousWordAction definition code for javax.swing.text.DefaultEditorKit.previousWordAction
          Name of the Action for moving the caret to the beginning of the previous word.
static String sample code for java.lang.String definition code for java.lang.String readOnlyAction sample code for javax.swing.text.DefaultEditorKit.readOnlyAction definition code for javax.swing.text.DefaultEditorKit.readOnlyAction
          Name of the action to set the editor into read-only mode.
static String sample code for java.lang.String definition code for java.lang.String selectAllAction sample code for javax.swing.text.DefaultEditorKit.selectAllAction definition code for javax.swing.text.DefaultEditorKit.selectAllAction
          Name of the Action for selecting the entire document
static String sample code for java.lang.String definition code for java.lang.String selectionBackwardAction sample code for javax.swing.text.DefaultEditorKit.selectionBackwardAction definition code for javax.swing.text.DefaultEditorKit.selectionBackwardAction
          Name of the Action for extending the selection by moving the caret logically backward one position.
static String sample code for java.lang.String definition code for java.lang.String selectionBeginAction sample code for javax.swing.text.DefaultEditorKit.selectionBeginAction definition code for javax.swing.text.DefaultEditorKit.selectionBeginAction
          Name of the Action for moving the caret to the beginning of the document.
static String sample code for java.lang.String definition code for java.lang.String selectionBeginLineAction sample code for javax.swing.text.DefaultEditorKit.selectionBeginLineAction definition code for javax.swing.text.DefaultEditorKit.selectionBeginLineAction
          Name of the Action for moving the caret to the beginning of a line, extending the selection.
static String sample code for java.lang.String definition code for java.lang.String selectionBeginParagraphAction sample code for javax.swing.text.DefaultEditorKit.selectionBeginParagraphAction definition code for javax.swing.text.DefaultEditorKit.selectionBeginParagraphAction
          Name of the Action for moving the caret to the beginning of a paragraph, extending the selection.
static String sample code for java.lang.String definition code for java.lang.String selectionBeginWordAction sample code for javax.swing.text.DefaultEditorKit.selectionBeginWordAction definition code for javax.swing.text.DefaultEditorKit.selectionBeginWordAction
          Name of the Action for moving the caret to the beginning of a word, extending the selection.
static String sample code for java.lang.String definition code for java.lang.String selectionDownAction sample code for javax.swing.text.DefaultEditorKit.selectionDownAction definition code for javax.swing.text.DefaultEditorKit.selectionDownAction
          Name of the Action for moving the caret logically downward one position, extending the selection.
static String sample code for java.lang.String definition code for java.lang.String selectionEndAction sample code for javax.swing.text.DefaultEditorKit.selectionEndAction definition code for javax.swing.text.DefaultEditorKit.selectionEndAction
          Name of the Action for moving the caret to the end of the document.
static String sample code for java.lang.String definition code for java.lang.String selectionEndLineAction sample code for javax.swing.text.DefaultEditorKit.selectionEndLineAction definition code for javax.swing.text.DefaultEditorKit.selectionEndLineAction
          Name of the Action for moving the caret to the end of a line, extending the selection.
static String sample code for java.lang.String definition code for java.lang.String selectionEndParagraphAction sample code for javax.swing.text.DefaultEditorKit.selectionEndParagraphAction definition code for javax.swing.text.DefaultEditorKit.selectionEndParagraphAction
          Name of the Action for moving the caret to the end of a paragraph, extending the selection.
static String sample code for java.lang.String definition code for java.lang.String selectionEndWordAction sample code for javax.swing.text.DefaultEditorKit.selectionEndWordAction definition code for javax.swing.text.DefaultEditorKit.selectionEndWordAction
          Name of the Action for moving the caret to the end of a word, extending the selection.
static String sample code for java.lang.String definition code for java.lang.String selectionForwardAction sample code for javax.swing.text.DefaultEditorKit.selectionForwardAction definition code for javax.swing.text.DefaultEditorKit.selectionForwardAction
          Name of the Action for extending the selection by moving the caret logically forward one position.
static String sample code for java.lang.String definition code for java.lang.String selectionNextWordAction sample code for javax.swing.text.DefaultEditorKit.selectionNextWordAction definition code for javax.swing.text.DefaultEditorKit.selectionNextWordAction
          Name of the Action for moving the selection to the beginning of the next word, extending the selection.
static String sample code for java.lang.String definition code for java.lang.String selectionPreviousWordAction sample code for javax.swing.text.DefaultEditorKit.selectionPreviousWordAction definition code for javax.swing.text.DefaultEditorKit.selectionPreviousWordAction
          Name of the Action for moving the selection to the beginning of the previous word, extending the selection.
static String sample code for java.lang.String definition code for java.lang.String selectionUpAction sample code for javax.swing.text.DefaultEditorKit.selectionUpAction definition code for javax.swing.text.DefaultEditorKit.selectionUpAction
          Name of the Action for moving the caret logically upward one position, extending the selection.
static String sample code for java.lang.String definition code for java.lang.String selectLineAction sample code for javax.swing.text.DefaultEditorKit.selectLineAction definition code for javax.swing.text.DefaultEditorKit.selectLineAction
          Name of the Action for selecting a line around the caret.
static String sample code for java.lang.String definition code for java.lang.String selectParagraphAction sample code for javax.swing.text.DefaultEditorKit.selectParagraphAction definition code for javax.swing.text.DefaultEditorKit.selectParagraphAction
          Name of the Action for selecting a paragraph around the caret.
static String sample code for java.lang.String definition code for java.lang.String selectWordAction sample code for javax.swing.text.DefaultEditorKit.selectWordAction definition code for javax.swing.text.DefaultEditorKit.selectWordAction
          Name of the Action for selecting a word around the caret.
static String sample code for java.lang.String definition code for java.lang.String upAction sample code for javax.swing.text.DefaultEditorKit.upAction definition code for javax.swing.text.DefaultEditorKit.upAction
          Name of the Action for moving the caret logically upward one position.
static String sample code for java.lang.String definition code for java.lang.String writableAction sample code for javax.swing.text.DefaultEditorKit.writableAction definition code for javax.swing.text.DefaultEditorKit.writableAction
          Name of the action to set the editor into writeable mode.
 
Constructor Summary
DefaultEditorKit sample code for javax.swing.text.DefaultEditorKit.DefaultEditorKit() definition code for javax.swing.text.DefaultEditorKit.DefaultEditorKit() ()
          default constructor for DefaultEditorKit
 
Method Summary
 Caret sample code for javax.swing.text.Caret definition code for javax.swing.text.Caret createCaret sample code for javax.swing.text.DefaultEditorKit.createCaret() definition code for javax.swing.text.DefaultEditorKit.createCaret() ()
          Fetches a caret that can navigate through views produced by the associated ViewFactory.
 Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document createDefaultDocument sample code for javax.swing.text.DefaultEditorKit.createDefaultDocument() definition code for javax.swing.text.DefaultEditorKit.createDefaultDocument() ()
          Creates an uninitialized text storage model (PlainDocument) that is appropriate for this type of editor.
 Action sample code for javax.swing.Action definition code for javax.swing.Action [] getActions sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() ()
          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 sample code for java.lang.String definition code for java.lang.String getContentType sample code for javax.swing.text.DefaultEditorKit.getContentType() definition code for javax.swing.text.DefaultEditorKit.getContentType() ()
          Gets the MIME type of the data that this kit represents support for.
 ViewFactory sample code for javax.swing.text.ViewFactory definition code for javax.swing.text.ViewFactory getViewFactory sample code for javax.swing.text.DefaultEditorKit.getViewFactory() definition code for javax.swing.text.DefaultEditorKit.getViewFactory() ()
          Fetches a factory that is suitable for producing views of any models that are produced by this kit.
 void read sample code for javax.swing.text.DefaultEditorKit.read(java.io.InputStream, javax.swing.text.Document, int) definition code for javax.swing.text.DefaultEditorKit.read(java.io.InputStream, javax.swing.text.Document, int) (InputStream sample code for java.io.InputStream definition code for java.io.InputStream  in, Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document  doc, int pos)
          Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
 void read sample code for javax.swing.text.DefaultEditorKit.read(java.io.Reader, javax.swing.text.Document, int) definition code for javax.swing.text.DefaultEditorKit.read(java.io.Reader, javax.swing.text.Document, int) (Reader sample code for java.io.Reader definition code for java.io.Reader  in, Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document  doc, int pos)
          Inserts content from the given stream, which will be treated as plain text.
 void write sample code for javax.swing.text.DefaultEditorKit.write(java.io.OutputStream, javax.swing.text.Document, int, int) definition code for javax.swing.text.DefaultEditorKit.write(java.io.OutputStream, javax.swing.text.Document, int, int) (OutputStream sample code for java.io.OutputStream definition code for java.io.OutputStream  out, Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document  doc, int pos, int len)
          Writes content from a document to the given stream in a format appropriate for this kind of content handler.
 void write sample code for javax.swing.text.DefaultEditorKit.write(java.io.Writer, javax.swing.text.Document, int, int) definition code for javax.swing.text.DefaultEditorKit.write(java.io.Writer, javax.swing.text.Document, int, int) (Writer sample code for java.io.Writer definition code for java.io.Writer  out, Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document  doc, int pos, int len)
          Writes content from a document to the given stream as plain text.
 
Methods inherited from class javax.swing.text.EditorKit sample code for javax.swing.text.EditorKit definition code for javax.swing.text.EditorKit
clone sample code for javax.swing.text.EditorKit.clone() definition code for javax.swing.text.EditorKit.clone() , deinstall sample code for javax.swing.text.EditorKit.deinstall(javax.swing.JEditorPane) definition code for javax.swing.text.EditorKit.deinstall(javax.swing.JEditorPane) , install sample code for javax.swing.text.EditorKit.install(javax.swing.JEditorPane) definition code for javax.swing.text.EditorKit.install(javax.swing.JEditorPane)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

EndOfLineStringProperty sample code for javax.swing.text.DefaultEditorKit.EndOfLineStringProperty

public static final String sample code for java.lang.String definition code for java.lang.String  EndOfLineStringProperty
When reading a document if a CRLF is encountered a property with this name is added and the value will be "\r\n".

See Also:
Constant Field Values

insertContentAction sample code for javax.swing.text.DefaultEditorKit.insertContentAction

public static final String sample code for java.lang.String definition code for java.lang.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.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

insertBreakAction sample code for javax.swing.text.DefaultEditorKit.insertBreakAction

public static final String sample code for java.lang.String definition code for java.lang.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.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

insertTabAction sample code for javax.swing.text.DefaultEditorKit.insertTabAction

public static final String sample code for java.lang.String definition code for java.lang.String  insertTabAction
Name of the action to place a tab character into the document. If there is a selection, it is removed before the tab is added.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

deletePrevCharAction sample code for javax.swing.text.DefaultEditorKit.deletePrevCharAction

public static final String sample code for java.lang.String definition code for java.lang.String  deletePrevCharAction
Name of the action to delete the character of content that precedes the current caret position.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

deleteNextCharAction sample code for javax.swing.text.DefaultEditorKit.deleteNextCharAction

public static final String sample code for java.lang.String definition code for java.lang.String  deleteNextCharAction
Name of the action to delete the character of content that follows the current caret position.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

readOnlyAction sample code for javax.swing.text.DefaultEditorKit.readOnlyAction

public static final String sample code for java.lang.String definition code for java.lang.String  readOnlyAction
Name of the action to set the editor into read-only mode.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

writableAction sample code for javax.swing.text.DefaultEditorKit.writableAction

public static final String sample code for java.lang.String definition code for java.lang.String  writableAction
Name of the action to set the editor into writeable mode.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

cutAction sample code for javax.swing.text.DefaultEditorKit.cutAction

public static final String sample code for java.lang.String definition code for java.lang.String  cutAction
Name of the action to cut the selected region and place the contents into the system clipboard.

See Also:
JTextComponent.cut() sample code for javax.swing.text.JTextComponent.cut() definition code for javax.swing.text.JTextComponent.cut() , getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

copyAction sample code for javax.swing.text.DefaultEditorKit.copyAction

public static final String sample code for java.lang.String definition code for java.lang.String  copyAction
Name of the action to copy the selected region and place the contents into the system clipboard.

See Also:
JTextComponent.copy() sample code for javax.swing.text.JTextComponent.copy() definition code for javax.swing.text.JTextComponent.copy() , getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

pasteAction sample code for javax.swing.text.DefaultEditorKit.pasteAction

public static final String sample code for java.lang.String definition code for java.lang.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:
JTextComponent.paste() sample code for javax.swing.text.JTextComponent.paste() definition code for javax.swing.text.JTextComponent.paste() , getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

beepAction sample code for javax.swing.text.DefaultEditorKit.beepAction

public static final String sample code for java.lang.String definition code for java.lang.String  beepAction
Name of the action to create a beep.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

pageUpAction sample code for javax.swing.text.DefaultEditorKit.pageUpAction

public static final String sample code for java.lang.String definition code for java.lang.String  pageUpAction
Name of the action to page up vertically.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

pageDownAction sample code for javax.swing.text.DefaultEditorKit.pageDownAction

public static final String sample code for java.lang.String definition code for java.lang.String  pageDownAction
Name of the action to page down vertically.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

forwardAction sample code for javax.swing.text.DefaultEditorKit.forwardAction

public static final String sample code for java.lang.String definition code for java.lang.String  forwardAction
Name of the Action for moving the caret logically forward one position.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

backwardAction sample code for javax.swing.text.DefaultEditorKit.backwardAction

public static final String sample code for java.lang.String definition code for java.lang.String  backwardAction
Name of the Action for moving the caret logically backward one position.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectionForwardAction sample code for javax.swing.text.DefaultEditorKit.selectionForwardAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectionForwardAction
Name of the Action for extending the selection by moving the caret logically forward one position.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectionBackwardAction sample code for javax.swing.text.DefaultEditorKit.selectionBackwardAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectionBackwardAction
Name of the Action for extending the selection by moving the caret logically backward one position.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

upAction sample code for javax.swing.text.DefaultEditorKit.upAction

public static final String sample code for java.lang.String definition code for java.lang.String  upAction
Name of the Action for moving the caret logically upward one position.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

downAction sample code for javax.swing.text.DefaultEditorKit.downAction

public static final String sample code for java.lang.String definition code for java.lang.String  downAction
Name of the Action for moving the caret logically downward one position.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectionUpAction sample code for javax.swing.text.DefaultEditorKit.selectionUpAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectionUpAction
Name of the Action for moving the caret logically upward one position, extending the selection.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectionDownAction sample code for javax.swing.text.DefaultEditorKit.selectionDownAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectionDownAction
Name of the Action for moving the caret logically downward one position, extending the selection.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

beginWordAction sample code for javax.swing.text.DefaultEditorKit.beginWordAction

public static final String sample code for java.lang.String definition code for java.lang.String  beginWordAction
Name of the Action for moving the caret to the beginning of a word.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

endWordAction sample code for javax.swing.text.DefaultEditorKit.endWordAction

public static final String sample code for java.lang.String definition code for java.lang.String  endWordAction
Name of the Action for moving the caret to the end of a word.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectionBeginWordAction sample code for javax.swing.text.DefaultEditorKit.selectionBeginWordAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectionBeginWordAction
Name of the Action for moving the caret to the beginning of a word, extending the selection.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectionEndWordAction sample code for javax.swing.text.DefaultEditorKit.selectionEndWordAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectionEndWordAction
Name of the Action for moving the caret to the end of a word, extending the selection.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

previousWordAction sample code for javax.swing.text.DefaultEditorKit.previousWordAction

public static final String sample code for java.lang.String definition code for java.lang.String  previousWordAction
Name of the Action for moving the caret to the beginning of the previous word.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

nextWordAction sample code for javax.swing.text.DefaultEditorKit.nextWordAction

public static final String sample code for java.lang.String definition code for java.lang.String  nextWordAction
Name of the Action for moving the caret to the beginning of the next word.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectionPreviousWordAction sample code for javax.swing.text.DefaultEditorKit.selectionPreviousWordAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectionPreviousWordAction
Name of the Action for moving the selection to the beginning of the previous word, extending the selection.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectionNextWordAction sample code for javax.swing.text.DefaultEditorKit.selectionNextWordAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectionNextWordAction
Name of the Action for moving the selection to the beginning of the next word, extending the selection.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

beginLineAction sample code for javax.swing.text.DefaultEditorKit.beginLineAction

public static final String sample code for java.lang.String definition code for java.lang.String  beginLineAction
Name of the Action for moving the caret to the beginning of a line.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

endLineAction sample code for javax.swing.text.DefaultEditorKit.endLineAction

public static final String sample code for java.lang.String definition code for java.lang.String  endLineAction
Name of the Action for moving the caret to the end of a line.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectionBeginLineAction sample code for javax.swing.text.DefaultEditorKit.selectionBeginLineAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectionBeginLineAction
Name of the Action for moving the caret to the beginning of a line, extending the selection.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectionEndLineAction sample code for javax.swing.text.DefaultEditorKit.selectionEndLineAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectionEndLineAction
Name of the Action for moving the caret to the end of a line, extending the selection.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

beginParagraphAction sample code for javax.swing.text.DefaultEditorKit.beginParagraphAction

public static final String sample code for java.lang.String definition code for java.lang.String  beginParagraphAction
Name of the Action for moving the caret to the beginning of a paragraph.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

endParagraphAction sample code for javax.swing.text.DefaultEditorKit.endParagraphAction

public static final String sample code for java.lang.String definition code for java.lang.String  endParagraphAction
Name of the Action for moving the caret to the end of a paragraph.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectionBeginParagraphAction sample code for javax.swing.text.DefaultEditorKit.selectionBeginParagraphAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectionBeginParagraphAction
Name of the Action for moving the caret to the beginning of a paragraph, extending the selection.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectionEndParagraphAction sample code for javax.swing.text.DefaultEditorKit.selectionEndParagraphAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectionEndParagraphAction
Name of the Action for moving the caret to the end of a paragraph, extending the selection.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

beginAction sample code for javax.swing.text.DefaultEditorKit.beginAction

public static final String sample code for java.lang.String definition code for java.lang.String  beginAction
Name of the Action for moving the caret to the beginning of the document.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

endAction sample code for javax.swing.text.DefaultEditorKit.endAction

public static final String sample code for java.lang.String definition code for java.lang.String  endAction
Name of the Action for moving the caret to the end of the document.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectionBeginAction sample code for javax.swing.text.DefaultEditorKit.selectionBeginAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectionBeginAction
Name of the Action for moving the caret to the beginning of the document.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectionEndAction sample code for javax.swing.text.DefaultEditorKit.selectionEndAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectionEndAction
Name of the Action for moving the caret to the end of the document.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectWordAction sample code for javax.swing.text.DefaultEditorKit.selectWordAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectWordAction
Name of the Action for selecting a word around the caret.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectLineAction sample code for javax.swing.text.DefaultEditorKit.selectLineAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectLineAction
Name of the Action for selecting a line around the caret.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectParagraphAction sample code for javax.swing.text.DefaultEditorKit.selectParagraphAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectParagraphAction
Name of the Action for selecting a paragraph around the caret.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

selectAllAction sample code for javax.swing.text.DefaultEditorKit.selectAllAction

public static final String sample code for java.lang.String definition code for java.lang.String  selectAllAction
Name of the Action for selecting the entire document

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values

defaultKeyTypedAction sample code for javax.swing.text.DefaultEditorKit.defaultKeyTypedAction

public static final String sample code for java.lang.String definition code for java.lang.String  defaultKeyTypedAction
Name of the action that is executed by default if a key typed event is received and there is no keymap entry.

See Also:
getActions() sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions() , Constant Field Values
Constructor Detail

DefaultEditorKit sample code for javax.swing.text.DefaultEditorKit() definition code for javax.swing.text.DefaultEditorKit()

public DefaultEditorKit()
default constructor for DefaultEditorKit

Method Detail

getContentType sample code for javax.swing.text.DefaultEditorKit.getContentType() definition code for javax.swing.text.DefaultEditorKit.getContentType()

public String sample code for java.lang.String definition code for java.lang.String  getContentType()
Gets the MIME type of the data that this kit represents support for. The default is text/plain.

Specified by:
getContentType sample code for javax.swing.text.EditorKit.getContentType() definition code for javax.swing.text.EditorKit.getContentType() in class EditorKit sample code for javax.swing.text.EditorKit definition code for javax.swing.text.EditorKit
Returns:
the type

getViewFactory sample code for javax.swing.text.DefaultEditorKit.getViewFactory() definition code for javax.swing.text.DefaultEditorKit.getViewFactory()

public ViewFactory sample code for javax.swing.text.ViewFactory definition code for javax.swing.text.ViewFactory  getViewFactory()
Fetches 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.

Specified by:
getViewFactory sample code for javax.swing.text.EditorKit.getViewFactory() definition code for javax.swing.text.EditorKit.getViewFactory() in class EditorKit sample code for javax.swing.text.EditorKit definition code for javax.swing.text.EditorKit
Returns:
the view factory

getActions sample code for javax.swing.text.DefaultEditorKit.getActions() definition code for javax.swing.text.DefaultEditorKit.getActions()

public Action sample code for javax.swing.Action definition code for javax.swing.Action [] getActions()
Fetches the set of commands that can be used on a text component that is using a model and view produced by this kit.

Specified by:
getActions sample code for javax.swing.text.EditorKit.getActions() definition code for javax.swing.text.EditorKit.getActions() in class EditorKit sample code for javax.swing.text.EditorKit definition code for javax.swing.text.EditorKit
Returns:
the command list

createCaret sample code for javax.swing.text.DefaultEditorKit.createCaret() definition code for javax.swing.text.DefaultEditorKit.createCaret()

public Caret sample code for javax.swing.text.Caret definition code for javax.swing.text.Caret  createCaret()
Fetches a caret that can navigate through views produced by the associated ViewFactory.

Specified by:
createCaret sample code for javax.swing.text.EditorKit.createCaret() definition code for javax.swing.text.EditorKit.createCaret() in class EditorKit sample code for javax.swing.text.EditorKit definition code for javax.swing.text.EditorKit
Returns:
the caret

createDefaultDocument sample code for javax.swing.text.DefaultEditorKit.createDefaultDocument() definition code for javax.swing.text.DefaultEditorKit.createDefaultDocument()

public Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document  createDefaultDocument()
Creates an uninitialized text storage model (PlainDocument) that is appropriate for this type of editor.

Specified by:
createDefaultDocument sample code for javax.swing.text.EditorKit.createDefaultDocument() definition code for javax.swing.text.EditorKit.createDefaultDocument() in class EditorKit sample code for javax.swing.text.EditorKit definition code for javax.swing.text.EditorKit
Returns:
the model

read sample code for javax.swing.text.DefaultEditorKit.read(java.io.InputStream, javax.swing.text.Document, int) definition code for javax.swing.text.DefaultEditorKit.read(java.io.InputStream, javax.swing.text.Document, int)

public void read(InputStream sample code for java.io.InputStream definition code for java.io.InputStream  in,
                 Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document  doc,
                 int pos)
          throws IOException sample code for java.io.IOException definition code for java.io.IOException ,
                 BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException 
Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.

Specified by:
read sample code for javax.swing.text.EditorKit.read(java.io.InputStream, javax.swing.text.Document, int) definition code for javax.swing.text.EditorKit.read(java.io.InputStream, javax.swing.text.Document, int) in class EditorKit sample code for javax.swing.text.EditorKit definition code for javax.swing.text.EditorKit
Parameters:
in - The stream to read from
doc - The destination for the insertion.
pos - The location in the document to place the content >= 0.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error
BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException - if pos represents an invalid location within the document.

write sample code for javax.swing.text.DefaultEditorKit.write(java.io.OutputStream, javax.swing.text.Document, int, int) definition code for javax.swing.text.DefaultEditorKit.write(java.io.OutputStream, javax.swing.text.Document, int, int)

public void write(OutputStream sample code for java.io.OutputStream definition code for java.io.OutputStream  out,
                  Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document  doc,
                  int pos,
                  int len)
           throws IOException sample code for java.io.IOException definition code for java.io.IOException ,
                  BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException 
Writes content from a document to the given stream in a format appropriate for this kind of content handler.

Specified by:
write sample code for javax.swing.text.EditorKit.write(java.io.OutputStream, javax.swing.text.Document, int, int) definition code for javax.swing.text.EditorKit.write(java.io.OutputStream, javax.swing.text.Document, int, int) in class EditorKit sample code for javax.swing.text.EditorKit definition code for javax.swing.text.EditorKit
Parameters:
out - The stream to write to
doc - The source for the write.
pos - The location in the document to fetch the content >= 0.
len - The amount to write out >= 0.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error
BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException - if pos represents an invalid location within the document.

read sample code for javax.swing.text.DefaultEditorKit.read(java.io.Reader, javax.swing.text.Document, int) definition code for javax.swing.text.DefaultEditorKit.read(java.io.Reader, javax.swing.text.Document, int)

public void read(Reader sample code for java.io.Reader definition code for java.io.Reader  in,
                 Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document  doc,
                 int pos)
          throws IOException sample code for java.io.IOException definition code for java.io.IOException ,
                 BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException 
Inserts content from the given stream, which will be treated as plain text.

Specified by:
read sample code for javax.swing.text.EditorKit.read(java.io.Reader, javax.swing.text.Document, int) definition code for javax.swing.text.EditorKit.read(java.io.Reader, javax.swing.text.Document, int) in class EditorKit sample code for javax.swing.text.EditorKit definition code for javax.swing.text.EditorKit
Parameters:
in - The stream to read from
doc - The destination for the insertion.
pos - The location in the document to place the content >= 0.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error
BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException - if pos represents an invalid location within the document.

write sample code for javax.swing.text.DefaultEditorKit.write(java.io.Writer, javax.swing.text.Document, int, int) definition code for javax.swing.text.DefaultEditorKit.write(java.io.Writer, javax.swing.text.Document, int, int)

public void write(Writer sample code for java.io.Writer definition code for java.io.Writer  out,
                  Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document  doc,
                  int pos,
                  int len)
           throws IOException sample code for java.io.IOException definition code for java.io.IOException ,
                  BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException 
Writes content from a document to the given stream as plain text.

Specified by:
write sample code for javax.swing.text.EditorKit.write(java.io.Writer, javax.swing.text.Document, int, int) definition code for javax.swing.text.EditorKit.write(java.io.Writer, javax.swing.text.Document, int, int) in class EditorKit sample code for javax.swing.text.EditorKit definition code for javax.swing.text.EditorKit
Parameters:
out - The stream to write to
doc - The source for the write.
pos - The location in the document to fetch the content from >= 0.
len - The amount to write out >= 0.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error
BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException - if pos is not within 0 and the length of the document.