net.sf.jasperreports.crosstabs.design

## 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:
    java.io.Serializable, java.lang.Cloneable, JRCellContents, JRChangeEventsSupport, JRBoxContainer, JRChild, JRCloneable, JRElementGroup, JRPropertiesHolder, JRStyleContainer, JRVisitable

      public class JRDesignCellContents
      extends JRDesignElementGroup
      implements JRCellContents

  Implementation of `JRCellContents` used for report design.
  Version:
    $Id: JRDesignCellContents.java 5877 2013-01-07 19:51:14Z teodord $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected JRDefaultStyleProvider` | `defaultStyleProvider`
    `protected ModeEnum` | `modeValue`
    `static java.lang.String` | `PROPERTY_BOX`
    `static java.lang.String` | `PROPERTY_STYLE`
    `static java.lang.String` | `PROPERTY_STYLE_NAME_REFERENCE`
    `protected JRStyle` | `style`
    `protected java.lang.String` | `styleNameReference`

    - ### Fields inherited from class net.sf.jasperreports.engine.design.JRDesignElementGroup

      `PROPERTY_CHILDREN, PROPERTY_ELEMENT_GROUP`

    - ### Fields inherited from class net.sf.jasperreports.engine.base.JRBaseElementGroup

      `children, elementGroup`

    - ### 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
    Constructor and Description
    `JRDesignCellContents()` Creates an empty cell contents.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()`
    `java.awt.Color` | `getBackcolor()` Returns the cell background color.
    `java.awt.Color` | `getDefaultLineColor()`
    `JRDefaultStyleProvider` | `getDefaultStyleProvider()`
    `int` | `getHeight()` Returns the computed cell height.
    `JRLineBox` | `getLineBox()`
    `ModeEnum` | `getModeValue()` Returns the cell transparency mode.
    `JRCrosstabOrigin` | `getOrigin()`
    `JRPropertiesHolder` | `getParentProperties()` Returns the parent properties holder, whose properties are used as defaults for this object.
    `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.
    `int` | `getWidth()` Returns the computed cell width.
    `boolean` | `hasProperties()` Checks whether the object has any properties.
    `void` | `setBackcolor(java.awt.Color color)` Sets the cell background color.
    `void` | `setHeight(int height)` Sets the computed cell height.
    `void` | `setMode(ModeEnum modeValue)` Sets the cell transparency mode.
    `void` | `setOrigin(JRCrosstabOrigin origin)`
    `void` | `setStyle(JRStyle style)` Sets the style used by this cell.
    `void` | `setStyleNameReference(java.lang.String styleName)` Set the name of the external style to be used for this cell.
    `protected void` | `setWidth(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, setElementGroup`

    - ### Methods inherited from class net.sf.jasperreports.engine.base.JRBaseElementGroup

      `clone, getChildren, getElementByKey, getElementByKey, getElementGroup, getElements, getElements, 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`

- - ### Field Detail

    - #### PROPERTY_BOX

          public static final java.lang.String PROPERTY_BOX

      See Also:
        Constant Field Values

    - #### PROPERTY_STYLE

          public static final java.lang.String PROPERTY_STYLE

      See Also:
        Constant Field Values

    - #### PROPERTY_STYLE_NAME_REFERENCE

          public static final java.lang.String PROPERTY_STYLE_NAME_REFERENCE

      See Also:
        Constant Field Values

    - #### defaultStyleProvider

          protected JRDefaultStyleProvider defaultStyleProvider

    - #### style

          protected JRStyle style

    - #### styleNameReference

          protected java.lang.String styleNameReference

    - #### modeValue

          protected ModeEnum modeValue

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

    - #### getLineBox

          public JRLineBox getLineBox()

      Specified by:
        `getLineBox` in interface `JRBoxContainer`

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

          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:
        `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()

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

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

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

    - #### setMode

          public void setMode(ModeEnum modeValue)

      Sets the cell transparency mode.
      Parameters:
        `modeValue` - the transparency mode
      See Also:
        `JRCellContents.getModeValue()`

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

    - #### setStyleNameReference

          public void setStyleNameReference(java.lang.String styleName)

      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()` returns `null` The 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:
        `getStyleNameReference()`

    - #### getOrigin

          public JRCrosstabOrigin getOrigin()

    - #### setOrigin

          public void setOrigin(JRCrosstabOrigin origin)

    - #### getDefaultLineColor

          public java.awt.Color getDefaultLineColor()

      Specified by:
        `getDefaultLineColor` in interface `JRBoxContainer`

    - #### clone

          public java.lang.Object clone()

      Specified by:
        `clone` in interface `JRCloneable`
      Overrides:
        `clone` in class `JRDesignElementGroup`

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

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com