001: /*
002: * Copyright (C) 2005 - 2008 JasperSoft Corporation. All rights reserved.
003: * http://www.jaspersoft.com.
004: *
005: * Unless you have purchased a commercial license agreement from JasperSoft,
006: * the following license terms apply:
007: *
008: * This program is free software; you can redistribute it and/or modify
009: * it under the terms of the GNU General Public License version 2 as published by
010: * the Free Software Foundation.
011: *
012: * This program is distributed WITHOUT ANY WARRANTY; and without the
013: * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
014: * See the GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
018: * or write to:
019: *
020: * Free Software Foundation, Inc.,
021: * 59 Temple Place - Suite 330,
022: * Boston, MA USA 02111-1307
023: *
024: *
025: *
026: *
027: * ChartTitle.java
028: *
029: * Created on 8 luglio 2005, 17.36
030: *
031: */
032:
033: package it.businesslogic.ireport.chart;
034:
035: import it.businesslogic.ireport.*;
036:
037: /**
038: *
039: * @author Administrator
040: */
041: public class ChartTitle {
042:
043: private IReportFont font = null;
044:
045: private String titleExpression = "";
046:
047: private java.awt.Color color = java.awt.Color.BLACK;
048:
049: private String position = "Top";
050:
051: /** Creates a new instance of ChartTitle */
052: public ChartTitle(String title) {
053:
054: this .titleExpression = title;
055: }
056:
057: public IReportFont getFont() {
058: return font;
059: }
060:
061: public void setFont(IReportFont font) {
062: this .font = font;
063: }
064:
065: public String getTitleExpression() {
066: return titleExpression;
067: }
068:
069: public void setTitleExpression(String titleExpression) {
070: this .titleExpression = titleExpression;
071: }
072:
073: public java.awt.Color getColor() {
074: return color;
075: }
076:
077: public void setColor(java.awt.Color color) {
078: this .color = color;
079: }
080:
081: public String getPosition() {
082: return position;
083: }
084:
085: public void setPosition(String position) {
086: this .position = position;
087: }
088:
089: public ChartTitle cloneMe() {
090:
091: ChartTitle ct = new ChartTitle(getTitleExpression());
092: if (getFont() != null)
093: ct.setFont((IReportFont) getFont().clone());
094: if (getColor() != null)
095: ct.setColor(new java.awt.Color(getColor().getRGB()));
096: ct.setPosition(new String(getPosition()));
097: ct.position = position;
098:
099: return ct;
100: }
101: }
|