From 6b1d0c4a12822571c5e132098c1f0c2b099c4814 Mon Sep 17 00:00:00 2001 From: nathan Date: Sun, 5 Mar 2017 00:19:20 +0100 Subject: [PATCH] Updated comments WRT component sizing information --- src/dorkbox/systemTray/swingUI/SwingUIFactory.java | 8 ++++++++ test/dorkbox/CustomSwingUI.java | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/dorkbox/systemTray/swingUI/SwingUIFactory.java b/src/dorkbox/systemTray/swingUI/SwingUIFactory.java index d030830..f5f1b96 100644 --- a/src/dorkbox/systemTray/swingUI/SwingUIFactory.java +++ b/src/dorkbox/systemTray/swingUI/SwingUIFactory.java @@ -27,6 +27,14 @@ import dorkbox.systemTray.Menu; /** * Factory to allow for Look & Feel of the Swing UI components in the SystemTray. Provide an implementation to customize the Swing L&F. + * + * NOTICE: components can ALSO have different sizes attached to them, resulting in different sized components + * mini + * myButton.putClientProperty("JComponent.sizeVariant", "mini"); + * small + * mySlider.putClientProperty("JComponent.sizeVariant", "small"); + * large + * myTextField.putClientProperty("JComponent.sizeVariant", "large"); */ public interface SwingUIFactory { diff --git a/test/dorkbox/CustomSwingUI.java b/test/dorkbox/CustomSwingUI.java index 209cfc0..e196586 100644 --- a/test/dorkbox/CustomSwingUI.java +++ b/test/dorkbox/CustomSwingUI.java @@ -38,6 +38,14 @@ import dorkbox.systemTray.swingUI.SwingUIFactory; * * This implementation is provided as an example of what looks reasonable on our systems for Nimbus. Naturally, everyone will have * different systems and thus will want to change this based on their own, specified Swing L&F. + * + * NOTICE: components can ALSO have different sizes attached to them, resulting in different sized components + * mini + * myButton.putClientProperty("JComponent.sizeVariant", "mini"); + * small + * mySlider.putClientProperty("JComponent.sizeVariant", "small"); + * large + * myTextField.putClientProperty("JComponent.sizeVariant", "large"); */ public class CustomSwingUI implements SwingUIFactory {