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.engine.base;
029:
030: import net.sf.jasperreports.engine.JRConditionalStyle;
031: import net.sf.jasperreports.engine.JRExpression;
032: import net.sf.jasperreports.engine.JRStyle;
033: import net.sf.jasperreports.engine.JRAbstractObjectFactory;
034: import net.sf.jasperreports.engine.JRConstants;
035:
036: /**
037: * @author Ionut Nedelcu (ionutned@users.sourceforge.net)
038: * @version $Id: JRBaseConditionalStyle.java 1413 2006-09-28 10:47:40Z teodord $
039: */
040: public class JRBaseConditionalStyle extends JRBaseStyle implements
041: JRConditionalStyle {
042:
043: /**
044: *
045: */
046: private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID;
047:
048: protected JRExpression conditionExpression = null;
049:
050: public JRBaseConditionalStyle() {
051: super ();
052: }
053:
054: public JRBaseConditionalStyle(JRConditionalStyle style,
055: JRStyle parentStyle, JRAbstractObjectFactory factory) {
056: this .parentStyle = parentStyle;
057:
058: mode = style.getOwnMode();
059: forecolor = style.getOwnForecolor();
060: backcolor = style.getOwnBackcolor();
061:
062: pen = style.getOwnPen();
063: fill = style.getOwnFill();
064:
065: radius = style.getOwnRadius();
066:
067: scaleImage = style.getOwnScaleImage();
068: horizontalAlignment = style.getOwnHorizontalAlignment();
069: verticalAlignment = style.getOwnVerticalAlignment();
070:
071: border = style.getOwnBorder();
072: topBorder = style.getOwnTopBorder();
073: leftBorder = style.getOwnLeftBorder();
074: bottomBorder = style.getOwnBottomBorder();
075: rightBorder = style.getOwnRightBorder();
076: borderColor = style.getOwnBorderColor();
077: topBorderColor = style.getOwnTopBorderColor();
078: leftBorderColor = style.getOwnLeftBorderColor();
079: bottomBorderColor = style.getOwnBottomBorderColor();
080: rightBorderColor = style.getOwnRightBorderColor();
081: padding = style.getOwnPadding();
082: topPadding = style.getOwnTopPadding();
083: leftPadding = style.getOwnLeftPadding();
084: bottomPadding = style.getOwnBottomPadding();
085: rightPadding = style.getOwnRightPadding();
086:
087: rotation = style.getOwnRotation();
088: lineSpacing = style.getOwnLineSpacing();
089: isStyledText = style.isOwnStyledText();
090:
091: pattern = style.getOwnPattern();
092:
093: fontName = style.getOwnFontName();
094: isBold = style.isOwnBold();
095: isItalic = style.isOwnItalic();
096: isUnderline = style.isOwnUnderline();
097: isStrikeThrough = style.isOwnStrikeThrough();
098: fontSize = style.getOwnFontSize();
099: pdfFontName = style.getOwnPdfFontName();
100: pdfEncoding = style.getOwnPdfEncoding();
101: isPdfEmbedded = style.isOwnPdfEmbedded();
102: conditionExpression = factory.getExpression(style
103: .getConditionExpression(), true);
104: }
105:
106: public JRExpression getConditionExpression() {
107: return conditionExpression;
108: }
109: }
|