lapis.swing
Class PlainEditorKit
java.lang.Object
javax.swing.text.EditorKit
javax.swing.text.DefaultEditorKit
lapis.swing.PlainEditorKit
- All Implemented Interfaces:
- Cloneable, Serializable
- public class PlainEditorKit
- extends DefaultEditorKit
- See Also:
- Serialized Form
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 |
debug
public static Debug debug
PlainEditorKit
public PlainEditorKit()
getActions
public Action[] getActions()
createDefaultDocument
public Document createDefaultDocument()
- Creates an uninitialized text storage model
that is appropriate for this type of editor.
- Returns:
- the model
clone
public Object clone()
- Clone the editor kit. Must always implement this method,
because Swing 1.1's DefaultEditorKit.clone() uses new to
create the cloned editor kit, rather than calling Object.clone()
getViewFactory
public 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.
- Returns:
- the view factory
install
public void install(JEditorPane c)
read
public void read(Reader in,
Document doc,
int pos)
throws IOException,
BadLocationException
- Inserts content from the given stream, which will be
treated as plain text.
- Parameters:
in
- The stream to read fromdoc
- The destination for the insertion.pos
- The location in the document to place the
content >= 0.
- Throws:
IOException
- on any I/O error
BadLocationException
- if pos represents an invalid
location within the document.