Class MacOSXPopupLocationFix.ScreenGeometry

java.lang.Object
org.jdesktop.swingx.autocomplete.workarounds.MacOSXPopupLocationFix.ScreenGeometry
Enclosing class:
MacOSXPopupLocationFix

private static final class MacOSXPopupLocationFix.ScreenGeometry extends Object
Figure out the dimensions of our screen.

This code is inspired by similar in JPopupMenu.adjustPopupLocationToFitScreen().

  • Field Details

  • Constructor Details

    • ScreenGeometry

      public ScreenGeometry(JComponent component)
  • Method Details

    • graphicsConfigurationForComponent

      private GraphicsConfiguration graphicsConfigurationForComponent(Component component)
      Get the best graphics configuration for the specified point and component.
    • getScreenBounds

      public Rectangle getScreenBounds()
      Get the bounds of where we can put a popup.
    • getScreenSize

      public Rectangle getScreenSize()
      Get the bounds of the screen currently displaying the component.
    • getScreenInsets

      public Insets getScreenInsets()
      Fetch the screen insets, the off limits areas around the screen such as menu bar, dock or start bar.