Enum AlignmentFlag
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<AlignmentFlag>,java.lang.constant.Constable
public enum AlignmentFlag extends java.lang.Enum<AlignmentFlag>
The vertical alignment flags are AlignBaseline, AlignSub, AlignSuper, AlignTop, AlignTextTop, AlignMiddle, AlignBottom and AlignTextBottom. The horizontal alignment flags are AlignLeft, AlignRight, AlignCenter and AlignJustify.
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 AlignLeft, AlignCenter, AlignRight, AlignBottom, AlignMiddle and AlignTop.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>> -
Enum Constant Summary
Enum Constants Enum Constant Description AlignBaselineAlign at baseline (default alignment).AlignBottomAlign bottom of widget to the bottom of the lowest sigling widget.AlignCenterAlign horizontally in the center.AlignJustifyJustify left and right.AlignLeftAlign to the left.AlignMiddleAlign vertically the middle to the middle of the parent widget.AlignRightAlign to the right.AlignSubAlign below the baseline (as if subscript).AlignSuperAlign above the baseline (as if superscript).AlignTextBottomAlign bottom of widget to the bottom of parent widget's font.AlignTextTopAlign top of widget with the top of the parent widget's font.AlignTopAlign top of widget with top of tallest sibling widget. -
Field Summary
Fields Modifier and Type Field Description static java.util.EnumSet<AlignmentFlag>AlignHorizontalMaskCombination of all horizontal alignment flags.static java.util.EnumSet<AlignmentFlag>AlignVerticalMaskCombination of all vertical alignment flags. -
Method Summary
Modifier and Type Method Description intgetValue()Returns the numerical representation of this enum.static AlignmentFlagvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static AlignmentFlag[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-
Enum Constant Details
-
AlignLeft
Align to the left. -
AlignRight
Align to the right. -
AlignCenter
Align horizontally in the center. -
AlignJustify
Justify left and right. -
AlignBaseline
Align at baseline (default alignment). -
AlignSub
Align below the baseline (as if subscript). -
AlignSuper
Align above the baseline (as if superscript). -
AlignTop
Align top of widget with top of tallest sibling widget. -
AlignTextTop
Align top of widget with the top of the parent widget's font. -
AlignMiddle
Align vertically the middle to the middle of the parent widget. -
AlignBottom
Align bottom of widget to the bottom of the lowest sigling widget. -
AlignTextBottom
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 type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getValue
public int getValue()Returns the numerical representation of this enum.
-