Package com.formdev.flatlaf.ui
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 void
clearViewCaches
(View view) Clears cached values in view so that CSS changes take effect.static PropertyChangeListener
createPropertyChangeListener
(PropertyChangeListener superListener) static void
InvokesupdateRendererCSSFontBaseSize(JComponent)
forBasicHTML.propertyKey
property change events, which are fired whenBasicHTML.updateRenderer(JComponent, String)
updates the HTML view.static void
Adds CSS rule BASE_SIZE to the style sheet of the HTML view, which re-calculates font sizes based on current component font size.static void
updateRendererCSSForeground
(View view, Color foreground) Updates foreground in style sheet of the HTML view.private static boolean
Checks whether view uses "absolute-size" keywords (e.g.
-
Field Details
-
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)
. -
usesAbsoluteSizeKeywordForFontSize
Checks whether view uses "absolute-size" keywords (e.g. "x-large") for font-size (see javax/swing/text/html/default.css). -
updateRendererCSSForeground
Updates foreground in style sheet of the HTML view. Adds "body { color: #<foreground-hex>; }" -
clearViewCaches
Clears cached values in view so that CSS changes take effect. -
createPropertyChangeListener
public static PropertyChangeListener createPropertyChangeListener(PropertyChangeListener superListener) -
propertyChange
InvokesupdateRendererCSSFontBaseSize(JComponent)
forBasicHTML.propertyKey
property change events, which are fired whenBasicHTML.updateRenderer(JComponent, String)
updates the HTML view.
-