com.ibm.commerce.payment.utils
Class TextAlignHelper
java.lang.Object
|
+--com.ibm.commerce.payment.utils.TextAlignHelper
- public class TextAlignHelper
- extends java.lang.Object
Utility class with static methods for aligning text Strings.
Method Summary |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextAlignHelper
public TextAlignHelper()
centerAlign
public static java.lang.String centerAlign(java.lang.String sIn,
int iSize,
java.lang.String sEncoding)
throws java.io.UnsupportedEncodingException
- Align a given Text String in the Center of a line of specified size.
- Parameters:
sIn
- The text String to be centered.iSize
- The size of the line that is to contain the Text String.encoding
- The encoding to be used for the output line.- Returns:
- The new String with the given Text centered using the specified encoding.
leftAlign
public static java.lang.String leftAlign(java.lang.String sIn,
int iSize,
java.lang.String sEncoding)
throws java.io.UnsupportedEncodingException
- Align a given Text String to the left of a line of specified size.
- Parameters:
sIn
- The text String to be left-aligned.iSize
- The size of the line that is to contain the Text String.encoding
- The encoding to be used for the output line.- Returns:
- The new String with the given Text left-aligned using the specified encoding.
rightAlign
public static java.lang.String rightAlign(java.lang.String sIn,
int iSize,
java.lang.String sEncoding)
throws java.io.UnsupportedEncodingException
- Align a given Text String to the right of a line of specified size.
- Parameters:
sIn
- The text String to be right-aligned.iSize
- The size of the line that is to contain the Text String.encoding
- The encoding to be used for the output line.- Returns:
- The new String with the given Text right-aligned using the specified encoding.