public interface TA_Frame extends IsTextArt
A frame (box) using ASCII and/or UTF characters.
| Modifier and Type | Method and Description |
|---|---|
default ArrayList<StrBuilder> |
addFrame(Collection<StrBuilder> coll,
int mode)
Changes the input collection by adding a frame.
|
default String |
addFrameString(Collection<StrBuilder> coll,
int mode)
Returns a string containing the input collection with the requested frame.
|
static TA_Frame |
create(TA_Line line,
TA_Corner corner,
TA_Border border,
String description)
Creates a new frame theme using the same top/bottom lines.
|
static TA_Frame |
create(TA_Line topline,
TA_Line bottomline,
TA_Corner corner,
TA_Border border,
String description)
Creates a new frame theme using different lines and the same top/bottom corners.
|
TA_Border |
getBorder()
Returns the border for the frame.
|
TA_Line |
getBottomline()
Returns the bottom line of the theme.
|
TA_Corner |
getCorner()
Returns the corner.
|
TA_Line |
getTopline()
Returns the top line of the theme.
|
default StrBuilder |
renderBottomLine(int mode,
int width)
Renders a bottom line for the frame.
|
default StrBuilder |
renderTopLine(int mode,
int width)
Renders a top line for the frame.
|
default StrBuilder |
toDoc() |
default String addFrameString(Collection<StrBuilder> coll, int mode)
Returns a string containing the input collection with the requested frame.
coll - input collectionmode - frame modedefault ArrayList<StrBuilder> addFrame(Collection<StrBuilder> coll, int mode)
Changes the input collection by adding a frame. The return list will have - one line added as first element with the frame top line, - one line added at the end with the frame bottom line, and - for each original element border characters will be added left and right.
The methods assumes that all line (members of the collection) have the same length.
The following exceptions apply:
top line will not be added if the frame does not define a top line nor top corners
bottom line will not be added if the frame does not define a bottom line nor bottom corners
left borders will only be added if the frame defines a border with left border character
right borders will only be added if the frame defines a border with right border character
The method does guarantee that all lines (member of the final collection) have the same length.
coll - the collection to add a frame tomode - options for the framedefault StrBuilder renderTopLine(int mode,
int width)
Renders a top line for the frame.
mode - the frame modewidth - the width of lines in the framedefault StrBuilder renderBottomLine(int mode,
int width)
Renders a bottom line for the frame.
mode - the frame modewidth - the width of lines in the frameTA_Border getBorder()
Returns the border for the frame.
TA_Line getBottomline()
Returns the bottom line of the theme.
TA_Corner getCorner()
Returns the corner.
TA_Line getTopline()
Returns the top line of the theme.
default StrBuilder toDoc()
toDoc in interface HasToDocstatic TA_Frame create(TA_Line line, TA_Corner corner, TA_Border border, String description)
Creates a new frame theme using the same top/bottom lines.
line - the frame top/bottom linecorner - the frame cornerborder - the frame borderdescription - a description for the line, cannot be blankstatic TA_Frame create(TA_Line topline, TA_Line bottomline, TA_Corner corner, TA_Border border, String description)
Creates a new frame theme using different lines and the same top/bottom corners.
topline - the frame top linebottomline - the frame bottom linecorner - the frame cornerborder - the frame borderdescription - a description for the line, cannot be blankCopyright © 2016–2017. All rights reserved.