public class TextAlignHelper
extends java.lang.Object
Constructor and Description |
---|
TextAlignHelper() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
centerAlign(java.lang.String sIn,
int iSize,
java.lang.String sEncoding)
Align a given Text String in the Center of a line of specified size.
|
static java.lang.String |
leftAlign(java.lang.String sIn,
int iSize,
java.lang.String sEncoding)
Align a given Text String to the left of a line of specified size.
|
static java.lang.String |
rightAlign(java.lang.String sIn,
int iSize,
java.lang.String sEncoding)
Align a given Text String to the right of a line of specified size.
|
public static java.lang.String centerAlign(java.lang.String sIn, int iSize, java.lang.String sEncoding) throws java.io.UnsupportedEncodingException
sIn
- The text String to be centered.iSize
- The size of the line that is to contain the Text String.sEncoding
- The encoding to be used for the output line.java.io.UnsupportedEncodingException
public static java.lang.String leftAlign(java.lang.String sIn, int iSize, java.lang.String sEncoding) throws java.io.UnsupportedEncodingException
sIn
- The text String to be left-aligned.iSize
- The size of the line that is to contain the Text String.sEncoding
- The encoding to be used for the output line.java.io.UnsupportedEncodingException
public static java.lang.String rightAlign(java.lang.String sIn, int iSize, java.lang.String sEncoding) throws java.io.UnsupportedEncodingException
sIn
- The text String to be right-aligned.iSize
- The size of the line that is to contain the Text String.sEncoding
- The encoding to be used for the output line.java.io.UnsupportedEncodingException