Package org.vaadin.miki.shared.labels
Enum LabelPosition
- java.lang.Object
-
- java.lang.Enum<LabelPosition>
-
- org.vaadin.miki.shared.labels.LabelPosition
-
- All Implemented Interfaces:
Serializable,Comparable<LabelPosition>
public enum LabelPosition extends Enum<LabelPosition>
Available label positions.- Since:
- 2022-09-23
- Author:
- miki
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AFTER_ENDLabel is placed to the side of the component, after it, and aligned to the end of the column.AFTER_MIDDLELabel is placed to the side of the component, after it, and aligned to the middle of the column.AFTER_STARTLabel is placed to the side of the component, after it, and aligned to the start of the column.BEFORE_ENDLabel is placed to the side of the component, before it, and aligned to the end of the column.BEFORE_MIDDLELabel is placed to the side of the component, before it, and aligned to the middle of the column.BEFORE_STARTLabel is placed to the side of the component, before it, and aligned to the start of the column.DEFAULTDefault label position, without any changes.LASTLabel is placed as the last thing of the entire component.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetPositionData()The attribute value that corresponds to the given label position.static LabelPositionvalueOf(String name)Returns the enum constant of this type with the specified name.static LabelPosition[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final LabelPosition DEFAULT
Default label position, without any changes.
-
BEFORE_START
public static final LabelPosition BEFORE_START
Label is placed to the side of the component, before it, and aligned to the start of the column. In left-to-right, top-to-bottom layouts, this means: label on the left, aligned to the top.
-
BEFORE_MIDDLE
public static final LabelPosition BEFORE_MIDDLE
Label is placed to the side of the component, before it, and aligned to the middle of the column. In left-to-right, top-to-bottom layouts, this means: label on the left, in the vertical middle of column.
-
BEFORE_END
public static final LabelPosition BEFORE_END
Label is placed to the side of the component, before it, and aligned to the end of the column. In left-to-right, top-to-bottom layouts, this means: label on the left, aligned to the bottom.
-
AFTER_START
public static final LabelPosition AFTER_START
Label is placed to the side of the component, after it, and aligned to the start of the column. In left-to-right, top-to-bottom layouts, this means: label on the right, aligned to the top.
-
AFTER_MIDDLE
public static final LabelPosition AFTER_MIDDLE
Label is placed to the side of the component, after it, and aligned to the middle of the column. In left-to-right, top-to-bottom layouts, this means: label on the right, in the vertical middle of column.
-
AFTER_END
public static final LabelPosition AFTER_END
Label is placed to the side of the component, after it, and aligned to the end of the column. In left-to-right, top-to-bottom layouts, this means: label on the right, aligned to the bottom.
-
LAST
public static final LabelPosition LAST
Label is placed as the last thing of the entire component. In left-to-right, top-to-bottom layouts, this means: label on the bottom.
-
-
Method Detail
-
values
public static LabelPosition[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (LabelPosition c : LabelPosition.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LabelPosition valueOf(String name)
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getPositionData
public String getPositionData()
The attribute value that corresponds to the given label position. Used by CSS selectors. This is a space-separated list of styles. Nevernull.- Returns:
- A non-
nullarray.
-
-