net.sf.jasperreports.crosstabs.design
Class JRDesignCellContents

java.lang.Object
  extended by net.sf.jasperreports.engine.base.JRBaseElementGroup
      extended by net.sf.jasperreports.engine.design.JRDesignElementGroup
          extended by net.sf.jasperreports.crosstabs.design.JRDesignCellContents
All Implemented Interfaces:
java.io.Serializable, JRCellContents, JRChild, JRElementGroup, JRStyleContainer

public class JRDesignCellContents
extends JRDesignElementGroup
implements JRCellContents

Implementation of JRCellContents used for report design.

Version:
$Id: JRDesignCellContents.java 1229 2006-04-19 13:27:35 +0300 (Wed, 19 Apr 2006) teodord $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)
See Also:
Serialized Form

Field Summary
protected  JRDefaultStyleProvider defaultStyleProvider
           
protected  java.lang.Byte mode
           
protected  JRStyle style
           
 
Fields inherited from class net.sf.jasperreports.engine.base.JRBaseElementGroup
children, elementGroup
 
Fields inherited from interface net.sf.jasperreports.crosstabs.JRCellContents
NOT_CALCULATED, POSITION_X_CENTER, POSITION_X_LEFT, POSITION_X_RIGHT, POSITION_X_STRETCH, POSITION_Y_BOTTOM, POSITION_Y_MIDDLE, POSITION_Y_STRETCH, POSITION_Y_TOP
 
Constructor Summary
JRDesignCellContents()
          Creates an empty cell contents.
 
Method Summary
 java.awt.Color getBackcolor()
          Returns the cell background color.
 JRBox getBox()
          Returns the cell border.
 JRDefaultStyleProvider getDefaultStyleProvider()
           
 int getHeight()
          Returns the computed cell height.
 java.lang.Byte getMode()
          Returns the cell transparency mode.
 JRStyle getStyle()
           
 int getWidth()
          Returns the computed cell width.
 void setBackcolor(java.awt.Color color)
          Sets the cell background color.
 void setBox(JRBox box)
          Sets the cell border.
protected  void setHeight(int height)
          Sets the computed cell height.
 void setMode(java.lang.Byte mode)
          Sets the cell transparency mode.
 void setStyle(JRStyle style)
          Sets the style used by this cell.
protected  void setWidth(int width)
          Sets the computed cell width.
 
Methods inherited from class net.sf.jasperreports.engine.design.JRDesignElementGroup
addElement, addElementGroup, removeElement, removeElementGroup, setElementGroup
 
Methods inherited from class net.sf.jasperreports.engine.base.JRBaseElementGroup
getChildren, getCopy, getElementByKey, getElementByKey, getElementGroup, getElements, getElements, writeXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jasperreports.engine.JRElementGroup
getChildren, getElementByKey, getElementGroup, getElements
 
Methods inherited from interface net.sf.jasperreports.engine.JRChild
getCopy, writeXml
 

Field Detail

defaultStyleProvider

protected JRDefaultStyleProvider defaultStyleProvider

style

protected JRStyle style

mode

protected java.lang.Byte mode
Constructor Detail

JRDesignCellContents

public JRDesignCellContents()
Creates an empty cell contents.

Method Detail

getBackcolor

public java.awt.Color getBackcolor()
Description copied from interface: JRCellContents
Returns the cell background color.

The cell is filled with the background color only if the cell has opaque mode.

Specified by:
getBackcolor in interface JRCellContents
Returns:
the cell backcolor

setBackcolor

public void setBackcolor(java.awt.Color color)
Sets the cell background color.

Parameters:
color - the background color
See Also:
JRCellContents.getBackcolor()

getBox

public JRBox getBox()
Description copied from interface: JRCellContents
Returns the cell border.

Specified by:
getBox in interface JRCellContents
Returns:
the cell border

setBox

public void setBox(JRBox box)
Sets the cell border.

Parameters:
box - the border
See Also:
JRCellContents.getBox()

getHeight

public int getHeight()
Description copied from interface: JRCellContents
Returns the computed cell height.

Specified by:
getHeight in interface JRCellContents
Returns:
the computed cell height
See Also:
JRCellContents.NOT_CALCULATED

setHeight

protected void setHeight(int height)
Sets the computed cell height.

Parameters:
height - the cell height
See Also:
JRCellContents.getHeight()

getWidth

public int getWidth()
Description copied from interface: JRCellContents
Returns the computed cell width.

Specified by:
getWidth in interface JRCellContents
Returns:
the computed cell width
See Also:
JRCellContents.NOT_CALCULATED

setWidth

protected void setWidth(int width)
Sets the computed cell width.

Parameters:
width - the cell width
See Also:
JRCellContents.getWidth()

getDefaultStyleProvider

public JRDefaultStyleProvider getDefaultStyleProvider()
Specified by:
getDefaultStyleProvider in interface JRStyleContainer

getStyle

public JRStyle getStyle()
Specified by:
getStyle in interface JRStyleContainer

setStyle

public void setStyle(JRStyle style)
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

public java.lang.Byte getMode()
Description copied from interface: JRCellContents
Returns the cell transparency mode.

Specified by:
getMode in interface JRCellContents
Returns:
MODE_OPAQUE or MODE_TRANSPARENT

setMode

public void setMode(java.lang.Byte mode)
Sets the cell transparency mode.

Parameters:
mode - the transparency mode
See Also:
JRCellContents.getMode()


© 2001-2006 JasperSoft Corporation www.jaspersoft.com