Class MacOSXPopupLocationFix


  • public final class MacOSXPopupLocationFix
    extends java.lang.Object
    Fix a problem where the JComboBox's popup obscures its editor in the Mac OS X Aqua look and feel.

    Installing this fix will resolve the problem for Aqua without having side-effects for other look-and-feels. It also supports dynamically changed look and feels.

    See Also:
    Glazed Lists bug entry, SwingX bug entry
    • Field Detail

      • comboBox

        private final javax.swing.JComboBox comboBox
        the components being fixed
      • popupMenu

        private final javax.swing.JPopupMenu popupMenu
    • Constructor Detail

      • MacOSXPopupLocationFix

        private MacOSXPopupLocationFix​(javax.swing.JComboBox comboBox)
        Private constructor so users use the more action-oriented install(javax.swing.JComboBox) method.
    • Method Detail

      • install

        public static MacOSXPopupLocationFix install​(javax.swing.JComboBox comboBox)
        Install the fix for the specified combo box.
      • uninstall

        public void uninstall()
        Uninstall the fix. Usually this is unnecessary since letting the combo box go out of scope is sufficient.
      • fixPopupLocation

        private void fixPopupLocation​(javax.swing.JComponent popupComponent)
        Do the adjustment on the specified popupComponent immediately before it is displayed.