QJCC homepage

biz.chitec.quarterback.swing
Class GBC

java.lang.Object
  extended byjava.awt.GridBagConstraints
      extended bybiz.chitec.quarterback.swing.GBC
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class GBC
extends java.awt.GridBagConstraints

Convenience class with astatic method to create GridBagConstraints and several predefined GridBagConstraints objects.

Version:
$Id: ad526bd950b552b73c8cdc0a5338308d2c0707df $
Author:
Dirk Hillbrecht 1997-2000, chitec/Dirk Hillbrecht 2000-2001,2003. Distributed under the terms of the GNU LGPL.
See Also:
Serialized Form

Field Summary
static java.awt.GridBagConstraints c
          Generic GridBagConstraints instance to be used as abbrevation for the full class name.
static java.awt.GridBagConstraints elemC
          One-cell-element without expanding, west-oriented.
static java.awt.GridBagConstraints elemcenteredC
          One-cell-element without expanding, centered.
static java.awt.GridBagConstraints expandingtableC
          Last-cell-element, centerized and expanding in both directions.
static java.awt.GridBagConstraints expandingverticalC
          Last-cell-element, centerized and vertically expanding.
static java.awt.GridBagConstraints expandingverticalupperC
          Last-cell-element, upper-center anchored and vertically expanding.
static java.awt.GridBagConstraints fillC
          One-cell-element without expanding but filling the rectangle, centered.
static java.awt.GridBagLayout gbl
          Layout manager that can also be used outside
static java.awt.GridBagConstraints horizelemC
          One-cell-element, expanding horizontally, west-oriented.
static java.awt.GridBagConstraints horizelemcenteredC
          One-cell-element, expanding horizontally, centered.
static java.awt.Insets myinsets
          Standard insets (1,2,1,2)
static java.awt.GridBagConstraints nonlastexpandingtableC
          Not last-cell-element, centerized and expanding in both directions.
static java.awt.GridBagConstraints relemC
          Last-cell-element without expanding, west-oriented.
static java.awt.GridBagConstraints relemcenteredC
          Last-cell-element without expanding, centered.
static java.awt.GridBagConstraints rfillC
          Last-cell-element without expanding but filling the rectangle, centered.
static java.awt.GridBagConstraints rhorizelemC
          Last-cell-element expanding horizontally, west-oriented.
static java.awt.GridBagConstraints rhorizelemcenteredC
          Last-cell-element expanding horizontally, centered.
static java.awt.GridBagConstraints rnorthwestfillC
          Last-cell-element without expanding but filling the rectangle, content is north-west-oriented.
static java.awt.GridBagConstraints separatorHC
          Horizontal line with additional free space around.
static java.awt.GridBagConstraints separatorVC
          Vertical line with additional free space around.
static java.awt.GridBagConstraints singlecenterC
          Singular element centered into its container both not expanding.
static java.awt.GridBagConstraints spacefillingC
          Last-cell-element, centerized and expanding in both directions, no insets.
 
Fields inherited from class java.awt.GridBagConstraints
anchor, BOTH, CENTER, EAST, fill, FIRST_LINE_END, FIRST_LINE_START, gridheight, gridwidth, gridx, gridy, HORIZONTAL, insets, ipadx, ipady, LAST_LINE_END, LAST_LINE_START, LINE_END, LINE_START, NONE, NORTH, NORTHEAST, NORTHWEST, PAGE_END, PAGE_START, RELATIVE, REMAINDER, SOUTH, SOUTHEAST, SOUTHWEST, VERTICAL, weightx, weighty, WEST
 
Constructor Summary
private GBC()
          Fully-static object.
 
Method Summary
static java.awt.GridBagConstraints copy(java.awt.GridBagConstraints orig)
           
static java.awt.GridBagConstraints makeGBC(int gridwidth, int gridheight, int fill, java.awt.Insets insets, int anchor, int weightx, int weighty)
          Create GridBagConstraints only with the more important parameters.
static java.awt.GridBagConstraints makeGBC(int gridx, int gridy, int gridwidth, int gridheight, int fill, int ipadx, int ipady, java.awt.Insets insets, int anchor, int weightx, int weighty)
          Create GridBagConstraints.
static javax.swing.JPanel packedPanel(java.awt.Component c)
          Returns panel which contains given Component centered and without expansion.
 
Methods inherited from class java.awt.GridBagConstraints
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gbl

public static final java.awt.GridBagLayout gbl
Layout manager that can also be used outside


myinsets

public static final java.awt.Insets myinsets
Standard insets (1,2,1,2)


c

public static final java.awt.GridBagConstraints c
Generic GridBagConstraints instance to be used as abbrevation for the full class name.


elemC

public static final java.awt.GridBagConstraints elemC
One-cell-element without expanding, west-oriented.


elemcenteredC

public static final java.awt.GridBagConstraints elemcenteredC
One-cell-element without expanding, centered.


horizelemC

public static final java.awt.GridBagConstraints horizelemC
One-cell-element, expanding horizontally, west-oriented.


horizelemcenteredC

public static final java.awt.GridBagConstraints horizelemcenteredC
One-cell-element, expanding horizontally, centered.


relemC

public static final java.awt.GridBagConstraints relemC
Last-cell-element without expanding, west-oriented.


relemcenteredC

public static final java.awt.GridBagConstraints relemcenteredC
Last-cell-element without expanding, centered.


fillC

public static final java.awt.GridBagConstraints fillC
One-cell-element without expanding but filling the rectangle, centered.


rfillC

public static final java.awt.GridBagConstraints rfillC
Last-cell-element without expanding but filling the rectangle, centered.


rnorthwestfillC

public static final java.awt.GridBagConstraints rnorthwestfillC
Last-cell-element without expanding but filling the rectangle, content is north-west-oriented.


rhorizelemC

public static final java.awt.GridBagConstraints rhorizelemC
Last-cell-element expanding horizontally, west-oriented.


rhorizelemcenteredC

public static final java.awt.GridBagConstraints rhorizelemcenteredC
Last-cell-element expanding horizontally, centered.


expandingtableC

public static final java.awt.GridBagConstraints expandingtableC
Last-cell-element, centerized and expanding in both directions.


spacefillingC

public static final java.awt.GridBagConstraints spacefillingC
Last-cell-element, centerized and expanding in both directions, no insets.


nonlastexpandingtableC

public static final java.awt.GridBagConstraints nonlastexpandingtableC
Not last-cell-element, centerized and expanding in both directions.


expandingverticalC

public static final java.awt.GridBagConstraints expandingverticalC
Last-cell-element, centerized and vertically expanding.


expandingverticalupperC

public static final java.awt.GridBagConstraints expandingverticalupperC
Last-cell-element, upper-center anchored and vertically expanding.


separatorHC

public static final java.awt.GridBagConstraints separatorHC
Horizontal line with additional free space around.


separatorVC

public static final java.awt.GridBagConstraints separatorVC
Vertical line with additional free space around.


singlecenterC

public static final java.awt.GridBagConstraints singlecenterC
Singular element centered into its container both not expanding.

Constructor Detail

GBC

private GBC()
Fully-static object.

Method Detail

makeGBC

public static final java.awt.GridBagConstraints makeGBC(int gridx,
                                                        int gridy,
                                                        int gridwidth,
                                                        int gridheight,
                                                        int fill,
                                                        int ipadx,
                                                        int ipady,
                                                        java.awt.Insets insets,
                                                        int anchor,
                                                        int weightx,
                                                        int weighty)
Create GridBagConstraints. Straight forward. Passed insets can be null, in which case they are not put into the constraints.


makeGBC

public static final java.awt.GridBagConstraints makeGBC(int gridwidth,
                                                        int gridheight,
                                                        int fill,
                                                        java.awt.Insets insets,
                                                        int anchor,
                                                        int weightx,
                                                        int weighty)
Create GridBagConstraints only with the more important parameters. Position is set relative, padding to (0,0).


copy

public static final java.awt.GridBagConstraints copy(java.awt.GridBagConstraints orig)

packedPanel

public static final javax.swing.JPanel packedPanel(java.awt.Component c)
Returns panel which contains given Component centered and without expansion.


QJCC homepage