public enum CellAlignment extends Enum<CellAlignment>
An enumeration class that defines the possible alignments of components in the cells of a percent layout.
The alignment determines how components are positioned in the cell(s) they are contained. For instance, they can be configured to fill the whole cell. If the size of the hosting container changes, the sizes of the components are adapted to fit into the new cell size. It is also possible to specify that components should keep their original size. Then they can be aligned at the start of the cell, the end of the cell, or its center.
The alignment constants defined here work for both columns and rows.
Therefore generic names like START
or END
are used rather
than column- or row-specific terms like left, right, or
top. Nevertheless, the meaning should be obvious. The
CellConstraints
class defines a property of this class.
Enum Constant and Description |
---|
CENTER
The alignment center.
|
END
The alignment end.
|
FULL
The alignment full.
|
START
The alignment start.
|
Modifier and Type | Method and Description |
---|---|
static CellAlignment |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CellAlignment[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CellAlignment START
public static final CellAlignment CENTER
public static final CellAlignment END
public static final CellAlignment FULL
public static CellAlignment[] values()
for (CellAlignment c : CellAlignment.values()) System.out.println(c);
public static CellAlignment valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2016 The JGUIraffe Team. All rights reserved.