|
Level Edit
Editor of TH .level files
|
Public Member Functions | |
| GridPanel (int noColumns) | |
| void | setInsets (int inset) |
| void | setInsets (int top, int left, int bottom, int right) |
| Component | add (Component comp) |
| Component | add (Component comp, boolean newRow) |
| void | remove (Component comp) |
| void | swap (Component oldComp, Component newComp) |
| void | next (int times) |
| void | next () |
| void | nextRow () |
A panel that uses the GridBagLayout to layout its components. This is a rudimentary implementation tailored for the LevelEdit project. It supplies similar functionality as MigLayout, but only the parts we need. The constructor takes a column argument that specifies the number of columns used in the grid. Each added component is put at the end of the grid left to right, top to bottom.
|
inline |
|
inline |
|
inline |
Adds a new component to the container and advances one row i newRow is true. If the component is added to the last column in the current row the advancement is still only one row.
| comp | Component to add. |
| newRow | Whether to advance one row after adding the new component. |
|
inline |
Skips one cell in the grid.
|
inline |
Skips 'times' cells in the grid so that the next component will be added further down.
| times | how many cells to skip. |
|
inline |
Advances the layout one row so that the next added component will be on a new one.
|
inline |
|
inline |
Set insets in all directions to 'inset' all for each object added in the future.
| inset | Inset to use in all directions. |
|
inline |
Set insets in each direction according to the parameters, will be used for all objects added to the JGridPanel from this point onwards.
| top | Top inset value |
| left | Left inset value |
| bottom | Bottom inset value |
| right | Right inset value |
|
inline |
Finds the oldComp in the grid of added components and swaps it for the newComp.
| oldComp | |
| newComp |