public class JosmHTMLEditorKit extends 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.HTMLEditorKit.HTMLFactory, HTMLEditorKit.HTMLTextAction, HTMLEditorKit.InsertHTMLTextAction, HTMLEditorKit.LinkController, HTMLEditorKit.Parser, HTMLEditorKit.ParserCallback
StyledEditorKit.AlignmentAction, StyledEditorKit.BoldAction, StyledEditorKit.FontFamilyAction, StyledEditorKit.FontSizeAction, StyledEditorKit.ForegroundAction, StyledEditorKit.ItalicAction, StyledEditorKit.StyledTextAction, StyledEditorKit.UnderlineAction
DefaultEditorKit.BeepAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.PasteAction
Modifier and Type | Field and Description |
---|---|
protected 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()
Constructs a new
JosmHTMLEditorKit |
Modifier and Type | Method and Description |
---|---|
StyleSheet |
getStyleSheet()
Get the set of styles currently being used to render the HTML elements.
|
void |
setStyleSheet(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, getViewFactory, insertHTML, install, isAutoFormSubmission, read, setAutoFormSubmission, setDefaultCursor, setLinkCursor, write
getCharacterAttributeRun
createCaret, read, write
protected StyleSheet ss
public JosmHTMLEditorKit()
JosmHTMLEditorKit
public void setStyleSheet(StyleSheet s)
setStyleSheet
in class HTMLEditorKit
getStyleSheet()
public StyleSheet getStyleSheet()
getStyleSheet
in class HTMLEditorKit
setStyleSheet(javax.swing.text.html.StyleSheet)