net.sf.jasperreports.engine.fill

## Class JRFillCellContents

- java.lang.Object
- - net.sf.jasperreports.engine.fill.JRFillElementGroup
  - - net.sf.jasperreports.engine.fill.JRFillElementContainer
    - - net.sf.jasperreports.engine.fill.JRFillCellContents

- All Implemented Interfaces:
    java.lang.Cloneable, JRCellContents, FillContainerContext, JRFillCloneable, JRBoxContainer, JRChild, JRCloneable, JRElementGroup, JRPropertiesHolder, JRStyleContainer, JRStyleSetter, JRVisitable

      public class JRFillCellContents
      extends JRFillElementContainer
      implements JRCellContents, JRStyleSetter

  Crosstab cell contents filler.
  Version:
    $Id: JRFillCellContents.java 6863 2014-02-06 09:59:27Z teodord $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `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, 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
    Modifier | Constructor and Description
    --- | ---
    `` | `JRFillCellContents(JRBaseFiller filler, JRCellContents cell, java.lang.String cellType, JRFillCrosstabObjectFactory factory)`
    `protected` | `JRFillCellContents(JRFillCellContents cellContents, JRFillCloneFactory factory)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addElement(int index, JRFillElement element)`
    `JRFillCloneable` | `createClone()`
    `JRFillCloneable` | `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()`
    `JRFillCellContents` | `getBoxContents(boolean left, boolean right, boolean top)`
    `protected int` | `getContainerHeight()` Returns the height of the element container.
    `java.awt.Color` | `getDefaultLineColor()`
    `JRDefaultStyleProvider` | `getDefaultStyleProvider()`
    `int` | `getHeight()` Returns the computed cell height.
    `int` | `getHorizontalSpan()`
    `JRLineBox` | `getLineBox()`
    `ModeEnum` | `getModeValue()` Returns the cell transparency mode.
    `protected JROrigin` | `getOrigin()`
    `JRPropertiesHolder` | `getParentProperties()` Returns the parent properties holder, whose properties are used as defaults for this object.
    `protected int` | `getPrintHeight()`
    `JRPropertiesMap` | `getPropertiesMap()` Returns this object's properties map.
    `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.
    `protected JRTemplateFrame` | `getTemplateFrame()`
    `protected int` | `getTopPadding()`
    `JRFillCellContents` | `getTransformedContents(int newWidth, int newHeight, CrosstabColumnPositionEnum xPosition, CrosstabRowPositionEnum yPosition)`
    `int` | `getVerticalSpan()`
    `int` | `getWidth()` Returns the computed cell width.
    `JRFillCellContents` | `getWorkingClone()`
    `boolean` | `hasProperties()` Checks whether the object has any properties.
    `protected void` | `initConditionalStyles()` Find all styles containing conditional styles which are referenced by elements in this band.
    `protected void` | `prepare(int availableHeight)`
    `void` | `releaseWorkingClone()`
    `protected void` | `setBox(JRLineBox box)`
    `protected void` | `setCellProperties(JRTemplatePrintFrame printCell)`
    `protected void` | `setHeight(int height)`
    `void` | `setHorizontalSpan(int horizontalSpan)`
    `void` | `setPrintProperty(java.lang.String name, java.lang.String value)`
    `void` | `setStyle(JRStyle style)` Set the style on the object.
    `void` | `setStyleNameReference(java.lang.String name)` Set the name of an external style that is to be used by the object.
    `void` | `setVerticalPositionType(CrosstabRowPositionEnum 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, initDeepElements, initElements, initFill, isCurrentOverflow, isCurrentOverflowAllowed, moveBandBottomElements, prepareElements, removeBlankElements, resetElements, rewind, setElementOriginProvider, setStretchHeight, stretchElements, willOverflow`

    - ### Methods inherited from class net.sf.jasperreports.engine.fill.JRFillElementGroup

      `clone, clone, getChildren, getElementByKey, getElementGroup, getElements, getStretchHeightDiff, reset, visit`

    - ### 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.JRElementGroup

      `getChildren, getElementByKey, getElementGroup, getElements`

    - ### Methods inherited from interface net.sf.jasperreports.engine.JRChild

      `clone`

    - ### Methods inherited from interface net.sf.jasperreports.engine.JRVisitable

      `visit`

    - ### Methods inherited from interface net.sf.jasperreports.engine.JRCloneable

      `clone`

- - ### Constructor Detail

    - #### JRFillCellContents

          public JRFillCellContents(JRBaseFiller filler,
                            JRCellContents cell,
                            java.lang.String cellType,
                            JRFillCrosstabObjectFactory 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

    - #### getLineBox

          public JRLineBox getLineBox()

      Specified by:
        `getLineBox` in interface `JRBoxContainer`

    - #### setBox

          protected void setBox(JRLineBox 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 right,
                                          boolean top)

    - #### getTransformedContents

          public JRFillCellContents getTransformedContents(int newWidth,
                                                  int newHeight,
                                                  CrosstabColumnPositionEnum xPosition,
                                                  CrosstabRowPositionEnum yPosition)
                                                    throws JRException

      Throws:
        `JRException`

    - #### prepare

          protected void prepare(int availableHeight)
                          throws JRException

      Throws:
        `JRException`

    - #### setPrintProperty

          public void setPrintProperty(java.lang.String name,
                              java.lang.String value)

    - #### fill

          protected JRPrintFrame fill()
                               throws JRException

      Throws:
        `JRException`

    - #### setCellProperties

          protected void setCellProperties(JRTemplatePrintFrame printCell)

    - #### getTemplateFrame

          protected JRTemplateFrame getTemplateFrame()

    - #### getOrigin

          protected JROrigin getOrigin()

    - #### 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 JRFillCloneable createClone()

    - #### createClone

          public JRFillCloneable createClone(JRFillCloneFactory factory)

      Description copied from interface: `JRFillCloneable`
      Creates a working clone of itself.
      Specified by:
        `createClone` in interface `JRFillCloneable`
      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(CrosstabRowPositionEnum positionType)

    - #### getHorizontalSpan

          public int getHorizontalSpan()

    - #### setHorizontalSpan

          public void setHorizontalSpan(int horizontalSpan)

    - #### 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()

      Description copied from interface: `JRStyleContainer`
      Returns this object's style.
      Specified by:
        `getStyle` in interface `JRStyleContainer`
      Returns:
        this object's style

    - #### 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`

    - #### getModeValue

          public ModeEnum getModeValue()

      Description copied from interface: `JRCellContents`
      Returns the cell transparency mode.
      Specified by:
        `getModeValue` in interface `JRCellContents`
      Returns:
        `ModeEnum.OPAQUE` or `ModeEnum.TRANSPARENT`

    - #### getStyleNameReference

          public java.lang.String getStyleNameReference()

      Description copied from interface: `JRStyleContainer`
      Returns the name of an external style which is to be used by this object.

      External styles are defined in `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.
      Specified by:
        `getStyleNameReference` in interface `JRStyleContainer`
      Returns:
        the name of an external style

    - #### setStyle

          public void setStyle(JRStyle style)

      Description copied from interface: `JRStyleSetter`
      Set the style on the object.

      In some cases, this method is invoked after the object has requested its style to be set.
      Specified by:
        `setStyle` in interface `JRStyleSetter`
      Parameters:
        `style` - the style to be used by the object

    - #### setStyleNameReference

          public void setStyleNameReference(java.lang.String name)

      Description copied from interface: `JRStyleSetter`
      Set the name of an external style that is to be used by the object.
      Specified by:
        `setStyleNameReference` in interface `JRStyleSetter`
      Parameters:
        `name` - the name of an external style

    - #### getDefaultLineColor

          public java.awt.Color getDefaultLineColor()

      Specified by:
        `getDefaultLineColor` in interface `JRBoxContainer`

    - #### hasProperties

          public boolean hasProperties()

      Description copied from interface: `JRPropertiesHolder`
      Checks whether the object has any properties.
      Specified by:
        `hasProperties` in interface `JRPropertiesHolder`
      Returns:
        whether the object has any properties

    - #### getPropertiesMap

          public JRPropertiesMap getPropertiesMap()

      Description copied from interface: `JRPropertiesHolder`
      Returns this object's properties map.
      Specified by:
        `getPropertiesMap` in interface `JRPropertiesHolder`
      Returns:
        this object's properties map

    - #### getParentProperties

          public JRPropertiesHolder getParentProperties()

      Description copied from interface: `JRPropertiesHolder`
      Returns the parent properties holder, whose properties are used as defaults for this object.
      Specified by:
        `getParentProperties` in interface `JRPropertiesHolder`
      Returns:
        the parent properties holder, or `null` if no parent

    - #### addElement

          protected void addElement(int index,
                        JRFillElement element)

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com