Interface FlatStyleableComponent

    • Method Detail

      • getStyle

        default String getStyle()
        Returns the style of a component as String in CSS syntax ("key1: value1; key2: value2; ...") or null if no style has been assigned.
        See Also:
        FlatClientProperties.STYLE
      • setStyle

        default void setStyle​(String style)
        Specifies the style of a component as String in CSS syntax ("key1: value1; key2: value2; ...").

        The keys are the same as used in UI defaults, but without component type prefix. E.g. for UI default Slider.thumbSize use key thumbSize.

        The syntax of the CSS values is the same as used in FlatLaf properties files (https://www.formdev.com/flatlaf/properties-files/), but some features are not supported (e.g. variables).

        See Also:
        FlatClientProperties.STYLE
      • getStyleMap

        default Map<String,​Object> getStyleMap()
        Returns the style of a component as Map<String, Object> or null if no style has been assigned.
        See Also:
        FlatClientProperties.STYLE
      • setStyleMap

        default void setStyleMap​(Map<String,​Object> styleMap)
        Specifies the style of a component as Map<String, Object> with binary values.

        The keys are the same as used in UI defaults, but without component type prefix. E.g. for UI default Slider.thumbSize use key thumbSize.

        The values are not parsed from a string. They must be binary.

        See Also:
        FlatClientProperties.STYLE
      • getStyleClass

        default String getStyleClass()
        Returns the style class(es) of a component (separated by space characters) or null if no style class has been assigned.
        See Also:
        FlatClientProperties.STYLE_CLASS
      • setStyleClass

        default void setStyleClass​(String styleClass)
        Specifies the style class(es) of a component (separated by space characters).
        See Also:
        FlatClientProperties.STYLE_CLASS