|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.text.Format com.gridsystems.utils.text.MaxWidthFormat
public class MaxWidthFormat
Title: General Utilities. Description: Copyright: Copyright (c) 2003 Company: GridSystems
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.text.Format |
---|
java.text.Format.Field |
Constructor Summary | |
---|---|
MaxWidthFormat(int length,
java.lang.String align,
java.lang.String suffix)
Creates an instance with the specified MaxWidthFormat. |
Method Summary | |
---|---|
java.lang.StringBuffer |
format(java.lang.Object obj,
java.lang.StringBuffer sb,
java.text.FieldPosition fp)
Tag Format adjust tags to the selected length. |
static int |
getCharacterSizeCount(char character)
Tells how much space uses a character in an HTML page. |
static int |
mustShort(java.lang.String text,
int maxLength)
Returns the index we have to cut the text. |
java.lang.Object |
parseObject(java.lang.String s,
java.text.ParsePosition parsePosition)
Function not implemented. |
Methods inherited from class java.text.Format |
---|
clone, format, formatToCharacterIterator, parseObject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MaxWidthFormat(int length, java.lang.String align, java.lang.String suffix)
length
- max width length must be greater than threealign
- options are "left", "center", "right"suffix
- added at the end of the text longer than 'length'Method Detail |
---|
public java.lang.Object parseObject(java.lang.String s, java.text.ParsePosition parsePosition)
parseObject
in class java.text.Format
s
- StringparsePosition
- ParsePosition
public java.lang.StringBuffer format(java.lang.Object obj, java.lang.StringBuffer sb, java.text.FieldPosition fp)
format
in class java.text.Format
obj
- Objectsb
- StringBufferfp
- FieldPosition
public static int mustShort(java.lang.String text, int maxLength)
text
- the input textmaxLength
- the number of chars (uperCase) we can write.
public static int getCharacterSizeCount(char character)
character
- the character to check.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |