public class WGridPanel extends WPanel
| Modifier and Type | Field and Description |
|---|---|
protected int |
grid
The grid size in pixels.
|
| Constructor and Description |
|---|
WGridPanel()
Constructs a grid panel with the default grid size.
|
WGridPanel(int gridSize)
Constructs a grid panel with a custom grid size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(WWidget w,
int x,
int y)
Adds a widget to this panel.
|
void |
add(WWidget w,
int x,
int y,
int width,
int height)
Adds a widget to this panel and resizes it to a custom size.
|
Insets |
getInsets()
Gets the layout insets of this panel.
|
WGridPanel |
setInsets(Insets insets)
Sets the layout insets of this panel.
|
addPainters, canResize, createPeers, cycleFocus, cycleFocus, expandToFit, expandToFit, getBackgroundPainter, hit, layout, onHidden, onShown, paint, remove, setBackgroundPainter, tick, toString, validateaddTooltip, canFocus, getAbsoluteX, getAbsoluteY, getHeight, getHost, getParent, getWidth, getX, getY, isActivationKey, isFocused, isWithinBounds, onCharTyped, onClick, onFocusGained, onFocusLost, onKeyPressed, onKeyReleased, onMouseDown, onMouseDrag, onMouseMove, onMouseScroll, onMouseUp, releaseFocus, renderTooltip, requestFocus, setHost, setLocation, setParent, setSizeprotected int grid
public WGridPanel()
public WGridPanel(int gridSize)
gridSize - the grid size in pixelspublic void add(WWidget w, int x, int y)
If the widget can be resized,
it will be resized to (grid, grid).
w - the widgetx - the X position in grid cellsy - the Y position in grid cellspublic void add(WWidget w, int x, int y, int width, int height)
w - the widgetx - the X position in grid cellsy - the Y position in grid cellswidth - the new width in grid cellsheight - the new height in grid cellspublic Insets getInsets()
public WGridPanel setInsets(Insets insets)
The insets should be set before adding any widgets to this panel.
insets - the insets, should not be null