getStyleMap() {
@@ -70,12 +76,34 @@ public interface FlatStyleableComponent
* E.g. for UI default {@code Slider.thumbSize} use key {@code thumbSize}.
*
* The values are not parsed from a string. They must be binary.
+ *
+ * @see FlatClientProperties#STYLE
*/
default void setStyleMap( Map styleMap ) {
putClientProperty( FlatClientProperties.STYLE, styleMap );
}
+ /**
+ * Returns the style class(es) of a component (separated by space characters)
+ * or {@code null} if no style class has been assigned.
+ *
+ * @see FlatClientProperties#STYLE_CLASS
+ */
+ default String getStyleClass() {
+ return (String) getClientProperty( FlatClientProperties.STYLE_CLASS );
+ }
+
+ /**
+ * Specifies the style class(es) of a component (separated by space characters).
+ *
+ * @see FlatClientProperties#STYLE_CLASS
+ */
+ default void setStyleClass( String styleClass ) {
+ putClientProperty( FlatClientProperties.STYLE_CLASS, styleClass );
+ }
+
+
/**
* Overrides {@link JComponent#getClientProperty(Object)}.
*/