jwo.utils.gui.html
Class ImprovedHTMLEditorKit
java.lang.Object
javax.swing.text.EditorKit
javax.swing.text.DefaultEditorKit
javax.swing.text.StyledEditorKit
javax.swing.text.html.HTMLEditorKit
jwo.utils.gui.html.ImprovedHTMLEditorKit
- All Implemented Interfaces:
- Accessible, Cloneable, Serializable
- public class ImprovedHTMLEditorKit
- extends HTMLEditorKit
HTML editor kit to replace the default one used by JEditorPane.
This one adopts a more sophisticated mechanism for looking for
relative image links. Based on the JavaWorld Tip 109.
- Version:
- 2.1, 18th July, 2003
- Author:
- Rob Kenworthy, modified by Jo Wood.
- See Also:
- Serialized Form
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, 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 |
Method Summary |
ViewFactory |
getViewFactory()
Overrides the default view factory by returning a customised
HTML view factory that looks for relative links. |
void |
setNewStyleSheet(String css)
Sets the style sheet of the editor kit to the given css file.
|
Methods inherited from class javax.swing.text.html.HTMLEditorKit |
clone, createDefaultDocument, createInputAttributes, deinstall, getAccessibleContext, getActions, getContentType, getDefaultCursor, getInputAttributes, getLinkCursor, getParser, getStyleSheet, insertHTML, install, read, setDefaultCursor, setLinkCursor, setStyleSheet, write |
ImprovedHTMLEditorKit
public ImprovedHTMLEditorKit()
getViewFactory
public ViewFactory getViewFactory()
- Overrides the default view factory by returning a customised
HTML view factory that looks for relative links.
- Returns:
- An HTML view factory.
setNewStyleSheet
public void setNewStyleSheet(String css)
- Sets the style sheet of the editor kit to the given css file.
This file should be relative to the directory identified by
system.css.path.key or identified as an absolute URL.
- Parameters:
css
- Css file to use for update.
Copyright Jo Wood, 1996-2004, last modified, 3rd September, 2004