public class JosmHTMLEditorKit extends javax.swing.text.html.HTMLEditorKit
HTMLEditorKit
that fixes an uncommon design choice that shares the set stylesheet between all instances.
This class stores a single stylesheet per instance, as it should have be done by Sun in the first place.
Moreover it allows to display SVG images.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
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
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
Modifier and Type | Field and Description |
---|---|
private static javax.swing.text.ViewFactory |
FACTORY
Shared factory for creating HTML Views.
|
private javax.swing.text.html.StyleSheet |
ss |
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
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 and Description |
---|
JosmHTMLEditorKit() |
Modifier and Type | Method and Description |
---|---|
javax.swing.text.html.StyleSheet |
getStyleSheet()
Get the set of styles currently being used to render the HTML elements.
|
javax.swing.text.ViewFactory |
getViewFactory() |
void |
setStyleSheet(javax.swing.text.html.StyleSheet s)
Set the set of styles to be used to render the various HTML elements.
|
clone, createDefaultDocument, createInputAttributes, deinstall, getAccessibleContext, getActions, getContentType, getDefaultCursor, getInputAttributes, getLinkCursor, getParser, insertHTML, install, isAutoFormSubmission, read, setAutoFormSubmission, setDefaultCursor, setLinkCursor, write
private static final javax.swing.text.ViewFactory FACTORY
private javax.swing.text.html.StyleSheet ss
public JosmHTMLEditorKit()
public void setStyleSheet(javax.swing.text.html.StyleSheet s)
setStyleSheet
in class javax.swing.text.html.HTMLEditorKit
getStyleSheet()
public javax.swing.text.html.StyleSheet getStyleSheet()
getStyleSheet
in class javax.swing.text.html.HTMLEditorKit
setStyleSheet(javax.swing.text.html.StyleSheet)
public javax.swing.text.ViewFactory getViewFactory()
getViewFactory
in class javax.swing.text.html.HTMLEditorKit