Class JRDesignCellContents
java.lang.Object
net.sf.jasperreports.engine.base.JRBaseElementGroup
net.sf.jasperreports.engine.design.JRDesignElementGroup
net.sf.jasperreports.crosstabs.design.JRDesignCellContents
- All Implemented Interfaces:
Serializable,Cloneable,JRCellContents,JRChangeEventsSupport,JRBoxContainer,JRChild,JRCloneable,JRElementGroup,JRPropertiesHolder,JRStyleContainer,JRVisitable
Implementation of
JRCellContents used for
report design.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JRDefaultStyleProviderprotected ModeEnumstatic final Stringstatic final Stringstatic final Stringprotected JRStyleprotected StringFields inherited from class net.sf.jasperreports.engine.design.JRDesignElementGroup
PROPERTY_CHILDREN, PROPERTY_ELEMENT_GROUPFields inherited from class net.sf.jasperreports.engine.base.JRBaseElementGroup
children, elementGroupFields inherited from interface net.sf.jasperreports.crosstabs.JRCellContents
NOT_CALCULATED, PROPERTIES_PREFIX, PROPERTY_COLUMN_SPAN, PROPERTY_ROW_SPAN, PROPERTY_TYPE, TYPE_COLUMN_HEADER, TYPE_CROSSTAB_HEADER, TYPE_CROSSTAB_TITLE, TYPE_DATA, TYPE_NO_DATA_CELL, TYPE_ROW_HEADER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns the cell background color.intReturns the computed cell height.getMode()Returns the cell transparency mode.Returns the parent properties holder, whose properties are used as defaults for this object.Returns this object's properties map.getStyle()Returns this object's style.Returns the name of an external style which is to be used by this object.intgetWidth()Returns the computed cell width.booleanChecks whether the object has any properties.voidsetBackcolor(Color color) Sets the cell background color.voidsetHeight(int height) Sets the computed cell height.voidSets the cell transparency mode.voidsetOrigin(JRCrosstabOrigin origin) voidSets the style used by this cell.voidsetStyleNameReference(String styleName) Set the name of the external style to be used for this cell.protected voidsetWidth(int width) Sets the computed cell width.Methods inherited from class net.sf.jasperreports.engine.design.JRDesignElementGroup
addElement, addElement, addElement, addElementGroup, addElementGroup, getEventSupport, removeElement, removeElementGroup, setElementGroupMethods inherited from class net.sf.jasperreports.engine.base.JRBaseElementGroup
clone, getChildren, getElementByKey, getElementByKey, getElementGroup, getElements, getElements, visitMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.jasperreports.engine.JRElementGroup
getChildren, getElementByKey, getElementGroup, getElementsMethods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getStyleNameMethods inherited from interface net.sf.jasperreports.engine.JRVisitable
visit
-
Field Details
-
PROPERTY_BOX
- See Also:
-
PROPERTY_STYLE
- See Also:
-
PROPERTY_STYLE_NAME_REFERENCE
- See Also:
-
defaultStyleProvider
-
style
-
styleNameReference
-
mode
-
-
Constructor Details
-
JRDesignCellContents
public JRDesignCellContents()Creates an empty cell contents.
-
-
Method Details
-
getBackcolor
Description copied from interface:JRCellContentsReturns the cell background color.The cell is filled with the background color only if the cell has opaque mode.
- Specified by:
getBackcolorin interfaceJRCellContents- Returns:
- the cell backcolor
-
setBackcolor
Sets the cell background color.- Parameters:
color- the background color- See Also:
-
getLineBox
- Specified by:
getLineBoxin interfaceJRBoxContainer
-
getHeight
public int getHeight()Description copied from interface:JRCellContentsReturns the computed cell height.- Specified by:
getHeightin interfaceJRCellContents- Returns:
- the computed cell height
- See Also:
-
setHeight
public void setHeight(int height) Sets the computed cell height.The method should NOT be called by external code.
- Parameters:
height- the cell height- See Also:
-
getWidth
public int getWidth()Description copied from interface:JRCellContentsReturns the computed cell width.- Specified by:
getWidthin interfaceJRCellContents- Returns:
- the computed cell width
- See Also:
-
setWidth
protected void setWidth(int width) Sets the computed cell width.- Parameters:
width- the cell width- See Also:
-
getDefaultStyleProvider
- Specified by:
getDefaultStyleProviderin interfaceJRStyleContainer
-
getStyle
Description copied from interface:JRStyleContainerReturns this object's style.- Specified by:
getStylein interfaceJRStyleContainer- Returns:
- this object's style
-
setStyle
Sets the style used by this cell. The style is only used for cell background and borders and is not inherited by elements inside the cell.- Parameters:
style- the style to be used
-
getMode
Description copied from interface:JRCellContentsReturns the cell transparency mode.- Specified by:
getModein interfaceJRCellContents- Returns:
ModeEnum.OPAQUEorModeEnum.TRANSPARENT
-
setMode
Sets the cell transparency mode.- Parameters:
mode- the transparency mode- See Also:
-
getStyleNameReference
Description copied from interface:JRStyleContainerReturns the name of an external style which is to be used by this object. External styles are defined intemplatesand are resolved at fill time. This attribute is only effective if no direct style (as returned bygetStyle()is specified for this object.- Specified by:
getStyleNameReferencein interfaceJRStyleContainer- Returns:
- the name of an external style
-
setStyleNameReference
Set the name of the external style to be used for this cell. An external style is only effective when there is no internal style set for this cell, i.e.getStyle()returnsnullThe external style will be resolved at fill time from the templates used in the report.- Parameters:
styleName- the name of the external style- See Also:
-
getOrigin
-
setOrigin
-
getDefaultLineColor
- Specified by:
getDefaultLineColorin interfaceJRBoxContainer
-
clone
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classJRDesignElementGroup
-
hasProperties
public boolean hasProperties()Description copied from interface:JRPropertiesHolderChecks whether the object has any properties.- Specified by:
hasPropertiesin interfaceJRPropertiesHolder- Returns:
- whether the object has any properties
-
getPropertiesMap
Description copied from interface:JRPropertiesHolderReturns this object's properties map.- Specified by:
getPropertiesMapin interfaceJRPropertiesHolder- Returns:
- this object's properties map
-
getParentProperties
Description copied from interface:JRPropertiesHolderReturns the parent properties holder, whose properties are used as defaults for this object.- Specified by:
getParentPropertiesin interfaceJRPropertiesHolder- Returns:
- the parent properties holder, or
nullif no parent
-