edu.ucla.stat.SOCR.util
Class GUIUtil

java.lang.Object
  extended by edu.ucla.stat.SOCR.util.GUIUtil

public class GUIUtil
extends java.lang.Object


Constructor Summary
GUIUtil()
           
 
Method Summary
static void addComponent(java.awt.Container container, java.awt.Component c, java.awt.GridBagConstraints gbc)
           
static void addComponent(java.awt.Container container, java.awt.Component c, int x, int y, int w, int h)
           
static void addComponent(java.awt.Container container, java.awt.Component c, int x, int y, int w, int h, int fill, int anchor, int wx, int wy)
          Adds a component into a container component of GridBagLayout.
static void addInput2Pane(java.lang.String label, java.awt.Component c, javax.swing.JPanel p, int row)
          add the component with the label at left to the JPanel at row
static java.awt.Frame getTopestParent(java.awt.Component component)
          Gets the toppest parent of a component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GUIUtil

public GUIUtil()
Method Detail

addComponent

public static void addComponent(java.awt.Container container,
                                java.awt.Component c,
                                int x,
                                int y,
                                int w,
                                int h,
                                int fill,
                                int anchor,
                                int wx,
                                int wy)
                         throws java.awt.AWTException
Adds a component into a container component of GridBagLayout.

Parameters:
container - a Container where a component will be added
c - a Component to be added into a container
x - an interger specifying the x coordiante of the added component
y - an integer specifying the y coordinate of the added component
w - an integer specifying the width of the added component
h - an integer specifying the height of the added component
anchor - an interger specifying the anchor point of the added component
wx - an double specifying the extra horizontal space distribution
wy - an double specifying the extra vertical space distribution
Throws:
java.awt.AWTException - Abstract Window Toolkit exception

addComponent

public static void addComponent(java.awt.Container container,
                                java.awt.Component c,
                                int x,
                                int y,
                                int w,
                                int h)
                         throws java.awt.AWTException
Throws:
java.awt.AWTException

addInput2Pane

public static void addInput2Pane(java.lang.String label,
                                 java.awt.Component c,
                                 javax.swing.JPanel p,
                                 int row)
                          throws java.awt.AWTException
add the component with the label at left to the JPanel at row

Throws:
java.awt.AWTException

addComponent

public static void addComponent(java.awt.Container container,
                                java.awt.Component c,
                                java.awt.GridBagConstraints gbc)
                         throws java.awt.AWTException
Throws:
java.awt.AWTException

getTopestParent

public static java.awt.Frame getTopestParent(java.awt.Component component)
Gets the toppest parent of a component.

Parameters:
a - Component