sferyx.administration.renderers
Class CustomHTMLEditorKit

java.lang.Object
  extended by javax.swing.text.EditorKit
      extended by javax.swing.text.DefaultEditorKit
          extended by javax.swing.text.StyledEditorKit
              extended by javax.swing.text.html.HTMLEditorKit
                  extended by sferyx.administration.renderers.CustomHTMLEditorKit
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.accessibility.Accessible

public class CustomHTMLEditorKit
extends javax.swing.text.html.HTMLEditorKit

CustomHTMLEditorKit is used in order to deliver CustomHTMLFactory for personalized handling of the elements inside the editor.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.text.html.HTMLEditorKit
javax.swing.text.html.HTMLEditorKit.HTMLFactory, javax.swing.text.html.HTMLEditorKit.HTMLTextAction, javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction, javax.swing.text.html.HTMLEditorKit.LinkController, javax.swing.text.html.HTMLEditorKit.Parser, javax.swing.text.html.HTMLEditorKit.ParserCallback
 
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.html.HTMLEditorKit
BOLD_ACTION, COLOR_ACTION, DEFAULT_CSS, FONT_CHANGE_BIGGER, FONT_CHANGE_SMALLER, IMG_ALIGN_BOTTOM, IMG_ALIGN_MIDDLE, IMG_ALIGN_TOP, IMG_BORDER, ITALIC_ACTION, LOGICAL_STYLE_ACTION, PARA_INDENT_LEFT, PARA_INDENT_RIGHT
 
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
 
Constructor Summary
CustomHTMLEditorKit()
           
 
Method Summary
 javax.swing.text.Document createDefaultDocument()
           
protected  void createInputAttributes(javax.swing.text.Element element, javax.swing.text.MutableAttributeSet set)
           
 javax.swing.text.MutableAttributeSet getInputAttributes_()
           
 javax.swing.text.MutableAttributeSet getInputAttributes()
           
protected  javax.swing.text.html.HTMLEditorKit.Parser getParser()
           
 javax.swing.text.html.StyleSheet getStyleSheet()
           
 javax.swing.text.ViewFactory getViewFactory()
          Returns peronalized version of the HTMLFactory
 void insertHTML(javax.swing.text.html.HTMLDocument doc, int offset, java.lang.String html, int popDepth, int pushDepth, javax.swing.text.html.HTML.Tag insertTag)
           
 void install(javax.swing.JEditorPane c)
           
 void setDefaultFont(java.lang.String defaultFont)
           
 void setDefaultFontSize(int defaultFontSize)
           
static void setExternalHTMLFactoryClassName(java.lang.String factoryClassName)
          If specified the new factory class name (should be fully qualified class name) a new factory will be instantiated and used by the Editor kit.
 void setStyleSheet(javax.swing.text.html.StyleSheet s)
           
 void write(java.io.Writer out, javax.swing.text.Document doc, int pos, int len)
           
 
Methods inherited from class javax.swing.text.html.HTMLEditorKit
clone, deinstall, getAccessibleContext, getActions, getContentType, getDefaultCursor, getLinkCursor, isAutoFormSubmission, read, setAutoFormSubmission, setDefaultCursor, setLinkCursor
 
Methods inherited from class javax.swing.text.StyledEditorKit
getCharacterAttributeRun
 
Methods inherited from class javax.swing.text.DefaultEditorKit
createCaret, read, write
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomHTMLEditorKit

public CustomHTMLEditorKit()
Method Detail

insertHTML

public void insertHTML(javax.swing.text.html.HTMLDocument doc,
                       int offset,
                       java.lang.String html,
                       int popDepth,
                       int pushDepth,
                       javax.swing.text.html.HTML.Tag insertTag)
                throws javax.swing.text.BadLocationException,
                       java.io.IOException
Overrides:
insertHTML in class javax.swing.text.html.HTMLEditorKit
Throws:
javax.swing.text.BadLocationException
java.io.IOException

setStyleSheet

public void setStyleSheet(javax.swing.text.html.StyleSheet s)
Overrides:
setStyleSheet in class javax.swing.text.html.HTMLEditorKit

getStyleSheet

public javax.swing.text.html.StyleSheet getStyleSheet()
Overrides:
getStyleSheet in class javax.swing.text.html.HTMLEditorKit

setExternalHTMLFactoryClassName

public static void setExternalHTMLFactoryClassName(java.lang.String factoryClassName)
If specified the new factory class name (should be fully qualified class name) a new factory will be instantiated and used by the Editor kit. To return to the default factory you can set the class name to null


getViewFactory

public javax.swing.text.ViewFactory getViewFactory()
Returns peronalized version of the HTMLFactory

Overrides:
getViewFactory in class javax.swing.text.html.HTMLEditorKit

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.html.HTMLEditorKit
Throws:
java.io.IOException
javax.swing.text.BadLocationException

getInputAttributes_

public javax.swing.text.MutableAttributeSet getInputAttributes_()

getInputAttributes

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

setDefaultFont

public void setDefaultFont(java.lang.String defaultFont)

setDefaultFontSize

public void setDefaultFontSize(int defaultFontSize)

getParser

protected javax.swing.text.html.HTMLEditorKit.Parser getParser()
Overrides:
getParser in class javax.swing.text.html.HTMLEditorKit

createInputAttributes

protected void createInputAttributes(javax.swing.text.Element element,
                                     javax.swing.text.MutableAttributeSet set)
Overrides:
createInputAttributes in class javax.swing.text.html.HTMLEditorKit

install

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

createDefaultDocument

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