Class ComponentUtilities


  • public class ComponentUtilities
    extends java.lang.Object
    Keep the enabled state of listed components in sync with a JComboBox selection or the selcted state of an AbstractButton, for instance a JCheckBox
    Since:
    8.5
    See Also:
    For added flexibility see the StateMonitor class.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void whenEqualsDisable​(javax.swing.JComboBox cbox, java.lang.Object value, javax.swing.JComponent comp)  
      static void whenEqualsDisable​(javax.swing.JComboBox cbox, java.lang.Object value, javax.swing.JComponent... comps)  
      static void whenEqualsEnable​(javax.swing.JComboBox cbox, java.lang.Object value, javax.swing.JComponent comp)  
      static void whenEqualsEnable​(javax.swing.JComboBox cbox, java.lang.Object value, javax.swing.JComponent... comps)  
      static void whenSelectedDisable​(javax.swing.AbstractButton button, javax.swing.JComponent comp)  
      static void whenSelectedDisable​(javax.swing.AbstractButton button, javax.swing.JComponent... comps)  
      static void whenSelectedEnable​(javax.swing.AbstractButton button, javax.swing.JComponent comp)  
      static void whenSelectedEnable​(javax.swing.AbstractButton button, javax.swing.JComponent... comps)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ComponentUtilities

        public ComponentUtilities()
    • Method Detail

      • whenSelectedEnable

        public static void whenSelectedEnable​(javax.swing.AbstractButton button,
                                              javax.swing.JComponent... comps)
      • whenSelectedDisable

        public static void whenSelectedDisable​(javax.swing.AbstractButton button,
                                               javax.swing.JComponent... comps)
      • whenSelectedEnable

        public static void whenSelectedEnable​(javax.swing.AbstractButton button,
                                              javax.swing.JComponent comp)
      • whenSelectedDisable

        public static void whenSelectedDisable​(javax.swing.AbstractButton button,
                                               javax.swing.JComponent comp)
      • whenEqualsEnable

        public static void whenEqualsEnable​(javax.swing.JComboBox cbox,
                                            java.lang.Object value,
                                            javax.swing.JComponent... comps)
      • whenEqualsDisable

        public static void whenEqualsDisable​(javax.swing.JComboBox cbox,
                                             java.lang.Object value,
                                             javax.swing.JComponent... comps)
      • whenEqualsEnable

        public static void whenEqualsEnable​(javax.swing.JComboBox cbox,
                                            java.lang.Object value,
                                            javax.swing.JComponent comp)
      • whenEqualsDisable

        public static void whenEqualsDisable​(javax.swing.JComboBox cbox,
                                             java.lang.Object value,
                                             javax.swing.JComponent comp)