Class FlatHTML
java.lang.Object
com.formdev.flatlaf.ui.FlatHTML
- Since:
- 3.5
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidclearViewCaches(View view) Clears cached values in view so that CSS changes take effect.static PropertyChangeListenercreatePropertyChangeListener(PropertyChangeListener superListener) private static intindexOfTag(String html, String tag, boolean endIndex) Returns start or end index of a HTML tag.static voidInvokesupdateRendererCSSFontBaseSize(JComponent)forBasicHTML.propertyKeyproperty change events, which are fired whenBasicHTML.updateRenderer(JComponent, String)updates the HTML view.static voidAdds CSS rule BASE_SIZE to the style sheet of the HTML view, which re-calculates font sizes based on current component font size.static voidupdateRendererCSSForeground(View view, Color foreground) Updates foreground in style sheet of the HTML view.private static booleanChecks whether view uses "absolute-size" keywords (e.g.
-
Field Details
-
testUpdateRenderer
-
absoluteSizeKeywordsSet
-
-
Constructor Details
-
FlatHTML
private FlatHTML()
-
-
Method Details
-
updateRendererCSSFontBaseSize
Adds CSS rule BASE_SIZE to the style sheet of the HTML view, which re-calculates font sizes based on current component font size. This is necessary for "absolute-size" keywords (e.g. "x-large") for "font-size" attributes in default style sheet (see javax/swing/text/html/default.css). See also CSS font-size.This method should be invoked after
BasicHTML.updateRenderer(JComponent, String). -
indexOfTag
-
usesAbsoluteSizeKeywordForFontSize
Checks whether view uses "absolute-size" keywords (e.g. "x-large") for font-size (see javax/swing/text/html/default.css). -
updateRendererCSSForeground
-
clearViewCaches
Clears cached values in view so that CSS changes take effect. -
createPropertyChangeListener
public static PropertyChangeListener createPropertyChangeListener(PropertyChangeListener superListener) -
propertyChange
InvokesupdateRendererCSSFontBaseSize(JComponent)forBasicHTML.propertyKeyproperty change events, which are fired whenBasicHTML.updateRenderer(JComponent, String)updates the HTML view.
-