|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.gui.printing.FormatItem
While formatting the header or the footer of a Page, we need items to represent text with a certain font, placed either left, center or right. A PageFormat will contain 6 FormatItems: 3 for the header and 3 for the footer. Each of these items can have his own font and text. TODO Add font color
| Field Summary | |
static int |
CENTER
Constant for center alignment. |
static int |
DEFAULT_ALIGN
default alignment is left |
static int |
LEFT
Constant for left alignment. |
static int |
RIGHT
Constant for right alignment. |
| Constructor Summary | |
FormatItem()
|
|
| Method Summary | |
static FormatItem |
build(AttributeList list)
|
FormatItem |
deepCopy()
|
boolean |
equals(java.lang.Object obj)
|
int |
getAlign()
The method getAlign returns the alignment of this FormatItem. |
FontFormat |
getFont()
The method getFont returns the font format to be used for this item. |
java.lang.String |
getText()
The method getText returns the text of this item with the format identifiers. |
AttributeList |
serialize()
|
void |
setAlign(int i)
The method setAlign sets the alignment. |
void |
setFont(FontFormat font)
The method setFont sets the Font for this item. |
void |
setText(java.lang.String string)
The method setText sets the text for this item. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int LEFT
public static final int CENTER
public static final int RIGHT
public static final int DEFAULT_ALIGN
| Constructor Detail |
public FormatItem()
| Method Detail |
public int getAlign()
LEFT,
CENTER,
RIGHTpublic FontFormat getFont()
public FormatItem deepCopy()
public java.lang.String getText()
PrintUtil.replaceIdentifier(String, int, int)method to
replace all previously added format shortcuts,.
public void setAlign(int i)
i - the new alignment.public void setFont(FontFormat font)
font - the new font for this item.public void setText(java.lang.String string)
string - the new text.public static FormatItem build(AttributeList list)
public AttributeList serialize()
public boolean equals(java.lang.Object obj)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||