Class SwingHelper


  • public class SwingHelper
    extends java.lang.Object
    Helper class for dealing with Swing.
    • Constructor Summary

      Constructors 
      Constructor Description
      SwingHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void center​(java.awt.Container parent, java.awt.Component component)  
      static void centerBottom​(java.awt.Container parent, java.awt.Component component)  
      static java.awt.Point convertScreenLocationToParent​(java.awt.Container parent, int x, int y)
      Converts the location x y to the parents coordinate system, returning the location.
      static java.awt.Rectangle getBoundsOnScreen​(java.awt.Component c)  
      static java.awt.Rectangle getInnerBoundsOnScreen​(javax.swing.JComponent c)  
      static int getMultipleSelectionKey()  
      static javax.swing.JLayeredPane getTopLayeredPane​(java.awt.Component c)  
      static boolean isDescendingFrom​(java.awt.Component focusOwner, java.awt.Component parent)  
      static boolean isMultipleSelectionKey​(java.awt.event.InputEvent event)  
      static void setFocusable​(java.awt.Container parent, boolean focusable)  
      • Methods inherited from class java.lang.Object

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

      • SwingHelper

        public SwingHelper()
    • Method Detail

      • isMultipleSelectionKey

        public static boolean isMultipleSelectionKey​(java.awt.event.InputEvent event)
      • getMultipleSelectionKey

        public static int getMultipleSelectionKey()
      • getTopLayeredPane

        public static javax.swing.JLayeredPane getTopLayeredPane​(java.awt.Component c)
      • convertScreenLocationToParent

        public static java.awt.Point convertScreenLocationToParent​(java.awt.Container parent,
                                                                   int x,
                                                                   int y)
        Converts the location x y to the parents coordinate system, returning the location.
      • getBoundsOnScreen

        public static java.awt.Rectangle getBoundsOnScreen​(java.awt.Component c)
      • getInnerBoundsOnScreen

        public static java.awt.Rectangle getInnerBoundsOnScreen​(javax.swing.JComponent c)
      • setFocusable

        public static void setFocusable​(java.awt.Container parent,
                                        boolean focusable)
      • center

        public static void center​(java.awt.Container parent,
                                  java.awt.Component component)
      • centerBottom

        public static void centerBottom​(java.awt.Container parent,
                                        java.awt.Component component)
      • isDescendingFrom

        public static boolean isDescendingFrom​(java.awt.Component focusOwner,
                                               java.awt.Component parent)