lapis.swing
Class PlainEditorKit

java.lang.Object
  extended byjavax.swing.text.EditorKit
      extended byjavax.swing.text.DefaultEditorKit
          extended bylapis.swing.PlainEditorKit
All Implemented Interfaces:
Cloneable, Serializable

public class PlainEditorKit
extends DefaultEditorKit

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.text.DefaultEditorKit
DefaultEditorKit.BeepAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.PasteAction
 
Field Summary
static Debug debug
           
 
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
PlainEditorKit()
           
 
Method Summary
 Object clone()
          Clone the editor kit.
 Document createDefaultDocument()
          Creates an uninitialized text storage model that is appropriate for this type of editor.
 Action[] getActions()
           
 ViewFactory getViewFactory()
          Fetches a factory that is suitable for producing views of any models that are produced by this kit.
 void install(JEditorPane c)
           
 void read(Reader in, Document doc, int pos)
          Inserts content from the given stream, which will be treated as plain text.
 
Methods inherited from class javax.swing.text.DefaultEditorKit
createCaret, getContentType, read, write, write
 
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

debug

public static Debug debug
Constructor Detail

PlainEditorKit

public PlainEditorKit()
Method Detail

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 from
doc - 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.