Assume: int n, String s, boolean b, Component comp
Note: All methods return this to permit call chaining.
| Constructor | ||
| new EZPanel(); | Default constructor. Empty, 12 pixel border. | |
| new EZPanel(n); | Creates EZPanel with n pixel border. | |
| new EZPanel(title); | Creates EZPanel with titled border. | |
| new EZPanel(border); | Creates EZPanel with Border border. | |
| Methods for setting general characteristics. Typically done first. | ||
| setGap(n) | Sets gap size to n pixels. Default 5. | |
| autoExpand() | Same as autoExpand(true). | |
| autoExpand(b) | If true, certain components will automatically expand vertically or horizontally. | |
| trace() | Same as trace(true). | |
| trace(b) | Console log of each addtion to layout. Primarly for debugging. | |
| Border of the panel | ||
| border(n) | Sets border to n pixels. Default 12. | |
| border(s) | Sets border to a titled border. | |
| border(brdr) | Sets border to Border brdr. | |
| Relative movement (GridBagContraints gridx and gridy) | ||
| row() | Moves to next row down. Default direction to right. | |
| row(r) | Moves to row r. Defaults direction to right. | |
| skip() | Moves one row or column in default direction. | |
| col() | Moves one column to right. Defaults direction to down. | |
| down() | Moves down one row in same column. Defaults direction to down. | |
| Width and height (GridBagConstraints widthx and widthy) | ||
| width(n) | Number of columns the next added component occupies. Default 1. | |
| widthRem() | The next added component occupies remaining columns to right end of row. | |
| height(n) | Number of rows the next added component occupies. Default 1. | |
| heightRem() | The next added component occupies remaining rows to bottom of column. | |
| Alignment within an area (default is to fill the area) | ||
| north() | Aligns next component in this direction. | |
| south() | Aligns next component in this direction. | |
| east() | Aligns next component in this direction. | |
| west() | Aligns next component in this direction. | |
| northeast() | Aligns next component in this direction. | |
| northwest() | Aligns next component in this direction. | |
| southeast() | Aligns next component in this direction. | |
| southwest() | Aligns next component in this direction. | |
| center() | Aligns next component in the center of the area. | |
| Specifying expansion (GridBagConstraints weightx and weighty) | ||
| expandH() | The next component area can be expanded horizontally. | |
| expandV() | The next component area can be expanded vertically. | |
| expandHV() | The next component area can be expanded in both directions. | |
| Adding components | ||
| add(comp) | Adds component in the current position. | |
| addHSpace(n) | Adds a component that takes up n horizontal pixels. | |
| addVSpace(n) | Adds a component that takes up n vertical pixels. | |
| AddHSpring() | Adds a component that can expand horizontally. | |
| AddVSpring() | Adds a component that can expand vertically. | |
| AddHLine() | Adds a horizontal line. | |
| AddVLine() | Adds a vertical line. | |