io.github.kusoroadeolu.clique.components.Divider .
Controls three aspects of divider rendering:
'─'.MarkupParser used to resolve inline markup tags
in the divider title.The DEFAULT constant provides a pre-built configuration with the
default divider character, no divider color, and MarkupParser#DEFAULT
as the parser.
This class is immutable and thread-safe. DividerConfigurationBuilder is
not thread-safe; external synchronization is required if a builder instance
is shared across threads.
Example:
DividerConfiguration config = DividerConfiguration.builder()
.dividerChar('=')
.dividerColor("red")
.parser(MarkupParser.DEFAULT)
.build();
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final DividerConfiguration | |
| private final char | |
| private final AnsiCode[] | |
| private final MarkupParser |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public static DividerConfiguration. | Returns: a newDividerConfigurationBuilderReturns a new builder for constructing a |
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public char | |
| public AnsiCode[] | |
| public MarkupParser | |
| public int | |
| public String |
| DEFAULT | back to summary |
|---|---|
| public static final DividerConfiguration DEFAULT | |
| dividerChar | back to summary |
|---|---|
| private final char dividerChar | |
| dividerColor | back to summary |
|---|---|
| private final AnsiCode[] dividerColor | |
| parser | back to summary |
|---|---|
| private final MarkupParser parser | |
| DividerConfiguration | back to summary |
|---|---|
| pack-priv DividerConfiguration(DividerConfiguration. | |
| DividerConfiguration | back to summary |
|---|---|
| pack-priv DividerConfiguration() | |
| DividerConfiguration | back to summary |
|---|---|
| pack-priv DividerConfiguration(AnsiCode[] dividerColor, char dividerChar, MarkupParser parser) | |
| builder | back to summary |
|---|---|
| public static DividerConfiguration. Returns a new builder for constructing a | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| getDividerChar | back to summary |
|---|---|
| public char getDividerChar() | |
| getDividerColor | back to summary |
|---|---|
| public AnsiCode[] getDividerColor() | |
| getParser | back to summary |
|---|---|
| public MarkupParser getParser() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Modifier and Type | Field and Description |
|---|---|
| private char | |
| private AnsiCode[] | |
| private MarkupParser |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public DividerConfiguration | Returns: a new, immutableDividerConfigurationConstructs a new |
| public DividerConfiguration. | Returns: this builderthe char used to render the Divider c)Sets the char used to render the Divider |
| public DividerConfiguration. | Returns: this builderone or more ANSI codes to apply to Divider;
must not be colorCodes)nullSets the ANSI color to the |
| public DividerConfiguration. | Returns: this buildera markup string representing the desired Divider color;
must not be color)nullSets the ANSI color to the Divider by parsing a markup string using the currently configured parser. |
| public DividerConfiguration. | Returns: this builderthe parser to use; must not be parser)nullSets the |
| dividerChar | back to summary |
|---|---|
| private char dividerChar | |
| dividerColor | back to summary |
|---|---|
| private AnsiCode[] dividerColor | |
| parser | back to summary |
|---|---|
| private MarkupParser parser | |
| DividerConfigurationBuilder | back to summary |
|---|---|
| public DividerConfigurationBuilder() | |
| build | back to summary |
|---|---|
| public DividerConfiguration build() Constructs a new
| |
| dividerChar | back to summary |
|---|---|
| public DividerConfiguration. Sets the char used to render the Divider
| |
| dividerColor | back to summary |
|---|---|
| public DividerConfiguration. Sets the ANSI color to the
| |
| dividerColor | back to summary |
|---|---|
| public DividerConfiguration. Sets the ANSI color to the Divider by parsing a markup string using the currently configured parser.
to the The markup string is resolved against the parser set via
| |
| parser | back to summary |
|---|---|
| public DividerConfiguration. Sets the
| |