Class MacOSXPopupLocationFix
- java.lang.Object
-
- org.jdesktop.swingx.autocomplete.workarounds.MacOSXPopupLocationFix
-
public final class MacOSXPopupLocationFix extends java.lang.ObjectFix 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 classMacOSXPopupLocationFix.ListenerReposition the popup immediately before it is shown.private static classMacOSXPopupLocationFix.ScreenGeometryFigure out the dimensions of our screen.
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JComboBoxcomboBoxthe components being fixedprivate MacOSXPopupLocationFix.Listenerlistenerthe listener provides callbacks as necessaryprivate javax.swing.JPopupMenupopupMenu
-
Constructor Summary
Constructors Modifier Constructor Description privateMacOSXPopupLocationFix(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 voidfixPopupLocation(javax.swing.JComponent popupComponent)Do the adjustment on the specified popupComponent immediately before it is displayed.static MacOSXPopupLocationFixinstall(javax.swing.JComboBox comboBox)Install the fix for the specified combo box.voiduninstall()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.
-
-