com.moneydance.awt
Class AwtUtil

java.lang.Object
  extended by com.moneydance.awt.AwtUtil

public class AwtUtil
extends java.lang.Object

Description: Misc. functions to make GUI programming easier.


Field Summary
static int DEFAULT_INSET
           
static int DEFAULT_X_INSET
           
static java.awt.Insets noInsets
           
static java.awt.Insets tallInsets
           
static int WINDOW_BOTTOM_LEFT
           
static int WINDOW_BOTTOM_RIGHT
           
static int WINDOW_CENTER
           
static int WINDOW_TOP_LEFT
           
static int WINDOW_TOP_RIGHT
           
 
Constructor Summary
AwtUtil()
           
 
Method Summary
static void centerWindow(java.awt.Window win)
           
static void drawHashOverArea(java.awt.Graphics2D g, java.awt.Paint col, 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, java.awt.Component parent)
           
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, java.awt.Component parent)
           
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 setWindowPosition(java.awt.Window child, java.awt.Component parent)
           
static void setWindowPosition(java.awt.Window win, int position)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_INSET

public static final int DEFAULT_INSET
See Also:
Constant Field Values

DEFAULT_X_INSET

public static final int DEFAULT_X_INSET
See Also:
Constant Field Values

noInsets

public static final java.awt.Insets noInsets

tallInsets

public static final java.awt.Insets tallInsets

WINDOW_BOTTOM_RIGHT

public static final int WINDOW_BOTTOM_RIGHT
See Also:
Constant Field Values

WINDOW_BOTTOM_LEFT

public static final int WINDOW_BOTTOM_LEFT
See Also:
Constant Field Values

WINDOW_TOP_LEFT

public static final int WINDOW_TOP_LEFT
See Also:
Constant Field Values

WINDOW_TOP_RIGHT

public static final int WINDOW_TOP_RIGHT
See Also:
Constant Field Values

WINDOW_CENTER

public static final int WINDOW_CENTER
See Also:
Constant Field Values
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,
                                          java.awt.Paint col,
                                          int x,
                                          int y,
                                          int width,
                                          int height)
Draw diagonal hashing lines over the given area.

Since:
build 600