net.sf.jasperreports.engine.fill
Class JRFillCellContents

java.lang.Object
  extended by net.sf.jasperreports.engine.fill.JRFillElementGroup
      extended by net.sf.jasperreports.engine.fill.JRFillElementContainer
          extended by net.sf.jasperreports.engine.fill.JRFillCellContents
All Implemented Interfaces:
JRCellContents, JRCloneable, JRChild, JRElementGroup, JRStyleContainer

public class JRFillCellContents
extends JRFillElementContainer
implements JRCellContents, JRCloneable

Crosstab cell contents filler.

Version:
$Id: JRFillCellContents.java 1307 2006-06-20 19:01:54 +0300 (Tue, 20 Jun 2006) teodord $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)

Nested Class Summary
protected static class JRFillCellContents.BoxContents
           
protected static class JRFillCellContents.StretchedContents
           
 
Field Summary
 
Fields inherited from class net.sf.jasperreports.engine.fill.JRFillElementContainer
deepElements, evaluatedStyles, expressionEvaluator, filler, firstYElement, hasPrintWhenOverflowElement, isOverflow, stylesToEvaluate
 
Fields inherited from class net.sf.jasperreports.engine.fill.JRFillElementGroup
children, elementGroup, elements
 
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
  JRFillCellContents(JRBaseFiller filler, JRCellContents cell, JRFillObjectFactory factory)
           
protected JRFillCellContents(JRFillCellContents cellContents, JRFillCloneFactory factory)
           
 
Method Summary
 JRCloneable createClone()
           
 JRCloneable createClone(JRFillCloneFactory factory)
          Creates a working clone of itself.
protected  void evaluate(byte evaluation)
           
protected  JRPrintFrame fill()
           
 java.awt.Color getBackcolor()
          Returns the cell background color.
protected  int getBottomPadding()
           
 JRBox getBox()
          Returns the cell border.
 JRFillCellContents getBoxContents(boolean left, boolean top)
           
protected  int getContainerHeight()
          Returns the height of the element container.
 JRDefaultStyleProvider getDefaultStyleProvider()
           
 int getHeight()
          Returns the computed cell height.
 java.lang.Byte getMode()
          Returns the cell transparency mode.
protected  int getPrintHeight()
           
 JRStyle getStyle()
           
protected  int getTopPadding()
           
 JRFillCellContents getTransformedContents(int newWidth, int newHeight, byte xPosition, byte yPosition)
           
 int getVerticalSpan()
           
 int getWidth()
          Returns the computed cell width.
 JRFillCellContents getWorkingClone()
           
protected  void initConditionalStyles()
          Find all styles containing conditional styles which are referenced by elements in this band.
protected  void prepare(int availableStretchHeight)
           
 void releaseWorkingClone()
           
protected  void setBox(JRBox box)
           
protected  void setHeight(int height)
           
 void setVerticalPositionType(byte positionType)
           
 void setVerticalSpan(int span)
           
protected  void setWidth(int width)
           
 void setX(int x)
           
 void setY(int y)
           
protected  void stretchTo(int stretchHeight)
           
protected  void verticallyPositionElements(JRTemplatePrintFrame printCell)
           
 
Methods inherited from class net.sf.jasperreports.engine.fill.JRFillElementContainer
addSubElements, buildConsolidatedStyle, collectConditionalStyle, evaluateConditionalStyle, evaluateConditionalStyles, fillElements, getEvaluatedConditionalStyle, getFirstY, getStretchHeight, initElements, initFill, moveBandBottomElements, prepareElements, removeBlankElements, resetElements, rewind, setElementsBandBottomY, setStretchHeight, stretchElements, willOverflow
 
Methods inherited from class net.sf.jasperreports.engine.fill.JRFillElementGroup
getChildren, getCopy, getElementByKey, getElementGroup, getElements, getStretchHeightDiff, reset, 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
 

Constructor Detail

JRFillCellContents

public JRFillCellContents(JRBaseFiller filler,
                          JRCellContents cell,
                          JRFillObjectFactory factory)

JRFillCellContents

protected JRFillCellContents(JRFillCellContents cellContents,
                             JRFillCloneFactory factory)
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

getBox

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

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

setBox

protected void setBox(JRBox box)

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

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

setHeight

protected void setHeight(int height)

setWidth

protected void setWidth(int width)

getBoxContents

public JRFillCellContents getBoxContents(boolean left,
                                         boolean top)

getTransformedContents

public JRFillCellContents getTransformedContents(int newWidth,
                                                 int newHeight,
                                                 byte xPosition,
                                                 byte yPosition)
                                          throws JRException
Throws:
JRException

prepare

protected void prepare(int availableStretchHeight)
                throws JRException
Throws:
JRException

fill

protected JRPrintFrame fill()
                     throws JRException
Throws:
JRException

verticallyPositionElements

protected void verticallyPositionElements(JRTemplatePrintFrame printCell)

getPrintHeight

protected int getPrintHeight()

stretchTo

protected void stretchTo(int stretchHeight)

getContainerHeight

protected int getContainerHeight()
Description copied from class: JRFillElementContainer
Returns the height of the element container.

Specified by:
getContainerHeight in class JRFillElementContainer
Returns:
the height of the element container

getTopPadding

protected int getTopPadding()

getBottomPadding

protected int getBottomPadding()

createClone

public JRCloneable createClone()

createClone

public JRCloneable createClone(JRFillCloneFactory factory)
Description copied from interface: JRCloneable
Creates a working clone of itself.

Specified by:
createClone in interface JRCloneable
Overrides:
createClone in class JRFillElementGroup
Parameters:
factory - the clone factory to use while creating the clone
Returns:
a working clone of itself

getWorkingClone

public JRFillCellContents getWorkingClone()

releaseWorkingClone

public void releaseWorkingClone()

setX

public void setX(int x)

setY

public void setY(int y)

getVerticalSpan

public int getVerticalSpan()

setVerticalSpan

public void setVerticalSpan(int span)

setVerticalPositionType

public void setVerticalPositionType(byte positionType)

evaluate

protected void evaluate(byte evaluation)
                 throws JRException
Overrides:
evaluate in class JRFillElementContainer
Throws:
JRException

getDefaultStyleProvider

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

getStyle

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

initConditionalStyles

protected void initConditionalStyles()
Description copied from class: JRFillElementContainer
Find all styles containing conditional styles which are referenced by elements in this band.

Overrides:
initConditionalStyles in class JRFillElementContainer

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


© 2001-2006 JasperSoft Corporation www.jaspersoft.com