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: * AxisFormat.java
028: *
029: * Created on September 27, 2006, 3:17 PM
030: *
031: */
032:
033: package it.businesslogic.ireport.chart;
034:
035: import it.businesslogic.ireport.IReportFont;
036: import java.awt.Color;
037:
038: /**
039: *
040: * @author gtoffoli
041: */
042: public class AxisFormat {
043:
044: private java.awt.Color labelColor = null;
045: private java.awt.Color tickLabelColor = null;
046: private java.awt.Color axisLineColor = null;
047: private String tickLabelMask = "";
048: private IReportFont labelFont = null;
049: private IReportFont tickLabelFont = null;
050:
051: public AxisFormat cloneMe() {
052: AxisFormat af = new AxisFormat();
053: if (labelColor != null)
054: af.setLabelColor(new Color(labelColor.getRGB()));
055: if (tickLabelColor != null)
056: af.setTickLabelColor(new Color(tickLabelColor.getRGB()));
057: if (axisLineColor != null)
058: af.setAxisLineColor(new Color(axisLineColor.getRGB()));
059: af.setTickLabelMask(tickLabelMask);
060: if (labelFont != null)
061: af.setLabelFont((IReportFont) labelFont.clone());
062: if (tickLabelFont != null)
063: af.setTickLabelFont((IReportFont) tickLabelFont.clone());
064:
065: return af;
066: }
067:
068: /** Creates a new instance of AxisFormat */
069: public AxisFormat() {
070: }
071:
072: public java.awt.Color getLabelColor() {
073: return labelColor;
074: }
075:
076: public void setLabelColor(java.awt.Color labelColor) {
077: this .labelColor = labelColor;
078: }
079:
080: public java.awt.Color getTickLabelColor() {
081: return tickLabelColor;
082: }
083:
084: public void setTickLabelColor(java.awt.Color tickLabelColor) {
085: this .tickLabelColor = tickLabelColor;
086: }
087:
088: public java.awt.Color getAxisLineColor() {
089: return axisLineColor;
090: }
091:
092: public void setAxisLineColor(java.awt.Color axisLineColor) {
093: this .axisLineColor = axisLineColor;
094: }
095:
096: public String getTickLabelMask() {
097: return tickLabelMask;
098: }
099:
100: public void setTickLabelMask(String tickLabelMask) {
101: this .tickLabelMask = tickLabelMask;
102: }
103:
104: public IReportFont getLabelFont() {
105: return labelFont;
106: }
107:
108: public void setLabelFont(IReportFont labelFont) {
109: this .labelFont = labelFont;
110: }
111:
112: public IReportFont getTickLabelFont() {
113: return tickLabelFont;
114: }
115:
116: public void setTickLabelFont(IReportFont tickLabelFont) {
117: this.tickLabelFont = tickLabelFont;
118: }
119:
120: }
|