|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jrefinery.report.Element
com.jrefinery.report.TextElement
The base class for all elements that display text in a report band.
All content is converted to String using the String.valueOf () method.
To convert values in a more sophisicated way, add filters to this element.
Known filters are for instance the NumberFormatFilter or
the SimpleDateFormatFilter.
For more information on filters have a look at the filter package
com.jrefinery.report.filter
| Field Summary | |
static java.lang.String |
CONTENT_TYPE
The content type string. |
| Fields inherited from class com.jrefinery.report.Element |
BOTTOM, CENTER, LEFT, MIDDLE, RIGHT, TOP |
| Constructor Summary | |
TextElement()
Creates a new empty text element. |
|
| Method Summary | |
java.lang.Object |
clone()
Clones this element. |
int |
getAlignment()
Deprecated. the text alignment should be defined using the style sheet interfaces. |
java.lang.String |
getContentType()
Returns the content type, in this case ' text/plain'. |
java.awt.Font |
getFont()
Deprecated. the FontDefinition object should be used to define the font and font-related properties. |
java.lang.String |
getFormattedText()
Deprecated. this method is replaced by Element.getValue(), filters are used for any formatting that is required. |
java.lang.String |
getNullString()
Return the null-value representation for this element. |
java.lang.Object |
getValue()
Returns the value for this text element. |
int |
getVerticalAlignment()
Deprecated. the text alignment should be defined using the style sheet interfaces. |
boolean |
isStrikethrough()
Deprecated. this information is contained in the FontDefinition object. |
boolean |
isUnderlined()
Deprecated. this information is contained in the FontDefinition object. |
void |
setAlignment(int alignment)
Deprecated. the text alignment should be defined using the style sheet interfaces. |
void |
setFont(java.awt.Font f)
Deprecated. the FontDefinition object should be used to define the font and font-related properties. |
void |
setNullString(java.lang.String s)
Defines the null value representation for this element. |
void |
setStrikethrough(boolean b)
Deprecated. this information is contained in the FontDefinition object. |
void |
setUnderlined(boolean b)
Deprecated. this information is contained in the FontDefinition object. |
void |
setVerticalAlignment(int alignment)
Deprecated. the text alignment should be defined using the style sheet interfaces. |
java.lang.String |
toString()
Returns a string representation of this element, useful for debugging purposes. |
| Methods inherited from class com.jrefinery.report.Element |
getDataSource, getName, getPaint, getParent, getStyle, getStyleSheetCollection, isVisible, registerStyleSheetCollection, setDataSource, setName, setPaint, setParent, setStyleSheetCollection, setVisible, unregisterStyleSheetCollection |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String CONTENT_TYPE
| Constructor Detail |
public TextElement()
| Method Detail |
public java.lang.String getNullString()
setNullString(String)public void setNullString(java.lang.String s)
s - the null string.public final java.lang.Object getValue()
Internally, a StringFilter is used to ensure that the final result is an
instance of String (even though it is returned as an Object.
getValue in class Elementpublic java.lang.String toString()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface DataTargetclone in class Elementjava.lang.CloneNotSupportedException - this should never happen.public java.lang.String getContentType()
text/plain'.
getContentType in class Elementpublic boolean isStrikethrough()
public void setStrikethrough(boolean b)
b - the flag.public void setFont(java.awt.Font f)
f - the font.public java.awt.Font getFont()
public boolean isUnderlined()
public void setUnderlined(boolean b)
b - the flag.public java.lang.String getFormattedText()
public int getAlignment()
This is one of ElementConstants.LEFT, ElementConstants.CENTER or
ElementConstants.RIGHT.
public void setAlignment(int alignment)
This is one of Element.LEFT, Element.CENTER or
Element.RIGHT.
alignment - the alignment for this element.public int getVerticalAlignment()
This is one of Element.TOP, Element.MIDDLE or
Element.BOTTOM.
public void setVerticalAlignment(int alignment)
This is one of the constants defined in the Element class: TOP,
MIDDLE or RIGHT.
alignment - the alignment.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||