first commit

This commit is contained in:
2025-07-28 13:56:49 +05:30
commit e9eb805edb
3438 changed files with 520990 additions and 0 deletions

View File

@@ -0,0 +1,163 @@
package net.sf.jasperreports.charts.base;
import java.awt.Color;
import net.sf.jasperreports.charts.JRAreaPlot;
import net.sf.jasperreports.charts.JRCategoryAxisFormat;
import net.sf.jasperreports.charts.JRValueAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.JRFont;
import net.sf.jasperreports.engine.JRStyleContainer;
import net.sf.jasperreports.engine.base.JRBaseChartPlot;
import net.sf.jasperreports.engine.base.JRBaseFont;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
import net.sf.jasperreports.engine.util.JRStyleResolver;
public class JRBaseAreaPlot extends JRBaseChartPlot implements JRAreaPlot {
private static final long serialVersionUID = 10200L;
protected JRExpression categoryAxisLabelExpression = null;
protected JRFont categoryAxisLabelFont = null;
protected Color categoryAxisLabelColor = null;
protected JRFont categoryAxisTickLabelFont = null;
protected Color categoryAxisTickLabelColor = null;
protected String categoryAxisTickLabelMask = null;
protected Color categoryAxisLineColor = null;
protected JRExpression valueAxisLabelExpression = null;
protected JRFont valueAxisLabelFont = null;
protected Color valueAxisLabelColor = null;
protected JRFont valueAxisTickLabelFont = null;
protected Color valueAxisTickLabelColor = null;
protected String valueAxisTickLabelMask = null;
protected Color valueAxisLineColor = null;
public JRBaseAreaPlot(JRChartPlot areaPlot, JRChart chart) {
super(areaPlot, chart);
}
public JRBaseAreaPlot(JRAreaPlot areaPlot, JRBaseObjectFactory factory) {
super((JRChartPlot)areaPlot, factory);
this.categoryAxisLabelExpression = factory.getExpression(areaPlot.getCategoryAxisLabelExpression());
this.categoryAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)areaPlot.getChart(), areaPlot.getCategoryAxisLabelFont());
this.categoryAxisLabelColor = areaPlot.getOwnCategoryAxisLabelColor();
this.categoryAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)areaPlot.getChart(), areaPlot.getCategoryAxisTickLabelFont());
this.categoryAxisTickLabelColor = areaPlot.getOwnCategoryAxisTickLabelColor();
this.categoryAxisTickLabelMask = areaPlot.getCategoryAxisTickLabelMask();
this.categoryAxisLineColor = areaPlot.getOwnCategoryAxisLineColor();
this.valueAxisLabelExpression = factory.getExpression(areaPlot.getValueAxisLabelExpression());
this.valueAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)areaPlot.getChart(), areaPlot.getValueAxisLabelFont());
this.valueAxisLabelColor = areaPlot.getOwnValueAxisLabelColor();
this.valueAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)areaPlot.getChart(), areaPlot.getValueAxisTickLabelFont());
this.valueAxisTickLabelColor = areaPlot.getOwnValueAxisTickLabelColor();
this.valueAxisTickLabelMask = areaPlot.getValueAxisTickLabelMask();
this.valueAxisLineColor = areaPlot.getOwnValueAxisLineColor();
}
public JRExpression getCategoryAxisLabelExpression() {
return this.categoryAxisLabelExpression;
}
public JRFont getCategoryAxisLabelFont() {
return this.categoryAxisLabelFont;
}
public Color getCategoryAxisLabelColor() {
return JRStyleResolver.getCategoryAxisLabelColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisLabelColor() {
return this.categoryAxisLabelColor;
}
public JRFont getCategoryAxisTickLabelFont() {
return this.categoryAxisTickLabelFont;
}
public Color getCategoryAxisTickLabelColor() {
return JRStyleResolver.getCategoryAxisTickLabelColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisTickLabelColor() {
return this.categoryAxisTickLabelColor;
}
public String getCategoryAxisTickLabelMask() {
return this.categoryAxisTickLabelMask;
}
public Color getCategoryAxisLineColor() {
return JRStyleResolver.getCategoryAxisLineColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisLineColor() {
return this.categoryAxisLineColor;
}
public JRExpression getValueAxisLabelExpression() {
return this.valueAxisLabelExpression;
}
public JRFont getValueAxisLabelFont() {
return this.valueAxisLabelFont;
}
public Color getValueAxisLabelColor() {
return JRStyleResolver.getValueAxisLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLabelColor() {
return this.valueAxisLabelColor;
}
public JRFont getValueAxisTickLabelFont() {
return this.valueAxisTickLabelFont;
}
public Color getValueAxisTickLabelColor() {
return JRStyleResolver.getValueAxisTickLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisTickLabelColor() {
return this.valueAxisTickLabelColor;
}
public String getValueAxisTickLabelMask() {
return this.valueAxisTickLabelMask;
}
public Color getValueAxisLineColor() {
return JRStyleResolver.getValueAxisLineColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLineColor() {
return this.valueAxisLineColor;
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public Object clone(JRChart parentChart) {
JRBaseAreaPlot clone = (JRBaseAreaPlot)super.clone(parentChart);
if (this.categoryAxisLabelExpression != null)
clone.categoryAxisLabelExpression = (JRExpression)this.categoryAxisLabelExpression.clone();
if (this.valueAxisLabelExpression != null)
clone.valueAxisLabelExpression = (JRExpression)this.valueAxisLabelExpression.clone();
return clone;
}
}

View File

@@ -0,0 +1,208 @@
package net.sf.jasperreports.charts.base;
import java.awt.Color;
import net.sf.jasperreports.charts.JRBar3DPlot;
import net.sf.jasperreports.charts.JRCategoryAxisFormat;
import net.sf.jasperreports.charts.JRValueAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.JRFont;
import net.sf.jasperreports.engine.JRStyleContainer;
import net.sf.jasperreports.engine.base.JRBaseChartPlot;
import net.sf.jasperreports.engine.base.JRBaseFont;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
import net.sf.jasperreports.engine.util.JRStyleResolver;
public class JRBaseBar3DPlot extends JRBaseChartPlot implements JRBar3DPlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_SHOW_LABELS = "showLabels";
public static final String PROPERTY_X_OFFSET = "xOffset";
public static final String PROPERTY_Y_OFFSET = "yOffset";
protected JRExpression categoryAxisLabelExpression = null;
protected JRFont categoryAxisLabelFont = null;
protected Color categoryAxisLabelColor = null;
protected JRFont categoryAxisTickLabelFont = null;
protected Color categoryAxisTickLabelColor = null;
protected String categoryAxisTickLabelMask = null;
protected Color categoryAxisLineColor = null;
protected JRExpression valueAxisLabelExpression = null;
protected JRFont valueAxisLabelFont = null;
protected Color valueAxisLabelColor = null;
protected JRFont valueAxisTickLabelFont = null;
protected Color valueAxisTickLabelColor = null;
protected String valueAxisTickLabelMask = null;
protected Color valueAxisLineColor = null;
protected double xOffset = 12.0D;
protected double yOffset = 8.0D;
protected boolean isShowLabels = false;
public JRBaseBar3DPlot(JRChartPlot barPlot, JRChart chart) {
super(barPlot, chart);
}
public JRBaseBar3DPlot(JRBar3DPlot barPlot, JRBaseObjectFactory factory) {
super((JRChartPlot)barPlot, factory);
this.xOffset = barPlot.getXOffset();
this.yOffset = barPlot.getYOffset();
this.isShowLabels = barPlot.isShowLabels();
this.categoryAxisLabelExpression = factory.getExpression(barPlot.getCategoryAxisLabelExpression());
this.categoryAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)barPlot.getChart(), barPlot.getCategoryAxisLabelFont());
this.categoryAxisLabelColor = barPlot.getOwnCategoryAxisLabelColor();
this.categoryAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)barPlot.getChart(), barPlot.getCategoryAxisTickLabelFont());
this.categoryAxisTickLabelColor = barPlot.getOwnCategoryAxisTickLabelColor();
this.categoryAxisTickLabelMask = barPlot.getCategoryAxisTickLabelMask();
this.categoryAxisLineColor = barPlot.getCategoryAxisLineColor();
this.valueAxisLabelExpression = factory.getExpression(barPlot.getValueAxisLabelExpression());
this.valueAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)barPlot.getChart(), barPlot.getValueAxisLabelFont());
this.valueAxisLabelColor = barPlot.getOwnValueAxisLabelColor();
this.valueAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)barPlot.getChart(), barPlot.getValueAxisTickLabelFont());
this.valueAxisTickLabelColor = barPlot.getOwnValueAxisTickLabelColor();
this.valueAxisTickLabelMask = barPlot.getValueAxisTickLabelMask();
this.valueAxisLineColor = barPlot.getValueAxisLineColor();
}
public JRExpression getCategoryAxisLabelExpression() {
return this.categoryAxisLabelExpression;
}
public JRFont getCategoryAxisLabelFont() {
return this.categoryAxisLabelFont;
}
public Color getCategoryAxisLabelColor() {
return JRStyleResolver.getCategoryAxisLabelColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisLabelColor() {
return this.categoryAxisLabelColor;
}
public JRFont getCategoryAxisTickLabelFont() {
return this.categoryAxisTickLabelFont;
}
public Color getCategoryAxisTickLabelColor() {
return JRStyleResolver.getCategoryAxisTickLabelColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisTickLabelColor() {
return this.categoryAxisTickLabelColor;
}
public String getCategoryAxisTickLabelMask() {
return this.categoryAxisTickLabelMask;
}
public Color getCategoryAxisLineColor() {
return JRStyleResolver.getCategoryAxisLineColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisLineColor() {
return this.categoryAxisLineColor;
}
public JRExpression getValueAxisLabelExpression() {
return this.valueAxisLabelExpression;
}
public JRFont getValueAxisLabelFont() {
return this.valueAxisLabelFont;
}
public Color getValueAxisLabelColor() {
return JRStyleResolver.getValueAxisLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLabelColor() {
return this.valueAxisLabelColor;
}
public JRFont getValueAxisTickLabelFont() {
return this.valueAxisTickLabelFont;
}
public Color getValueAxisTickLabelColor() {
return JRStyleResolver.getValueAxisTickLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisTickLabelColor() {
return this.valueAxisTickLabelColor;
}
public String getValueAxisTickLabelMask() {
return this.valueAxisTickLabelMask;
}
public Color getValueAxisLineColor() {
return JRStyleResolver.getValueAxisLineColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLineColor() {
return this.valueAxisLineColor;
}
public double getXOffset() {
return this.xOffset;
}
public void setXOffset(double xOffset) {
double old = this.xOffset;
this.xOffset = xOffset;
getEventSupport().firePropertyChange("xOffset", old, this.xOffset);
}
public double getYOffset() {
return this.yOffset;
}
public void setYOffset(double yOffset) {
double old = this.yOffset;
this.yOffset = yOffset;
getEventSupport().firePropertyChange("yOffset", old, this.yOffset);
}
public boolean isShowLabels() {
return this.isShowLabels;
}
public void setShowLabels(boolean isShowLabels) {
boolean old = this.isShowLabels;
this.isShowLabels = isShowLabels;
getEventSupport().firePropertyChange("showLabels", old, this.isShowLabels);
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public Object clone(JRChart parentChart) {
JRBaseBar3DPlot clone = (JRBaseBar3DPlot)super.clone(parentChart);
if (this.categoryAxisLabelExpression != null)
clone.categoryAxisLabelExpression = (JRExpression)this.categoryAxisLabelExpression.clone();
if (this.valueAxisLabelExpression != null)
clone.valueAxisLabelExpression = (JRExpression)this.valueAxisLabelExpression.clone();
return clone;
}
}

View File

@@ -0,0 +1,208 @@
package net.sf.jasperreports.charts.base;
import java.awt.Color;
import net.sf.jasperreports.charts.JRBarPlot;
import net.sf.jasperreports.charts.JRCategoryAxisFormat;
import net.sf.jasperreports.charts.JRValueAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.JRFont;
import net.sf.jasperreports.engine.JRStyleContainer;
import net.sf.jasperreports.engine.base.JRBaseChartPlot;
import net.sf.jasperreports.engine.base.JRBaseFont;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
import net.sf.jasperreports.engine.util.JRStyleResolver;
public class JRBaseBarPlot extends JRBaseChartPlot implements JRBarPlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_SHOW_LABELS = "showLabels";
public static final String PROPERTY_SHOW_TICK_LABELS = "showTickLabels";
public static final String PROPERTY_SHOW_TICK_MARKS = "showTickMarks";
protected JRExpression categoryAxisLabelExpression = null;
protected JRFont categoryAxisLabelFont = null;
protected Color categoryAxisLabelColor = null;
protected JRFont categoryAxisTickLabelFont = null;
protected Color categoryAxisTickLabelColor = null;
protected String categoryAxisTickLabelMask = null;
protected Color categoryAxisLineColor = null;
protected JRExpression valueAxisLabelExpression = null;
protected JRFont valueAxisLabelFont = null;
protected Color valueAxisLabelColor = null;
protected JRFont valueAxisTickLabelFont = null;
protected Color valueAxisTickLabelColor = null;
protected String valueAxisTickLabelMask = null;
protected Color valueAxisLineColor = null;
protected boolean isShowTickMarks = false;
protected boolean isShowTickLabels = false;
protected boolean isShowLabels = false;
public JRBaseBarPlot(JRChartPlot barPlot, JRChart chart) {
super(barPlot, chart);
}
public JRBaseBarPlot(JRBarPlot barPlot, JRBaseObjectFactory factory) {
super((JRChartPlot)barPlot, factory);
this.isShowTickMarks = barPlot.isShowTickMarks();
this.isShowTickLabels = barPlot.isShowTickLabels();
this.isShowLabels = barPlot.isShowLabels();
this.categoryAxisLabelExpression = factory.getExpression(barPlot.getCategoryAxisLabelExpression());
this.categoryAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)barPlot.getChart(), barPlot.getCategoryAxisLabelFont());
this.categoryAxisLabelColor = barPlot.getOwnCategoryAxisLabelColor();
this.categoryAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)barPlot.getChart(), barPlot.getCategoryAxisTickLabelFont());
this.categoryAxisTickLabelColor = barPlot.getOwnCategoryAxisTickLabelColor();
this.categoryAxisTickLabelMask = barPlot.getCategoryAxisTickLabelMask();
this.categoryAxisLineColor = barPlot.getCategoryAxisLineColor();
this.valueAxisLabelExpression = factory.getExpression(barPlot.getValueAxisLabelExpression());
this.valueAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)barPlot.getChart(), barPlot.getValueAxisLabelFont());
this.valueAxisLabelColor = barPlot.getOwnValueAxisLabelColor();
this.valueAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)barPlot.getChart(), barPlot.getValueAxisTickLabelFont());
this.valueAxisTickLabelColor = barPlot.getOwnValueAxisTickLabelColor();
this.valueAxisTickLabelMask = barPlot.getValueAxisTickLabelMask();
this.valueAxisLineColor = barPlot.getValueAxisLineColor();
}
public JRExpression getCategoryAxisLabelExpression() {
return this.categoryAxisLabelExpression;
}
public JRFont getCategoryAxisLabelFont() {
return this.categoryAxisLabelFont;
}
public Color getCategoryAxisLabelColor() {
return JRStyleResolver.getCategoryAxisLabelColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisLabelColor() {
return this.categoryAxisLabelColor;
}
public JRFont getCategoryAxisTickLabelFont() {
return this.categoryAxisTickLabelFont;
}
public Color getCategoryAxisTickLabelColor() {
return JRStyleResolver.getCategoryAxisTickLabelColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisTickLabelColor() {
return this.categoryAxisTickLabelColor;
}
public String getCategoryAxisTickLabelMask() {
return this.categoryAxisTickLabelMask;
}
public Color getCategoryAxisLineColor() {
return JRStyleResolver.getCategoryAxisLineColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisLineColor() {
return this.categoryAxisLineColor;
}
public JRExpression getValueAxisLabelExpression() {
return this.valueAxisLabelExpression;
}
public JRFont getValueAxisLabelFont() {
return this.valueAxisLabelFont;
}
public Color getValueAxisLabelColor() {
return JRStyleResolver.getValueAxisLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLabelColor() {
return this.valueAxisLabelColor;
}
public JRFont getValueAxisTickLabelFont() {
return this.valueAxisTickLabelFont;
}
public Color getValueAxisTickLabelColor() {
return JRStyleResolver.getValueAxisTickLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisTickLabelColor() {
return this.valueAxisTickLabelColor;
}
public String getValueAxisTickLabelMask() {
return this.valueAxisTickLabelMask;
}
public Color getValueAxisLineColor() {
return JRStyleResolver.getValueAxisLineColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLineColor() {
return this.valueAxisLineColor;
}
public boolean isShowTickMarks() {
return this.isShowTickMarks;
}
public void setShowTickMarks(boolean isShowTickMarks) {
boolean old = this.isShowTickMarks;
this.isShowTickMarks = isShowTickMarks;
getEventSupport().firePropertyChange("showTickMarks", old, this.isShowTickMarks);
}
public boolean isShowTickLabels() {
return this.isShowTickLabels;
}
public void setShowTickLabels(boolean isShowTickLabels) {
boolean old = this.isShowTickLabels;
this.isShowTickLabels = isShowTickLabels;
getEventSupport().firePropertyChange("showTickLabels", old, this.isShowTickLabels);
}
public boolean isShowLabels() {
return this.isShowLabels;
}
public void setShowLabels(boolean isShowLabels) {
boolean old = this.isShowLabels;
this.isShowLabels = isShowLabels;
getEventSupport().firePropertyChange("showLabels", old, this.isShowLabels);
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public Object clone(JRChart parentChart) {
JRBaseBarPlot clone = (JRBaseBarPlot)super.clone(parentChart);
if (this.categoryAxisLabelExpression != null)
clone.categoryAxisLabelExpression = (JRExpression)this.categoryAxisLabelExpression.clone();
if (this.valueAxisLabelExpression != null)
clone.valueAxisLabelExpression = (JRExpression)this.valueAxisLabelExpression.clone();
return clone;
}
}

View File

@@ -0,0 +1,178 @@
package net.sf.jasperreports.charts.base;
import java.awt.Color;
import net.sf.jasperreports.charts.JRBubblePlot;
import net.sf.jasperreports.charts.JRXAxisFormat;
import net.sf.jasperreports.charts.JRYAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.JRFont;
import net.sf.jasperreports.engine.JRStyleContainer;
import net.sf.jasperreports.engine.base.JRBaseChartPlot;
import net.sf.jasperreports.engine.base.JRBaseFont;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
import net.sf.jasperreports.engine.util.JRStyleResolver;
public class JRBaseBubblePlot extends JRBaseChartPlot implements JRBubblePlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_SCALE_TYPE = "scaleType";
protected JRExpression xAxisLabelExpression = null;
protected JRFont xAxisLabelFont = null;
protected Color xAxisLabelColor = null;
protected JRFont xAxisTickLabelFont = null;
protected Color xAxisTickLabelColor = null;
protected String xAxisTickLabelMask = null;
protected Color xAxisLineColor = null;
protected JRExpression yAxisLabelExpression = null;
protected JRFont yAxisLabelFont = null;
protected Color yAxisLabelColor = null;
protected JRFont yAxisTickLabelFont = null;
protected Color yAxisTickLabelColor = null;
protected String yAxisTickLabelMask = null;
protected Color yAxisLineColor = null;
protected int scaleType = 2;
public JRBaseBubblePlot(JRChartPlot bubblePlot, JRChart chart) {
super(bubblePlot, chart);
}
public JRBaseBubblePlot(JRBubblePlot bubblePlot, JRBaseObjectFactory factory) {
super((JRChartPlot)bubblePlot, factory);
this.scaleType = bubblePlot.getScaleType();
this.xAxisLabelExpression = factory.getExpression(bubblePlot.getXAxisLabelExpression());
this.xAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)bubblePlot.getChart(), bubblePlot.getXAxisLabelFont());
this.xAxisLabelColor = bubblePlot.getOwnXAxisLabelColor();
this.xAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)bubblePlot.getChart(), bubblePlot.getXAxisTickLabelFont());
this.xAxisTickLabelColor = bubblePlot.getOwnXAxisTickLabelColor();
this.xAxisTickLabelMask = bubblePlot.getXAxisTickLabelMask();
this.xAxisLineColor = bubblePlot.getXAxisLineColor();
this.yAxisLabelExpression = factory.getExpression(bubblePlot.getYAxisLabelExpression());
this.yAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)bubblePlot.getChart(), bubblePlot.getYAxisLabelFont());
this.yAxisLabelColor = bubblePlot.getOwnYAxisLabelColor();
this.yAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)bubblePlot.getChart(), bubblePlot.getYAxisTickLabelFont());
this.yAxisTickLabelColor = bubblePlot.getOwnYAxisTickLabelColor();
this.yAxisTickLabelMask = bubblePlot.getYAxisTickLabelMask();
this.yAxisLineColor = bubblePlot.getYAxisLineColor();
}
public JRExpression getXAxisLabelExpression() {
return this.xAxisLabelExpression;
}
public JRFont getXAxisLabelFont() {
return this.xAxisLabelFont;
}
public Color getXAxisLabelColor() {
return JRStyleResolver.getXAxisLabelColor((JRXAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnXAxisLabelColor() {
return this.xAxisLabelColor;
}
public JRFont getXAxisTickLabelFont() {
return this.xAxisTickLabelFont;
}
public Color getXAxisTickLabelColor() {
return JRStyleResolver.getXAxisTickLabelColor((JRXAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnXAxisTickLabelColor() {
return this.xAxisTickLabelColor;
}
public String getXAxisTickLabelMask() {
return this.xAxisTickLabelMask;
}
public Color getXAxisLineColor() {
return JRStyleResolver.getXAxisLineColor((JRXAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnXAxisLineColor() {
return this.xAxisLineColor;
}
public JRExpression getYAxisLabelExpression() {
return this.yAxisLabelExpression;
}
public JRFont getYAxisLabelFont() {
return this.yAxisLabelFont;
}
public Color getYAxisLabelColor() {
return JRStyleResolver.getYAxisLabelColor((JRYAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnYAxisLabelColor() {
return this.yAxisLabelColor;
}
public JRFont getYAxisTickLabelFont() {
return this.yAxisTickLabelFont;
}
public Color getYAxisTickLabelColor() {
return JRStyleResolver.getYAxisTickLabelColor((JRYAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnYAxisTickLabelColor() {
return this.yAxisTickLabelColor;
}
public String getYAxisTickLabelMask() {
return this.yAxisTickLabelMask;
}
public Color getYAxisLineColor() {
return JRStyleResolver.getYAxisLineColor((JRYAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnYAxisLineColor() {
return this.yAxisLineColor;
}
public int getScaleType() {
return this.scaleType;
}
public void setScaleType(int scaleType) {
int old = this.scaleType;
this.scaleType = scaleType;
getEventSupport().firePropertyChange("scaleType", old, this.scaleType);
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public Object clone(JRChart parentChart) {
JRBaseBubblePlot clone = (JRBaseBubblePlot)super.clone(parentChart);
if (this.xAxisLabelExpression != null)
clone.xAxisLabelExpression = (JRExpression)this.xAxisLabelExpression.clone();
if (this.yAxisLabelExpression != null)
clone.yAxisLabelExpression = (JRExpression)this.yAxisLabelExpression.clone();
return clone;
}
}

View File

@@ -0,0 +1,178 @@
package net.sf.jasperreports.charts.base;
import java.awt.Color;
import net.sf.jasperreports.charts.JRCandlestickPlot;
import net.sf.jasperreports.charts.JRTimeAxisFormat;
import net.sf.jasperreports.charts.JRValueAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.JRFont;
import net.sf.jasperreports.engine.JRStyleContainer;
import net.sf.jasperreports.engine.base.JRBaseChartPlot;
import net.sf.jasperreports.engine.base.JRBaseFont;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
import net.sf.jasperreports.engine.util.JRStyleResolver;
public class JRBaseCandlestickPlot extends JRBaseChartPlot implements JRCandlestickPlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_SHOW_VOLUME = "showVolume";
protected JRExpression timeAxisLabelExpression = null;
protected JRFont timeAxisLabelFont = null;
protected Color timeAxisLabelColor = null;
protected JRFont timeAxisTickLabelFont = null;
protected Color timeAxisTickLabelColor = null;
protected String timeAxisTickLabelMask = null;
protected Color timeAxisLineColor = null;
protected JRExpression valueAxisLabelExpression = null;
protected JRFont valueAxisLabelFont = null;
protected Color valueAxisLabelColor = null;
protected JRFont valueAxisTickLabelFont = null;
protected Color valueAxisTickLabelColor = null;
protected String valueAxisTickLabelMask = null;
protected Color valueAxisLineColor = null;
protected boolean isShowVolume = true;
protected JRBaseCandlestickPlot(JRChartPlot candlestickPlot, JRChart chart) {
super(candlestickPlot, chart);
}
public JRBaseCandlestickPlot(JRCandlestickPlot candlestickPlot, JRBaseObjectFactory factory) {
super((JRChartPlot)candlestickPlot, factory);
this.isShowVolume = candlestickPlot.isShowVolume();
this.timeAxisLabelExpression = factory.getExpression(candlestickPlot.getTimeAxisLabelExpression());
this.timeAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)candlestickPlot.getChart(), candlestickPlot.getTimeAxisLabelFont());
this.timeAxisLabelColor = candlestickPlot.getOwnTimeAxisLabelColor();
this.timeAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)candlestickPlot.getChart(), candlestickPlot.getTimeAxisTickLabelFont());
this.timeAxisTickLabelColor = candlestickPlot.getOwnTimeAxisTickLabelColor();
this.timeAxisTickLabelMask = candlestickPlot.getTimeAxisTickLabelMask();
this.timeAxisLineColor = candlestickPlot.getTimeAxisLineColor();
this.valueAxisLabelExpression = factory.getExpression(candlestickPlot.getValueAxisLabelExpression());
this.valueAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)candlestickPlot.getChart(), candlestickPlot.getValueAxisLabelFont());
this.valueAxisLabelColor = candlestickPlot.getOwnValueAxisLabelColor();
this.valueAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)candlestickPlot.getChart(), candlestickPlot.getValueAxisTickLabelFont());
this.valueAxisTickLabelColor = candlestickPlot.getOwnValueAxisTickLabelColor();
this.valueAxisTickLabelMask = candlestickPlot.getValueAxisTickLabelMask();
this.valueAxisLineColor = candlestickPlot.getValueAxisTickLabelColor();
}
public JRExpression getTimeAxisLabelExpression() {
return this.timeAxisLabelExpression;
}
public JRFont getTimeAxisLabelFont() {
return this.timeAxisLabelFont;
}
public Color getTimeAxisLabelColor() {
return JRStyleResolver.getTimeAxisLabelColor((JRTimeAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnTimeAxisLabelColor() {
return this.timeAxisLabelColor;
}
public JRFont getTimeAxisTickLabelFont() {
return this.timeAxisTickLabelFont;
}
public Color getTimeAxisTickLabelColor() {
return JRStyleResolver.getTimeAxisTickLabelColor((JRTimeAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnTimeAxisTickLabelColor() {
return this.timeAxisTickLabelColor;
}
public String getTimeAxisTickLabelMask() {
return this.timeAxisTickLabelMask;
}
public Color getTimeAxisLineColor() {
return JRStyleResolver.getTimeAxisLineColor((JRTimeAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnTimeAxisLineColor() {
return this.timeAxisLineColor;
}
public JRExpression getValueAxisLabelExpression() {
return this.valueAxisLabelExpression;
}
public JRFont getValueAxisLabelFont() {
return this.valueAxisLabelFont;
}
public Color getValueAxisLabelColor() {
return JRStyleResolver.getValueAxisLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLabelColor() {
return this.valueAxisLabelColor;
}
public JRFont getValueAxisTickLabelFont() {
return this.valueAxisTickLabelFont;
}
public Color getValueAxisTickLabelColor() {
return JRStyleResolver.getValueAxisTickLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisTickLabelColor() {
return this.valueAxisTickLabelColor;
}
public String getValueAxisTickLabelMask() {
return this.valueAxisTickLabelMask;
}
public Color getValueAxisLineColor() {
return JRStyleResolver.getValueAxisLineColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLineColor() {
return this.valueAxisLineColor;
}
public boolean isShowVolume() {
return this.isShowVolume;
}
public void setShowVolume(boolean ShowVolume) {
boolean old = this.isShowVolume;
this.isShowVolume = ShowVolume;
getEventSupport().firePropertyChange("showVolume", old, this.isShowVolume);
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public Object clone(JRChart parentChart) {
JRBaseCandlestickPlot clone = (JRBaseCandlestickPlot)super.clone(parentChart);
if (this.timeAxisLabelExpression != null)
clone.timeAxisLabelExpression = (JRExpression)this.timeAxisLabelExpression.clone();
if (this.valueAxisLabelExpression != null)
clone.valueAxisLabelExpression = (JRExpression)this.valueAxisLabelExpression.clone();
return clone;
}
}

View File

@@ -0,0 +1,55 @@
package net.sf.jasperreports.charts.base;
import net.sf.jasperreports.charts.JRCategoryDataset;
import net.sf.jasperreports.charts.JRCategorySeries;
import net.sf.jasperreports.engine.JRChartDataset;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.base.JRBaseChartDataset;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
import net.sf.jasperreports.engine.design.JRVerifier;
public class JRBaseCategoryDataset extends JRBaseChartDataset implements JRCategoryDataset {
private static final long serialVersionUID = 10200L;
protected JRCategorySeries[] categorySeries = null;
public JRBaseCategoryDataset(JRChartDataset dataset) {
super(dataset);
}
public JRBaseCategoryDataset(JRCategoryDataset dataset, JRBaseObjectFactory factory) {
super((JRChartDataset)dataset, factory);
JRCategorySeries[] srcCategorySeries = dataset.getSeries();
if (srcCategorySeries != null && srcCategorySeries.length > 0) {
this.categorySeries = new JRCategorySeries[srcCategorySeries.length];
for (int i = 0; i < this.categorySeries.length; i++)
this.categorySeries[i] = factory.getCategorySeries(srcCategorySeries[i]);
}
}
public JRCategorySeries[] getSeries() {
return this.categorySeries;
}
public byte getDatasetType() {
return 2;
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public void validate(JRVerifier verifier) {
verifier.verify(this);
}
public Object clone() {
JRBaseCategoryDataset clone = (JRBaseCategoryDataset)super.clone();
if (this.categorySeries != null) {
clone.categorySeries = new JRCategorySeries[this.categorySeries.length];
for (int i = 0; i < this.categorySeries.length; i++)
this.categorySeries[i] = (JRCategorySeries)this.categorySeries[i].clone();
}
return clone;
}
}

View File

@@ -0,0 +1,73 @@
package net.sf.jasperreports.charts.base;
import java.io.Serializable;
import net.sf.jasperreports.charts.JRCategorySeries;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRHyperlink;
import net.sf.jasperreports.engine.JRRuntimeException;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
public class JRBaseCategorySeries implements JRCategorySeries, Serializable {
private static final long serialVersionUID = 10200L;
protected JRExpression seriesExpression = null;
protected JRExpression categoryExpression = null;
protected JRExpression valueExpression = null;
protected JRExpression labelExpression = null;
protected JRHyperlink itemHyperlink;
protected JRBaseCategorySeries() {}
public JRBaseCategorySeries(JRCategorySeries categorySeries, JRBaseObjectFactory factory) {
factory.put(categorySeries, this);
this.seriesExpression = factory.getExpression(categorySeries.getSeriesExpression());
this.categoryExpression = factory.getExpression(categorySeries.getCategoryExpression());
this.valueExpression = factory.getExpression(categorySeries.getValueExpression());
this.labelExpression = factory.getExpression(categorySeries.getLabelExpression());
this.itemHyperlink = factory.getHyperlink(categorySeries.getItemHyperlink());
}
public JRExpression getSeriesExpression() {
return this.seriesExpression;
}
public JRExpression getCategoryExpression() {
return this.categoryExpression;
}
public JRExpression getValueExpression() {
return this.valueExpression;
}
public JRExpression getLabelExpression() {
return this.labelExpression;
}
public JRHyperlink getItemHyperlink() {
return this.itemHyperlink;
}
public Object clone() {
JRBaseCategorySeries clone = null;
try {
clone = (JRBaseCategorySeries)super.clone();
} catch (CloneNotSupportedException e) {
throw new JRRuntimeException(e);
}
if (this.seriesExpression != null)
clone.seriesExpression = (JRExpression)this.seriesExpression.clone();
if (this.categoryExpression != null)
clone.categoryExpression = (JRExpression)this.categoryExpression.clone();
if (this.valueExpression != null)
clone.valueExpression = (JRExpression)this.valueExpression.clone();
if (this.labelExpression != null)
clone.labelExpression = (JRExpression)this.labelExpression.clone();
if (this.itemHyperlink != null)
clone.itemHyperlink = (JRHyperlink)this.itemHyperlink.clone();
return clone;
}
}

View File

@@ -0,0 +1,43 @@
package net.sf.jasperreports.charts.base;
import java.io.Serializable;
import net.sf.jasperreports.charts.JRChartAxis;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRRuntimeException;
import net.sf.jasperreports.engine.JRVisitable;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
public class JRBaseChartAxis implements JRChartAxis, Serializable {
protected byte position = 1;
protected JRChart chart = null;
private static final long serialVersionUID = 10200L;
public JRBaseChartAxis() {}
public JRBaseChartAxis(JRChartAxis axis, JRBaseObjectFactory factory) {
factory.put(axis, this);
this.position = axis.getPosition();
this.chart = (JRChart)factory.getVisitResult((JRVisitable)axis.getChart());
}
public byte getPosition() {
return this.position;
}
public JRChart getChart() {
return this.chart;
}
public Object clone(JRChart parentChart) {
JRBaseChartAxis clone = null;
try {
clone = (JRBaseChartAxis)clone();
} catch (CloneNotSupportedException e) {
throw new JRRuntimeException(e);
}
clone.chart = parentChart;
return clone;
}
}

View File

@@ -0,0 +1,55 @@
package net.sf.jasperreports.charts.base;
import java.io.Serializable;
import net.sf.jasperreports.charts.JRDataRange;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.JRRuntimeException;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
public class JRBaseDataRange implements JRDataRange, Serializable {
private static final long serialVersionUID = 10200L;
protected JRExpression lowExpression = null;
protected JRExpression highExpression = null;
public JRBaseDataRange(JRDataRange dataRange) {
if (dataRange != null) {
this.lowExpression = dataRange.getLowExpression();
this.highExpression = dataRange.getHighExpression();
}
}
public JRBaseDataRange(JRDataRange dataRange, JRBaseObjectFactory factory) {
factory.put(dataRange, this);
this.lowExpression = factory.getExpression(dataRange.getLowExpression());
this.highExpression = factory.getExpression(dataRange.getHighExpression());
}
public JRExpression getLowExpression() {
return this.lowExpression;
}
public JRExpression getHighExpression() {
return this.highExpression;
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public Object clone() {
JRBaseDataRange clone = null;
try {
clone = (JRBaseDataRange)super.clone();
} catch (CloneNotSupportedException e) {
throw new JRRuntimeException(e);
}
if (this.lowExpression != null)
clone.lowExpression = (JRExpression)this.lowExpression.clone();
if (this.highExpression != null)
clone.highExpression = (JRExpression)this.highExpression.clone();
return clone;
}
}

View File

@@ -0,0 +1,111 @@
package net.sf.jasperreports.charts.base;
import net.sf.jasperreports.charts.JRHighLowDataset;
import net.sf.jasperreports.engine.JRChartDataset;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.JRHyperlink;
import net.sf.jasperreports.engine.base.JRBaseChartDataset;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
import net.sf.jasperreports.engine.design.JRVerifier;
public class JRBaseHighLowDataset extends JRBaseChartDataset implements JRHighLowDataset {
private static final long serialVersionUID = 10200L;
protected JRExpression seriesExpression;
protected JRExpression dateExpression;
protected JRExpression highExpression;
protected JRExpression lowExpression;
protected JRExpression openExpression;
protected JRExpression closeExpression;
protected JRExpression volumeExpression;
private JRHyperlink itemHyperlink;
public JRBaseHighLowDataset(JRChartDataset dataset) {
super(dataset);
}
public JRBaseHighLowDataset(JRHighLowDataset dataset, JRBaseObjectFactory factory) {
super((JRChartDataset)dataset, factory);
this.seriesExpression = factory.getExpression(dataset.getSeriesExpression());
this.dateExpression = factory.getExpression(dataset.getDateExpression());
this.highExpression = factory.getExpression(dataset.getHighExpression());
this.lowExpression = factory.getExpression(dataset.getLowExpression());
this.openExpression = factory.getExpression(dataset.getOpenExpression());
this.closeExpression = factory.getExpression(dataset.getCloseExpression());
this.volumeExpression = factory.getExpression(dataset.getVolumeExpression());
this.itemHyperlink = factory.getHyperlink(dataset.getItemHyperlink());
}
public JRExpression getSeriesExpression() {
return this.seriesExpression;
}
public JRExpression getDateExpression() {
return this.dateExpression;
}
public JRExpression getHighExpression() {
return this.highExpression;
}
public JRExpression getLowExpression() {
return this.lowExpression;
}
public JRExpression getOpenExpression() {
return this.openExpression;
}
public JRExpression getCloseExpression() {
return this.closeExpression;
}
public JRExpression getVolumeExpression() {
return this.volumeExpression;
}
public byte getDatasetType() {
return 7;
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public JRHyperlink getItemHyperlink() {
return this.itemHyperlink;
}
public void validate(JRVerifier verifier) {
verifier.verify(this);
}
public Object clone() {
JRBaseHighLowDataset clone = (JRBaseHighLowDataset)super.clone();
if (this.seriesExpression != null)
clone.seriesExpression = (JRExpression)this.seriesExpression.clone();
if (this.dateExpression != null)
clone.dateExpression = (JRExpression)this.dateExpression.clone();
if (this.highExpression != null)
clone.highExpression = (JRExpression)this.highExpression.clone();
if (this.lowExpression != null)
clone.lowExpression = (JRExpression)this.lowExpression.clone();
if (this.openExpression != null)
clone.openExpression = (JRExpression)this.openExpression.clone();
if (this.closeExpression != null)
clone.closeExpression = (JRExpression)this.closeExpression.clone();
if (this.volumeExpression != null)
clone.volumeExpression = (JRExpression)this.volumeExpression.clone();
if (this.itemHyperlink != null)
clone.itemHyperlink = (JRHyperlink)this.itemHyperlink.clone();
return clone;
}
}

View File

@@ -0,0 +1,193 @@
package net.sf.jasperreports.charts.base;
import java.awt.Color;
import net.sf.jasperreports.charts.JRHighLowPlot;
import net.sf.jasperreports.charts.JRTimeAxisFormat;
import net.sf.jasperreports.charts.JRValueAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.JRFont;
import net.sf.jasperreports.engine.JRStyleContainer;
import net.sf.jasperreports.engine.base.JRBaseChartPlot;
import net.sf.jasperreports.engine.base.JRBaseFont;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
import net.sf.jasperreports.engine.util.JRStyleResolver;
public class JRBaseHighLowPlot extends JRBaseChartPlot implements JRHighLowPlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_SHOW_CLOSE_TICKS = "showCloseTicks";
public static final String PROPERTY_SHOW_OPEN_TICKS = "showOpenTicks";
protected JRExpression timeAxisLabelExpression = null;
protected JRFont timeAxisLabelFont = null;
protected Color timeAxisLabelColor = null;
protected JRFont timeAxisTickLabelFont = null;
protected Color timeAxisTickLabelColor = null;
protected String timeAxisTickLabelMask = null;
protected Color timeAxisLineColor = null;
protected JRExpression valueAxisLabelExpression = null;
protected JRFont valueAxisLabelFont = null;
protected Color valueAxisLabelColor = null;
protected JRFont valueAxisTickLabelFont = null;
protected Color valueAxisTickLabelColor = null;
protected String valueAxisTickLabelMask = null;
protected Color valueAxisLineColor = null;
protected boolean isShowOpenTicks = false;
protected boolean isShowCloseTicks = false;
public JRBaseHighLowPlot(JRChartPlot highLowPlot, JRChart chart) {
super(highLowPlot, chart);
}
public JRBaseHighLowPlot(JRHighLowPlot highLowPlot, JRBaseObjectFactory factory) {
super((JRChartPlot)highLowPlot, factory);
this.isShowOpenTicks = highLowPlot.isShowOpenTicks();
this.isShowCloseTicks = highLowPlot.isShowCloseTicks();
this.timeAxisLabelExpression = factory.getExpression(highLowPlot.getTimeAxisLabelExpression());
this.timeAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)highLowPlot.getChart(), highLowPlot.getTimeAxisLabelFont());
this.timeAxisLabelColor = highLowPlot.getOwnTimeAxisLabelColor();
this.timeAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)highLowPlot.getChart(), highLowPlot.getTimeAxisTickLabelFont());
this.timeAxisTickLabelColor = highLowPlot.getOwnTimeAxisTickLabelColor();
this.timeAxisTickLabelMask = highLowPlot.getTimeAxisTickLabelMask();
this.timeAxisLineColor = highLowPlot.getTimeAxisLineColor();
this.valueAxisLabelExpression = factory.getExpression(highLowPlot.getValueAxisLabelExpression());
this.valueAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)highLowPlot.getChart(), highLowPlot.getValueAxisLabelFont());
this.valueAxisLabelColor = highLowPlot.getOwnValueAxisLabelColor();
this.valueAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)highLowPlot.getChart(), highLowPlot.getValueAxisTickLabelFont());
this.valueAxisTickLabelColor = highLowPlot.getOwnValueAxisTickLabelColor();
this.valueAxisTickLabelMask = highLowPlot.getValueAxisTickLabelMask();
this.valueAxisLineColor = highLowPlot.getValueAxisTickLabelColor();
}
public JRExpression getTimeAxisLabelExpression() {
return this.timeAxisLabelExpression;
}
public JRFont getTimeAxisLabelFont() {
return this.timeAxisLabelFont;
}
public Color getTimeAxisLabelColor() {
return JRStyleResolver.getTimeAxisLabelColor((JRTimeAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnTimeAxisLabelColor() {
return this.timeAxisLabelColor;
}
public JRFont getTimeAxisTickLabelFont() {
return this.timeAxisTickLabelFont;
}
public Color getTimeAxisTickLabelColor() {
return JRStyleResolver.getTimeAxisTickLabelColor((JRTimeAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnTimeAxisTickLabelColor() {
return this.timeAxisTickLabelColor;
}
public String getTimeAxisTickLabelMask() {
return this.timeAxisTickLabelMask;
}
public Color getTimeAxisLineColor() {
return JRStyleResolver.getTimeAxisLineColor((JRTimeAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnTimeAxisLineColor() {
return this.timeAxisLineColor;
}
public JRExpression getValueAxisLabelExpression() {
return this.valueAxisLabelExpression;
}
public JRFont getValueAxisLabelFont() {
return this.valueAxisLabelFont;
}
public Color getValueAxisLabelColor() {
return JRStyleResolver.getValueAxisLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLabelColor() {
return this.valueAxisLabelColor;
}
public JRFont getValueAxisTickLabelFont() {
return this.valueAxisTickLabelFont;
}
public Color getValueAxisTickLabelColor() {
return JRStyleResolver.getValueAxisTickLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisTickLabelColor() {
return this.valueAxisTickLabelColor;
}
public String getValueAxisTickLabelMask() {
return this.valueAxisTickLabelMask;
}
public Color getValueAxisLineColor() {
return JRStyleResolver.getValueAxisLineColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLineColor() {
return this.valueAxisLineColor;
}
public boolean isShowOpenTicks() {
return this.isShowOpenTicks;
}
public void setShowOpenTicks(boolean showOpenTicks) {
boolean old = this.isShowOpenTicks;
this.isShowOpenTicks = showOpenTicks;
getEventSupport().firePropertyChange("showOpenTicks", old, this.isShowOpenTicks);
}
public boolean isShowCloseTicks() {
return this.isShowCloseTicks;
}
public void setShowCloseTicks(boolean showCloseTicks) {
boolean old = this.isShowCloseTicks;
this.isShowCloseTicks = showCloseTicks;
getEventSupport().firePropertyChange("showCloseTicks", old, this.isShowCloseTicks);
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public Object clone(JRChart parentChart) {
JRBaseHighLowPlot clone = (JRBaseHighLowPlot)super.clone(parentChart);
if (this.timeAxisLabelExpression != null)
clone.timeAxisLabelExpression = (JRExpression)this.timeAxisLabelExpression.clone();
if (this.valueAxisLabelExpression != null)
clone.valueAxisLabelExpression = (JRExpression)this.valueAxisLabelExpression.clone();
return clone;
}
}

View File

@@ -0,0 +1,193 @@
package net.sf.jasperreports.charts.base;
import java.awt.Color;
import net.sf.jasperreports.charts.JRCategoryAxisFormat;
import net.sf.jasperreports.charts.JRLinePlot;
import net.sf.jasperreports.charts.JRValueAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.JRFont;
import net.sf.jasperreports.engine.JRStyleContainer;
import net.sf.jasperreports.engine.base.JRBaseChartPlot;
import net.sf.jasperreports.engine.base.JRBaseFont;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
import net.sf.jasperreports.engine.util.JRStyleResolver;
public class JRBaseLinePlot extends JRBaseChartPlot implements JRLinePlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_SHOW_LINES = "showLines";
public static final String PROPERTY_SHOW_SHAPES = "showShapes";
protected JRExpression categoryAxisLabelExpression = null;
protected JRFont categoryAxisLabelFont = null;
protected Color categoryAxisLabelColor = null;
protected JRFont categoryAxisTickLabelFont = null;
protected Color categoryAxisTickLabelColor = null;
protected String categoryAxisTickLabelMask = null;
protected Color categoryAxisLineColor = null;
protected JRExpression valueAxisLabelExpression = null;
protected JRFont valueAxisLabelFont = null;
protected Color valueAxisLabelColor = null;
protected JRFont valueAxisTickLabelFont = null;
protected Color valueAxisTickLabelColor = null;
protected String valueAxisTickLabelMask = null;
protected Color valueAxisLineColor = null;
boolean isShowShapes = true;
boolean isShowLines = true;
public JRBaseLinePlot(JRChartPlot linePlot, JRChart chart) {
super(linePlot, chart);
}
public JRBaseLinePlot(JRLinePlot linePlot, JRBaseObjectFactory factory) {
super((JRChartPlot)linePlot, factory);
this.isShowShapes = linePlot.isShowShapes();
this.isShowLines = linePlot.isShowLines();
this.categoryAxisLabelExpression = factory.getExpression(linePlot.getCategoryAxisLabelExpression());
this.categoryAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)linePlot.getChart(), linePlot.getCategoryAxisLabelFont());
this.categoryAxisLabelColor = linePlot.getOwnCategoryAxisLabelColor();
this.categoryAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)linePlot.getChart(), linePlot.getCategoryAxisTickLabelFont());
this.categoryAxisTickLabelColor = linePlot.getOwnCategoryAxisTickLabelColor();
this.categoryAxisTickLabelMask = linePlot.getCategoryAxisTickLabelMask();
this.categoryAxisLineColor = linePlot.getCategoryAxisLineColor();
this.valueAxisLabelExpression = factory.getExpression(linePlot.getValueAxisLabelExpression());
this.valueAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)linePlot.getChart(), linePlot.getValueAxisLabelFont());
this.valueAxisLabelColor = linePlot.getOwnValueAxisLabelColor();
this.valueAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)linePlot.getChart(), linePlot.getValueAxisTickLabelFont());
this.valueAxisTickLabelColor = linePlot.getOwnValueAxisTickLabelColor();
this.valueAxisTickLabelMask = linePlot.getValueAxisTickLabelMask();
this.valueAxisLineColor = linePlot.getValueAxisLineColor();
}
public JRExpression getCategoryAxisLabelExpression() {
return this.categoryAxisLabelExpression;
}
public JRFont getCategoryAxisLabelFont() {
return this.categoryAxisLabelFont;
}
public Color getCategoryAxisLabelColor() {
return JRStyleResolver.getCategoryAxisLabelColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisLabelColor() {
return this.categoryAxisLabelColor;
}
public JRFont getCategoryAxisTickLabelFont() {
return this.categoryAxisTickLabelFont;
}
public Color getCategoryAxisTickLabelColor() {
return JRStyleResolver.getCategoryAxisTickLabelColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisTickLabelColor() {
return this.categoryAxisTickLabelColor;
}
public String getCategoryAxisTickLabelMask() {
return this.categoryAxisTickLabelMask;
}
public Color getCategoryAxisLineColor() {
return JRStyleResolver.getCategoryAxisLineColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisLineColor() {
return this.categoryAxisLineColor;
}
public JRExpression getValueAxisLabelExpression() {
return this.valueAxisLabelExpression;
}
public JRFont getValueAxisLabelFont() {
return this.valueAxisLabelFont;
}
public Color getValueAxisLabelColor() {
return JRStyleResolver.getValueAxisLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLabelColor() {
return this.valueAxisLabelColor;
}
public JRFont getValueAxisTickLabelFont() {
return this.valueAxisTickLabelFont;
}
public Color getValueAxisTickLabelColor() {
return JRStyleResolver.getValueAxisTickLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisTickLabelColor() {
return this.valueAxisTickLabelColor;
}
public String getValueAxisTickLabelMask() {
return this.valueAxisTickLabelMask;
}
public Color getValueAxisLineColor() {
return JRStyleResolver.getValueAxisLineColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLineColor() {
return this.valueAxisLineColor;
}
public boolean isShowShapes() {
return this.isShowShapes;
}
public boolean isShowLines() {
return this.isShowLines;
}
public void setShowShapes(boolean value) {
boolean old = this.isShowShapes;
this.isShowShapes = value;
getEventSupport().firePropertyChange("showShapes", old, this.isShowShapes);
}
public void setShowLines(boolean value) {
boolean old = this.isShowLines;
this.isShowLines = value;
getEventSupport().firePropertyChange("showShapes", old, this.isShowLines);
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public Object clone(JRChart parentChart) {
JRBaseLinePlot clone = (JRBaseLinePlot)super.clone(parentChart);
if (this.categoryAxisLabelExpression != null)
clone.categoryAxisLabelExpression = (JRExpression)this.categoryAxisLabelExpression.clone();
if (this.valueAxisLabelExpression != null)
clone.valueAxisLabelExpression = (JRExpression)this.valueAxisLabelExpression.clone();
return clone;
}
}

View File

@@ -0,0 +1,123 @@
package net.sf.jasperreports.charts.base;
import java.awt.Color;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import net.sf.jasperreports.charts.JRDataRange;
import net.sf.jasperreports.charts.JRMeterPlot;
import net.sf.jasperreports.charts.JRValueDisplay;
import net.sf.jasperreports.charts.util.JRMeterInterval;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.base.JRBaseChartPlot;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
public class JRBaseMeterPlot extends JRBaseChartPlot implements JRMeterPlot {
private static final long serialVersionUID = 10200L;
protected JRDataRange dataRange = null;
protected JRValueDisplay valueDisplay = null;
protected byte shape = 2;
protected List intervals = new ArrayList();
protected int meterAngle = 180;
protected String units = null;
protected double tickInterval = 10.0D;
protected Color meterBackgroundColor = null;
protected Color needleColor = null;
protected Color tickColor = null;
public JRBaseMeterPlot(JRChartPlot meterPlot, JRChart chart) {
super(meterPlot, chart);
}
public JRBaseMeterPlot(JRMeterPlot meterPlot, JRBaseObjectFactory factory) {
super((JRChartPlot)meterPlot, factory);
this.dataRange = new JRBaseDataRange(meterPlot.getDataRange(), factory);
this.valueDisplay = new JRBaseValueDisplay(meterPlot.getValueDisplay(), factory);
this.shape = meterPlot.getShape();
List origIntervals = meterPlot.getIntervals();
this.intervals.clear();
if (origIntervals != null) {
Iterator iter = origIntervals.iterator();
while (iter.hasNext()) {
JRMeterInterval interval = iter.next();
this.intervals.add(new JRMeterInterval(interval, factory));
}
}
this.meterAngle = meterPlot.getMeterAngle();
this.units = meterPlot.getUnits();
this.tickInterval = meterPlot.getTickInterval();
this.meterBackgroundColor = meterPlot.getMeterBackgroundColor();
this.needleColor = meterPlot.getNeedleColor();
this.tickColor = meterPlot.getTickColor();
}
public JRDataRange getDataRange() {
return this.dataRange;
}
public JRValueDisplay getValueDisplay() {
return this.valueDisplay;
}
public byte getShape() {
return this.shape;
}
public List getIntervals() {
return this.intervals;
}
public int getMeterAngle() {
return this.meterAngle;
}
public String getUnits() {
return this.units;
}
public double getTickInterval() {
return this.tickInterval;
}
public Color getMeterBackgroundColor() {
return this.meterBackgroundColor;
}
public Color getNeedleColor() {
return this.needleColor;
}
public Color getTickColor() {
return this.tickColor;
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public Object clone(JRChart parentChart) {
JRBaseMeterPlot clone = (JRBaseMeterPlot)super.clone(parentChart);
if (this.dataRange != null)
clone.dataRange = (JRDataRange)this.dataRange.clone();
if (this.valueDisplay != null)
clone.valueDisplay = (JRValueDisplay)this.valueDisplay.clone();
if (this.intervals != null) {
clone.intervals = new ArrayList(this.intervals.size());
for (int i = 0; i < this.intervals.size(); i++)
clone.intervals.add(((JRMeterInterval)this.intervals.get(i)).clone());
}
return clone;
}
}

View File

@@ -0,0 +1,57 @@
package net.sf.jasperreports.charts.base;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import net.sf.jasperreports.charts.JRChartAxis;
import net.sf.jasperreports.charts.JRMultiAxisPlot;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.base.JRBaseChartPlot;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
public class JRBaseMultiAxisPlot extends JRBaseChartPlot implements JRMultiAxisPlot {
private static final long serialVersionUID = 10200L;
protected List axes = new ArrayList();
public JRBaseMultiAxisPlot(JRChartPlot multiAxisPlot, JRChart chart) {
super(multiAxisPlot, chart);
}
public JRBaseMultiAxisPlot(JRMultiAxisPlot multiAxisPlot, JRBaseObjectFactory factory) {
super((JRChartPlot)multiAxisPlot, factory);
List origAxes = multiAxisPlot.getAxes();
this.axes.clear();
if (origAxes != null) {
Iterator iter = origAxes.iterator();
while (iter.hasNext()) {
JRChartAxis axis = iter.next();
this.axes.add(factory.getChartAxis(axis));
}
}
}
public List getAxes() {
return this.axes;
}
public void collectExpressions(JRExpressionCollector collector) {
Iterator iter = this.axes.iterator();
while (iter.hasNext()) {
JRChartAxis axis = iter.next();
collector.collect(axis.getChart());
}
}
public Object clone(JRChart parentChart) {
JRBaseMultiAxisPlot clone = (JRBaseMultiAxisPlot)super.clone(parentChart);
if (this.axes != null) {
clone.axes = new ArrayList(this.axes.size());
for (int i = 0; i < this.axes.size(); i++)
clone.axes.add(((JRChartAxis)this.axes.get(i)).clone(parentChart));
}
return clone;
}
}

View File

@@ -0,0 +1,52 @@
package net.sf.jasperreports.charts.base;
import net.sf.jasperreports.charts.JRPie3DPlot;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.base.JRBaseChartPlot;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
public class JRBasePie3DPlot extends JRBaseChartPlot implements JRPie3DPlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_CIRCULAR = "circular";
public static final String PROPERTY_DEPTH_FACTOR = "depthFactor";
protected double depthFactor = 0.2D;
protected boolean isCircular = false;
public JRBasePie3DPlot(JRChartPlot pie3DPlot, JRChart chart) {
super(pie3DPlot, chart);
}
public JRBasePie3DPlot(JRPie3DPlot pie3DPlot, JRBaseObjectFactory factory) {
super((JRChartPlot)pie3DPlot, factory);
this.depthFactor = pie3DPlot.getDepthFactor();
this.isCircular = pie3DPlot.isCircular();
}
public double getDepthFactor() {
return this.depthFactor;
}
public void setDepthFactor(double depthFactor) {
double old = this.depthFactor;
this.depthFactor = depthFactor;
getEventSupport().firePropertyChange("depthFactor", old, this.depthFactor);
}
public void collectExpressions(JRExpressionCollector collector) {}
public boolean isCircular() {
return this.isCircular;
}
public void setCircular(boolean isCircular) {
boolean old = this.isCircular;
this.isCircular = isCircular;
getEventSupport().firePropertyChange("circular", old, this.isCircular);
}
}

View File

@@ -0,0 +1,75 @@
package net.sf.jasperreports.charts.base;
import net.sf.jasperreports.charts.JRPieDataset;
import net.sf.jasperreports.engine.JRChartDataset;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.JRHyperlink;
import net.sf.jasperreports.engine.base.JRBaseChartDataset;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
import net.sf.jasperreports.engine.design.JRVerifier;
public class JRBasePieDataset extends JRBaseChartDataset implements JRPieDataset {
private static final long serialVersionUID = 10200L;
protected JRExpression keyExpression = null;
protected JRExpression valueExpression = null;
protected JRExpression labelExpression = null;
private JRHyperlink sectionHyperlink;
public JRBasePieDataset(JRChartDataset dataset) {
super(dataset);
}
public JRBasePieDataset(JRPieDataset dataset, JRBaseObjectFactory factory) {
super((JRChartDataset)dataset, factory);
this.keyExpression = factory.getExpression(dataset.getKeyExpression());
this.valueExpression = factory.getExpression(dataset.getValueExpression());
this.labelExpression = factory.getExpression(dataset.getLabelExpression());
this.sectionHyperlink = factory.getHyperlink(dataset.getSectionHyperlink());
}
public JRExpression getKeyExpression() {
return this.keyExpression;
}
public JRExpression getValueExpression() {
return this.valueExpression;
}
public JRExpression getLabelExpression() {
return this.labelExpression;
}
public byte getDatasetType() {
return 1;
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public JRHyperlink getSectionHyperlink() {
return this.sectionHyperlink;
}
public void validate(JRVerifier verifier) {
verifier.verify(this);
}
public Object clone() {
JRBasePieDataset clone = (JRBasePieDataset)super.clone();
if (this.keyExpression != null)
clone.keyExpression = (JRExpression)this.keyExpression.clone();
if (this.valueExpression != null)
clone.valueExpression = (JRExpression)this.valueExpression.clone();
if (this.labelExpression != null)
clone.labelExpression = (JRExpression)this.labelExpression.clone();
if (this.sectionHyperlink != null)
clone.sectionHyperlink = (JRHyperlink)this.sectionHyperlink.clone();
return clone;
}
}

View File

@@ -0,0 +1,44 @@
package net.sf.jasperreports.charts.base;
import java.io.IOException;
import java.io.ObjectInputStream;
import net.sf.jasperreports.charts.JRPiePlot;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.base.JRBaseChartPlot;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
public class JRBasePiePlot extends JRBaseChartPlot implements JRPiePlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_CIRCULAR = "circular";
protected boolean isCircular = true;
public JRBasePiePlot(JRChartPlot piePlot, JRChart chart) {
super(piePlot, chart);
}
public JRBasePiePlot(JRPiePlot piePlot, JRBaseObjectFactory factory) {
super((JRChartPlot)piePlot, factory);
this.isCircular = piePlot.isCircular();
}
public void collectExpressions(JRExpressionCollector collector) {}
public boolean isCircular() {
return this.isCircular;
}
public void setCircular(boolean isCircular) {
boolean old = this.isCircular;
this.isCircular = isCircular;
getEventSupport().firePropertyChange("circular", old, this.isCircular);
}
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
ObjectInputStream.GetField fields = in.readFields();
this.isCircular = fields.get("isCircular", true);
}
}

View File

@@ -0,0 +1,193 @@
package net.sf.jasperreports.charts.base;
import java.awt.Color;
import net.sf.jasperreports.charts.JRScatterPlot;
import net.sf.jasperreports.charts.JRXAxisFormat;
import net.sf.jasperreports.charts.JRYAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.JRFont;
import net.sf.jasperreports.engine.JRStyleContainer;
import net.sf.jasperreports.engine.base.JRBaseChartPlot;
import net.sf.jasperreports.engine.base.JRBaseFont;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
import net.sf.jasperreports.engine.util.JRStyleResolver;
public class JRBaseScatterPlot extends JRBaseChartPlot implements JRScatterPlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_SHOW_LINES = "showLines";
public static final String PROPERTY_SHOW_SHAPES = "showShapes";
protected JRExpression xAxisLabelExpression = null;
protected JRFont xAxisLabelFont = null;
protected Color xAxisLabelColor = null;
protected JRFont xAxisTickLabelFont = null;
protected Color xAxisTickLabelColor = null;
protected String xAxisTickLabelMask = null;
protected Color xAxisLineColor = null;
protected JRExpression yAxisLabelExpression = null;
protected JRFont yAxisLabelFont = null;
protected Color yAxisLabelColor = null;
protected JRFont yAxisTickLabelFont = null;
protected Color yAxisTickLabelColor = null;
protected String yAxisTickLabelMask = null;
protected Color yAxisLineColor = null;
boolean isShowShapes = true;
boolean isShowLines = true;
public JRBaseScatterPlot(JRChartPlot scattedPlot, JRChart chart) {
super(scattedPlot, chart);
}
public JRBaseScatterPlot(JRScatterPlot scattedPlot, JRBaseObjectFactory factory) {
super((JRChartPlot)scattedPlot, factory);
this.isShowShapes = scattedPlot.isShowShapes();
this.isShowLines = scattedPlot.isShowLines();
this.xAxisLabelExpression = factory.getExpression(scattedPlot.getXAxisLabelExpression());
this.xAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)scattedPlot.getChart(), scattedPlot.getXAxisLabelFont());
this.xAxisLabelColor = scattedPlot.getOwnXAxisLabelColor();
this.xAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)scattedPlot.getChart(), scattedPlot.getXAxisTickLabelFont());
this.xAxisTickLabelColor = scattedPlot.getOwnXAxisTickLabelColor();
this.xAxisTickLabelMask = scattedPlot.getXAxisTickLabelMask();
this.xAxisLineColor = scattedPlot.getXAxisLineColor();
this.yAxisLabelExpression = factory.getExpression(scattedPlot.getYAxisLabelExpression());
this.yAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)scattedPlot.getChart(), scattedPlot.getYAxisLabelFont());
this.yAxisLabelColor = scattedPlot.getOwnYAxisLabelColor();
this.yAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)scattedPlot.getChart(), scattedPlot.getYAxisTickLabelFont());
this.yAxisTickLabelColor = scattedPlot.getOwnYAxisTickLabelColor();
this.yAxisTickLabelMask = scattedPlot.getYAxisTickLabelMask();
this.yAxisLineColor = scattedPlot.getYAxisLineColor();
}
public JRExpression getXAxisLabelExpression() {
return this.xAxisLabelExpression;
}
public JRFont getXAxisLabelFont() {
return this.xAxisLabelFont;
}
public Color getXAxisLabelColor() {
return JRStyleResolver.getXAxisLabelColor((JRXAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnXAxisLabelColor() {
return this.xAxisLabelColor;
}
public JRFont getXAxisTickLabelFont() {
return this.xAxisTickLabelFont;
}
public Color getXAxisTickLabelColor() {
return JRStyleResolver.getXAxisTickLabelColor((JRXAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnXAxisTickLabelColor() {
return this.xAxisTickLabelColor;
}
public String getXAxisTickLabelMask() {
return this.xAxisTickLabelMask;
}
public Color getXAxisLineColor() {
return JRStyleResolver.getXAxisLineColor((JRXAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnXAxisLineColor() {
return this.xAxisLineColor;
}
public JRExpression getYAxisLabelExpression() {
return this.yAxisLabelExpression;
}
public JRFont getYAxisLabelFont() {
return this.yAxisLabelFont;
}
public Color getYAxisLabelColor() {
return JRStyleResolver.getYAxisLabelColor((JRYAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnYAxisLabelColor() {
return this.yAxisLabelColor;
}
public JRFont getYAxisTickLabelFont() {
return this.yAxisTickLabelFont;
}
public Color getYAxisTickLabelColor() {
return JRStyleResolver.getYAxisTickLabelColor((JRYAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnYAxisTickLabelColor() {
return this.yAxisTickLabelColor;
}
public String getYAxisTickLabelMask() {
return this.yAxisTickLabelMask;
}
public Color getYAxisLineColor() {
return JRStyleResolver.getYAxisLineColor((JRYAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnYAxisLineColor() {
return this.yAxisLineColor;
}
public boolean isShowShapes() {
return this.isShowShapes;
}
public boolean isShowLines() {
return this.isShowLines;
}
public void setShowShapes(boolean value) {
boolean old = this.isShowShapes;
this.isShowShapes = value;
getEventSupport().firePropertyChange("showShapes", old, this.isShowShapes);
}
public void setShowLines(boolean value) {
boolean old = this.isShowLines;
this.isShowLines = value;
getEventSupport().firePropertyChange("showLines", old, this.isShowLines);
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public Object clone(JRChart parentChart) {
JRBaseScatterPlot clone = (JRBaseScatterPlot)super.clone(parentChart);
if (this.xAxisLabelExpression != null)
clone.xAxisLabelExpression = (JRExpression)this.xAxisLabelExpression.clone();
if (this.yAxisLabelExpression != null)
clone.yAxisLabelExpression = (JRExpression)this.yAxisLabelExpression.clone();
return clone;
}
}

View File

@@ -0,0 +1,101 @@
package net.sf.jasperreports.charts.base;
import java.awt.Color;
import net.sf.jasperreports.charts.JRDataRange;
import net.sf.jasperreports.charts.JRThermometerPlot;
import net.sf.jasperreports.charts.JRValueDisplay;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.base.JRBaseChartPlot;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
public class JRBaseThermometerPlot extends JRBaseChartPlot implements JRThermometerPlot {
private static final long serialVersionUID = 10200L;
protected JRDataRange dataRange = null;
protected JRValueDisplay valueDisplay = null;
protected boolean showValueLines = false;
protected byte valueLocation = 3;
protected Color mercuryColor = null;
protected JRDataRange lowRange = null;
protected JRDataRange mediumRange = null;
protected JRDataRange highRange = null;
public JRBaseThermometerPlot(JRChartPlot thermoPlot, JRChart chart) {
super(thermoPlot, chart);
}
public JRBaseThermometerPlot(JRThermometerPlot thermoPlot, JRBaseObjectFactory factory) {
super((JRChartPlot)thermoPlot, factory);
this.dataRange = new JRBaseDataRange(thermoPlot.getDataRange(), factory);
this.valueDisplay = new JRBaseValueDisplay(thermoPlot.getValueDisplay(), factory);
this.showValueLines = thermoPlot.isShowValueLines();
this.valueLocation = thermoPlot.getValueLocation();
this.mercuryColor = thermoPlot.getMercuryColor();
if (thermoPlot.getLowRange() != null)
this.lowRange = new JRBaseDataRange(thermoPlot.getLowRange(), factory);
if (thermoPlot.getMediumRange() != null)
this.mediumRange = new JRBaseDataRange(thermoPlot.getMediumRange(), factory);
if (thermoPlot.getHighRange() != null)
this.highRange = new JRBaseDataRange(thermoPlot.getHighRange(), factory);
}
public JRDataRange getDataRange() {
return this.dataRange;
}
public JRValueDisplay getValueDisplay() {
return this.valueDisplay;
}
public boolean isShowValueLines() {
return this.showValueLines;
}
public byte getValueLocation() {
return this.valueLocation;
}
public Color getMercuryColor() {
return this.mercuryColor;
}
public JRDataRange getLowRange() {
return this.lowRange;
}
public JRDataRange getMediumRange() {
return this.mediumRange;
}
public JRDataRange getHighRange() {
return this.highRange;
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public Object clone(JRChart parentChart) {
JRBaseThermometerPlot clone = (JRBaseThermometerPlot)super.clone(parentChart);
if (this.dataRange != null)
clone.dataRange = (JRDataRange)this.dataRange.clone();
if (this.valueDisplay != null)
clone.valueDisplay = (JRValueDisplay)this.valueDisplay.clone();
if (this.lowRange != null)
clone.lowRange = (JRDataRange)this.lowRange.clone();
if (this.mediumRange != null)
clone.mediumRange = (JRDataRange)this.mediumRange.clone();
if (this.highRange != null)
clone.highRange = (JRDataRange)this.highRange.clone();
return clone;
}
}

View File

@@ -0,0 +1,55 @@
package net.sf.jasperreports.charts.base;
import net.sf.jasperreports.charts.JRTimePeriodDataset;
import net.sf.jasperreports.charts.JRTimePeriodSeries;
import net.sf.jasperreports.engine.JRChartDataset;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.base.JRBaseChartDataset;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
import net.sf.jasperreports.engine.design.JRVerifier;
public class JRBaseTimePeriodDataset extends JRBaseChartDataset implements JRTimePeriodDataset {
private static final long serialVersionUID = 10200L;
private JRTimePeriodSeries[] timePeriodSeries = null;
protected JRBaseTimePeriodDataset(JRTimePeriodDataset dataset) {
super((JRChartDataset)dataset);
}
public JRBaseTimePeriodDataset(JRTimePeriodDataset dataset, JRBaseObjectFactory factory) {
super((JRChartDataset)dataset, factory);
JRTimePeriodSeries[] srcTimePeriodSeries = dataset.getSeries();
if (srcTimePeriodSeries != null && srcTimePeriodSeries.length > 0) {
this.timePeriodSeries = new JRTimePeriodSeries[srcTimePeriodSeries.length];
for (int i = 0; i < this.timePeriodSeries.length; i++)
this.timePeriodSeries[i] = factory.getTimePeriodSeries(srcTimePeriodSeries[i]);
}
}
public JRTimePeriodSeries[] getSeries() {
return this.timePeriodSeries;
}
public byte getDatasetType() {
return 5;
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public void validate(JRVerifier verifier) {
verifier.verify(this);
}
public Object clone() {
JRBaseTimePeriodDataset clone = (JRBaseTimePeriodDataset)super.clone();
if (this.timePeriodSeries != null) {
clone.timePeriodSeries = new JRTimePeriodSeries[this.timePeriodSeries.length];
for (int i = 0; i < this.timePeriodSeries.length; i++)
this.timePeriodSeries[i] = (JRTimePeriodSeries)this.timePeriodSeries[i].clone();
}
return clone;
}
}

View File

@@ -0,0 +1,82 @@
package net.sf.jasperreports.charts.base;
import java.io.Serializable;
import net.sf.jasperreports.charts.JRTimePeriodSeries;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRHyperlink;
import net.sf.jasperreports.engine.JRRuntimeException;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
public class JRBaseTimePeriodSeries implements JRTimePeriodSeries, Serializable {
private static final long serialVersionUID = 608L;
protected JRExpression seriesExpression;
protected JRExpression startDateExpression;
protected JRExpression endDateExpression;
protected JRExpression valueExpression;
protected JRExpression labelExpression;
protected JRHyperlink itemHyperlink;
protected JRBaseTimePeriodSeries() {}
public JRBaseTimePeriodSeries(JRTimePeriodSeries timePeriodSeries, JRBaseObjectFactory factory) {
factory.put(timePeriodSeries, factory);
this.seriesExpression = factory.getExpression(timePeriodSeries.getSeriesExpression());
this.startDateExpression = factory.getExpression(timePeriodSeries.getStartDateExpression());
this.endDateExpression = factory.getExpression(timePeriodSeries.getEndDateExpression());
this.valueExpression = factory.getExpression(timePeriodSeries.getValueExpression());
this.labelExpression = factory.getExpression(timePeriodSeries.getLabelExpression());
this.itemHyperlink = factory.getHyperlink(timePeriodSeries.getItemHyperlink());
}
public JRExpression getSeriesExpression() {
return this.seriesExpression;
}
public JRExpression getStartDateExpression() {
return this.startDateExpression;
}
public JRExpression getEndDateExpression() {
return this.endDateExpression;
}
public JRExpression getValueExpression() {
return this.valueExpression;
}
public JRExpression getLabelExpression() {
return this.labelExpression;
}
public JRHyperlink getItemHyperlink() {
return this.itemHyperlink;
}
public Object clone() {
JRBaseTimePeriodSeries clone = null;
try {
clone = (JRBaseTimePeriodSeries)super.clone();
} catch (CloneNotSupportedException e) {
throw new JRRuntimeException(e);
}
if (this.seriesExpression != null)
clone.seriesExpression = (JRExpression)this.seriesExpression.clone();
if (this.startDateExpression != null)
clone.startDateExpression = (JRExpression)this.startDateExpression.clone();
if (this.endDateExpression != null)
clone.endDateExpression = (JRExpression)this.endDateExpression.clone();
if (this.valueExpression != null)
clone.valueExpression = (JRExpression)this.valueExpression.clone();
if (this.labelExpression != null)
clone.labelExpression = (JRExpression)this.labelExpression.clone();
if (this.itemHyperlink != null)
clone.itemHyperlink = (JRHyperlink)this.itemHyperlink.clone();
return clone;
}
}

View File

@@ -0,0 +1,73 @@
package net.sf.jasperreports.charts.base;
import java.io.Serializable;
import net.sf.jasperreports.charts.JRTimeSeries;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRHyperlink;
import net.sf.jasperreports.engine.JRRuntimeException;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
public class JRBaseTimeSeries implements JRTimeSeries, Serializable {
private static final long serialVersionUID = 10200L;
protected JRExpression seriesExpression = null;
protected JRExpression timePeriodExpression = null;
protected JRExpression valueExpression = null;
protected JRExpression labelExpression = null;
protected JRHyperlink itemHyperlink;
protected JRBaseTimeSeries() {}
public JRBaseTimeSeries(JRTimeSeries timeSeries, JRBaseObjectFactory factory) {
factory.put(timeSeries, this);
this.seriesExpression = factory.getExpression(timeSeries.getSeriesExpression());
this.timePeriodExpression = factory.getExpression(timeSeries.getTimePeriodExpression());
this.valueExpression = factory.getExpression(timeSeries.getValueExpression());
this.labelExpression = factory.getExpression(timeSeries.getLabelExpression());
this.itemHyperlink = factory.getHyperlink(timeSeries.getItemHyperlink());
}
public JRExpression getSeriesExpression() {
return this.seriesExpression;
}
public JRExpression getTimePeriodExpression() {
return this.timePeriodExpression;
}
public JRExpression getValueExpression() {
return this.valueExpression;
}
public JRExpression getLabelExpression() {
return this.labelExpression;
}
public JRHyperlink getItemHyperlink() {
return this.itemHyperlink;
}
public Object clone() {
JRBaseTimeSeries clone = null;
try {
clone = (JRBaseTimeSeries)super.clone();
} catch (CloneNotSupportedException e) {
throw new JRRuntimeException(e);
}
if (this.seriesExpression != null)
clone.seriesExpression = (JRExpression)this.seriesExpression.clone();
if (this.timePeriodExpression != null)
clone.timePeriodExpression = (JRExpression)this.timePeriodExpression.clone();
if (this.valueExpression != null)
clone.valueExpression = (JRExpression)this.valueExpression.clone();
if (this.labelExpression != null)
clone.labelExpression = (JRExpression)this.labelExpression.clone();
if (this.itemHyperlink != null)
clone.itemHyperlink = (JRHyperlink)this.itemHyperlink.clone();
return clone;
}
}

View File

@@ -0,0 +1,82 @@
package net.sf.jasperreports.charts.base;
import net.sf.jasperreports.charts.JRTimeSeries;
import net.sf.jasperreports.charts.JRTimeSeriesDataset;
import net.sf.jasperreports.engine.JRChartDataset;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.base.JRBaseChartDataset;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
import net.sf.jasperreports.engine.design.JRVerifier;
import net.sf.jasperreports.engine.design.events.JRChangeEventsSupport;
import net.sf.jasperreports.engine.design.events.JRPropertyChangeSupport;
public class JRBaseTimeSeriesDataset extends JRBaseChartDataset implements JRTimeSeriesDataset, JRChangeEventsSupport {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_TIME_PERIOD = "timePeriod";
private JRTimeSeries[] timeSeries = null;
private Class timePeriod;
private transient JRPropertyChangeSupport eventSupport;
protected JRBaseTimeSeriesDataset(JRTimeSeriesDataset dataset) {
super((JRChartDataset)dataset);
}
public JRBaseTimeSeriesDataset(JRTimeSeriesDataset dataset, JRBaseObjectFactory factory) {
super((JRChartDataset)dataset, factory);
this.timePeriod = dataset.getTimePeriod();
JRTimeSeries[] srcTimeSeries = dataset.getSeries();
if (srcTimeSeries != null && srcTimeSeries.length > 0) {
this.timeSeries = new JRTimeSeries[srcTimeSeries.length];
for (int i = 0; i < this.timeSeries.length; i++)
this.timeSeries[i] = factory.getTimeSeries(srcTimeSeries[i]);
}
}
public JRTimeSeries[] getSeries() {
return this.timeSeries;
}
public Class getTimePeriod() {
return this.timePeriod;
}
public void setTimePeriod(Class timePeriod) {
Object old = this.timePeriod;
this.timePeriod = timePeriod;
getEventSupport().firePropertyChange("timePeriod", old, this.timePeriod);
}
public byte getDatasetType() {
return 6;
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public void validate(JRVerifier verifier) {
verifier.verify(this);
}
public Object clone() {
JRBaseTimeSeriesDataset clone = (JRBaseTimeSeriesDataset)super.clone();
if (this.timeSeries != null) {
clone.timeSeries = new JRTimeSeries[this.timeSeries.length];
for (int i = 0; i < this.timeSeries.length; i++)
this.timeSeries[i] = (JRTimeSeries)this.timeSeries[i].clone();
}
return clone;
}
public JRPropertyChangeSupport getEventSupport() {
synchronized (this) {
if (this.eventSupport == null)
this.eventSupport = new JRPropertyChangeSupport(this);
}
return this.eventSupport;
}
}

View File

@@ -0,0 +1,193 @@
package net.sf.jasperreports.charts.base;
import java.awt.Color;
import net.sf.jasperreports.charts.JRTimeAxisFormat;
import net.sf.jasperreports.charts.JRTimeSeriesPlot;
import net.sf.jasperreports.charts.JRValueAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.JRFont;
import net.sf.jasperreports.engine.JRStyleContainer;
import net.sf.jasperreports.engine.base.JRBaseChartPlot;
import net.sf.jasperreports.engine.base.JRBaseFont;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
import net.sf.jasperreports.engine.util.JRStyleResolver;
public class JRBaseTimeSeriesPlot extends JRBaseChartPlot implements JRTimeSeriesPlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_SHOW_LINES = "showLines";
public static final String PROPERTY_SHOW_SHAPES = "showShapes";
protected JRExpression timeAxisLabelExpression = null;
protected JRFont timeAxisLabelFont = null;
protected Color timeAxisLabelColor = null;
protected JRFont timeAxisTickLabelFont = null;
protected Color timeAxisTickLabelColor = null;
protected String timeAxisTickLabelMask = null;
protected Color timeAxisLineColor = null;
protected JRExpression valueAxisLabelExpression = null;
protected JRFont valueAxisLabelFont = null;
protected Color valueAxisLabelColor = null;
protected JRFont valueAxisTickLabelFont = null;
protected Color valueAxisTickLabelColor = null;
protected String valueAxisTickLabelMask = null;
protected Color valueAxisLineColor = null;
boolean isShowShapes = true;
boolean isShowLines = true;
protected JRBaseTimeSeriesPlot(JRChartPlot plot, JRChart chart) {
super(plot, chart);
}
public JRBaseTimeSeriesPlot(JRTimeSeriesPlot plot, JRBaseObjectFactory factory) {
super((JRChartPlot)plot, factory);
this.isShowLines = plot.isShowLines();
this.isShowShapes = plot.isShowShapes();
this.timeAxisLabelExpression = factory.getExpression(plot.getTimeAxisLabelExpression());
this.timeAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)plot.getChart(), plot.getTimeAxisLabelFont());
this.timeAxisLabelColor = plot.getOwnTimeAxisLabelColor();
this.timeAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)plot.getChart(), plot.getTimeAxisTickLabelFont());
this.timeAxisTickLabelColor = plot.getOwnTimeAxisTickLabelColor();
this.timeAxisTickLabelMask = plot.getTimeAxisTickLabelMask();
this.timeAxisLineColor = plot.getTimeAxisLineColor();
this.valueAxisLabelExpression = factory.getExpression(plot.getValueAxisLabelExpression());
this.valueAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)plot.getChart(), plot.getValueAxisLabelFont());
this.valueAxisLabelColor = plot.getOwnValueAxisLabelColor();
this.valueAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)plot.getChart(), plot.getValueAxisTickLabelFont());
this.valueAxisTickLabelColor = plot.getOwnValueAxisTickLabelColor();
this.valueAxisTickLabelMask = plot.getValueAxisTickLabelMask();
this.valueAxisLineColor = plot.getValueAxisTickLabelColor();
}
public JRExpression getTimeAxisLabelExpression() {
return this.timeAxisLabelExpression;
}
public JRFont getTimeAxisLabelFont() {
return this.timeAxisLabelFont;
}
public Color getTimeAxisLabelColor() {
return JRStyleResolver.getTimeAxisLabelColor((JRTimeAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnTimeAxisLabelColor() {
return this.timeAxisLabelColor;
}
public JRFont getTimeAxisTickLabelFont() {
return this.timeAxisTickLabelFont;
}
public Color getTimeAxisTickLabelColor() {
return JRStyleResolver.getTimeAxisTickLabelColor((JRTimeAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnTimeAxisTickLabelColor() {
return this.timeAxisTickLabelColor;
}
public String getTimeAxisTickLabelMask() {
return this.timeAxisTickLabelMask;
}
public Color getTimeAxisLineColor() {
return JRStyleResolver.getTimeAxisLineColor((JRTimeAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnTimeAxisLineColor() {
return this.timeAxisLineColor;
}
public JRExpression getValueAxisLabelExpression() {
return this.valueAxisLabelExpression;
}
public JRFont getValueAxisLabelFont() {
return this.valueAxisLabelFont;
}
public Color getValueAxisLabelColor() {
return JRStyleResolver.getValueAxisLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLabelColor() {
return this.valueAxisLabelColor;
}
public JRFont getValueAxisTickLabelFont() {
return this.valueAxisTickLabelFont;
}
public Color getValueAxisTickLabelColor() {
return JRStyleResolver.getValueAxisTickLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisTickLabelColor() {
return this.valueAxisTickLabelColor;
}
public String getValueAxisTickLabelMask() {
return this.valueAxisTickLabelMask;
}
public Color getValueAxisLineColor() {
return JRStyleResolver.getValueAxisLineColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLineColor() {
return this.valueAxisLineColor;
}
public boolean isShowLines() {
return this.isShowLines;
}
public boolean isShowShapes() {
return this.isShowShapes;
}
public void setShowLines(boolean val) {
boolean old = this.isShowLines;
this.isShowLines = val;
getEventSupport().firePropertyChange("showLines", old, this.isShowLines);
}
public void setShowShapes(boolean val) {
boolean old = this.isShowShapes;
this.isShowShapes = val;
getEventSupport().firePropertyChange("showShapes", old, this.isShowShapes);
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public Object clone(JRChart parentChart) {
JRBaseTimeSeriesPlot clone = (JRBaseTimeSeriesPlot)super.clone(parentChart);
if (this.timeAxisLabelExpression != null)
clone.timeAxisLabelExpression = (JRExpression)this.timeAxisLabelExpression.clone();
if (this.valueAxisLabelExpression != null)
clone.valueAxisLabelExpression = (JRExpression)this.valueAxisLabelExpression.clone();
return clone;
}
}

View File

@@ -0,0 +1,47 @@
package net.sf.jasperreports.charts.base;
import net.sf.jasperreports.charts.JRValueDataset;
import net.sf.jasperreports.engine.JRChartDataset;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.base.JRBaseChartDataset;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
import net.sf.jasperreports.engine.design.JRVerifier;
public class JRBaseValueDataset extends JRBaseChartDataset implements JRValueDataset {
private static final long serialVersionUID = 10200L;
protected JRExpression valueExpression = null;
public JRBaseValueDataset(JRChartDataset dataset) {
super(dataset);
}
public JRBaseValueDataset(JRValueDataset dataset, JRBaseObjectFactory factory) {
super((JRChartDataset)dataset, factory);
this.valueExpression = factory.getExpression(dataset.getValueExpression());
}
public JRExpression getValueExpression() {
return this.valueExpression;
}
public byte getDatasetType() {
return 8;
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public void validate(JRVerifier verifier) {
verifier.verify(this);
}
public Object clone() {
JRBaseValueDataset clone = (JRBaseValueDataset)super.clone();
if (this.valueExpression != null)
clone.valueExpression = (JRExpression)this.valueExpression.clone();
return clone;
}
}

View File

@@ -0,0 +1,58 @@
package net.sf.jasperreports.charts.base;
import java.awt.Color;
import java.io.Serializable;
import net.sf.jasperreports.charts.JRValueDisplay;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.JRFont;
import net.sf.jasperreports.engine.JRRuntimeException;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
public class JRBaseValueDisplay implements JRValueDisplay, Serializable {
private static final long serialVersionUID = 10200L;
protected Color color = null;
protected String mask = null;
protected JRFont font = null;
public JRBaseValueDisplay(JRValueDisplay valueDisplay) {
if (valueDisplay != null) {
this.color = valueDisplay.getColor();
this.mask = valueDisplay.getMask();
this.font = valueDisplay.getFont();
}
}
public JRBaseValueDisplay(JRValueDisplay valueDisplay, JRBaseObjectFactory factory) {
factory.put(valueDisplay, this);
if (valueDisplay != null) {
this.color = valueDisplay.getColor();
this.mask = valueDisplay.getMask();
this.font = valueDisplay.getFont();
}
}
public Color getColor() {
return this.color;
}
public String getMask() {
return this.mask;
}
public JRFont getFont() {
return this.font;
}
public void collectExpressions(JRExpressionCollector collector) {}
public Object clone() {
try {
return super.clone();
} catch (CloneNotSupportedException e) {
throw new JRRuntimeException(e);
}
}
}

View File

@@ -0,0 +1,55 @@
package net.sf.jasperreports.charts.base;
import net.sf.jasperreports.charts.JRXyDataset;
import net.sf.jasperreports.charts.JRXySeries;
import net.sf.jasperreports.engine.JRChartDataset;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.base.JRBaseChartDataset;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
import net.sf.jasperreports.engine.design.JRVerifier;
public class JRBaseXyDataset extends JRBaseChartDataset implements JRXyDataset {
private static final long serialVersionUID = 10200L;
protected JRXySeries[] xySeries = null;
public JRBaseXyDataset(JRChartDataset dataset) {
super(dataset);
}
public JRBaseXyDataset(JRXyDataset dataset, JRBaseObjectFactory factory) {
super((JRChartDataset)dataset, factory);
JRXySeries[] srcXySeries = dataset.getSeries();
if (srcXySeries != null && srcXySeries.length > 0) {
this.xySeries = new JRXySeries[srcXySeries.length];
for (int i = 0; i < this.xySeries.length; i++)
this.xySeries[i] = factory.getXySeries(srcXySeries[i]);
}
}
public JRXySeries[] getSeries() {
return this.xySeries;
}
public byte getDatasetType() {
return 3;
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public void validate(JRVerifier verifier) {
verifier.verify(this);
}
public Object clone() {
JRBaseXyDataset clone = (JRBaseXyDataset)super.clone();
if (this.xySeries != null) {
clone.xySeries = new JRXySeries[this.xySeries.length];
for (int i = 0; i < this.xySeries.length; i++)
this.xySeries[i] = (JRXySeries)this.xySeries[i].clone();
}
return clone;
}
}

View File

@@ -0,0 +1,73 @@
package net.sf.jasperreports.charts.base;
import java.io.Serializable;
import net.sf.jasperreports.charts.JRXySeries;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRHyperlink;
import net.sf.jasperreports.engine.JRRuntimeException;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
public class JRBaseXySeries implements JRXySeries, Serializable {
private static final long serialVersionUID = 10200L;
protected JRExpression seriesExpression = null;
protected JRExpression xValueExpression = null;
protected JRExpression yValueExpression = null;
protected JRExpression labelExpression = null;
protected JRHyperlink itemHyperlink;
protected JRBaseXySeries() {}
public JRBaseXySeries(JRXySeries xySeries, JRBaseObjectFactory factory) {
factory.put(xySeries, this);
this.seriesExpression = factory.getExpression(xySeries.getSeriesExpression());
this.xValueExpression = factory.getExpression(xySeries.getXValueExpression());
this.yValueExpression = factory.getExpression(xySeries.getYValueExpression());
this.labelExpression = factory.getExpression(xySeries.getLabelExpression());
this.itemHyperlink = factory.getHyperlink(xySeries.getItemHyperlink());
}
public JRExpression getSeriesExpression() {
return this.seriesExpression;
}
public JRExpression getXValueExpression() {
return this.xValueExpression;
}
public JRExpression getYValueExpression() {
return this.yValueExpression;
}
public JRExpression getLabelExpression() {
return this.labelExpression;
}
public JRHyperlink getItemHyperlink() {
return this.itemHyperlink;
}
public Object clone() {
JRBaseXySeries clone = null;
try {
clone = (JRBaseXySeries)super.clone();
} catch (CloneNotSupportedException e) {
throw new JRRuntimeException(e);
}
if (this.seriesExpression != null)
clone.seriesExpression = (JRExpression)this.seriesExpression.clone();
if (this.xValueExpression != null)
clone.xValueExpression = (JRExpression)this.xValueExpression.clone();
if (this.yValueExpression != null)
clone.yValueExpression = (JRExpression)this.yValueExpression.clone();
if (this.labelExpression != null)
clone.labelExpression = (JRExpression)this.labelExpression.clone();
if (this.itemHyperlink != null)
clone.itemHyperlink = (JRHyperlink)this.itemHyperlink.clone();
return clone;
}
}

View File

@@ -0,0 +1,55 @@
package net.sf.jasperreports.charts.base;
import net.sf.jasperreports.charts.JRXyzDataset;
import net.sf.jasperreports.charts.JRXyzSeries;
import net.sf.jasperreports.engine.JRChartDataset;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.base.JRBaseChartDataset;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
import net.sf.jasperreports.engine.design.JRVerifier;
public class JRBaseXyzDataset extends JRBaseChartDataset implements JRXyzDataset {
public static final long serialVersionUID = 10200L;
protected JRXyzSeries[] xyzSeries = null;
public JRBaseXyzDataset(JRChartDataset dataset) {
super(dataset);
}
public JRBaseXyzDataset(JRXyzDataset dataset, JRBaseObjectFactory factory) {
super((JRChartDataset)dataset, factory);
JRXyzSeries[] srcXyzSeries = dataset.getSeries();
if (srcXyzSeries != null && srcXyzSeries.length > 0) {
this.xyzSeries = new JRXyzSeries[srcXyzSeries.length];
for (int i = 0; i < srcXyzSeries.length; i++)
this.xyzSeries[i] = factory.getXyzSeries(srcXyzSeries[i]);
}
}
public JRXyzSeries[] getSeries() {
return this.xyzSeries;
}
public byte getDatasetType() {
return 4;
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public void validate(JRVerifier verifier) {
verifier.verify(this);
}
public Object clone() {
JRBaseXyzDataset clone = (JRBaseXyzDataset)super.clone();
if (this.xyzSeries != null) {
clone.xyzSeries = new JRXyzSeries[this.xyzSeries.length];
for (int i = 0; i < this.xyzSeries.length; i++)
this.xyzSeries[i] = (JRXyzSeries)this.xyzSeries[i].clone();
}
return clone;
}
}

View File

@@ -0,0 +1,73 @@
package net.sf.jasperreports.charts.base;
import java.io.Serializable;
import net.sf.jasperreports.charts.JRXyzSeries;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRHyperlink;
import net.sf.jasperreports.engine.JRRuntimeException;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
public class JRBaseXyzSeries implements JRXyzSeries, Serializable {
private static final long serialVersionUID = 10200L;
protected JRExpression seriesExpression = null;
protected JRExpression xValueExpression = null;
protected JRExpression yValueExpression = null;
protected JRExpression zValueExpression = null;
protected JRHyperlink itemHyperlink;
public JRBaseXyzSeries() {}
public JRBaseXyzSeries(JRXyzSeries xyzSeries, JRBaseObjectFactory factory) {
factory.put(xyzSeries, this);
this.seriesExpression = factory.getExpression(xyzSeries.getSeriesExpression());
this.xValueExpression = factory.getExpression(xyzSeries.getXValueExpression());
this.yValueExpression = factory.getExpression(xyzSeries.getYValueExpression());
this.zValueExpression = factory.getExpression(xyzSeries.getZValueExpression());
this.itemHyperlink = factory.getHyperlink(xyzSeries.getItemHyperlink());
}
public JRExpression getSeriesExpression() {
return this.seriesExpression;
}
public JRExpression getXValueExpression() {
return this.xValueExpression;
}
public JRExpression getYValueExpression() {
return this.yValueExpression;
}
public JRExpression getZValueExpression() {
return this.zValueExpression;
}
public JRHyperlink getItemHyperlink() {
return this.itemHyperlink;
}
public Object clone() {
JRBaseXyzSeries clone = null;
try {
clone = (JRBaseXyzSeries)super.clone();
} catch (CloneNotSupportedException e) {
throw new JRRuntimeException(e);
}
if (this.seriesExpression != null)
clone.seriesExpression = (JRExpression)this.seriesExpression.clone();
if (this.xValueExpression != null)
clone.xValueExpression = (JRExpression)this.xValueExpression.clone();
if (this.yValueExpression != null)
clone.yValueExpression = (JRExpression)this.yValueExpression.clone();
if (this.zValueExpression != null)
clone.zValueExpression = (JRExpression)this.zValueExpression.clone();
if (this.itemHyperlink != null)
clone.itemHyperlink = (JRHyperlink)this.itemHyperlink.clone();
return clone;
}
}