Class MacOSXPopupLocationFix.ScreenGeometry

  • Enclosing class:
    MacOSXPopupLocationFix

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

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

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) boolean aqua  
      (package private) java.awt.GraphicsConfiguration graphicsConfiguration  
    • Constructor Summary

      Constructors 
      Constructor Description
      ScreenGeometry​(javax.swing.JComponent component)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Rectangle getScreenBounds()
      Get the bounds of where we can put a popup.
      java.awt.Insets getScreenInsets()
      Fetch the screen insets, the off limits areas around the screen such as menu bar, dock or start bar.
      java.awt.Rectangle getScreenSize()
      Get the bounds of the screen currently displaying the component.
      private java.awt.GraphicsConfiguration graphicsConfigurationForComponent​(java.awt.Component component)
      Get the best graphics configuration for the specified point and component.
      • Methods inherited from class java.lang.Object

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

      • graphicsConfiguration

        final java.awt.GraphicsConfiguration graphicsConfiguration
      • aqua

        final boolean aqua
    • Constructor Detail

      • ScreenGeometry

        public ScreenGeometry​(javax.swing.JComponent component)
    • Method Detail

      • graphicsConfigurationForComponent

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

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

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

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