Package com.vaadin.flow.component
Enum HasText.WhiteSpace
- java.lang.Object
-
- java.lang.Enum<HasText.WhiteSpace>
-
- com.vaadin.flow.component.HasText.WhiteSpace
-
- All Implemented Interfaces:
Serializable
,Comparable<HasText.WhiteSpace>
- Enclosing interface:
- HasText
public static enum HasText.WhiteSpace extends Enum<HasText.WhiteSpace>
Represents"white-space"
style values.- Since:
- Author:
- Vaadin Ltd
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BREAK_SPACES
The behavior is identical to that of pre-wrap, except that: Any sequence of preserved white space always takes up space, including at the end of the line.INHERIT
Inherits this property from its parent element.INITIAL
Sets this property to its default value.NORMAL
Sequences of white space are collapsed.NOWRAP
Collapses white space as for normal, but suppresses line breaks (text wrapping) within the source.PRE
Sequences of white space are preserved.PRE_LINE
Sequences of white space are collapsed.PRE_WRAP
Sequences of white space are preserved.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HasText.WhiteSpace
forString(String value)
String
toString()
static HasText.WhiteSpace
valueOf(String name)
Returns the enum constant of this type with the specified name.static HasText.WhiteSpace[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NORMAL
public static final HasText.WhiteSpace NORMAL
Sequences of white space are collapsed. Newline characters in the source are handled the same as other white space. Lines are broken as necessary to fill line boxes.
-
NOWRAP
public static final HasText.WhiteSpace NOWRAP
Collapses white space as for normal, but suppresses line breaks (text wrapping) within the source.
-
PRE
public static final HasText.WhiteSpace PRE
Sequences of white space are preserved. Lines are only broken at newline characters in the source and at <br> elements.
-
PRE_WRAP
public static final HasText.WhiteSpace PRE_WRAP
Sequences of white space are preserved. Lines are broken at newline characters, at <br>, and as necessary to fill line boxes.
-
PRE_LINE
public static final HasText.WhiteSpace PRE_LINE
Sequences of white space are collapsed. Lines are broken at newline characters, at <br>, and as necessary to fill line boxes.
-
BREAK_SPACES
public static final HasText.WhiteSpace BREAK_SPACES
The behavior is identical to that of pre-wrap, except that:- Any sequence of preserved white space always takes up space, including at the end of the line.
- A line breaking opportunity exists after every preserved white space character, including between white space characters.
- Such preserved spaces take up space and do not hang, and thus affect the box’s intrinsic sizes (min-content size and max-content size).
-
INHERIT
public static final HasText.WhiteSpace INHERIT
Inherits this property from its parent element.
-
INITIAL
public static final HasText.WhiteSpace INITIAL
Sets this property to its default value.
-
-
Method Detail
-
values
public static HasText.WhiteSpace[] 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 (HasText.WhiteSpace c : HasText.WhiteSpace.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HasText.WhiteSpace 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
-
toString
public String toString()
- Overrides:
toString
in classEnum<HasText.WhiteSpace>
-
forString
public static HasText.WhiteSpace forString(String value)
-
-