com.retek.commons.gui.util
Class GridTool

java.lang.Object
  extended bycom.retek.commons.gui.util.GridTool

public class GridTool
extends java.lang.Object

This tool creates a complex GridBagConstraints object with only numbers. It is rather complicated, but with proper documenation, it is easy to learn and use and much more flexible than any other route to creating well-layed out JAVA screens.

It is important to note that GridBagConstraints does not support component orientation and thus this should be handle inside each screen being coded.

Retek Inc. Copyright (c) 2002


Method Summary
static java.awt.GridBagConstraints constraints(int xCoordinate, int yCoordinate, int gridWidth, int gridHeight, int horizontalWeight, int verticalWeight, int anchorValue, int fillValue, int topPad, int leftPad, int bottomPad, int rightPad)
          Creates and returns a GridBagConstraints objects based on a series of integers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

constraints

public static java.awt.GridBagConstraints constraints(int xCoordinate,
                                                      int yCoordinate,
                                                      int gridWidth,
                                                      int gridHeight,
                                                      int horizontalWeight,
                                                      int verticalWeight,
                                                      int anchorValue,
                                                      int fillValue,
                                                      int topPad,
                                                      int leftPad,
                                                      int bottomPad,
                                                      int rightPad)
Creates and returns a GridBagConstraints objects based on a series of integers. This is a shorthand for GUI design simplicity. Unfortunately, it requires understanding the constraints.

Parameters:
xCoordinate - The X Grid Location (column to start the widget in).
yCoordinate - The Y Grid Location (row to start the widget in).
gridWidth - Grid Width To Consume (number of columns).
gridHeight - Grid Height To Consume (number of rows).
horizontalWeight - Weight of Horizontal Resizing
verticalWeight - Weight of Vertical Resizing
anchorValue - Anchor. Valid values include: 0 = Center, 1 = West, 2 = East, 3 = North, 4 = South, 5 = Northwest, 6 = Northeast, 7 = Southwest, 8 = Southeast.
fillValue - Fill. Valid values include: 0 = None, 1 = Horizontal, 2 = Vertical, 3 = Both.
topPad - Top Pad (in pixels).
leftPad - Left Pad (in pixels).
bottomPad - Bottom Pad (in pixels).
rightPad - Right Pad (in pixels);
Returns:
A GrigBagConstraints object constructed from the input parameters.


Copyright © 2004 Retek Inc. All Rights Reserved. - Generated at Fri, 10/22/2004 07:28