Modifier and Type | Method and Description |
---|---|
WordWrap.Builder |
WordWrap.Builder.breakWords(boolean breakWords)
If a word is longer than
maxWidth and breakWords is true then
such a word will be broken across two or more lines (with or without a hyphen
according to insertHyphens(boolean) ). |
WordWrap.Builder |
WordWrap.Builder.excludeExtraWordChars(String excludeWordChars)
Adds extra word characters to be excluded.
|
WordWrap.Builder |
WordWrap.Builder.extraWordChars(Set<Character> extraWordChars)
Sets all extra word characters (characters that will be treated like normal
alphabetic characters for defining word boundaries).
|
WordWrap.Builder |
WordWrap.Builder.extraWordChars(String extraWordChars)
Sets all extra word characters (characters that will be treated like normal
alphabetic characters for defining word boundaries).
|
static WordWrap.Builder |
WordWrap.from(CharSequence text)
Sets the the source to be wrapped and returns a builder to specify more
parameters.
|
static WordWrap.Builder |
WordWrap.from(File file,
Charset charset)
Sets the source to be wrapped and the character set to be used to read it.
|
static WordWrap.Builder |
WordWrap.from(InputStream in,
Charset charset)
Sets the source to be wrapped and the character set to be used to read it.
|
static WordWrap.Builder |
WordWrap.from(Reader reader)
Sets the source to be wrapped and returns a builder to specify more
parameters.
|
static WordWrap.Builder |
WordWrap.fromClasspath(String resource,
Charset charset)
Sets the source to be wrapped as a classpath resource to be read using the
given character set.
|
static WordWrap.Builder |
WordWrap.fromClasspathUtf8(String resource)
Sets the source to be wrapped as a classpath resource which will be read
using the UTF-8 character set.
|
static WordWrap.Builder |
WordWrap.fromUtf8(InputStream in)
Sets the source to be wrapped.
|
WordWrap.Builder |
WordWrap.Builder.includeExtraWordChars(String includeWordChars)
Adds more word characters (characters that will be treated like normal
alphabetic characters for defining word boundaries).
|
WordWrap.Builder |
WordWrap.Builder.insertHyphens(boolean insertHyphens)
Sets if to break words using a hyphen character.
|
WordWrap.Builder |
WordWrap.Builder.maxWidth(Number maxWidth)
Sets the maximum width of a line using the
stringWidth function. |
WordWrap.Builder |
WordWrap.Builder.newLine(String newLine)
Sets the newLine string to be used.
|
WordWrap.Builder |
WordWrap.Builder.stringWidth(Function<? super CharSequence,? extends Number> stringWidth)
Sets the string width function used to determine if a line is at maximum
width (and therefore needing wrapping or splitting).
|
Copyright © 2018–2024. All rights reserved.