KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > it > businesslogic > ireport > chart > AxisFormat


1 /*
2  * Copyright (C) 2005 - 2006 JasperSoft Corporation. All rights reserved.
3  * http://www.jaspersoft.com.
4  *
5  * Unless you have purchased a commercial license agreement from JasperSoft,
6  * the following license terms apply:
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as published by
10  * the Free Software Foundation.
11  *
12  * This program is distributed WITHOUT ANY WARRANTY; and without the
13  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
18  * or write to:
19  *
20  * Free Software Foundation, Inc.,
21  * 59 Temple Place - Suite 330,
22  * Boston, MA USA 02111-1307
23  *
24  *
25  *
26  *
27  * AxisFormat.java
28  *
29  * Created on September 27, 2006, 3:17 PM
30  *
31  */

32
33 package it.businesslogic.ireport.chart;
34
35 import it.businesslogic.ireport.IReportFont;
36 import java.awt.Color JavaDoc;
37
38 /**
39  *
40  * @author gtoffoli
41  */

42 public class AxisFormat {
43     
44     private java.awt.Color JavaDoc labelColor = null;
45     private java.awt.Color JavaDoc tickLabelColor = null;
46     private java.awt.Color JavaDoc axisLineColor = null;
47     private String JavaDoc tickLabelMask = "";
48     private IReportFont labelFont = null;
49     private IReportFont tickLabelFont = null;
50     
51     
52     public AxisFormat cloneMe()
53     {
54         AxisFormat af = new AxisFormat();
55         if (labelColor != null) af.setLabelColor( new Color JavaDoc( labelColor.getRGB() ));
56         if (tickLabelColor != null) af.setTickLabelColor( new Color JavaDoc( tickLabelColor.getRGB() ));
57         if (axisLineColor != null) af.setAxisLineColor( new Color JavaDoc( axisLineColor.getRGB() ));
58         af.setTickLabelMask(tickLabelMask);
59         if (labelFont != null) af.setLabelFont( (IReportFont)labelFont.clone());
60         if (tickLabelFont != null) af.setTickLabelFont( (IReportFont)tickLabelFont.clone());
61         
62         return af;
63     }
64     
65     /** Creates a new instance of AxisFormat */
66     public AxisFormat() {
67     }
68
69     public java.awt.Color JavaDoc getLabelColor() {
70         return labelColor;
71     }
72
73     public void setLabelColor(java.awt.Color JavaDoc labelColor) {
74         this.labelColor = labelColor;
75     }
76
77     public java.awt.Color JavaDoc getTickLabelColor() {
78         return tickLabelColor;
79     }
80
81     public void setTickLabelColor(java.awt.Color JavaDoc tickLabelColor) {
82         this.tickLabelColor = tickLabelColor;
83     }
84
85     public java.awt.Color JavaDoc getAxisLineColor() {
86         return axisLineColor;
87     }
88
89     public void setAxisLineColor(java.awt.Color JavaDoc axisLineColor) {
90         this.axisLineColor = axisLineColor;
91     }
92
93     public String JavaDoc getTickLabelMask() {
94         return tickLabelMask;
95     }
96
97     public void setTickLabelMask(String JavaDoc tickLabelMask) {
98         this.tickLabelMask = tickLabelMask;
99     }
100
101     public IReportFont getLabelFont() {
102         return labelFont;
103     }
104
105     public void setLabelFont(IReportFont labelFont) {
106         this.labelFont = labelFont;
107     }
108
109     public IReportFont getTickLabelFont() {
110         return tickLabelFont;
111     }
112
113     public void setTickLabelFont(IReportFont tickLabelFont) {
114         this.tickLabelFont = tickLabelFont;
115     }
116     
117 }
118
Popular Tags