Enum Class AlignmentFlag
- All Implemented Interfaces:
Serializable
,Comparable<AlignmentFlag>
,Constable
The vertical alignment flags are Baseline
, Sub
, Super
, Top
, TextTop
, Middle
, Bottom
and TextBottom
.
The horizontal alignment flags are Left
, Right
, Center
and Justify
.
When used with setVerticalAlignment(), this applies only to inline widgets and determines how to position itself on the current line, with respect to sibling inline widgets.
When used with WContainerWidget#setContentAlignment()
, this determines the vertical alignment of contents
within the table cell.
When used with WPainter#drawText()
, this determines the
horizontal and vertical alignment of the text with respect to the bounding rectangle.
When used with WContainerWidget#setContentAlignment()
, this specifies how contents should be aligned
horizontally within the container.
Not all values are applicable in all situations. The most commonly used values are Left
, Center
, Right
,
Bottom
, Middle
and Top
.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAlign at baseline (default alignment).Align bottom of widget to the bottom of the lowest sigling widget.Align horizontally in the center.Justify left and right.Align to the left.Align vertically the middle to the middle of the parent widget.Align to the right.Align below the baseline (as if subscript).Align above the baseline (as if superscript).Align bottom of widget to the bottom of parent widget's font.Align top of widget with the top of the parent widget's font.Align top of widget with top of tallest sibling widget. -
Field Summary
Modifier and TypeFieldDescriptionstatic final EnumSet<AlignmentFlag>
Combination of all horizontal alignment flags.static final EnumSet<AlignmentFlag>
Combination of all vertical alignment flags. -
Method Summary
Modifier and TypeMethodDescriptionint
getValue()
Returns the numerical representation of this enum.static AlignmentFlag
Returns the enum constant of this class with the specified name.static AlignmentFlag[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Left
Align to the left. -
Right
Align to the right. -
Center
Align horizontally in the center. -
Justify
Justify left and right. -
Baseline
Align at baseline (default alignment). -
Sub
Align below the baseline (as if subscript). -
Super
Align above the baseline (as if superscript). -
Top
Align top of widget with top of tallest sibling widget. -
TextTop
Align top of widget with the top of the parent widget's font. -
Middle
Align vertically the middle to the middle of the parent widget. -
Bottom
Align bottom of widget to the bottom of the lowest sigling widget. -
TextBottom
Align bottom of widget to the bottom of parent widget's font.
-
-
Field Details
-
AlignHorizontalMask
Combination of all horizontal alignment flags. -
AlignVerticalMask
Combination of all vertical alignment flags.
-
-
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
-
getValue
public int getValue()Returns the numerical representation of this enum.
-