Class JosmHTMLEditorKit
java.lang.Object
javax.swing.text.EditorKit
javax.swing.text.DefaultEditorKit
javax.swing.text.StyledEditorKit
javax.swing.text.html.HTMLEditorKit
org.openstreetmap.josm.gui.widgets.JosmHTMLEditorKit
- All Implemented Interfaces:
Serializable,Cloneable,Accessible
A subclass of
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.- Since:
- 6040
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.text.html.HTMLEditorKit
HTMLEditorKit.HTMLFactory, HTMLEditorKit.HTMLTextAction, HTMLEditorKit.InsertHTMLTextAction, HTMLEditorKit.LinkController, HTMLEditorKit.Parser, HTMLEditorKit.ParserCallbackNested classes/interfaces inherited from class javax.swing.text.StyledEditorKit
StyledEditorKit.AlignmentAction, StyledEditorKit.BoldAction, StyledEditorKit.FontFamilyAction, StyledEditorKit.FontSizeAction, StyledEditorKit.ForegroundAction, StyledEditorKit.ItalicAction, StyledEditorKit.StyledTextAction, StyledEditorKit.UnderlineActionNested classes/interfaces inherited from class javax.swing.text.DefaultEditorKit
DefaultEditorKit.BeepAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.PasteAction -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ViewFactoryShared factory for creating HTML Views.private StyleSheetFields 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_RIGHTFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the set of styles currently being used to render the HTML elements.voidSet the set of styles to be used to render the various HTML elements.Methods inherited from class javax.swing.text.html.HTMLEditorKit
clone, createDefaultDocument, createInputAttributes, deinstall, getAccessibleContext, getActions, getContentType, getDefaultCursor, getInputAttributes, getLinkCursor, getParser, insertHTML, install, isAutoFormSubmission, read, setAutoFormSubmission, setDefaultCursor, setLinkCursor, writeMethods inherited from class javax.swing.text.StyledEditorKit
getCharacterAttributeRunMethods inherited from class javax.swing.text.DefaultEditorKit
createCaret, read, write
-
Field Details
-
FACTORY
Shared factory for creating HTML Views. -
ss
-
-
Constructor Details
-
JosmHTMLEditorKit
public JosmHTMLEditorKit()
-
-
Method Details
-
setStyleSheet
Set the set of styles to be used to render the various HTML elements. These styles are specified in terms of CSS specifications. Each document produced by the kit will have a copy of the sheet which it can add the document specific styles to. Unlike the base implementation, the StyleSheet specified is NOT shared by all HTMLEditorKit instances, to provide a finer granularity.- Overrides:
setStyleSheetin classHTMLEditorKit- See Also:
-
getStyleSheet
Get the set of styles currently being used to render the HTML elements. Unlike the base implementation, the StyleSheet specified is NOT shared by all HTMLEditorKit instances, to provide a finer granularity.- Overrides:
getStyleSheetin classHTMLEditorKit- See Also:
-
getViewFactory
- Overrides:
getViewFactoryin classHTMLEditorKit
-