|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jrefinery.report.Element
Base class for all report elements (display items that can appear within a report band).
All elements have a non-null name and have a style sheet defined. The style sheet is used to store and access all element properties that can be used to layout the element or affect the elements appeareance in a ReportProcessor.
Field Summary | |
static int |
BOTTOM
Deprecated. use ElementAlignment objects instead. |
static int |
CENTER
Deprecated. use ElementAlignment objects instead. |
static int |
LEFT
Deprecated. use ElementAlignment objects instead. |
static int |
MIDDLE
Deprecated. use ElementAlignment objects instead. |
static int |
RIGHT
Deprecated. use ElementAlignment objects instead. |
static int |
TOP
Deprecated. use ElementAlignment objects instead. |
Constructor Summary | |
protected |
Element()
Constructs an element. |
Method Summary | |
java.lang.Object |
clone()
Clones this Element, the datasource and the private stylesheet of this element. |
abstract java.lang.String |
getContentType()
Defines the content-type for this element. |
DataSource |
getDataSource()
Returns the datasource for this element. |
java.lang.String |
getName()
Returns the name of the element. |
java.awt.Paint |
getPaint()
Deprecated. don't store and access the paint directly, use the stylesheet. |
Band |
getParent()
Return the parent of the element. |
ElementStyleSheet |
getStyle()
Returns this elements private stylesheet. |
StyleSheetCollection |
getStyleSheetCollection()
|
java.lang.Object |
getValue()
Queries this element's datasource for a value. |
boolean |
isVisible()
Defines whether this element should be painted. |
protected void |
registerStyleSheetCollection()
|
void |
setDataSource(DataSource ds)
Sets the data source for this element. |
void |
setName(java.lang.String name)
Defines the name for this element. |
void |
setPaint(java.awt.Paint p)
Deprecated. use a stylesheet to define the paint. The paint object must be an instance of color. |
protected void |
setParent(Band parent)
defines the parent of the element. |
void |
setStyleSheetCollection(StyleSheetCollection styleSheetCollection)
|
void |
setVisible(boolean b)
Defines, whether this element should be drawn. |
protected void |
unregisterStyleSheetCollection()
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int LEFT
public static final int RIGHT
public static final int CENTER
public static final int TOP
public static final int MIDDLE
public static final int BOTTOM
Constructor Detail |
protected Element()
The element inherits the DefaultElementStyleSheet. When the element is added to the band, the bands default stylesheet is also added to the elements style.
A datasource is assigned with this element is set to a default source, which always returns null.
Method Detail |
public final Band getParent()
protected final void setParent(Band parent)
parent
- (null allowed).public void setName(java.lang.String name)
name
- the name of this element (null not permitted)public java.lang.String getName()
public final DataSource getDataSource()
getDataSource
in interface DataTarget
public void setDataSource(DataSource ds)
setDataSource
in interface DataTarget
ds
- the datasource (null
not permitted).public java.lang.Object getValue()
public boolean isVisible()
public void setVisible(boolean b)
b
- the new visibility statepublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface DataTarget
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- should never happen.public ElementStyleSheet getStyle()
public abstract java.lang.String getContentType()
An element is not allowed to change its content-type after ther report processing has started.
If an content-type is unknown to the output-target, the processor should ignore the content or clearly document its internal reprocessing. Ignoring is preferred.
public StyleSheetCollection getStyleSheetCollection()
public void setStyleSheetCollection(StyleSheetCollection styleSheetCollection)
protected void unregisterStyleSheetCollection()
protected void registerStyleSheetCollection()
public java.awt.Paint getPaint()
public void setPaint(java.awt.Paint p)
The paint object must be an instance of color. Generic paints are not permitted.
p
- the paint for this element (null permitted).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |