|
ReportCat 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectli.netcat.print.util.TextPrint
The TextPrint is a simple implementation of a multiline text that supports pagebreak.
| Constructor Summary | |
TextPrint()
Constructs a new TextPrint with no text. |
|
TextPrint(java.lang.String text)
Constructs a new TextPrint displaying the given text. |
|
TextPrint(java.lang.String text,
int alignment)
Constructs a new TextPrint displaying the given text with the given horizontal alignment. |
|
| Method Summary | |
java.awt.Color |
getColor()
Returns the Color used to draw the whole text. |
boolean |
getFitWidth()
Specifies whether this TextPrint will consume the whole width or not.
|
java.awt.Font |
getFont()
Returns the Font used to draw the whole text. |
int |
getHorizontalAlignment()
Returns the horizontal alignment. |
java.awt.Dimension |
getPreferredSize(java.awt.Graphics g)
Returns the preferred size of the Print. |
PrintIterator |
getPrintIterator()
Factory method, that produces a PrintIerator. |
java.lang.String |
getText()
Returns the text associated with that TextPrint. |
void |
setColor(java.awt.Color color)
Sets the Color used to draw the whole text. |
void |
setFitWidth(boolean fitWidth)
Specifies whether this TextPrint will consume the whole width or not.
|
void |
setFont(java.awt.Font font)
Sets the Font used to draw the whole text. |
void |
setHorizontalAlignment(int alignment)
Sets the horizontal alignment. |
void |
setText(java.lang.String text)
Sets the text associated with that TextPrint. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TextPrint()
TextPrint with no text.
public TextPrint(java.lang.String text)
TextPrint displaying the given text.
text - The text, can be null.
public TextPrint(java.lang.String text,
int alignment)
TextPrint displaying the given text with the given horizontal alignment.
text - The text, can be null.alignment - The horizontal alignment, one of LEFT, CENTER or RIGHT.| Method Detail |
public java.lang.String getText()
TextPrint.
TextPrint.public void setText(java.lang.String text)
TextPrint.
text - The new text associated with that TextPrint, can be null.public int getHorizontalAlignment()
LEFT, CENTER or RIGHT.public void setHorizontalAlignment(int alignment)
alignment - The horizontal alignment, it must be one of LEFT, CENTER or RIGHT.public java.awt.Font getFont()
Font used to draw the whole text.
Font used to draw the whole text.public void setFont(java.awt.Font font)
Font used to draw the whole text.
font - The Font used to draw the whole text, must not be null.public java.awt.Color getColor()
Color used to draw the whole text.
Color used to draw the whole text.public void setColor(java.awt.Color color)
Color used to draw the whole text.
color - The Color used to draw the whole text, must not be null.public boolean getFitWidth()
TextPrint will consume the whole width or not.
This property is only of interest in combination with a short text.
public void setFitWidth(boolean fitWidth)
TextPrint will consume the whole width or not.
This property is only of interest in combination with a short text.
fitWidth - Specify false if the width of the Painter shoud only be as wide as the longest line. true is the default.public java.awt.Dimension getPreferredSize(java.awt.Graphics g)
PrintPrint.
getPreferredSize in interface Printg - The relevant Graphics object. It can be used to calculate the widths of strings.
Print.public PrintIterator getPrintIterator()
PrintPrintIerator. The PrintIterator is used like an enumeration to generate all Prints.
getPrintIterator in interface PrintPrintIterator that is able to iterate over the Print.
|
ReportCat 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||