Class AwtUtil


  • public class AwtUtil
    extends java.lang.Object
    Description: Misc. functions to make GUI programming easier.
    • Constructor Summary

      Constructors 
      Constructor Description
      AwtUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void centerWindow​(java.awt.Window win)  
      static void drawHashOverArea​(java.awt.Graphics2D g, int x, int y, int width, int height)
      Draw diagonal hashing lines over the given area.
      static java.awt.GridBagConstraints getC​(int x, int y, float weightx, float weighty, int width, int height, boolean fillx, boolean filly, int align, java.awt.Insets insets)  
      static java.awt.GridBagConstraints getC​(int x, int y, float weightx, float weighty, int width, int height, int padx, int pady, int topInset, int leftInset, int botInset, int rightInset)  
      static java.awt.GridBagConstraints getConstraints​(int x, int y, float weightx, float weighty, int width, int height, boolean fillx, boolean filly)  
      static java.awt.GridBagConstraints getConstraints​(int x, int y, float weightx, float weighty, int width, int height, boolean fillx, boolean filly, int align)  
      static java.awt.GridBagConstraints getConstraints​(int x, int y, float weightx, float weighty, int width, int height, boolean fillx, boolean filly, int align, int inset)  
      static java.awt.GridBagConstraints getConstraints​(int x, int y, float weightx, float weighty, int width, int height, boolean fillx, boolean filly, int align, int xinset, int yinset)  
      static java.awt.GridBagConstraints getConstraints​(int x, int y, float weightx, float weighty, int width, int height, boolean fillx, boolean filly, int topInset, int leftInset, int botInset, int rightInset)  
      static java.awt.GridBagConstraints getConstraints​(int x, int y, float weightx, float weighty, int width, int height, boolean fillx, boolean filly, int align, int topInset, int leftInset, int botInset, int rightInset)  
      static java.awt.GridBagConstraints getConstraints​(int x, int y, float weightx, float weighty, int width, int height, int topInset, int leftInset, int botInset, int rightInset)  
      static java.awt.Frame getFrame​(java.awt.Component c)  
      static javax.swing.JFrame getJFrame​(java.awt.Component c)
      Since build 505 of Moneydance
      static java.awt.Component getTopmostParent​(java.awt.Component c)  
      static java.awt.Window getWindow​(java.awt.Component c)  
      static java.awt.Image loadImage​(java.lang.Class base, java.lang.String imageFileName)  
      static java.awt.Image loadImage​(java.lang.Class base, java.lang.String imageFileName, java.awt.Component comp)  
      static java.awt.Image loadImage​(java.lang.String imageFileName)  
      static void setupWindow​(java.awt.Window child)  
      static void setupWindow​(java.awt.Window child, int position)  
      static void setupWindow​(java.awt.Window child, int width, int height)  
      static void setupWindow​(java.awt.Window child, int width, int height, int position)  
      static void setupWindow​(java.awt.Window child, int width, int height, int x, int y)  
      static void setupWindow​(java.awt.Window child, int width, int height, int x, int y, java.awt.Component parent)  
      static void setupWindow​(java.awt.Window child, int width, int height, java.awt.Component parent)  
      static void setupWindow​(java.awt.Window child, java.awt.Component parent)  
      static void setWindowPosition​(java.awt.Window win, int position)  
      static void setWindowPosition​(java.awt.Window child, java.awt.Component parent)  
      • Methods inherited from class java.lang.Object

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

      • AwtUtil

        public AwtUtil()
    • Method Detail

      • getConstraints

        public static java.awt.GridBagConstraints getConstraints​(int x,
                                                                 int y,
                                                                 float weightx,
                                                                 float weighty,
                                                                 int width,
                                                                 int height,
                                                                 boolean fillx,
                                                                 boolean filly)
      • getConstraints

        public static java.awt.GridBagConstraints getConstraints​(int x,
                                                                 int y,
                                                                 float weightx,
                                                                 float weighty,
                                                                 int width,
                                                                 int height,
                                                                 boolean fillx,
                                                                 boolean filly,
                                                                 int align)
      • getConstraints

        public static java.awt.GridBagConstraints getConstraints​(int x,
                                                                 int y,
                                                                 float weightx,
                                                                 float weighty,
                                                                 int width,
                                                                 int height,
                                                                 boolean fillx,
                                                                 boolean filly,
                                                                 int align,
                                                                 int inset)
      • getConstraints

        public static java.awt.GridBagConstraints getConstraints​(int x,
                                                                 int y,
                                                                 float weightx,
                                                                 float weighty,
                                                                 int width,
                                                                 int height,
                                                                 boolean fillx,
                                                                 boolean filly,
                                                                 int align,
                                                                 int xinset,
                                                                 int yinset)
      • getConstraints

        public static java.awt.GridBagConstraints getConstraints​(int x,
                                                                 int y,
                                                                 float weightx,
                                                                 float weighty,
                                                                 int width,
                                                                 int height,
                                                                 boolean fillx,
                                                                 boolean filly,
                                                                 int topInset,
                                                                 int leftInset,
                                                                 int botInset,
                                                                 int rightInset)
      • getConstraints

        public static java.awt.GridBagConstraints getConstraints​(int x,
                                                                 int y,
                                                                 float weightx,
                                                                 float weighty,
                                                                 int width,
                                                                 int height,
                                                                 int topInset,
                                                                 int leftInset,
                                                                 int botInset,
                                                                 int rightInset)
      • getConstraints

        public static java.awt.GridBagConstraints getConstraints​(int x,
                                                                 int y,
                                                                 float weightx,
                                                                 float weighty,
                                                                 int width,
                                                                 int height,
                                                                 boolean fillx,
                                                                 boolean filly,
                                                                 int align,
                                                                 int topInset,
                                                                 int leftInset,
                                                                 int botInset,
                                                                 int rightInset)
      • getC

        public static java.awt.GridBagConstraints getC​(int x,
                                                       int y,
                                                       float weightx,
                                                       float weighty,
                                                       int width,
                                                       int height,
                                                       int padx,
                                                       int pady,
                                                       int topInset,
                                                       int leftInset,
                                                       int botInset,
                                                       int rightInset)
      • getC

        public static java.awt.GridBagConstraints getC​(int x,
                                                       int y,
                                                       float weightx,
                                                       float weighty,
                                                       int width,
                                                       int height,
                                                       boolean fillx,
                                                       boolean filly,
                                                       int align,
                                                       java.awt.Insets insets)
      • loadImage

        public static java.awt.Image loadImage​(java.lang.Class base,
                                               java.lang.String imageFileName)
      • loadImage

        public static java.awt.Image loadImage​(java.lang.String imageFileName)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • loadImage

        public static java.awt.Image loadImage​(java.lang.Class base,
                                               java.lang.String imageFileName,
                                               java.awt.Component comp)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • getTopmostParent

        public static final java.awt.Component getTopmostParent​(java.awt.Component c)
      • getFrame

        public static final java.awt.Frame getFrame​(java.awt.Component c)
      • getJFrame

        public static final javax.swing.JFrame getJFrame​(java.awt.Component c)
        Since build 505 of Moneydance
      • getWindow

        public static final java.awt.Window getWindow​(java.awt.Component c)
      • centerWindow

        public static final void centerWindow​(java.awt.Window win)
      • setWindowPosition

        public static final void setWindowPosition​(java.awt.Window win,
                                                   int position)
      • setWindowPosition

        public static final void setWindowPosition​(java.awt.Window child,
                                                   java.awt.Component parent)
      • setupWindow

        public static final void setupWindow​(java.awt.Window child)
      • setupWindow

        public static final void setupWindow​(java.awt.Window child,
                                             int position)
      • setupWindow

        public static final void setupWindow​(java.awt.Window child,
                                             java.awt.Component parent)
      • setupWindow

        public static final void setupWindow​(java.awt.Window child,
                                             int width,
                                             int height)
      • setupWindow

        public static final void setupWindow​(java.awt.Window child,
                                             int width,
                                             int height,
                                             int position)
      • setupWindow

        public static final void setupWindow​(java.awt.Window child,
                                             int width,
                                             int height,
                                             int x,
                                             int y,
                                             java.awt.Component parent)
      • setupWindow

        public static final void setupWindow​(java.awt.Window child,
                                             int width,
                                             int height,
                                             int x,
                                             int y)
      • setupWindow

        public static final void setupWindow​(java.awt.Window child,
                                             int width,
                                             int height,
                                             java.awt.Component parent)
      • drawHashOverArea

        public static final void drawHashOverArea​(java.awt.Graphics2D g,
                                                  int x,
                                                  int y,
                                                  int width,
                                                  int height)
        Draw diagonal hashing lines over the given area.
        Since:
        build 600