org.apache.batik.ext.swing
public class JGridBagPanel extends JPanel implements GridBagConstants
Nested Class Summary | |
---|---|
static interface | JGridBagPanel.InsetsManager
Provides insets desired for a given grid cell |
Field Summary | |
---|---|
static JGridBagPanel.InsetsManager | DEFAULT_INSETS
An InsetsManager that uses padding for inside cells |
JGridBagPanel.InsetsManager | insetsManager
Used to get insets at any given cell location |
static JGridBagPanel.InsetsManager | ZERO_INSETS
An InsetsManager that uses zero insets |
Constructor Summary | |
---|---|
JGridBagPanel()
Sets the layout manager to GridBagLayout | |
JGridBagPanel(JGridBagPanel.InsetsManager insetsManager)
Initializes panel with a given insets manager |
Method Summary | |
---|---|
void | add(Component cmp, int gridx, int gridy, int gridwidth, int gridheight, int anchor, int fill, double weightx, double weighty)
This version uses default insets and assumes that components are added in
positive cell coordinates. |
void | setLayout(LayoutManager layout)
This method only takes effect if the LayoutManager is a GridBagLayout |
Parameters: cmp Component to add to the panel gridx x position of the cell into which component should be added gridy y position of the cell into which component should be added gridwidth width, in cells, of the space occupied by the component in the grid gridheight height, in cells, of the space occupied by the component in the grid anchor placement of the component in its allocated space: WEST, NORTH, SOUTH, NORTHWEST, ... fill out should the component be resized within its space? NONE, BOTH, HORIZONTAL, VERTICAL. weightx what amount of extra horizontal space, if any, should be given to this component? weighty what amount of extra vertical space, if any, should be given to this component?