Package com.formdev.flatlaf.ui
Class FlatHTML
- java.lang.Object
-
- com.formdev.flatlaf.ui.FlatHTML
-
public class FlatHTML extends Object
- Since:
- 3.5
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PropertyChangeListenercreatePropertyChangeListener(PropertyChangeListener superListener)static voidpropertyChange(PropertyChangeEvent e)InvokesupdateRendererCSSFontBaseSize(JComponent)forBasicHTML.propertyKeyproperty change events, which are fired whenBasicHTML.updateRenderer(JComponent, String)updates the HTML view.static voidupdateRendererCSSFontBaseSize(JComponent c)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 voidupdateRendererCSSForeground(View view, Color foreground)Updates foreground in style sheet of the HTML view.
-
-
-
Method Detail
-
updateRendererCSSFontBaseSize
public static void updateRendererCSSFontBaseSize(JComponent c)
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).
-
updateRendererCSSForeground
public static void updateRendererCSSForeground(View view, Color foreground)
Updates foreground in style sheet of the HTML view. Adds "body { color: #<foreground-hex>; }"
-
createPropertyChangeListener
public static PropertyChangeListener createPropertyChangeListener(PropertyChangeListener superListener)
-
propertyChange
public static void propertyChange(PropertyChangeEvent e)
InvokesupdateRendererCSSFontBaseSize(JComponent)forBasicHTML.propertyKeyproperty change events, which are fired whenBasicHTML.updateRenderer(JComponent, String)updates the HTML view.
-
-