Package org.jfree.report.structure
Class Element
java.lang.Object
org.jfree.report.structure.Node
org.jfree.report.structure.Element
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
AutoTableCellContent,AutoTableElement,ContentElement,Section
An element is a node that can have attributes. The 'id' and the 'name'
attribute is defined for all elements.
Both the name and the id attribute may be null.
Properties in the 'http://jfreereport.sourceforge.net/namespaces/engine/flow'
namespace and in the 'http://jfreereport.sourceforge.net/namespaces/engine/compatibility'
namespace are considered internal. You should only touch them, if you really
know what you are doing.
- Author:
- Thomas Morgner
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExpression(Expression function) Adds a function to the report's collection of expressions.clone()getAttribute(String name) getAttribute(String namespace, String name) getAttributeExpression(String attr) Returns the expressions for the report.getAttributeExpression(String namespace, String attr) org.jfree.layouting.util.AttributeMapgetAttributeExpressions(String namespace) org.jfree.layouting.util.AttributeMapReturns the expressions for the report.getId()protected LocalegetName()Returns the name of the Element.org.jfree.layouting.input.style.CSSStyleRulegetStyle()Returns this elements private stylesheet.getStyleExpression(String property) Returns the expressions for the report.getType()org.jfree.layouting.input.style.values.CSSConstantbooleanReturns true, if the element is enabled.booleanvoidsetAttribute(String name, Object value) voidsetAttribute(String namespace, String name, Object value) voidsetAttributeExpression(String namespace, String attr, Expression function) Adds a function to the report's collection of expressions.voidsetAttributeExpression(String attr, Expression function) voidsetDisplayCondition(Expression displayCondition) voidsetEnabled(boolean enabled) Defines whether the element is enabled.voidsetExpressions(Expression[] expressions) Sets the expressions for the report.voidvoidDefines the name for this Element.voidsetNamespace(String id) voidsetStyleExpression(String property, Expression function) Adds a function to the report's collection of expressions.voidvoidsetVirtual(boolean virtual) voidsetVisibility(org.jfree.layouting.input.style.values.CSSConstant v) Methods inherited from class org.jfree.report.structure.Node
getGroup, getParent, getReport, getRootReport, setParent, updateParent
-
Field Details
-
NAME_ATTRIBUTE
- See Also:
-
ID_ATTRIBUTE
- See Also:
-
TYPE_ATTRIBUTE
The type corresponds (somewhat) to the tagname of HTML.- See Also:
-
NAMESPACE_ATTRIBUTE
See XML-Namespaces for the idea of that one ...- See Also:
-
VIRTUAL_ATTRIBUTE
- See Also:
-
-
Constructor Details
-
Element
protected Element()Constructs an element. The element inherits the element's defined default ElementStyleSheet to provide reasonable default values for common stylekeys. When the element is added to the band, the bands stylesheet is set as parent to the element's stylesheet. A datasource is assigned with this element is set to a default source, which always returns null.
-
-
Method Details
-
getNamespace
-
setNamespace
-
getId
-
setId
-
getType
-
setType
-
setName
Defines the name for this Element. The name must not be empty, or a NullPointerException is thrown. Names can be used to lookup an element within a band. There is no requirement for element names to be unique.- Parameters:
name- the name of this element
-
getName
Returns the name of the Element. The name of the Element is never null.- Returns:
- the name.
-
setAttribute
-
setAttribute
-
getAttribute
-
getAttribute
-
getAttributeMap
public org.jfree.layouting.util.AttributeMap getAttributeMap() -
getStyle
public org.jfree.layouting.input.style.CSSStyleRule getStyle()Returns this elements private stylesheet. This sheet can be used to override the default values set in one of the parent-stylesheets.- Returns:
- the Element's stylesheet
-
setVisibility
public void setVisibility(org.jfree.layouting.input.style.values.CSSConstant v) -
getVisibility
public org.jfree.layouting.input.style.values.CSSConstant getVisibility() -
setAttributeExpression
-
setAttributeExpression
Adds a function to the report's collection of expressions.- Parameters:
namespace-attr-function- the function.
-
getAttributeExpression
Returns the expressions for the report.- Parameters:
attr-- Returns:
- the expressions.
-
getAttributeExpression
-
getAttributeExpressions
-
getAttributeExpressionMap
public org.jfree.layouting.util.AttributeMap getAttributeExpressionMap() -
setStyleExpression
Adds a function to the report's collection of expressions.- Parameters:
property-function- the function.
-
getStyleExpression
Returns the expressions for the report.- Parameters:
property-- Returns:
- the expressions.
-
getStyleExpressions
-
addExpression
Adds a function to the report's collection of expressions.- Parameters:
function- the function.
-
getExpressions
Returns the expressions for the report.- Returns:
- the expressions.
-
setExpressions
Sets the expressions for the report.- Parameters:
expressions- the expressions (nullnot permitted).
-
isEnabled
public boolean isEnabled()Returns true, if the element is enabled. -
setEnabled
public void setEnabled(boolean enabled) Defines whether the element is enabled. Disabled elements will be fully ignored by the report processor. This is a design time property to exclude elements from the processing without actually having to deal with the other complex properties.- Parameters:
enabled-
-
getDisplayCondition
- Overrides:
getDisplayConditionin classNode
-
setDisplayCondition
-
getLocale
-
getLocaleFromAttributes
-
isVirtual
public boolean isVirtual() -
setVirtual
public void setVirtual(boolean virtual) -
clone
- Overrides:
clonein classNode- Throws:
CloneNotSupportedException
-