|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jasperreports.engine.base.JRBaseElement
public abstract class JRBaseElement
This class provides a skeleton implementation for a report element. It mostly provides internal variables, representing the most common element properties, and their getter/setter methods. It also has a constructor for initializing these properties.
Constructor Summary | |
---|---|
protected |
JRBaseElement(JRDefaultStyleProvider defaultStyleProvider)
|
protected |
JRBaseElement(JRElement element,
JRBaseObjectFactory factory)
Initializes basic properties of the element. |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
java.lang.Object |
clone(JRElementGroup parentGroup)
|
java.awt.Color |
getBackcolor()
|
protected JRStyle |
getBaseStyle()
|
JRDefaultStyleProvider |
getDefaultStyleProvider()
|
JRElementGroup |
getElementGroup()
Indicates the logical group that the element belongs to. |
JRPropertyChangeSupport |
getEventSupport()
Returns the property change support object for this instance. |
java.awt.Color |
getForecolor()
|
int |
getHeight()
|
java.lang.String |
getKey()
Returns the string value that uniquely identifies the element. |
ModeEnum |
getModeValue()
Returns the element transparency mode. |
java.awt.Color |
getOwnBackcolor()
|
java.awt.Color |
getOwnForecolor()
|
ModeEnum |
getOwnModeValue()
|
JRPropertiesHolder |
getParentProperties()
Returns the parent properties holder, whose properties are used as defaults for this object. |
PositionTypeEnum |
getPositionTypeValue()
Returns the position type for the element |
JRExpression |
getPrintWhenExpression()
Gets the the expression that is evaluated in order to decide if the element should be displayed. |
JRGroup |
getPrintWhenGroupChanges()
Returns the group for which an element with a printRepeatedValues attribute set to true will be redisplayed even if the value has not changed. |
JRPropertiesMap |
getPropertiesMap()
Returns this object's properties map. |
JRPropertyExpression[] |
getPropertyExpressions()
Returns the list of dynamic/expression-based properties for this report element. |
StretchTypeEnum |
getStretchTypeValue()
Indicates the stretch type for the element |
JRStyle |
getStyle()
Returns this object's style. |
java.lang.String |
getStyleNameReference()
Returns the name of an external style which is to be used by this object. |
int |
getWidth()
|
int |
getX()
Gets the the section relative horizontal offset of the element top left corner. |
int |
getY()
Gets the the section relative vertical offset of the element top left corner. |
boolean |
hasProperties()
Checks whether the object has any properties. |
boolean |
isPrintInFirstWholeBand()
Returns true if an element with a printRepeatedValues attribute set to true will be redisplayed for every new page or column that is not an overflow from a previous page or column. |
boolean |
isPrintRepeatedValues()
Specifies if the element value will be printed for every iteration, even if its value has not changed. |
boolean |
isPrintWhenDetailOverflows()
If this is set to true, the element will be reprinted on the next page if the band does not fit in the current page. |
boolean |
isRemoveLineWhenBlank()
Returns true if the remaining blank space appearing when the value is not printed will be removed. |
void |
setBackcolor(java.awt.Color backcolor)
|
void |
setForecolor(java.awt.Color forecolor)
|
void |
setMode(ModeEnum modeValue)
Sets the element transparency mode. |
void |
setPositionType(PositionTypeEnum positionTypeValue)
Sets the position type for the element. |
void |
setPrintInFirstWholeBand(boolean isPrint)
Specifies whether an element with a printRepeatedValues attribute set to true should be redisplayed for every new page or column that is not an overflow from a previous page or column. |
void |
setPrintRepeatedValues(boolean isPrintRepeatedValues)
|
void |
setPrintWhenDetailOverflows(boolean isPrint)
If this is set to true, the element will be reprinted on the next page if the band does not fit in the current page. |
void |
setRemoveLineWhenBlank(boolean isRemoveLine)
Specifies whether the remaining blank space appearing when the value is not printed will be removed. |
void |
setStretchType(StretchTypeEnum stretchTypeValue)
Specifies how the engine should treat a missing image. |
void |
setWidth(int width)
|
void |
setX(int x)
Sets the the section relative horizontal offset of the element top left corner. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.jasperreports.engine.JRElement |
---|
collectExpressions |
Methods inherited from interface net.sf.jasperreports.engine.JRVisitable |
---|
visit |
Field Detail |
---|
public static final java.lang.String PROPERTY_POSITION_TYPE
public static final java.lang.String PROPERTY_PRINT_IN_FIRST_WHOLE_BAND
public static final java.lang.String PROPERTY_PRINT_REPEATED_VALUES
public static final java.lang.String PROPERTY_PRINT_WHEN_DETAIL_OVERFLOWS
public static final java.lang.String PROPERTY_REMOVE_LINE_WHEN_BLANK
public static final java.lang.String PROPERTY_STRETCH_TYPE
public static final java.lang.String PROPERTY_WIDTH
public static final java.lang.String PROPERTY_X
protected java.lang.String key
protected PositionTypeEnum positionTypeValue
protected StretchTypeEnum stretchTypeValue
protected boolean isPrintRepeatedValues
protected ModeEnum modeValue
protected int x
protected int y
protected int width
protected int height
protected boolean isRemoveLineWhenBlank
protected boolean isPrintInFirstWholeBand
protected boolean isPrintWhenDetailOverflows
protected java.awt.Color forecolor
protected java.awt.Color backcolor
protected JRExpression printWhenExpression
protected JRGroup printWhenGroupChanges
protected JRElementGroup elementGroup
protected JRDefaultStyleProvider defaultStyleProvider
protected JRStyle parentStyle
protected java.lang.String parentStyleNameReference
Constructor Detail |
---|
protected JRBaseElement(JRDefaultStyleProvider defaultStyleProvider)
protected JRBaseElement(JRElement element, JRBaseObjectFactory factory)
element
- an element whose properties are copied to this element. Usually it is a
JRDesignElement
that must be transformed into an
JRBaseElement at compile time.factory
- a factory used in the compile processMethod Detail |
---|
public JRDefaultStyleProvider getDefaultStyleProvider()
getDefaultStyleProvider
in interface JRStyleContainer
protected JRStyle getBaseStyle()
public java.lang.String getKey()
JRElement
getKey
in interface JRCommonElement
getKey
in interface JRElement
public PositionTypeEnum getPositionTypeValue()
JRElement
getPositionTypeValue
in interface JRElement
public void setPositionType(PositionTypeEnum positionTypeValue)
JRElement
setPositionType
in interface JRElement
positionTypeValue
- the position typepublic StretchTypeEnum getStretchTypeValue()
JRElement
getStretchTypeValue
in interface JRElement
StretchTypeEnum
public void setStretchType(StretchTypeEnum stretchTypeValue)
JRElement
setStretchType
in interface JRElement
stretchTypeValue
- a value representing one of the stretch type constants in StretchTypeEnum
public boolean isPrintRepeatedValues()
JRElement
isPrintRepeatedValues
in interface JRElement
JRElement.isRemoveLineWhenBlank()
,
JRElement.isPrintInFirstWholeBand()
public void setPrintRepeatedValues(boolean isPrintRepeatedValues)
setPrintRepeatedValues
in interface JRElement
public ModeEnum getModeValue()
JRCommonElement
getModeValue
in interface JRCommonElement
public ModeEnum getOwnModeValue()
getOwnModeValue
in interface JRCommonElement
public void setMode(ModeEnum modeValue)
JRCommonElement
setMode
in interface JRCommonElement
public int getX()
JRElement
getX
in interface JRElement
public void setX(int x)
JRElement
setX
in interface JRElement
public int getY()
JRElement
getY
in interface JRElement
public int getWidth()
getWidth
in interface JRCommonElement
public void setWidth(int width)
setWidth
in interface JRElement
public int getHeight()
getHeight
in interface JRCommonElement
public boolean isRemoveLineWhenBlank()
JRElement
isRemoveLineWhenBlank
in interface JRElement
public void setRemoveLineWhenBlank(boolean isRemoveLine)
JRElement
setRemoveLineWhenBlank
in interface JRElement
public boolean isPrintInFirstWholeBand()
JRElement
isPrintInFirstWholeBand
in interface JRElement
JRElement.isPrintRepeatedValues()
public void setPrintInFirstWholeBand(boolean isPrint)
JRElement
setPrintInFirstWholeBand
in interface JRElement
JRElement.isPrintRepeatedValues()
public boolean isPrintWhenDetailOverflows()
JRElement
isPrintWhenDetailOverflows
in interface JRElement
public void setPrintWhenDetailOverflows(boolean isPrint)
JRElement
setPrintWhenDetailOverflows
in interface JRElement
public java.awt.Color getForecolor()
getForecolor
in interface JRCommonElement
public java.awt.Color getOwnForecolor()
getOwnForecolor
in interface JRCommonElement
public void setForecolor(java.awt.Color forecolor)
setForecolor
in interface JRCommonElement
public java.awt.Color getBackcolor()
getBackcolor
in interface JRCommonElement
public java.awt.Color getOwnBackcolor()
getOwnBackcolor
in interface JRCommonElement
public void setBackcolor(java.awt.Color backcolor)
setBackcolor
in interface JRCommonElement
public JRExpression getPrintWhenExpression()
JRElement
getPrintWhenExpression
in interface JRElement
public JRGroup getPrintWhenGroupChanges()
JRElement
getPrintWhenGroupChanges
in interface JRElement
JRElement.isPrintRepeatedValues()
public JRElementGroup getElementGroup()
JRElement
getElementGroup
in interface JRElement
StretchTypeEnum.RELATIVE_TO_TALLEST_OBJECT
public JRStyle getStyle()
JRStyleContainer
getStyle
in interface JRStyleContainer
public java.lang.String getStyleNameReference()
JRStyleContainer
templates
and are resolved
at fill time.
This attribute is only effective if no direct style (as returned by getStyle()
is specified for this object.
getStyleNameReference
in interface JRStyleContainer
public JRPropertyChangeSupport getEventSupport()
JRChangeEventsSupport
getEventSupport
in interface JRChangeEventsSupport
public java.lang.Object clone()
clone
in interface JRCloneable
clone
in class java.lang.Object
public java.lang.Object clone(JRElementGroup parentGroup)
clone
in interface JRChild
public boolean hasProperties()
JRPropertiesHolder
hasProperties
in interface JRPropertiesHolder
public JRPropertiesMap getPropertiesMap()
JRPropertiesHolder
getPropertiesMap
in interface JRPropertiesHolder
public JRPropertiesHolder getParentProperties()
JRPropertiesHolder
getParentProperties
in interface JRPropertiesHolder
null
if no parentpublic JRPropertyExpression[] getPropertyExpressions()
JRElement
getPropertyExpressions
in interface JRElement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |