io.github.kusoroadeolu.clique.components.Frame .
Instances are obtained via builder(). The DEFAULT constant provides
a pre-built configuration with the following values:
2FrameAlign#CENTERMarkupParser#DEFAULTThis class is immutable and thread-safe. FrameConfigurationBuilder is
not thread-safe; external synchronization is required if a builder instance
is shared across threads.
Example:
FrameConfiguration config = FrameConfiguration.builder()
.padding(3)
.frameAlign(FrameAlign.LEFT)
.borderColor("red")
.build();
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private final FrameAlign | |
| private final AnsiCode[] | |
| public static final FrameConfiguration | DEFAULT
A default |
| private final int | |
| private final MarkupParser |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static FrameConfiguration. | Returns: a newFrameConfigurationBuilderReturns a new builder for constructing a |
| public boolean | equals(Object object)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public AnsiCode[] | Returns: the border color codes; nevernull, may be emptyReturns the ANSI codes applied to the frame border, or an empty array if no border color has been set. |
| public FrameAlign | Returns: the frame alignment; nevernullReturns the default horizontal alignment applied to nested content. |
| public int | Returns: the padding value; always>= 0Returns the number of blank characters inserted between the frame border and its content on each side. |
| public MarkupParser | Returns: the parser; nevernullReturns the markup parser used to interpret inline style tags in nested strings and border color specifications. |
| public int | |
| public String |
| align | back to summary |
|---|---|
| private final FrameAlign align | |
| borderColor | back to summary |
|---|---|
| private final AnsiCode[] borderColor | |
| DEFAULT | back to summary |
|---|---|
| public static final FrameConfiguration DEFAULT A default | |
| padding | back to summary |
|---|---|
| private final int padding | |
| parser | back to summary |
|---|---|
| private final MarkupParser parser | |
| FrameConfiguration | back to summary |
|---|---|
| private FrameConfiguration() | |
| FrameConfiguration | back to summary |
|---|---|
| private FrameConfiguration(FrameConfiguration. | |
| builder | back to summary |
|---|---|
| public static FrameConfiguration. Returns a new builder for constructing a | |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) 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.
| |
| getBorderColor | back to summary |
|---|---|
| public AnsiCode[] getBorderColor() Returns the ANSI codes applied to the frame border, or an empty array if no border color has been set.
| |
| getFrameAlign | back to summary |
|---|---|
| public FrameAlign getFrameAlign() Returns the default horizontal alignment applied to nested content. Individual nodes may override this value at nest time via
| |
| getPadding | back to summary |
|---|---|
| public int getPadding() Returns the number of blank characters inserted between the frame border and its content on each side.
| |
| getParser | back to summary |
|---|---|
| public MarkupParser getParser() Returns the markup parser used to interpret inline style tags in nested strings and border color specifications.
| |
| 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-
| |
FrameConfiguration.
Default values match those of FrameConfiguration#DEFAULT. Methods
may be called in any order; each returns this for chaining.
This builder is not thread-safe.
| Modifier and Type | Field and Description |
|---|---|
| private AnsiCode[] | |
| private FrameAlign | |
| private int | |
| private MarkupParser |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public FrameConfiguration. | Returns: this buildera markup string representing the desired border color;
must not be borderColor)nullSets the border color by parsing a markup string using the currently configured parser. |
| public FrameConfiguration. | Returns: this builderthe ANSI codes to apply to the border; must not be borderColor)nullSets the border color directly from one or more |
| public FrameConfiguration | Returns: a new, immutableFrameConfigurationConstructs a new |
| public FrameConfiguration. | Returns: this builderthe alignment to apply; must not be align)nullSets the default horizontal alignment for content nested in the frame. |
| public FrameConfiguration. | Returns: this builderthe number of blank characters on each side; must be padding)>= 0Sets the padding applied between the frame border and its content. |
| public FrameConfiguration. | Returns: this builderthe parser to use; must not be parser)nullSets the markup parser used to interpret inline style tags in nested content and border color markup strings. |
| borderColor | back to summary |
|---|---|
| private AnsiCode[] borderColor | |
| frameAlign | back to summary |
|---|---|
| private FrameAlign frameAlign | |
| padding | back to summary |
|---|---|
| private int padding | |
| parser | back to summary |
|---|---|
| private MarkupParser parser | |
| FrameConfigurationBuilder | back to summary |
|---|---|
| public FrameConfigurationBuilder() | |
| borderColor | back to summary |
|---|---|
| public FrameConfiguration. Sets the border color by parsing a markup string using the currently configured parser. The markup string is resolved against the parser set via
| |
| borderColor | back to summary |
|---|---|
| public FrameConfiguration. Sets the border color directly from one or more
| |
| build | back to summary |
|---|---|
| public FrameConfiguration build() Constructs a new
| |
| frameAlign | back to summary |
|---|---|
| public FrameConfiguration. Sets the default horizontal alignment for content nested in the frame. This value is used when content is added without an explicit alignment. Individual nodes may override it at nest time.
| |
| padding | back to summary |
|---|---|
| public FrameConfiguration. Sets the padding applied between the frame border and its content.
| |
| parser | back to summary |
|---|---|
| public FrameConfiguration. Sets the markup parser used to interpret inline style tags in nested content and border color markup strings.
| |