|
JavaTM 2 Platform Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.text.EditorKit | +--javax.swing.text.DefaultEditorKit
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.
Inner Class Summary | |
static class |
DefaultEditorKit.BeepAction
Creates a beep. |
static class |
DefaultEditorKit.CopyAction
Coies the selected region and place its contents into the system clipboard. |
static class |
DefaultEditorKit.CutAction
Cuts the selected region and place its contents into the system clipboard. |
static class |
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
Places a line/paragraph break into the document. |
static class |
DefaultEditorKit.InsertContentAction
Places content into the associated document. |
static class |
DefaultEditorKit.InsertTabAction
Places a tab character into the document. |
static class |
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 |
backwardAction
Name of the Action for moving the caret logically backward one position. |
static String |
beepAction
Name of the action to create a beep. |
static String |
beginAction
Name of the Action for moving the caret to the begining of the document. |
static String |
beginLineAction
Name of the Action for moving the caret to the begining of a line. |
static String |
beginParagraphAction
Name of the Action for moving the caret to the begining of a paragraph. |
static String |
beginWordAction
Name of the Action for moving the caret to the begining of a word. |
static String |
copyAction
Name of the action to copy the selected region and place the contents into the system clipboard. |
static String |
cutAction
Name of the action to cut the selected region and place the contents into the system clipboard. |
static String |
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 |
deleteNextCharAction
Name of the action to delete the character of content that follows the current caret position. |
static String |
deletePrevCharAction
Name of the action to delete the character of content that precedes the current caret position. |
static String |
downAction
Name of the Action for moving the caret logically downward one position. |
static String |
endAction
Name of the Action for moving the caret to the end of the document. |
static String |
endLineAction
Name of the Action for moving the caret to the end of a line. |
static 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". |
static String |
endParagraphAction
Name of the Action for moving the caret to the end of a paragraph. |
static String |
endWordAction
Name of the Action for moving the caret to the end of a word. |
static String |
forwardAction
Name of the Action for moving the caret logically forward one position. |
static String |
insertBreakAction
Name of the action to place a line/paragraph break into the document. |
static String |
insertContentAction
Name of the action to place content into the associated document. |
static String |
insertTabAction
Name of the action to place a tab character into the document. |
static String |
nextWordAction
Name of the Action for moving the caret to the begining of the next word. |
static String |
pageDownAction
Name of the action to page down vertically. |
static String |
pageUpAction
Name of the action to page up vertically. |
static 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. |
static String |
previousWordAction
Name of the Action for moving the caret to the begining of the previous word. |
static String |
readOnlyAction
Name of the action to set the editor into read-only mode. |
static String |
selectAllAction
Name of the Action for selecting the entire document |
static String |
selectionBackwardAction
Name of the Action for extending the selection by moving the caret logically backward one position. |
static String |
selectionBeginAction
Name of the Action for moving the caret to the begining of the document. |
static String |
selectionBeginLineAction
Name of the Action for moving the caret to the begining of a line, extending the selection. |
static String |
selectionBeginParagraphAction
Name of the Action for moving the caret to the begining of a paragraph, extending the selection. |
static String |
selectionBeginWordAction
Name of the Action for moving the caret to the begining of a word, extending the selection. |
static String |
selectionDownAction
Name of the Action for moving the caret logically downward one position, extending the selection. |
static String |
selectionEndAction
Name of the Action for moving the caret to the end of the document. |
static String |
selectionEndLineAction
Name of the Action for moving the caret to the end of a line, extending the selection. |
static String |
selectionEndParagraphAction
Name of the Action for moving the caret to the end of a paragraph, extending the selection. |
static String |
selectionEndWordAction
Name of the Action for moving the caret to the end of a word, extending the selection. |
static String |
selectionForwardAction
Name of the Action for extending the selection by moving the caret logically forward one position. |
static String |
selectionNextWordAction
Name of the Action for moving the selection to the begining of the next word, extending the selection. |
static String |
selectionPreviousWordAction
Name of the Action for moving the selection to the begining of the previous word, extending the selection. |
static String |
selectionUpAction
Name of the Action for moving the caret logically upward one position, extending the selection. |
static String |
selectLineAction
Name of the Action for selecting a line around the caret. |
static String |
selectParagraphAction
Name of the Action for selecting a paragraph around the caret. |
static String |
selectWordAction
Name of the Action for selecting a word around the caret. |
static String |
upAction
Name of the Action for moving the caret logically upward one position. |
static String |
writableAction
Name of the action to set the editor into writeable mode. |
Constructor Summary | |
DefaultEditorKit()
|
Method Summary | |
Object |
clone()
Creates a copy of the editor kit. |
Caret |
createCaret()
Fetches a caret that can navigate through views produced by the associated ViewFactory. |
Document |
createDefaultDocument()
Creates an uninitialized text storage model (PlainDocument) that is appropriate for this type of editor. |
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. |
String |
getContentType()
Gets the MIME type of the data that this kit represents support for. |
ViewFactory |
getViewFactory()
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)
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)
Inserts content from the given stream, which will be treated as plain text. |
void |
write(OutputStream out,
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(Writer out,
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 |
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
DefaultEditorKit.InsertContentAction
,
getActions()
public static final String insertBreakAction
DefaultEditorKit.InsertBreakAction
,
getActions()
public static final String insertTabAction
DefaultEditorKit.InsertTabAction
,
getActions()
public static final String deletePrevCharAction
DeletePrevCharAction
,
getActions()
public static final String deleteNextCharAction
DeleteNextCharAction
,
getActions()
public static final String readOnlyAction
ReadOnlyAction
,
getActions()
public static final String writableAction
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
DefaultEditorKit.BeepAction
,
getActions()
public static final String pageUpAction
PageUpAction
,
getActions()
public static final String pageDownAction
PageDownAction
,
getActions()
public static final String forwardAction
ForwardAction
,
getActions()
public static final String backwardAction
BackwardAction
,
getActions()
public static final String selectionForwardAction
SelectionForwardAction
,
getActions()
public static final String selectionBackwardAction
SelectionBackwardAction
,
getActions()
public static final String upAction
UpAction
,
getActions()
public static final String downAction
DownAction
,
getActions()
public static final String selectionUpAction
UpAction
,
getActions()
public static final String selectionDownAction
DownAction
,
getActions()
public static final String beginWordAction
BeginAction
,
getActions()
public static final String endWordAction
EndAction
,
getActions()
public static final String selectionBeginWordAction
BeginWordAction
,
getActions()
public static final String selectionEndWordAction
EndWordAction
,
getActions()
public static final String previousWordAction
PreviousWordAction
,
getActions()
public static final String nextWordAction
NextWordAction
,
getActions()
public static final String selectionPreviousWordAction
PreviousWordAction
,
getActions()
public static final String selectionNextWordAction
NextWordAction
,
getActions()
public static final String beginLineAction
BeginAction
,
getActions()
public static final String endLineAction
EndAction
,
getActions()
public static final String selectionBeginLineAction
BeginLineAction
,
getActions()
public static final String selectionEndLineAction
EndLineAction
,
getActions()
public static final String beginParagraphAction
BeginAction
,
getActions()
public static final String endParagraphAction
EndAction
,
getActions()
public static final String selectionBeginParagraphAction
BeginParagraphAction
,
getActions()
public static final String selectionEndParagraphAction
EndParagraphAction
,
getActions()
public static final String beginAction
BeginAction
,
getActions()
public static final String endAction
EndAction
,
getActions()
public static final String selectionBeginAction
BeginAction
,
getActions()
public static final String selectionEndAction
EndAction
,
getActions()
public static final String selectWordAction
SelectWordAction
,
getActions()
public static final String selectLineAction
SelectLineAction
,
getActions()
public static final String selectParagraphAction
SelectParagraphAction
,
getActions()
public static final String selectAllAction
SelectAllAction
,
getActions()
public static final String defaultKeyTypedAction
DefaultEditorKit.DefaultKeyTypedAction
,
getActions()
Constructor Detail |
public DefaultEditorKit()
Method Detail |
public String getContentType()
text/plain
.public Object clone()
public ViewFactory getViewFactory()
public Action[] getActions()
public Caret createCaret()
public Document createDefaultDocument()
public void read(InputStream in, Document doc, int pos) throws IOException, BadLocationException
in
- The stream to read fromdoc
- The destination for the insertion.pos
- The location in the document to place the
content >= 0.public void write(OutputStream out, Document doc, int pos, int len) throws IOException, BadLocationException
out
- 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.public void read(Reader in, Document doc, int pos) throws IOException, BadLocationException
in
- The stream to read fromdoc
- The destination for the insertion.pos
- The location in the document to place the
content >= 0.public void write(Writer out, Document doc, int pos, int len) throws IOException, BadLocationException
out
- 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.
|
JavaTM 2 Platform Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |