public final class AttachOptions
extends org.freedesktop.bindings.Constant
Table
uses
eventually existing additional space, e.g. because another cell in the same
row is much wider or another column much higher.
It may be necessary to encapsulate your attached Widget in an
Alignment
container. This could look like this:
Table table; ... TextEntry number = new TextEntry(); number.setWidthChars(4); Alignment alignNumber = new Alignment(Alignment.LEFT, Alignment.CENTER, 0,0, number); table.attach(alignNumber, 1, 2, 1, 2, AttachOptions.FILL, AttachOptions.SHRINK, 0,0);
Modifier and Type | Field and Description |
---|---|
static AttachOptions |
EXPAND
Like FILL, but also causes the cell to expand and use extra space.
|
static AttachOptions |
FILL
The widget gets all the available space.
|
static AttachOptions |
SHRINK
Although there is additional space available, the Widget shall keep its
size or even shrink if possible.
|
public static final AttachOptions EXPAND
public static final AttachOptions FILL
Alignment
container, the Widget is resized to fill
the space. If you do use Alignment containers the Widget itself will
not grow, but keep its size while the container controls where it
resides.public static final AttachOptions SHRINK
Encapsulating the Widget in an Alignment
container does not
help, since the Alignment container only gets the same space granted
the shrinked Widget would get.