|
|||||||||
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 | +--com.borland.primetime.editor.TextEditorKit
This is the base editor kit that the PrimeTime text editor is going to use. It defines which view and document types will be used, and also controls how to read and write to a document.
In addition, a TextEditorKit defines a StyleMap and Scanner implementation to be used when this editor kit is in effect.
Note that we do not use any of the Action objects defined in the superclass, DefaultEditorKit, because they do not do targetting properly. Instead, we use the Actions from BaseEditorActions and EditorActions.
BaseEditorActions
,
EditorActions
,
DefaultEditorKit
, Serialized FormInner classes inherited from class javax.swing.text.DefaultEditorKit |
javax.swing.text.DefaultEditorKit.BeepAction,
javax.swing.text.DefaultEditorKit.CopyAction,
javax.swing.text.DefaultEditorKit.CutAction,
javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction,
javax.swing.text.DefaultEditorKit.InsertBreakAction,
javax.swing.text.DefaultEditorKit.InsertContentAction,
javax.swing.text.DefaultEditorKit.InsertTabAction,
javax.swing.text.DefaultEditorKit.PasteAction |
Field Summary | |
static 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". |
protected java.util.Map |
registeredKeymaps
|
protected BasicStyleMap |
styleMap
|
Fields inherited from class javax.swing.text.DefaultEditorKit |
backwardAction,
beepAction,
beginAction,
beginLineAction,
beginParagraphAction,
beginWordAction,
copyAction,
cutAction,
defaultKeyTypedAction,
deleteNextCharAction,
deletePrevCharAction,
downAction,
endAction,
endLineAction,
EndOfLineStringProperty,
endParagraphAction,
endWordAction,
forwardAction,
insertBreakAction,
insertContentAction,
insertTabAction,
nextWordAction,
pageDownAction,
pageUpAction,
pasteAction,
previousWordAction,
readOnlyAction,
selectAllAction,
selectionBackwardAction,
selectionBeginAction,
selectionBeginLineAction,
selectionBeginParagraphAction,
selectionBeginWordAction,
selectionDownAction,
selectionEndAction,
selectionEndLineAction,
selectionEndParagraphAction,
selectionEndWordAction,
selectionForwardAction,
selectionNextWordAction,
selectionPreviousWordAction,
selectionUpAction,
selectLineAction,
selectParagraphAction,
selectWordAction,
upAction,
writableAction |
Constructor Summary | |
TextEditorKit()
|
Method Summary | |
java.lang.Object |
clone()
Create a copy of the editor kit. |
javax.swing.text.Caret |
createCaret()
Fetches a caret that can navigate through views produced by the associated ViewFactory. |
javax.swing.text.Document |
createDefaultDocument()
Creates an uninitialized text storage model that is appropriate for this type of editor. |
Scanner |
createScanner()
Create an instance of the appropriate Scanner class to use with this kit. |
javax.swing.Action[] |
getActions()
|
java.lang.String |
getContentType()
Get the MIME type of the data that this kit represents support for. |
javax.swing.text.Keymap |
getKeymap(java.lang.String keymapName)
Retrieve a keymap by name. |
BasicStyleMap |
getStyleMap()
Return the StyleMap to use when rendering Documents created with this kit. |
javax.swing.text.ViewFactory |
getViewFactory()
Fetches a factory that is suitable for producing views of any models that are produced by this kit. |
static void |
initOpenTool(byte majorVersion,
byte minorVersion)
|
void |
install(javax.swing.JEditorPane c)
Called when the kit is being installed into a JEditorPane. |
void |
read(java.io.InputStream in,
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(java.io.Reader in,
javax.swing.text.Document doc,
int pos)
Inserts content from the given stream, which will be treated as plain text. |
void |
registerKeymap(javax.swing.text.Keymap keymap)
Register a keymap. |
void |
write(java.io.OutputStream out,
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(java.io.Writer out,
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 |
deinstall |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.util.Map registeredKeymaps
protected BasicStyleMap styleMap
public static final java.lang.String EndOfLineStringProperty
Constructor Detail |
public TextEditorKit()
Method Detail |
public static void initOpenTool(byte majorVersion, byte minorVersion)
public Scanner createScanner()
Note that the default implementation returns a static instance of the NullScanner, which is OK since the NullScanner does nothing. Subclasses that have actual scanners should create a new instance here.
public BasicStyleMap getStyleMap()
public void registerKeymap(javax.swing.text.Keymap keymap)
kit
- The TextEditorKit to register.#getEditorKit
public javax.swing.text.Keymap getKeymap(java.lang.String keymapName)
keymapName
- The name of the Keymap being retrieved.registerKeymap(javax.swing.text.Keymap)
public void install(javax.swing.JEditorPane c)
c
- the JEditorPanepublic java.lang.String getContentType()
text/java
.public java.lang.Object clone()
public javax.swing.text.Document createDefaultDocument()
The PrimeTime EditorKit classes always return an instance of EditorDocument.
public final javax.swing.text.ViewFactory getViewFactory()
The PrimeTime EditorKit classes always return a ViewFactory that creates a EditorView.
public javax.swing.text.Caret createCaret()
public void read(java.io.InputStream in, javax.swing.text.Document doc, int pos) throws java.io.IOException, javax.swing.text.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(java.io.OutputStream out, javax.swing.text.Document doc, int pos, int len) throws java.io.IOException, javax.swing.text.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(java.io.Reader in, javax.swing.text.Document doc, int pos) throws java.io.IOException, javax.swing.text.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(java.io.Writer out, javax.swing.text.Document doc, int pos, int len) throws java.io.IOException, javax.swing.text.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.public javax.swing.Action[] getActions()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |