Class MacOSXPopupLocationFix
- java.lang.Object
-
- org.jdesktop.swingx.autocomplete.workarounds.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
MacOSXPopupLocationFix.Listener
Reposition the popup immediately before it is shown.private static class
MacOSXPopupLocationFix.ScreenGeometry
Figure out the dimensions of our screen.
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JComboBox
comboBox
the components being fixedprivate MacOSXPopupLocationFix.Listener
listener
the listener provides callbacks as necessaryprivate javax.swing.JPopupMenu
popupMenu
-
Constructor Summary
Constructors Modifier Constructor Description private
MacOSXPopupLocationFix(javax.swing.JComboBox comboBox)
Private constructor so users use the more action-orientedinstall(javax.swing.JComboBox)
method.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
fixPopupLocation(javax.swing.JComponent popupComponent)
Do the adjustment on the specified popupComponent immediately before it is displayed.static MacOSXPopupLocationFix
install(javax.swing.JComboBox comboBox)
Install the fix for the specified combo box.void
uninstall()
Uninstall the fix.
-
-
-
Field Detail
-
comboBox
private final javax.swing.JComboBox comboBox
the components being fixed
-
popupMenu
private final javax.swing.JPopupMenu popupMenu
-
listener
private final MacOSXPopupLocationFix.Listener listener
the listener provides callbacks as necessary
-
-
Constructor Detail
-
MacOSXPopupLocationFix
private MacOSXPopupLocationFix(javax.swing.JComboBox comboBox)
Private constructor so users use the more action-orientedinstall(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.
-
-