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: * BarPlot.java
028: *
029: * Created on 16 agosto 2005, 10.19
030: *
031: */
032:
033: package it.businesslogic.ireport.chart;
034:
035: /**
036: *
037: * @author Administrator
038: */
039: public class BarPlot extends Plot {
040:
041: private boolean showLabels = false;
042: private boolean showTickMarks = true;
043: private boolean showTickLabels = true;
044:
045: private String categoryAxisLabelExpression = "";
046: private String valueAxisLabelExpression = "";
047:
048: private AxisFormat categoryAxisFormat = new AxisFormat();
049: private AxisFormat valueAxisFormat = new AxisFormat();
050:
051: /** Creates a new instance of PiePlot */
052: public BarPlot() {
053: }
054:
055: public boolean isShowLabels() {
056: return showLabels;
057: }
058:
059: public void setShowLabels(boolean showLabels) {
060: this .showLabels = showLabels;
061: }
062:
063: public boolean isShowTickMarks() {
064: return showTickMarks;
065: }
066:
067: public void setShowTickMarks(boolean showTickMarks) {
068: this .showTickMarks = showTickMarks;
069: }
070:
071: public boolean isShowTickLabels() {
072: return showTickLabels;
073: }
074:
075: public void setShowTickLabels(boolean showTickLabels) {
076: this .showTickLabels = showTickLabels;
077: }
078:
079: public String getCategoryAxisLabelExpression() {
080: return categoryAxisLabelExpression;
081: }
082:
083: public void setCategoryAxisLabelExpression(
084: String categoryAxisLabelExpression) {
085: this .categoryAxisLabelExpression = categoryAxisLabelExpression;
086: }
087:
088: public String getValueAxisLabelExpression() {
089: return valueAxisLabelExpression;
090: }
091:
092: public void setValueAxisLabelExpression(
093: String valueAxisLabelExpression) {
094: this .valueAxisLabelExpression = valueAxisLabelExpression;
095: }
096:
097: public Plot cloneMe() {
098: BarPlot obj = new BarPlot();
099: copyBasePlot(obj);
100: obj.setShowLabels(this .isShowLabels());
101: obj.setShowTickLabels(this .isShowTickLabels());
102: obj.setShowTickMarks(this .isShowTickMarks());
103: obj.setCategoryAxisLabelExpression(this
104: .getCategoryAxisLabelExpression());
105: obj.setValueAxisLabelExpression(this
106: .getValueAxisLabelExpression());
107: obj.setCategoryAxisFormat(getCategoryAxisFormat().cloneMe());
108: obj.setValueAxisFormat(getValueAxisFormat().cloneMe());
109:
110: return obj;
111: }
112:
113: public AxisFormat getCategoryAxisFormat() {
114: return categoryAxisFormat;
115: }
116:
117: public void setCategoryAxisFormat(AxisFormat categoryAxisFormat) {
118: this .categoryAxisFormat = categoryAxisFormat;
119: }
120:
121: public AxisFormat getValueAxisFormat() {
122: return valueAxisFormat;
123: }
124:
125: public void setValueAxisFormat(AxisFormat valueAxisFormat) {
126: this.valueAxisFormat = valueAxisFormat;
127: }
128: }
|