- java.lang.Object
-
- java.lang.Enum<WrapBehaviour>
-
- com.googlecode.lanterna.screen.WrapBehaviour
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<WrapBehaviour>
public enum WrapBehaviour extends java.lang.Enum<WrapBehaviour>
What to do when line length is exceeded.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CHAR
Wrap at any character boundaries.CLIP
Don't wrap lines automatically, but honor explicit line-feeds.SINGLE_LINE
Never ever leave current line.WORD
Only wrap at word boundaries.
-
Field Summary
Fields Modifier and Type Field Description private boolean
allowLineFeed
private boolean
autoWrap
private boolean
keepWords
-
Constructor Summary
Constructors Modifier Constructor Description private
WrapBehaviour(boolean allowLineFeed, boolean autoWrap, boolean keepWords)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowLineFeed()
boolean
autoWrap()
boolean
keepWords()
static WrapBehaviour
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static WrapBehaviour[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SINGLE_LINE
public static final WrapBehaviour SINGLE_LINE
Never ever leave current line.
-
CLIP
public static final WrapBehaviour CLIP
Don't wrap lines automatically, but honor explicit line-feeds.
-
CHAR
public static final WrapBehaviour CHAR
Wrap at any character boundaries.
-
WORD
public static final WrapBehaviour WORD
Only wrap at word boundaries. If a single word exceeds line length, it will still be broken to line length.
-
-
Method Detail
-
values
public static WrapBehaviour[] 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 (WrapBehaviour c : WrapBehaviour.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static WrapBehaviour valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
allowLineFeed
public boolean allowLineFeed()
-
autoWrap
public boolean autoWrap()
-
keepWords
public boolean keepWords()
-
-