public class DrawTextUtility extends Object
Modifier and Type | Method and Description |
---|---|
static String[] |
toAsciiBorder(String[] aText)
Adds a predefined "single-line" border to the provided text.
|
static String[] |
toBorder(String[] aText,
char aTopLeftBorderChar,
char aTopRightBorderChar,
char aBottomLeftBorderChar,
char aBottomRightBorderChar,
char aHorizontalBorderChar,
char aVerticalBorderChar)
Adds a predefined border according border to the provided text.
|
static String[] |
toBorder(String[] aText,
int aBorderWidth,
char aBorderChar)
Adds the according border with the given char and the provided witdh to
the provided text.
|
static String[] |
toBottomBorder(String[] aText,
int aBorderWidth,
char aBorderChar)
Adds the according border with the given char and the provided witdh to
the provided text.
|
static String[] |
toDoubleBorder(String[] aText)
Adds a predefined "double-line" border to the provided text.
|
static String[] |
toLeftBorder(String[] aText,
int aBorderWidth,
char aBorderChar)
Adds the according border with the given char and the provided witdh to
the provided text.
|
static String |
toLine(int aLength,
char aFillChar)
Returns a
String with the given length and containing only the
provided fill character. |
static String[] |
toRightBorder(String[] aText,
int aBorderWidth,
char aBorderChar)
Adds the according border with the given char and the provided witdh to
the provided text.
|
static String[] |
toSingleBorder(String[] aText)
Adds a predefined "single-line" border to the provided text.
|
static String[] |
toTopBorder(String[] aText,
int aBorderWidth,
char aBorderChar)
Adds the according border with the given char and the provided witdh to
the provided text.
|
public static String toLine(int aLength, char aFillChar)
String
with the given length and containing only the
provided fill character.aLength
- The length to be reached.aFillChar
- The char to be used for filling upString
filled with the fill character till the
provided length.public static String[] toLeftBorder(String[] aText, int aBorderWidth, char aBorderChar)
aText
- The text to which the border is to be applied.aBorderChar
- The character of the border to be drawn.aBorderWidth
- The width of the border to be drawn.public static String[] toRightBorder(String[] aText, int aBorderWidth, char aBorderChar)
aText
- The text to which the border is to be applied.aBorderChar
- The character of the border to be drawn.aBorderWidth
- The width of the border to be drawn.public static String[] toTopBorder(String[] aText, int aBorderWidth, char aBorderChar)
aText
- The text to which the border is to be applied.aBorderChar
- The character of the border to be drawn.aBorderWidth
- The width of the border to be drawn.public static String[] toBottomBorder(String[] aText, int aBorderWidth, char aBorderChar)
aText
- The text to which the border is to be applied.aBorderChar
- The character of the border to be drawn.aBorderWidth
- The width of the border to be drawn.public static String[] toBorder(String[] aText, int aBorderWidth, char aBorderChar)
aText
- The text to which the border is to be applied.aBorderChar
- The character of the border to be drawn.aBorderWidth
- The width of the border to be drawn.public static String[] toBorder(String[] aText, char aTopLeftBorderChar, char aTopRightBorderChar, char aBottomLeftBorderChar, char aBottomRightBorderChar, char aHorizontalBorderChar, char aVerticalBorderChar)
aText
- The text to which the border is to be applied.aTopLeftBorderChar
- The top left border's character.aTopRightBorderChar
- The top right border's character.aBottomLeftBorderChar
- The bottom left border's character.aBottomRightBorderChar
- The bottom right border's character.aHorizontalBorderChar
- The horizontal lines' border character.aVerticalBorderChar
- The vertical lines' border character.public static String[] toSingleBorder(String[] aText)
aText
- The text to which the border is to be applied.public static String[] toDoubleBorder(String[] aText)
aText
- The text to which the border is to be applied.Copyright © 2015. All rights reserved.