public interface TA_Grid extends IsTextArt
A grid (table) using ASCII and/or UTF characters.
| Modifier and Type | Method and Description |
|---|---|
default TA_Grid |
addBottomRuleCharacterMap(int ruleset,
char none,
char horizontal,
char bottomleft,
char bottomright,
char midup)
Adds a new character map for a bottom rule using the given rule set indicator for normal, light, etc.
|
default TA_Grid |
addCharacterMap(int ruleset,
char none,
char vertical,
char midleft,
char midright)
Adds a new character map for a content row using the given rule set indicator for normal, light, etc.
|
default TA_Grid |
addCharacterMap(int ruleset,
char none,
char horizontal,
char vertical,
char topleft,
char topright,
char bottomleft,
char bottomright,
char midleft,
char midright,
char midboth,
char middown,
char midup)
Adds a new character map for a given rule set.
|
default ArrayList<StrBuilder> |
addGrid(Collection<Object> content,
int mode)
Changes the input list by adding a grid.
|
default ArrayList<StrBuilder> |
addGrid(Collection<Object> content,
TA_GridThemes theme)
Changes the input list by adding a grid.
|
default ArrayList<StrBuilder> |
addGrid(Collection<Object> content,
TA_GridThemes theme,
TA_GridThemeOptions options)
Changes the input list by adding a grid.
|
default TA_Grid |
addMidruleCharacterMap(int ruleset,
char none,
char vertical,
char midleft,
char midright,
char midboth,
char middown,
char midup)
Adds a new character map for a mid rule using the given rule set indicator for normal, light, etc.
|
void |
addSupportedRuleSet(int set)
Adds a new rule set to the list supported rule sets.
|
default TA_Grid |
addTopruleCharacterMap(int ruleset,
char none,
char horizontal,
char topleft,
char topright,
char middown)
Adds a new character map for a top rule using the given rule set indicator for normal, light, etc.
|
default ArrayList<Integer> |
calculateColumns(ArrayList<Object> table)
Calculates column width across the table, using columns with content to calculate width.
|
static TA_Grid |
create(String description)
Creates a new empty (no character map loaded) grid object.
|
Map<Integer,Character> |
getCharacterMap()
Returns the character map.
|
default boolean |
hasRuleSet(int set)
Tests if a particular rule set is supported by the grid.
|
int |
supportedRulesets()
Returns a flag with supported rule sets (effectively a list of supported rule sets).
|
default void |
testRuleType(int type)
Tests if the requested row type can be used, that is there is a corresponding character map available.
|
default StrBuilder |
toDoc() |
Map<Integer,Character> getCharacterMap()
Returns the character map.
default TA_Grid addCharacterMap(int ruleset, char none, char horizontal, char vertical, char topleft, char topright, char bottomleft, char bottomright, char midleft, char midright, char midboth, char middown, char midup)
Adds a new character map for a given rule set.
ruleset - required rule type (e.g. normal or light)none - the none character (usually blank)horizontal - the horizontal border charactervertical - the vertical border charactertopleft - the top-left corner charactertopright - the top-right corner characterbottomleft - the bottom-left corner characterbottomright - the bottom-right corner charactermidleft - the mid-left corner charactermidright - the mid-right corner charactermidboth - the mid-both connector charactermiddown - the mid-down connector charactermidup - the mid-up connector characterdefault TA_Grid addTopruleCharacterMap(int ruleset, char none, char horizontal, char topleft, char topright, char middown)
Adds a new character map for a top rule using the given rule set indicator for normal, light, etc.
ruleset - required rule type (e.g. normal or light)none - the none character (usually blank)horizontal - the horizontal border charactertopleft - the top-left corner charactertopright - the top-right corner charactermiddown - the mid-down connector characterdefault TA_Grid addBottomRuleCharacterMap(int ruleset, char none, char horizontal, char bottomleft, char bottomright, char midup)
Adds a new character map for a bottom rule using the given rule set indicator for normal, light, etc.
ruleset - required rule type (e.g. normal or light)none - the none character (usually blank)horizontal - the horizontal border characterbottomleft - the bottom-left corner characterbottomright - the bottom-right corner charactermidup - the mid-up connector characterdefault TA_Grid addMidruleCharacterMap(int ruleset, char none, char vertical, char midleft, char midright, char midboth, char middown, char midup)
Adds a new character map for a mid rule using the given rule set indicator for normal, light, etc.
ruleset - required rule type (e.g. normal or light)none - the none character (usually blank)vertical - the vertical border charactermidleft - the mid-left corner charactermidright - the mid-right corner charactermidboth - the mid-both connector charactermiddown - the mid-down connector charactermidup - the mid-up connector characterdefault TA_Grid addCharacterMap(int ruleset, char none, char vertical, char midleft, char midright)
Adds a new character map for a content row using the given rule set indicator for normal, light, etc.
ruleset - required rule type (e.g. normal or light)none - the none character (usually blank)vertical - the vertical border charactermidleft - the mid-left corner charactermidright - the mid-right corner characterint supportedRulesets()
Returns a flag with supported rule sets (effectively a list of supported rule sets).
void addSupportedRuleSet(int set)
Adds a new rule set to the list supported rule sets.
set - new rule setdefault boolean hasRuleSet(int set)
Tests if a particular rule set is supported by the grid.
set - the rule set to test fordefault ArrayList<Integer> calculateColumns(ArrayList<Object> table)
Calculates column width across the table, using columns with content to calculate width.
table - a table with rules and contentdefault void testRuleType(int type)
Tests if the requested row type can be used, that is there is a corresponding character map available. The test is a validation of state, throwing an exception if no corresponding character map is provided by the grid.
type - row type to testdefault ArrayList<StrBuilder> addGrid(Collection<Object> content, TA_GridThemes theme)
Changes the input list by adding a grid.
The method does guarantee that all lines (member of the final collection) have the same length.
content - the content to add a grid totheme - the grid themedefault ArrayList<StrBuilder> addGrid(Collection<Object> content, TA_GridThemes theme, TA_GridThemeOptions options)
Changes the input list by adding a grid.
The method does guarantee that all lines (member of the final collection) have the same length.
content - the content to add a grid totheme - the grid themeoptions - the grid theme optionsdefault ArrayList<StrBuilder> addGrid(Collection<Object> content, int mode)
Changes the input list by adding a grid.
The method does guarantee that all lines (member of the final collection) have the same length.
content - the content to add a grid tomode - options for the griddefault StrBuilder toDoc()
toDoc in interface HasToDocCopyright © 2016–2017. All rights reserved.