|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--planetj.formatters.StringFormatter
Provide static methods to position or center a String within a given width. Creation date: (4/22/2002 2:56:09 PM)
Constructor Summary | |
StringFormatter()
|
Method Summary | |
static String |
center(String s,
int width)
Place spaces around s to center it within width characters. |
Object |
formatValue(Object value)
Insert the method's description here. |
static String |
leftAdjust(String s,
int width)
Pad out s with spaces after it. |
static String |
rightAdjust(String pString,
int pWidth)
Pad out s with spaces before it. |
static String |
spaceApartStrings(String pLeftString,
String pRightString,
int pTotalWidth)
Inserts spaces between two Strings until the Stirng.length() = pWidth Creation date: Jun 11, 2004 11:54:59 AM |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StringFormatter()
Method Detail |
public static String center(String s, int width)
public Object formatValue(Object value)
IFormatter
formatValue
in interface IFormatter
value
- java.lang.Object
public static String leftAdjust(String s, int width)
public static String rightAdjust(String pString, int pWidth)
public static String spaceApartStrings(String pLeftString, String pRightString, int pTotalWidth)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |