com.swabunga.spell.swing.autospell
Class AutoSpellEditorKit

java.lang.Object
  extended by javax.swing.text.EditorKit
      extended by javax.swing.text.DefaultEditorKit
          extended by javax.swing.text.StyledEditorKit
              extended by com.swabunga.spell.swing.autospell.AutoSpellEditorKit
All Implemented Interfaces:
AutoSpellConstants, java.io.Serializable, java.lang.Cloneable

public class AutoSpellEditorKit
extends javax.swing.text.StyledEditorKit
implements AutoSpellConstants

This editorkit just forwards all method calls to the original EditorKit for all method but getAction where it also adds a "MarkAsMisspelled" action and getViewFactory where we return our own ViewFactory (Based on the original).

Author:
Robert Gustavsson (robert@lindesign.se)
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.text.StyledEditorKit
javax.swing.text.StyledEditorKit.AlignmentAction, javax.swing.text.StyledEditorKit.BoldAction, javax.swing.text.StyledEditorKit.FontFamilyAction, javax.swing.text.StyledEditorKit.FontSizeAction, javax.swing.text.StyledEditorKit.ForegroundAction, javax.swing.text.StyledEditorKit.ItalicAction, javax.swing.text.StyledEditorKit.StyledTextAction, javax.swing.text.StyledEditorKit.UnderlineAction
 
Nested classes/interfaces 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
 
Fields inherited from class javax.swing.text.DefaultEditorKit
backwardAction, beepAction, beginAction, beginLineAction, beginParagraphAction, beginWordAction, copyAction, cutAction, defaultKeyTypedAction, deleteNextCharAction, deleteNextWordAction, deletePrevCharAction, deletePrevWordAction, 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
 
Fields inherited from interface com.swabunga.spell.swing.autospell.AutoSpellConstants
wordMisspelled, wordMisspelledTrue
 
Constructor Summary
AutoSpellEditorKit(javax.swing.text.StyledEditorKit editorKit)
           
 
Method Summary
 java.lang.Object clone()
           
 javax.swing.text.Caret createCaret()
           
 javax.swing.text.Document createDefaultDocument()
           
 void deinstall(javax.swing.JEditorPane c)
           
 javax.swing.Action[] getActions()
           
 javax.swing.text.Element getCharacterAttributeRun()
           
 java.lang.String getContentType()
           
 javax.swing.text.MutableAttributeSet getInputAttributes()
           
 javax.swing.text.StyledEditorKit getStyledEditorKit()
           
 javax.swing.text.ViewFactory getViewFactory()
           
 void install(javax.swing.JEditorPane c)
           
 void read(java.io.InputStream in, javax.swing.text.Document doc, int pos)
           
 void read(java.io.Reader in, javax.swing.text.Document doc, int pos)
           
 void write(java.io.OutputStream out, javax.swing.text.Document doc, int pos, int len)
           
 void write(java.io.Writer out, javax.swing.text.Document doc, int pos, int len)
           
 
Methods inherited from class javax.swing.text.StyledEditorKit
createInputAttributes
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoSpellEditorKit

public AutoSpellEditorKit(javax.swing.text.StyledEditorKit editorKit)
Method Detail

getStyledEditorKit

public javax.swing.text.StyledEditorKit getStyledEditorKit()

clone

public java.lang.Object clone()
Overrides:
clone in class javax.swing.text.StyledEditorKit

deinstall

public void deinstall(javax.swing.JEditorPane c)
Overrides:
deinstall in class javax.swing.text.StyledEditorKit

getCharacterAttributeRun

public javax.swing.text.Element getCharacterAttributeRun()
Overrides:
getCharacterAttributeRun in class javax.swing.text.StyledEditorKit

getInputAttributes

public javax.swing.text.MutableAttributeSet getInputAttributes()
Overrides:
getInputAttributes in class javax.swing.text.StyledEditorKit

install

public void install(javax.swing.JEditorPane c)
Overrides:
install in class javax.swing.text.StyledEditorKit

getContentType

public java.lang.String getContentType()
Overrides:
getContentType in class javax.swing.text.DefaultEditorKit

getActions

public javax.swing.Action[] getActions()
Overrides:
getActions in class javax.swing.text.StyledEditorKit

createCaret

public javax.swing.text.Caret createCaret()
Overrides:
createCaret in class javax.swing.text.DefaultEditorKit

createDefaultDocument

public javax.swing.text.Document createDefaultDocument()
Overrides:
createDefaultDocument in class javax.swing.text.StyledEditorKit

getViewFactory

public javax.swing.text.ViewFactory getViewFactory()
Overrides:
getViewFactory in class javax.swing.text.StyledEditorKit

read

public void read(java.io.InputStream in,
                 javax.swing.text.Document doc,
                 int pos)
          throws java.io.IOException,
                 javax.swing.text.BadLocationException
Overrides:
read in class javax.swing.text.DefaultEditorKit
Throws:
java.io.IOException
javax.swing.text.BadLocationException

write

public void write(java.io.OutputStream out,
                  javax.swing.text.Document doc,
                  int pos,
                  int len)
           throws java.io.IOException,
                  javax.swing.text.BadLocationException
Overrides:
write in class javax.swing.text.DefaultEditorKit
Throws:
java.io.IOException
javax.swing.text.BadLocationException

read

public void read(java.io.Reader in,
                 javax.swing.text.Document doc,
                 int pos)
          throws java.io.IOException,
                 javax.swing.text.BadLocationException
Overrides:
read in class javax.swing.text.DefaultEditorKit
Throws:
java.io.IOException
javax.swing.text.BadLocationException

write

public void write(java.io.Writer out,
                  javax.swing.text.Document doc,
                  int pos,
                  int len)
           throws java.io.IOException,
                  javax.swing.text.BadLocationException
Overrides:
write in class javax.swing.text.DefaultEditorKit
Throws:
java.io.IOException
javax.swing.text.BadLocationException