Styling: Extras: add style getters and setters to component classes

This commit is contained in:
Karl Tauber
2021-09-06 15:23:15 +02:00
parent 4a65bc88d5
commit 674efae184
37 changed files with 705 additions and 20 deletions

View File

@@ -127,12 +127,21 @@ public interface FlatClientProperties
//---- JComponent ---------------------------------------------------------
/**
* Specifies the style of a component in CSS syntax ("key1: value1; key2: value2; ...").
* Specifies the style of a component as String in CSS syntax ("key1: value1; key2: value2; ...")
* or as {@link java.util.Map}<String, Object> with binary values.
* <p>
* The keys are the same as used in UI defaults, but without component type prefix.
* E.g. for UI default {@code Slider.thumbSize} use key {@code thumbSize}.
* <p>
* The syntax of the CSS values is the same as used in FlatLaf properties files
* (<a href="https://www.formdev.com/flatlaf/properties-files/">https://www.formdev.com/flatlaf/properties-files/</a>),
* but some features are not supported (e.g. variables).
* When using a map, the values are not parsed from a string. They must be binary.
* <p>
* <strong>Components</strong> {@link javax.swing.JComponent}<br>
* <strong>Value type</strong> {@link java.lang.String} or {@link java.util.Map}&lt;String, Object&gt;<br>
*
* @since TODO
* @since 2
*/
String STYLE = "FlatLaf.style";