001: /*
002: * ============================================================================
003: * GNU Lesser General Public License
004: * ============================================================================
005: *
006: * JasperReports - Free Java report-generating library.
007: * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
008: *
009: * This library is free software; you can redistribute it and/or
010: * modify it under the terms of the GNU Lesser General Public
011: * License as published by the Free Software Foundation; either
012: * version 2.1 of the License, or (at your option) any later version.
013: *
014: * This library is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
017: * Lesser General Public License for more details.
018: *
019: * You should have received a copy of the GNU Lesser General Public
020: * License along with this library; if not, write to the Free Software
021: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
022: *
023: * JasperSoft Corporation
024: * 303 Second Street, Suite 450 North
025: * San Francisco, CA 94107
026: * http://www.jaspersoft.com
027: */
028: package net.sf.jasperreports.crosstabs.design;
029:
030: import net.sf.jasperreports.crosstabs.base.JRBaseCrosstabCell;
031: import net.sf.jasperreports.engine.JRConstants;
032:
033: /**
034: * Implementation of {@link net.sf.jasperreports.crosstabs.JRCrosstabCell JRCrosstabCell} to be used
035: * for report design.
036: *
037: * @author Lucian Chirita (lucianc@users.sourceforge.net)
038: * @version $Id: JRDesignCrosstabCell.java 1229 2006-04-19 10:27:35Z teodord $
039: */
040: public class JRDesignCrosstabCell extends JRBaseCrosstabCell {
041: private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID;
042:
043: /**
044: * Creates a crosstab data cell.
045: */
046: public JRDesignCrosstabCell() {
047: contents = new JRDesignCellContents();
048: }
049:
050: /**
051: * Indicates that the cell corresponds to a total column.
052: *
053: * @param columnTotalGroup the corresponding column group
054: * @see net.sf.jasperreports.crosstabs.JRCrosstabCell#getColumnTotalGroup()
055: */
056: public void setColumnTotalGroup(String columnTotalGroup) {
057: this .columnTotalGroup = columnTotalGroup;
058: }
059:
060: /**
061: * Sets the cell contents.
062: *
063: * @param contents the contents
064: * @see net.sf.jasperreports.crosstabs.JRCrosstabCell#getContents()
065: */
066: public void setContents(JRDesignCellContents contents) {
067: if (contents == null) {
068: contents = new JRDesignCellContents();
069: }
070:
071: this .contents = contents;
072: }
073:
074: /**
075: * Indicates that the cell corresponds to a total row.
076: *
077: * @param rowTotalGroup the corresponding row group
078: * @see net.sf.jasperreports.crosstabs.JRCrosstabCell#getRowTotalGroup()
079: */
080: public void setRowTotalGroup(String rowTotalGroup) {
081: this .rowTotalGroup = rowTotalGroup;
082: }
083:
084: /**
085: * Sets the cell width.
086: * <p>
087: * This is compulsory for base cells only.
088: *
089: * @param width the width
090: * @see net.sf.jasperreports.crosstabs.JRCrosstabCell#getWidth()
091: */
092: public void setWidth(Integer width) {
093: this .width = width;
094: }
095:
096: /**
097: * Sets the cell height.
098: * <p>
099: * This is compulsory for base cells only.
100: *
101: * @param height the height
102: * @see net.sf.jasperreports.crosstabs.JRCrosstabCell#getHeight()
103: */
104: public void setHeight(Integer height) {
105: this.height = height;
106: }
107: }
|