|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.reporting.engine.classic.core.elementfactory.ElementFactory org.pentaho.reporting.engine.classic.core.elementfactory.TextElementFactory org.pentaho.reporting.engine.classic.core.elementfactory.LabelElementFactory
public class 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 Element |
createLabelElement(String name,
Rectangle2D bounds,
Color paint,
ElementAlignment alignment,
ElementAlignment valign,
FontDefinition font,
String labeltext)
Deprecated. Use a more fine-grained approach to define this element by using the element-factory directly. |
static Element |
createLabelElement(String name,
Rectangle2D bounds,
Color paint,
ElementAlignment alignment,
FontDefinition font,
String labeltext)
Deprecated. Use a more fine-grained approach to define this element by using the element-factory directly. |
String |
getExcelFormula()
|
String |
getText()
Returns the label text. |
void |
setExcelFormula(String excelFormula)
|
void |
setText(String text)
Defines the text of the label. |
Methods inherited from class org.pentaho.reporting.engine.classic.core.elementfactory.TextElementFactory |
---|
getBold, getEmbedFont, getEncoding, getFontName, getFontSize, getItalic, getLineHeight, getMaximumLetterSpacing, getMinimumLetterSpacing, getOptimumLetterSpacing, getReservedLiteral, getStrikethrough, getTrimTextContent, getUnderline, getVerticalTextAlignment, getWhitespaceCollapse, getWrap, getWrapText, setBold, setEmbedFont, setEncoding, setFontName, setFontSize, setItalic, setLineHeight, setMaximumLetterSpacing, setMinimumLetterSpacing, setOptimumLetterSpacing, setReservedLiteral, setStrikethrough, setTrimTextContent, setUnderline, setVerticalTextAlignment, setWhitespaceCollapse, setWrap, setWrapText |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LabelElementFactory()
Method Detail |
---|
public String getText()
public void setText(String text)
text
- the plain text of the label.public String getExcelFormula()
public void setExcelFormula(String excelFormula)
public Element createElement()
createElement
in class ElementFactory
IllegalStateException
- if the text is not defined.ElementFactory.createElement()
public static Element createLabelElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, FontDefinition font, 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
NullPointerException
- if bounds, name, format or field are null
IllegalArgumentException
- if the given alignment is invalidpublic static Element createLabelElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, 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.
NullPointerException
- if bounds, name, format or field are null
.
IllegalArgumentException
- if the given alignment is invalid.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |