public final class TextStyle extends Object
HelpAppendable. HelpWriters are free to ignore the TextStyle recommendations particularly where they are not supported or contradict common
usage.| Modifier and Type | Class | Description |
|---|---|---|
static class |
TextStyle.Alignment |
The alignment possibilities.
|
static class |
TextStyle.Builder |
The builder for the TextStyle.
|
| Modifier and Type | Field | Description |
|---|---|---|
static TextStyle |
DEFAULT |
The default style as generated by the default Builder.
|
static int |
UNSET_MAX_WIDTH |
The unset value for maxWidth: 2147483647.
|
| Modifier and Type | Method | Description |
|---|---|---|
static TextStyle.Builder |
builder() |
Creates a new builder.
|
TextStyle.Alignment |
getAlignment() |
Gets the alignment.
|
int |
getIndent() |
Gets the indent value.
|
int |
getLeftPad() |
Gets the left padding.
|
int |
getMaxWidth() |
gets the maximum width.
|
int |
getMinWidth() |
gets the minimum width.
|
boolean |
isScalable() |
Specifies if the column can be made wider or to narrower width to fit constraints of the HelpAppendable and formatting.
|
CharSequence |
pad(boolean addIndent,
CharSequence text) |
Pads a string to the maximum width or optionally to the maximum width - indent.
|
String |
toString() |
public static final int UNSET_MAX_WIDTH
public static TextStyle.Builder builder()
public TextStyle.Alignment getAlignment()
public int getIndent()
public int getLeftPad()
public int getMaxWidth()
public int getMinWidth()
public boolean isScalable()
public CharSequence pad(boolean addIndent, CharSequence text)
addIndent - if true account for the indent when padding the string.text - the text to pad.Copyright © 2002-2025 The Apache Software Foundation. All rights reserved.Apache Commons CLI | Issue management | Source repository