|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.report.elementfactory.ElementFactory
org.jfree.report.elementfactory.TextElementFactory
org.jfree.report.elementfactory.LabelElementFactory
A factory to define LabelElements. LabelElements are considered immutable and should not be modified once they are created. The label expects plain text.
Constructor Summary | |
LabelElementFactory()
DefaultConstructor. |
Method Summary | |
Element |
createElement()
Creates the label element. |
static TextElement |
createLabelElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Color paint,
ElementAlignment alignment,
ElementAlignment valign,
FontDefinition font,
java.lang.String labeltext)
Creates a new TextElement containing a label. |
static TextElement |
createLabelElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Color paint,
ElementAlignment alignment,
FontDefinition font,
java.lang.String labeltext)
Creates a new TextElement containing a label. |
java.lang.String |
getText()
Returns the label text. |
void |
setText(java.lang.String text)
Defines the text of the label. |
Methods inherited from class org.jfree.report.elementfactory.TextElementFactory |
applyStyle, getBold, getColor, getEmbedFont, getEncoding, getFontName, getFontSize, getHorizontalAlignment, getItalic, getLineHeight, getReservedLiteral, getStrikethrough, getTrimTextContent, getUnderline, getVerticalAlignment, setBold, setColor, setEmbedFont, setEncoding, setFontName, setFontSize, setHorizontalAlignment, setItalic, setLineHeight, setReservedLiteral, setStrikethrough, setTrimTextContent, setUnderline, setVerticalAlignment |
Methods inherited from class org.jfree.report.elementfactory.ElementFactory |
applyElementName, getAbsolutePosition, getDynamicHeight, getMaximumSize, getMinimumSize, getName, getPreferredSize, setAbsolutePosition, setDynamicHeight, setMaximumSize, setMinimumSize, setName, setPreferredSize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LabelElementFactory()
Method Detail |
public java.lang.String getText()
public void setText(java.lang.String text)
text
- the plain text of the label.public Element createElement()
createElement
in class ElementFactory
java.lang.IllegalStateException
- if the text is not defined.ElementFactory.createElement()
public static TextElement createLabelElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Color paint, ElementAlignment alignment, FontDefinition font, java.lang.String labeltext)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.font
- the font for this elementlabeltext
- the text to display
java.lang.NullPointerException
- if bounds, name, format or field are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createLabelElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Color paint, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, java.lang.String labeltext)
TextElement
containing a label.
name
- the name of the new element.bounds
- the bounds of the new element.paint
- the text color of this text element.alignment
- the horizontal alignment.valign
- the vertical alignment.font
- the font for this element.labeltext
- the text to display.
java.lang.NullPointerException
- if bounds, name, format or field are null
.
java.lang.IllegalArgumentException
- if the given alignment is invalid.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |