- All Implemented Interfaces:
Serializable
,Comparable<TextBoxStyle>
,Constable
,org.refcodes.mixin.BoxGrid<Character>
,TextBoxGrid
The
TextBoxStyle
enumeration defines character sets for various box
grid representations. For example Box Drawing (Unicode block) characters are
used, which are not available on every system or terminal:
╔══════════════════════════════════════════════════════════════════════════╗
║ U+250x ─ ━ │ ┃ ┄ ┅ ┆ ┇ ┈ ┉ ┊ ┋ ┌ ┍ ┎ ┏ ║
║ U+251x ┐ ┑ ┒ ┓ └ ┕ ┖ ┗ ┘ ┙ ┚ ┛ ├ ┝ ┞ ┟ ║
║ U+252x ┠ ┡ ┢ ┣ ┤ ┥ ┦ ┧ ┨ ┩ ┪ ┫ ┬ ┭ ┮ ┯ ║
║ U+253x ┰ ┱ ┲ ┳ ┴ ┵ ┶ ┷ ┸ ┹ ┺ ┻ ┼ ┽ ┾ ┿ ║
║ U+254x ╀ ╁ ╂ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊ ╋ ╌ ╍ ╎ ╏ ║
║ U+255x ═ ║ ╒ ╓ ╔ ╕ ╖ ╗ ╘ ╙ ╚ ╛ ╜ ╝ ╞ ╟ ║
║ U+256x ╠ ╡ ╢ ╣ ╤ ╥ ╦ ╧ ╨ ╩ ╪ ╫ ╬ ╭ ╮ ╯ ║
║ U+257x ╰ ╱ ╲ ╳ ╴ ╵ ╶ ╷ ╸ ╹ ╺ ╻ ╼ ╽ ╾ ╿ ║
╚══════════════════════════════════════════════════════════════════════════╝
Therefore plain ASCII character sets such as ASCII
are
provided as well.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface org.refcodes.mixin.BoxGrid
org.refcodes.mixin.BoxGrid.BoxGridBuilder<T extends Object,
B extends Object>, org.refcodes.mixin.BoxGrid.BoxGridMutator<T extends Object>, org.refcodes.mixin.BoxGrid.BoxGridProperty<T extends Object> Nested classes/interfaces inherited from interface org.refcodes.textual.TextBoxGrid
TextBoxGrid.TextBoxGridBuilder<B extends TextBoxGrid.TextBoxGridBuilder<B>>, TextBoxGrid.TextBoxGridMutator, TextBoxGrid.TextBoxGridProperty
-
Enum Constant Summary
Enum ConstantDescriptionRepresentation of the following text box grid:/-+-\ | | | +-+-+ | | | \-+-/
Representation of the following text box grid:" - - " " " " - - " " " " - - "
Representation of the following text box grid:" " " " " " " " " "
Representation of the following text box grid:┏━┳━┓ ┃ ┃ ┃ ┣━╋━┫ ┃ ┃ ┃ ┗━┻━┛
Representation of the following text box grid:┏━┳━┓ ┃ ┃ ┃ ┡━╇━┩ │ │ │ └─┴─┘
Representation of the following text box grid:╔═╦═╗ ║ ║ ║ ╠═╬═╣ ║ ║ ║ ╚═╩═╝
Representation of the following text box grid:╔═╤═╗ ║ │ ║ ╟─┼─╢ ║ │ ║ ╚═╧═╝
Representation of the following text box grid:╓─╥─╖ ║ ║ ║ ╟─╫─╢ ║ ║ ║ ╙─╨─╜
Representation of the following text box grid:┏━┯━┓ ┃ │ ┃ ┡━┿━┩ │ │ │ └─┴─┘
Representation of the following text box grid:┏━┳━┓ ┃ ┃ ┃ ┠─╂─┨ ┃ ┃ ┃ ┗━┻━┛
Representation of the following text box grid:╔═╤═╗ ║ │ ║ ╠═╪═╣ ║ │ ║ ╚═╧═╝
Representation of the following text box grid:┌─┰─┐ │ ┃ │ ┝━╋━┥ │ ┃ │ └─┸─┘
Representation of the following text box grid:┌─╥─┐ │ ║ │ ├─╫─┤ │ ║ │ └─╨─┘
Representation of the following text box grid:┌─┬─┐ │ │ │ ┢━┿━┪ ┃ │ ┃ ┗━┷━┛
Representation of the following text box grid:┌─┬─┐ │ │ │ ├─┼─┤ │ │ │ └─┴─┘
Representation of the following text box grid:" ─ ─ " " " " ─ ─ " " " " ─ ─ "
Representation of the following text box grid:┌─╥─┐ │ ║ │ ╞═╬═╡ │ ║ │ └─╨─┘
Representation of the following text box grid:┌─┬─┐ │ │ │ ├─┼─┤ │ │ │ └─┴─┘
Representation of the following text box grid:╒═╤═╕ │ │ │ ╞═╪═╡ │ │ │ ╘═╧═╛
Representation of the following text box grid:┌─┬─┐ │ │ │ ┢━╈━┪ ┃ ┃ ┃ ┗━┻━┛
-
Field Summary
Modifier and TypeFieldDescriptionstatic final TextBoxStyle
Style displayed for sure when being under test (e.g.static final TextBoxStyle
Style supported Unicode capable terminals (when not being under test).static final TextBoxStyle
Style displayed for sure when being on a Windows machine. -
Method Summary
Modifier and TypeMethodDescriptionstatic TextBoxGrid
Depending on the runtime environment (Windows, Linux, JUnit) we prefer different text box styles as depending on the runtime environment not all characters used by the various text box styles may be available.static TextBoxGrid
toTextBoxGrid
(String aValue) Retrieves the best fittingTextBoxStyle
for the given value by ignoring the characters' case as well as all "-" and "_" characters in the provided value as well as in the enumeration's name..static TextBoxStyle
Returns the enum constant of this class with the specified name.static TextBoxStyle[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SINGLE
Representation of the following text box grid:┌─┬─┐ │ │ │ ├─┼─┤ │ │ │ └─┴─┘
-
SINGLE_DASHED
Representation of the following text box grid:┌─┬─┐ │ │ │ ├─┼─┤ │ │ │ └─┴─┘
-
SINGLE_DOUBLE
Representation of the following text box grid:╒═╤═╕ │ │ │ ╞═╪═╡ │ │ │ ╘═╧═╛
-
DOUBLE_SINGLE
Representation of the following text box grid:╓─╥─╖ ║ ║ ║ ╟─╫─╢ ║ ║ ║ ╙─╨─╜
-
DOUBLE
Representation of the following text box grid:╔═╦═╗ ║ ║ ║ ╠═╬═╣ ║ ║ ║ ╚═╩═╝
-
BOLD
Representation of the following text box grid:┏━┳━┓ ┃ ┃ ┃ ┣━╋━┫ ┃ ┃ ┃ ┗━┻━┛
-
HYBRID_BOLD_SINGLE
Representation of the following text box grid:┏━┳━┓ ┃ ┃ ┃ ┠─╂─┨ ┃ ┃ ┃ ┗━┻━┛
-
HYBRID_SINGLE_BOLD
Representation of the following text box grid:┌─┰─┐ │ ┃ │ ┝━╋━┥ │ ┃ │ └─┸─┘
-
BOLD_HEADER_SINGLE_BODY
Representation of the following text box grid:┏━┳━┓ ┃ ┃ ┃ ┡━╇━┩ │ │ │ └─┴─┘
-
SINGLE_HEADER_BOLD_BODY
Representation of the following text box grid:┌─┬─┐ │ │ │ ┢━╈━┪ ┃ ┃ ┃ ┗━┻━┛
-
HYBRID_BOLD_HEADER_SINGLE_BODY
Representation of the following text box grid:┏━┯━┓ ┃ │ ┃ ┡━┿━┩ │ │ │ └─┴─┘
-
HYBRID_SINGLE_HEADER_BOLD_BODY
Representation of the following text box grid:┌─┬─┐ │ │ │ ┢━┿━┪ ┃ │ ┃ ┗━┷━┛
-
HYBRID_DOUBLE_SINGLE
Representation of the following text box grid:╔═╤═╗ ║ │ ║ ╠═╪═╣ ║ │ ║ ╚═╧═╝
-
HYBRID_SINGLE_DOUBLE
Representation of the following text box grid:┌─╥─┐ │ ║ │ ├─╫─┤ │ ║ │ └─╨─┘
-
DOUBLE_BORDER_SINGLE_CONTENT
Representation of the following text box grid:╔═╤═╗ ║ │ ║ ╟─┼─╢ ║ │ ║ ╚═╧═╝
-
SINGLE_BORDER_DOUBLE_CONTENT
Representation of the following text box grid:┌─╥─┐ │ ║ │ ╞═╬═╡ │ ║ │ └─╨─┘
-
ASCII
Representation of the following text box grid:/-+-\ | | | +-+-+ | | | \-+-/
-
BLANK
Representation of the following text box grid:" " " " " " " " " "
-
SINGLE_BLANK
Representation of the following text box grid:" ─ ─ " " " " ─ ─ " " " " ─ ─ "
-
ASCII_BLANK
Representation of the following text box grid:" - - " " " " - - " " " " - - "
-
-
Field Details
-
UNICODE_TEXT_BOX_STYLE
Style supported Unicode capable terminals (when not being under test). -
WINDOWS_TEXT_BOX_STYLE
Style displayed for sure when being on a Windows machine. -
ASCII_TEXT_BOX_STYLE
Style displayed for sure when being under test (e.g. JUnit) or in a Cp1252 or a plain "xterm".
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getLeftEdge
- Specified by:
getLeftEdge
in interfaceorg.refcodes.mixin.BoxGrid<Character>
-
getTopLeftEdge
- Specified by:
getTopLeftEdge
in interfaceorg.refcodes.mixin.BoxGrid<Character>
-
getDividerEdge
- Specified by:
getDividerEdge
in interfaceorg.refcodes.mixin.BoxGrid<Character>
-
getTopDividerEdge
- Specified by:
getTopDividerEdge
in interfaceorg.refcodes.mixin.BoxGrid<Character>
-
getTopRightEdge
- Specified by:
getTopRightEdge
in interfaceorg.refcodes.mixin.BoxGrid<Character>
-
getRightEdge
- Specified by:
getRightEdge
in interfaceorg.refcodes.mixin.BoxGrid<Character>
-
getLeftLine
- Specified by:
getLeftLine
in interfaceorg.refcodes.mixin.BoxGrid<Character>
-
getDividerLine
- Specified by:
getDividerLine
in interfaceorg.refcodes.mixin.BoxGrid<Character>
-
getRightLine
- Specified by:
getRightLine
in interfaceorg.refcodes.mixin.BoxGrid<Character>
-
getTopLine
- Specified by:
getTopLine
in interfaceorg.refcodes.mixin.BoxGrid<Character>
-
getBottomRightEdge
- Specified by:
getBottomRightEdge
in interfaceorg.refcodes.mixin.BoxGrid<Character>
-
getBottomDividerEdge
- Specified by:
getBottomDividerEdge
in interfaceorg.refcodes.mixin.BoxGrid<Character>
-
getBottomLeftEdge
- Specified by:
getBottomLeftEdge
in interfaceorg.refcodes.mixin.BoxGrid<Character>
-
getBottomLine
- Specified by:
getBottomLine
in interfaceorg.refcodes.mixin.BoxGrid<Character>
-
getInnerLine
- Specified by:
getInnerLine
in interfaceorg.refcodes.mixin.BoxGrid<Character>
-
toTextBoxGrid
Retrieves the best fittingTextBoxStyle
for the given value by ignoring the characters' case as well as all "-" and "_" characters in the provided value as well as in the enumeration's name..- Parameters:
aValue
- The value for which to determine theTextBoxStyle
.- Returns:
- The according
TextBoxStyle
or null if none was found.
-
toExecutionTextBoxGrid
Depending on the runtime environment (Windows, Linux, JUnit) we prefer different text box styles as depending on the runtime environment not all characters used by the various text box styles may be available.- Returns:
- The
TextBoxStyle
by default fitting best for the current environment.
-