Enum Class Align
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<Align>
,Constable
Alignment only matters if the widget receives a “too large” allocation,
for example if you packed the widget with the Gtk.Widget:hexpand
property inside a Box
, then the widget might get extra space.
If you have for example a 16x16 icon inside a 32x32 space, the icon
could be scaled and stretched, it could be centered, or it could be
positioned to one side of the space.
Note that in horizontal context GTK_ALIGN_START
and GTK_ALIGN_END
are interpreted relative to text direction.
Baseline support is optional for containers and widgets, and is only available
for vertical alignment. GTK_ALIGN_BASELINE_CENTER
and GTK_ALIGN_BASELINE_FILL
are treated similar to GTK_ALIGN_CENTER
and GTK_ALIGN_FILL
, except that it
positions the widget to line up the baselines, where that is supported.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionstretch to fill all space, but align the baseline.a different name forGTK_ALIGN_BASELINE
.center natural width of widget inside the allocationsnap to right or bottom side, leaving space on left or topstretch to fill all space if possible, center if no meaningful way to stretchsnap to left or top side, leaving space on right or bottom -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Type
getType()
Get the GType of the Align classint
getValue()
Get the numeric value of this enumstatic Align
of
(int value) Create a new Align for the provided valuestatic Align
Returns the enum constant of this class with the specified name.static Align[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FILL
stretch to fill all space if possible, center if no meaningful way to stretch -
START
snap to left or top side, leaving space on right or bottom -
END
snap to right or bottom side, leaving space on left or top -
CENTER
center natural width of widget inside the allocation -
BASELINE_FILL
a different name forGTK_ALIGN_BASELINE
. -
BASELINE_CENTER
stretch to fill all space, but align the baseline.
-
-
Field Details
-
BASELINE
align the widget according to the baseline.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
of
Create a new Align for the provided value- Parameters:
value
- the enum value- Returns:
- the enum for the provided value
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValue
in interfaceEnumeration
- Returns:
- the enum value
-
getType
-