public class WBox extends WPanel
| Modifier and Type | Field and Description |
|---|---|
protected Axis |
axis
The axis that the widgets are laid out on.
|
protected HorizontalAlignment |
horizontalAlignment
The horizontal alignment for this box's children.
|
protected int |
spacing
The spacing between widgets.
|
protected VerticalAlignment |
verticalAlignment
The vertical alignment for this box's children.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(WWidget widget)
Adds a widget to this box.
|
void |
add(WWidget widget,
int width,
int height)
Adds a widget to this box.
|
Axis |
getAxis()
Gets the axis of this box.
|
HorizontalAlignment |
getHorizontalAlignment()
Gets the horizontal alignment of this box.
|
Insets |
getInsets()
Gets the layout insets of this box.
|
int |
getSpacing()
Gets the spacing between widgets.
|
VerticalAlignment |
getVerticalAlignment()
Gets the vertical alignment of this box.
|
void |
layout()
Uses this Panel's layout rules to reposition and resize components to fit nicely in the panel.
|
WBox |
setAxis(Axis axis)
Sets the axis of this box.
|
WBox |
setHorizontalAlignment(HorizontalAlignment alignment)
Sets the horizontal alignment of this box.
|
WBox |
setInsets(Insets insets)
Sets the layout insets of this box.
|
WBox |
setSpacing(int spacing)
Sets the spacing between widgets in this box.
|
WBox |
setVerticalAlignment(VerticalAlignment alignment)
Sets the vertical alignment of this box.
|
addPainters, canResize, createPeers, cycleFocus, cycleFocus, expandToFit, expandToFit, getBackgroundPainter, hit, 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 spacing
protected Axis axis
protected HorizontalAlignment horizontalAlignment
protected VerticalAlignment verticalAlignment
public WBox(Axis axis)
axis - the box axisjava.lang.NullPointerException - if the axis is nullpublic void add(WWidget widget, int width, int height)
widget - the widgetwidth - the new width of the widgetheight - the new height of the widgetpublic void add(WWidget widget)
widget - the widgetpublic void layout()
WPanelpublic int getSpacing()
public WBox setSpacing(int spacing)
spacing - the new spacingpublic Axis getAxis()
public WBox setAxis(Axis axis)
axis - the new axisjava.lang.NullPointerException - if the axis is nullpublic HorizontalAlignment getHorizontalAlignment()
public WBox setHorizontalAlignment(HorizontalAlignment alignment)
alignment - the new alignmentjava.lang.NullPointerException - if the alignment is nullpublic VerticalAlignment getVerticalAlignment()
public WBox setVerticalAlignment(VerticalAlignment alignment)
alignment - the new alignmentjava.lang.NullPointerException - if the alignment is nullpublic Insets getInsets()