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,10 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
public interface JRAreaPlot extends JRChartPlot, JRCategoryAxisFormat, JRValueAxisFormat {
JRExpression getCategoryAxisLabelExpression();
JRExpression getValueAxisLabelExpression();
}

View File

@@ -0,0 +1,22 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
public interface JRBar3DPlot extends JRChartPlot, JRCategoryAxisFormat, JRValueAxisFormat {
JRExpression getCategoryAxisLabelExpression();
JRExpression getValueAxisLabelExpression();
double getXOffset();
void setXOffset(double paramDouble);
double getYOffset();
void setYOffset(double paramDouble);
boolean isShowLabels();
void setShowLabels(boolean paramBoolean);
}

View File

@@ -0,0 +1,22 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
public interface JRBarPlot extends JRChartPlot, JRCategoryAxisFormat, JRValueAxisFormat {
JRExpression getCategoryAxisLabelExpression();
JRExpression getValueAxisLabelExpression();
boolean isShowTickMarks();
void setShowTickMarks(boolean paramBoolean);
boolean isShowTickLabels();
void setShowTickLabels(boolean paramBoolean);
boolean isShowLabels();
void setShowLabels(boolean paramBoolean);
}

View File

@@ -0,0 +1,14 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
public interface JRBubblePlot extends JRChartPlot, JRXAxisFormat, JRYAxisFormat {
JRExpression getXAxisLabelExpression();
JRExpression getYAxisLabelExpression();
int getScaleType();
void setScaleType(int paramInt);
}

View File

@@ -0,0 +1,12 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
public interface JRCandlestickPlot extends JRChartPlot, JRTimeAxisFormat, JRValueAxisFormat {
JRExpression getTimeAxisLabelExpression();
JRExpression getValueAxisLabelExpression();
boolean isShowVolume();
}

View File

@@ -0,0 +1,24 @@
package net.sf.jasperreports.charts;
import java.awt.Color;
import net.sf.jasperreports.engine.JRFont;
public interface JRCategoryAxisFormat {
JRFont getCategoryAxisLabelFont();
Color getCategoryAxisLabelColor();
Color getOwnCategoryAxisLabelColor();
JRFont getCategoryAxisTickLabelFont();
Color getCategoryAxisTickLabelColor();
Color getOwnCategoryAxisTickLabelColor();
String getCategoryAxisTickLabelMask();
Color getCategoryAxisLineColor();
Color getOwnCategoryAxisLineColor();
}

View File

@@ -0,0 +1,7 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartDataset;
public interface JRCategoryDataset extends JRChartDataset {
JRCategorySeries[] getSeries();
}

View File

@@ -0,0 +1,17 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRCloneable;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRHyperlink;
public interface JRCategorySeries extends JRCloneable {
JRExpression getSeriesExpression();
JRExpression getCategoryExpression();
JRExpression getValueExpression();
JRExpression getLabelExpression();
JRHyperlink getItemHyperlink();
}

View File

@@ -0,0 +1,15 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChart;
public interface JRChartAxis {
public static final byte POSITION_LEFT_OR_TOP = 1;
public static final byte POSITION_RIGHT_OR_BOTTOM = 2;
byte getPosition();
JRChart getChart();
Object clone(JRChart paramJRChart);
}

View File

@@ -0,0 +1,10 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRCloneable;
import net.sf.jasperreports.engine.JRExpression;
public interface JRDataRange extends JRCloneable {
JRExpression getLowExpression();
JRExpression getHighExpression();
}

View File

@@ -0,0 +1,23 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartDataset;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRHyperlink;
public interface JRHighLowDataset extends JRChartDataset {
JRExpression getSeriesExpression();
JRExpression getDateExpression();
JRExpression getHighExpression();
JRExpression getLowExpression();
JRExpression getOpenExpression();
JRExpression getCloseExpression();
JRExpression getVolumeExpression();
JRHyperlink getItemHyperlink();
}

View File

@@ -0,0 +1,14 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
public interface JRHighLowPlot extends JRChartPlot, JRTimeAxisFormat, JRValueAxisFormat {
JRExpression getTimeAxisLabelExpression();
JRExpression getValueAxisLabelExpression();
boolean isShowOpenTicks();
boolean isShowCloseTicks();
}

View File

@@ -0,0 +1,18 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
public interface JRLinePlot extends JRChartPlot, JRCategoryAxisFormat, JRValueAxisFormat {
JRExpression getCategoryAxisLabelExpression();
JRExpression getValueAxisLabelExpression();
boolean isShowLines();
void setShowLines(boolean paramBoolean);
boolean isShowShapes();
void setShowShapes(boolean paramBoolean);
}

View File

@@ -0,0 +1,33 @@
package net.sf.jasperreports.charts;
import java.awt.Color;
import java.util.List;
import net.sf.jasperreports.engine.JRChartPlot;
public interface JRMeterPlot extends JRChartPlot {
public static final byte SHAPE_CHORD = 0;
public static final byte SHAPE_CIRCLE = 1;
public static final byte SHAPE_PIE = 2;
JRDataRange getDataRange();
JRValueDisplay getValueDisplay();
byte getShape();
List getIntervals();
int getMeterAngle();
String getUnits();
double getTickInterval();
Color getMeterBackgroundColor();
Color getNeedleColor();
Color getTickColor();
}

View File

@@ -0,0 +1,8 @@
package net.sf.jasperreports.charts;
import java.util.List;
import net.sf.jasperreports.engine.JRChartPlot;
public interface JRMultiAxisPlot extends JRChartPlot {
List getAxes();
}

View File

@@ -0,0 +1,11 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartPlot;
public interface JRPie3DPlot extends JRChartPlot {
public static final double DEPTH_FACTOR_DEFAULT = 0.2D;
double getDepthFactor();
boolean isCircular();
}

View File

@@ -0,0 +1,15 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartDataset;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRHyperlink;
public interface JRPieDataset extends JRChartDataset {
JRExpression getKeyExpression();
JRExpression getValueExpression();
JRExpression getLabelExpression();
JRHyperlink getSectionHyperlink();
}

View File

@@ -0,0 +1,7 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartPlot;
public interface JRPiePlot extends JRChartPlot {
boolean isCircular();
}

View File

@@ -0,0 +1,18 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
public interface JRScatterPlot extends JRChartPlot, JRXAxisFormat, JRYAxisFormat {
JRExpression getXAxisLabelExpression();
JRExpression getYAxisLabelExpression();
boolean isShowLines();
void setShowLines(boolean paramBoolean);
boolean isShowShapes();
void setShowShapes(boolean paramBoolean);
}

View File

@@ -0,0 +1,30 @@
package net.sf.jasperreports.charts;
import java.awt.Color;
import net.sf.jasperreports.engine.JRChartPlot;
public interface JRThermometerPlot extends JRChartPlot {
public static final byte LOCATION_NONE = 0;
public static final byte LOCATION_LEFT = 1;
public static final byte LOCATION_RIGHT = 2;
public static final byte LOCATION_BULB = 3;
JRDataRange getDataRange();
JRValueDisplay getValueDisplay();
boolean isShowValueLines();
byte getValueLocation();
Color getMercuryColor();
JRDataRange getLowRange();
JRDataRange getMediumRange();
JRDataRange getHighRange();
}

View File

@@ -0,0 +1,24 @@
package net.sf.jasperreports.charts;
import java.awt.Color;
import net.sf.jasperreports.engine.JRFont;
public interface JRTimeAxisFormat {
JRFont getTimeAxisLabelFont();
Color getTimeAxisLabelColor();
Color getOwnTimeAxisLabelColor();
JRFont getTimeAxisTickLabelFont();
Color getTimeAxisTickLabelColor();
Color getOwnTimeAxisTickLabelColor();
String getTimeAxisTickLabelMask();
Color getTimeAxisLineColor();
Color getOwnTimeAxisLineColor();
}

View File

@@ -0,0 +1,7 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartDataset;
public interface JRTimePeriodDataset extends JRChartDataset {
JRTimePeriodSeries[] getSeries();
}

View File

@@ -0,0 +1,19 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRCloneable;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRHyperlink;
public interface JRTimePeriodSeries extends JRCloneable {
JRExpression getSeriesExpression();
JRExpression getStartDateExpression();
JRExpression getEndDateExpression();
JRExpression getValueExpression();
JRExpression getLabelExpression();
JRHyperlink getItemHyperlink();
}

View File

@@ -0,0 +1,17 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRCloneable;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRHyperlink;
public interface JRTimeSeries extends JRCloneable {
JRExpression getSeriesExpression();
JRExpression getTimePeriodExpression();
JRExpression getValueExpression();
JRExpression getLabelExpression();
JRHyperlink getItemHyperlink();
}

View File

@@ -0,0 +1,11 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartDataset;
public interface JRTimeSeriesDataset extends JRChartDataset {
JRTimeSeries[] getSeries();
Class getTimePeriod();
void setTimePeriod(Class paramClass);
}

View File

@@ -0,0 +1,14 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
public interface JRTimeSeriesPlot extends JRChartPlot, JRTimeAxisFormat, JRValueAxisFormat {
JRExpression getTimeAxisLabelExpression();
JRExpression getValueAxisLabelExpression();
boolean isShowLines();
boolean isShowShapes();
}

View File

@@ -0,0 +1,24 @@
package net.sf.jasperreports.charts;
import java.awt.Color;
import net.sf.jasperreports.engine.JRFont;
public interface JRValueAxisFormat {
JRFont getValueAxisLabelFont();
Color getValueAxisLabelColor();
Color getOwnValueAxisLabelColor();
JRFont getValueAxisTickLabelFont();
Color getValueAxisTickLabelColor();
Color getOwnValueAxisTickLabelColor();
String getValueAxisTickLabelMask();
Color getValueAxisLineColor();
Color getOwnValueAxisLineColor();
}

View File

@@ -0,0 +1,8 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartDataset;
import net.sf.jasperreports.engine.JRExpression;
public interface JRValueDataset extends JRChartDataset {
JRExpression getValueExpression();
}

View File

@@ -0,0 +1,13 @@
package net.sf.jasperreports.charts;
import java.awt.Color;
import net.sf.jasperreports.engine.JRCloneable;
import net.sf.jasperreports.engine.JRFont;
public interface JRValueDisplay extends JRCloneable {
Color getColor();
String getMask();
JRFont getFont();
}

View File

@@ -0,0 +1,24 @@
package net.sf.jasperreports.charts;
import java.awt.Color;
import net.sf.jasperreports.engine.JRFont;
public interface JRXAxisFormat {
JRFont getXAxisLabelFont();
Color getXAxisLabelColor();
Color getOwnXAxisLabelColor();
JRFont getXAxisTickLabelFont();
Color getXAxisTickLabelColor();
Color getOwnXAxisTickLabelColor();
String getXAxisTickLabelMask();
Color getXAxisLineColor();
Color getOwnXAxisLineColor();
}

View File

@@ -0,0 +1,7 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartDataset;
public interface JRXyDataset extends JRChartDataset {
JRXySeries[] getSeries();
}

View File

@@ -0,0 +1,17 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRCloneable;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRHyperlink;
public interface JRXySeries extends JRCloneable {
JRExpression getSeriesExpression();
JRExpression getXValueExpression();
JRExpression getYValueExpression();
JRExpression getLabelExpression();
JRHyperlink getItemHyperlink();
}

View File

@@ -0,0 +1,7 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRChartDataset;
public interface JRXyzDataset extends JRChartDataset {
JRXyzSeries[] getSeries();
}

View File

@@ -0,0 +1,17 @@
package net.sf.jasperreports.charts;
import net.sf.jasperreports.engine.JRCloneable;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRHyperlink;
public interface JRXyzSeries extends JRCloneable {
JRExpression getSeriesExpression();
JRExpression getXValueExpression();
JRExpression getYValueExpression();
JRExpression getZValueExpression();
JRHyperlink getItemHyperlink();
}

View File

@@ -0,0 +1,24 @@
package net.sf.jasperreports.charts;
import java.awt.Color;
import net.sf.jasperreports.engine.JRFont;
public interface JRYAxisFormat {
JRFont getYAxisLabelFont();
Color getYAxisLabelColor();
Color getOwnYAxisLabelColor();
JRFont getYAxisTickLabelFont();
Color getYAxisTickLabelColor();
Color getOwnYAxisTickLabelColor();
String getYAxisTickLabelMask();
Color getYAxisLineColor();
Color getOwnYAxisLineColor();
}

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;
}
}

View File

@@ -0,0 +1,147 @@
package net.sf.jasperreports.charts.design;
import java.awt.Color;
import net.sf.jasperreports.charts.base.JRBaseAreaPlot;
import net.sf.jasperreports.charts.util.JRAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRFont;
public class JRDesignAreaPlot extends JRBaseAreaPlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_CATEGORY_AXIS_LABEL_COLOR = "categoryAxisLabelColor";
public static final String PROPERTY_CATEGORY_AXIS_LABEL_EXPRESSION = "categoryAxisLabelExpression";
public static final String PROPERTY_CATEGORY_AXIS_LABEL_FONT = "categoryAxisLabelFont";
public static final String PROPERTY_CATEGORY_AXIS_LINE_COLOR = "categoryAxisLineColor";
public static final String PROPERTY_CATEGORY_AXIS_TICK_LABEL_COLOR = "categoryAxisTickLabelColor";
public static final String PROPERTY_CATEGORY_AXIS_TICK_LABEL_FONT = "categoryAxisTickLabelFont";
public static final String PROPERTY_CATEGORY_AXIS_TICK_LABEL_MASK = "categoryAxisTickLabelMask";
public static final String PROPERTY_VALUE_AXIS_LABEL_COLOR = "valueAxisLabelColor";
public static final String PROPERTY_VALUE_AXIS_LABEL_EXPRESSION = "valueAxisLabelExpression";
public static final String PROPERTY_VALUE_AXIS_LABEL_FONT = "valueAxisLabelFont";
public static final String PROPERTY_VALUE_AXIS_LINE_COLOR = "valueAxisLineColor";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_COLOR = "valueAxisTickLabelColor";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_FONT = "valueAxisTickLabelFont";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_MASK = "valueAxisTickLabelMask";
public JRDesignAreaPlot(JRChartPlot areaPlot, JRChart chart) {
super(areaPlot, chart);
}
public void setCategoryAxisLabelExpression(JRExpression categoryAxisLabelExpression) {
Object old = this.categoryAxisLabelExpression;
this.categoryAxisLabelExpression = categoryAxisLabelExpression;
getEventSupport().firePropertyChange("categoryAxisLabelExpression", old, this.categoryAxisLabelExpression);
}
public void setCategoryAxisLabelFont(JRFont categoryAxisLabelFont) {
Object old = this.categoryAxisLabelFont;
this.categoryAxisLabelFont = categoryAxisLabelFont;
getEventSupport().firePropertyChange("categoryAxisLabelFont", old, this.categoryAxisLabelFont);
}
public void setCategoryAxisLabelColor(Color categoryAxisLabelColor) {
Object old = this.categoryAxisLabelColor;
this.categoryAxisLabelColor = categoryAxisLabelColor;
getEventSupport().firePropertyChange("categoryAxisLabelColor", old, this.categoryAxisLabelColor);
}
public void setCategoryAxisTickLabelFont(JRFont categoryAxisTickLabelFont) {
Object old = this.categoryAxisTickLabelFont;
this.categoryAxisTickLabelFont = categoryAxisTickLabelFont;
getEventSupport().firePropertyChange("categoryAxisTickLabelFont", old, this.categoryAxisTickLabelFont);
}
public void setCategoryAxisTickLabelColor(Color categoryAxisTickLabelColor) {
Object old = this.categoryAxisTickLabelColor;
this.categoryAxisTickLabelColor = categoryAxisTickLabelColor;
getEventSupport().firePropertyChange("categoryAxisTickLabelColor", old, this.categoryAxisTickLabelColor);
}
public void setCategoryAxisTickLabelMask(String categoryAxisTickLabelMask) {
Object old = this.categoryAxisTickLabelMask;
this.categoryAxisTickLabelMask = categoryAxisTickLabelMask;
getEventSupport().firePropertyChange("categoryAxisTickLabelMask", old, this.categoryAxisTickLabelMask);
}
public void setCategoryAxisLineColor(Color categoryAxisLineColor) {
Object old = this.categoryAxisLineColor;
this.categoryAxisLineColor = categoryAxisLineColor;
getEventSupport().firePropertyChange("categoryAxisLineColor", old, this.categoryAxisLineColor);
}
public void setValueAxisLabelExpression(JRExpression valueAxisLabelExpression) {
Object old = this.valueAxisLabelExpression;
this.valueAxisLabelExpression = valueAxisLabelExpression;
getEventSupport().firePropertyChange("valueAxisLabelExpression", old, this.valueAxisLabelExpression);
}
public void setValueAxisLabelFont(JRFont valueAxisLabelFont) {
Object old = this.valueAxisLabelFont;
this.valueAxisLabelFont = valueAxisLabelFont;
getEventSupport().firePropertyChange("valueAxisLabelFont", old, this.valueAxisLabelFont);
}
public void setValueAxisLabelColor(Color valueAxisLabelColor) {
Object old = this.valueAxisLabelColor;
this.valueAxisLabelColor = valueAxisLabelColor;
getEventSupport().firePropertyChange("valueAxisLabelColor", old, this.valueAxisLabelColor);
}
public void setValueAxisTickLabelFont(JRFont valueAxisTickLabelFont) {
Object old = this.valueAxisTickLabelFont;
this.valueAxisTickLabelFont = valueAxisTickLabelFont;
getEventSupport().firePropertyChange("valueAxisTickLabelFont", old, this.valueAxisTickLabelFont);
}
public void setValueAxisTickLabelColor(Color valueAxisTickLabelColor) {
Object old = this.valueAxisTickLabelColor;
this.valueAxisTickLabelColor = valueAxisTickLabelColor;
getEventSupport().firePropertyChange("valueAxisTickLabelColor", old, this.valueAxisTickLabelColor);
}
public void setValueAxisTickLabelMask(String valueAxisTickLabelMask) {
Object old = this.valueAxisTickLabelMask;
this.valueAxisTickLabelMask = valueAxisTickLabelMask;
getEventSupport().firePropertyChange("valueAxisTickLabelMask", old, this.valueAxisTickLabelMask);
}
public void setValueAxisLineColor(Color valueAxisLineColor) {
Object old = this.valueAxisLineColor;
this.valueAxisLineColor = valueAxisLineColor;
getEventSupport().firePropertyChange("valueAxisLineColor", old, this.valueAxisLineColor);
}
public void setCategoryAxisFormat(JRAxisFormat axisFormat) {
setCategoryAxisLabelFont(axisFormat.getLabelFont());
setCategoryAxisLabelColor(axisFormat.getLabelColor());
setCategoryAxisTickLabelFont(axisFormat.getTickLabelFont());
setCategoryAxisTickLabelColor(axisFormat.getTickLabelColor());
setCategoryAxisTickLabelMask(axisFormat.getTickLabelMask());
setCategoryAxisLineColor(axisFormat.getLineColor());
}
public void setValueAxisFormat(JRAxisFormat axisFormat) {
setValueAxisLabelFont(axisFormat.getLabelFont());
setValueAxisLabelColor(axisFormat.getLabelColor());
setValueAxisTickLabelFont(axisFormat.getTickLabelFont());
setValueAxisTickLabelColor(axisFormat.getTickLabelColor());
setValueAxisTickLabelMask(axisFormat.getTickLabelMask());
setValueAxisLineColor(axisFormat.getLineColor());
}
}

View File

@@ -0,0 +1,147 @@
package net.sf.jasperreports.charts.design;
import java.awt.Color;
import net.sf.jasperreports.charts.base.JRBaseBar3DPlot;
import net.sf.jasperreports.charts.util.JRAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRFont;
public class JRDesignBar3DPlot extends JRBaseBar3DPlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_CATEGORY_AXIS_LABEL_COLOR = "categoryAxisLabelColor";
public static final String PROPERTY_CATEGORY_AXIS_LABEL_EXPRESSION = "categoryAxisLabelExpression";
public static final String PROPERTY_CATEGORY_AXIS_LABEL_FONT = "categoryAxisLabelFont";
public static final String PROPERTY_CATEGORY_AXIS_LINE_COLOR = "categoryAxisLineColor";
public static final String PROPERTY_CATEGORY_AXIS_TICK_LABEL_COLOR = "categoryAxisTickLabelColor";
public static final String PROPERTY_CATEGORY_AXIS_TICK_LABEL_FONT = "categoryAxisTickLabelFont";
public static final String PROPERTY_CATEGORY_AXIS_TICK_LABEL_MASK = "categoryAxisTickLabelMask";
public static final String PROPERTY_VALUE_AXIS_LABEL_COLOR = "valueAxisLabelColor";
public static final String PROPERTY_VALUE_AXIS_LABEL_EXPRESSION = "valueAxisLabelExpression";
public static final String PROPERTY_VALUE_AXIS_LABEL_FONT = "valueAxisLabelFont";
public static final String PROPERTY_VALUE_AXIS_LINE_COLOR = "valueAxisLineColor";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_COLOR = "valueAxisTickLabelColor";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_FONT = "valueAxisTickLabelFont";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_MASK = "valueAxisTickLabelMask";
public JRDesignBar3DPlot(JRChartPlot barPlot, JRChart chart) {
super(barPlot, chart);
}
public void setCategoryAxisLabelExpression(JRExpression categoryAxisLabelExpression) {
Object old = this.categoryAxisLabelExpression;
this.categoryAxisLabelExpression = categoryAxisLabelExpression;
getEventSupport().firePropertyChange("categoryAxisLabelExpression", old, this.categoryAxisLabelExpression);
}
public void setCategoryAxisLabelFont(JRFont categoryAxisLabelFont) {
Object old = this.categoryAxisLabelFont;
this.categoryAxisLabelFont = categoryAxisLabelFont;
getEventSupport().firePropertyChange("categoryAxisLabelFont", old, this.categoryAxisLabelFont);
}
public void setCategoryAxisLabelColor(Color categoryAxisLabelColor) {
Object old = this.categoryAxisLabelColor;
this.categoryAxisLabelColor = categoryAxisLabelColor;
getEventSupport().firePropertyChange("categoryAxisLabelColor", old, this.categoryAxisLabelColor);
}
public void setCategoryAxisTickLabelFont(JRFont categoryAxisTickLabelFont) {
Object old = this.categoryAxisTickLabelFont;
this.categoryAxisTickLabelFont = categoryAxisTickLabelFont;
getEventSupport().firePropertyChange("categoryAxisTickLabelFont", old, this.categoryAxisTickLabelFont);
}
public void setCategoryAxisTickLabelColor(Color categoryAxisTickLabelColor) {
Object old = this.categoryAxisTickLabelColor;
this.categoryAxisTickLabelColor = categoryAxisTickLabelColor;
getEventSupport().firePropertyChange("categoryAxisTickLabelColor", old, this.categoryAxisTickLabelColor);
}
public void setCategoryAxisTickLabelMask(String categoryAxisTickLabelMask) {
Object old = this.categoryAxisTickLabelMask;
this.categoryAxisTickLabelMask = categoryAxisTickLabelMask;
getEventSupport().firePropertyChange("categoryAxisTickLabelMask", old, this.categoryAxisTickLabelMask);
}
public void setCategoryAxisLineColor(Color categoryAxisLineColor) {
Object old = this.categoryAxisLineColor;
this.categoryAxisLineColor = categoryAxisLineColor;
getEventSupport().firePropertyChange("categoryAxisLineColor", old, this.categoryAxisLineColor);
}
public void setValueAxisLabelExpression(JRExpression valueAxisLabelExpression) {
Object old = this.valueAxisLabelExpression;
this.valueAxisLabelExpression = valueAxisLabelExpression;
getEventSupport().firePropertyChange("valueAxisLabelExpression", old, this.valueAxisLabelExpression);
}
public void setValueAxisLabelFont(JRFont valueAxisLabelFont) {
Object old = this.valueAxisLabelFont;
this.valueAxisLabelFont = valueAxisLabelFont;
getEventSupport().firePropertyChange("valueAxisLabelFont", old, this.valueAxisLabelFont);
}
public void setValueAxisLabelColor(Color valueAxisLabelColor) {
Object old = this.valueAxisLabelColor;
this.valueAxisLabelColor = valueAxisLabelColor;
getEventSupport().firePropertyChange("valueAxisLabelColor", old, this.valueAxisLabelColor);
}
public void setValueAxisTickLabelFont(JRFont valueAxisTickLabelFont) {
Object old = this.valueAxisTickLabelFont;
this.valueAxisTickLabelFont = valueAxisTickLabelFont;
getEventSupport().firePropertyChange("valueAxisTickLabelFont", old, this.valueAxisTickLabelFont);
}
public void setValueAxisTickLabelColor(Color valueAxisTickLabelColor) {
Object old = this.valueAxisTickLabelColor;
this.valueAxisTickLabelColor = valueAxisTickLabelColor;
getEventSupport().firePropertyChange("valueAxisTickLabelColor", old, this.valueAxisTickLabelColor);
}
public void setValueAxisTickLabelMask(String valueAxisTickLabelMask) {
Object old = this.valueAxisTickLabelMask;
this.valueAxisTickLabelMask = valueAxisTickLabelMask;
getEventSupport().firePropertyChange("valueAxisTickLabelMask", old, this.valueAxisTickLabelMask);
}
public void setValueAxisLineColor(Color valueAxisLineColor) {
Object old = this.valueAxisLineColor;
this.valueAxisLineColor = valueAxisLineColor;
getEventSupport().firePropertyChange("valueAxisLineColor", old, this.valueAxisLineColor);
}
public void setCategoryAxisFormat(JRAxisFormat axisFormat) {
setCategoryAxisLabelFont(axisFormat.getLabelFont());
setCategoryAxisLabelColor(axisFormat.getLabelColor());
setCategoryAxisTickLabelFont(axisFormat.getTickLabelFont());
setCategoryAxisTickLabelColor(axisFormat.getTickLabelColor());
setCategoryAxisTickLabelMask(axisFormat.getTickLabelMask());
setCategoryAxisLineColor(axisFormat.getLineColor());
}
public void setValueAxisFormat(JRAxisFormat axisFormat) {
setValueAxisLabelFont(axisFormat.getLabelFont());
setValueAxisLabelColor(axisFormat.getLabelColor());
setValueAxisTickLabelFont(axisFormat.getTickLabelFont());
setValueAxisTickLabelColor(axisFormat.getTickLabelColor());
setValueAxisTickLabelMask(axisFormat.getTickLabelMask());
setValueAxisLineColor(axisFormat.getLineColor());
}
}

View File

@@ -0,0 +1,147 @@
package net.sf.jasperreports.charts.design;
import java.awt.Color;
import net.sf.jasperreports.charts.base.JRBaseBarPlot;
import net.sf.jasperreports.charts.util.JRAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRFont;
public class JRDesignBarPlot extends JRBaseBarPlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_CATEGORY_AXIS_LABEL_COLOR = "categoryAxisLabelColor";
public static final String PROPERTY_CATEGORY_AXIS_LABEL_EXPRESSION = "categoryAxisLabelExpression";
public static final String PROPERTY_CATEGORY_AXIS_LABEL_FONT = "categoryAxisLabelFont";
public static final String PROPERTY_CATEGORY_AXIS_LINE_COLOR = "categoryAxisLineColor";
public static final String PROPERTY_CATEGORY_AXIS_TICK_LABEL_COLOR = "categoryAxisTickLabelColor";
public static final String PROPERTY_CATEGORY_AXIS_TICK_LABEL_FONT = "categoryAxisTickLabelFont";
public static final String PROPERTY_CATEGORY_AXIS_TICK_LABEL_MASK = "categoryAxisTickLabelMask";
public static final String PROPERTY_VALUE_AXIS_LABEL_COLOR = "valueAxisLabelColor";
public static final String PROPERTY_VALUE_AXIS_LABEL_EXPRESSION = "valueAxisLabelExpression";
public static final String PROPERTY_VALUE_AXIS_LABEL_FONT = "valueAxisLabelFont";
public static final String PROPERTY_VALUE_AXIS_LINE_COLOR = "valueAxisLineColor";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_COLOR = "valueAxisTickLabelColor";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_FONT = "valueAxisTickLabelFont";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_MASK = "valueAxisTickLabelMask";
public JRDesignBarPlot(JRChartPlot barPlot, JRChart chart) {
super(barPlot, chart);
}
public void setCategoryAxisLabelExpression(JRExpression categoryAxisLabelExpression) {
Object old = this.categoryAxisLabelExpression;
this.categoryAxisLabelExpression = categoryAxisLabelExpression;
getEventSupport().firePropertyChange("categoryAxisLabelExpression", old, this.categoryAxisLabelExpression);
}
public void setCategoryAxisLabelFont(JRFont categoryAxisLabelFont) {
Object old = this.categoryAxisLabelFont;
this.categoryAxisLabelFont = categoryAxisLabelFont;
getEventSupport().firePropertyChange("categoryAxisLabelFont", old, this.categoryAxisLabelFont);
}
public void setCategoryAxisLabelColor(Color categoryAxisLabelColor) {
Object old = this.categoryAxisLabelColor;
this.categoryAxisLabelColor = categoryAxisLabelColor;
getEventSupport().firePropertyChange("categoryAxisLabelColor", old, this.categoryAxisLabelColor);
}
public void setCategoryAxisTickLabelFont(JRFont categoryAxisTickLabelFont) {
Object old = this.categoryAxisTickLabelFont;
this.categoryAxisTickLabelFont = categoryAxisTickLabelFont;
getEventSupport().firePropertyChange("categoryAxisTickLabelFont", old, this.categoryAxisTickLabelFont);
}
public void setCategoryAxisTickLabelColor(Color categoryAxisTickLabelColor) {
Object old = this.categoryAxisTickLabelColor;
this.categoryAxisTickLabelColor = categoryAxisTickLabelColor;
getEventSupport().firePropertyChange("categoryAxisTickLabelColor", old, this.categoryAxisTickLabelColor);
}
public void setCategoryAxisTickLabelMask(String categoryAxisTickLabelMask) {
Object old = this.categoryAxisTickLabelMask;
this.categoryAxisTickLabelMask = categoryAxisTickLabelMask;
getEventSupport().firePropertyChange("categoryAxisTickLabelMask", old, this.categoryAxisTickLabelMask);
}
public void setCategoryAxisLineColor(Color categoryAxisLineColor) {
Object old = this.categoryAxisLineColor;
this.categoryAxisLineColor = categoryAxisLineColor;
getEventSupport().firePropertyChange("categoryAxisLineColor", old, this.categoryAxisLineColor);
}
public void setValueAxisLabelExpression(JRExpression valueAxisLabelExpression) {
Object old = this.valueAxisLabelExpression;
this.valueAxisLabelExpression = valueAxisLabelExpression;
getEventSupport().firePropertyChange("valueAxisLabelExpression", old, this.valueAxisLabelExpression);
}
public void setValueAxisLabelFont(JRFont valueAxisLabelFont) {
Object old = this.valueAxisLabelFont;
this.valueAxisLabelFont = valueAxisLabelFont;
getEventSupport().firePropertyChange("valueAxisLabelFont", old, this.valueAxisLabelFont);
}
public void setValueAxisLabelColor(Color valueAxisLabelColor) {
Object old = this.valueAxisLabelColor;
this.valueAxisLabelColor = valueAxisLabelColor;
getEventSupport().firePropertyChange("valueAxisLabelColor", old, this.valueAxisLabelColor);
}
public void setValueAxisTickLabelFont(JRFont valueAxisTickLabelFont) {
Object old = this.valueAxisTickLabelFont;
this.valueAxisTickLabelFont = valueAxisTickLabelFont;
getEventSupport().firePropertyChange("valueAxisTickLabelFont", old, this.valueAxisTickLabelFont);
}
public void setValueAxisTickLabelColor(Color valueAxisTickLabelColor) {
Object old = this.valueAxisTickLabelColor;
this.valueAxisTickLabelColor = valueAxisTickLabelColor;
getEventSupport().firePropertyChange("valueAxisTickLabelColor", old, this.valueAxisTickLabelColor);
}
public void setValueAxisTickLabelMask(String valueAxisTickLabelMask) {
Object old = this.valueAxisTickLabelMask;
this.valueAxisTickLabelMask = valueAxisTickLabelMask;
getEventSupport().firePropertyChange("valueAxisTickLabelMask", old, this.valueAxisTickLabelMask);
}
public void setValueAxisLineColor(Color valueAxisLineColor) {
Object old = this.valueAxisLineColor;
this.valueAxisLineColor = valueAxisLineColor;
getEventSupport().firePropertyChange("valueAxisLineColor", old, this.valueAxisLineColor);
}
public void setCategoryAxisFormat(JRAxisFormat axisFormat) {
setCategoryAxisLabelFont(axisFormat.getLabelFont());
setCategoryAxisLabelColor(axisFormat.getLabelColor());
setCategoryAxisTickLabelFont(axisFormat.getTickLabelFont());
setCategoryAxisTickLabelColor(axisFormat.getTickLabelColor());
setCategoryAxisTickLabelMask(axisFormat.getTickLabelMask());
setCategoryAxisLineColor(axisFormat.getLineColor());
}
public void setValueAxisFormat(JRAxisFormat axisFormat) {
setValueAxisLabelFont(axisFormat.getLabelFont());
setValueAxisLabelColor(axisFormat.getLabelColor());
setValueAxisTickLabelFont(axisFormat.getTickLabelFont());
setValueAxisTickLabelColor(axisFormat.getTickLabelColor());
setValueAxisTickLabelMask(axisFormat.getTickLabelMask());
setValueAxisLineColor(axisFormat.getLineColor());
}
}

View File

@@ -0,0 +1,147 @@
package net.sf.jasperreports.charts.design;
import java.awt.Color;
import net.sf.jasperreports.charts.base.JRBaseBubblePlot;
import net.sf.jasperreports.charts.util.JRAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRFont;
public class JRDesignBubblePlot extends JRBaseBubblePlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_X_AXIS_LABEL_COLOR = "xAxisLabelColor";
public static final String PROPERTY_X_AXIS_LABEL_EXPRESSION = "xAxisLabelExpression";
public static final String PROPERTY_X_AXIS_LABEL_FONT = "xAxisLabelFont";
public static final String PROPERTY_X_AXIS_LINE_COLOR = "xAxisLineColor";
public static final String PROPERTY_X_AXIS_TICK_LABEL_COLOR = "xAxisTickLabelColor";
public static final String PROPERTY_X_AXIS_TICK_LABEL_FONT = "xAxisTickLabelFont";
public static final String PROPERTY_X_AXIS_TICK_LABEL_MASK = "xAxisTickLabelMask";
public static final String PROPERTY_Y_AXIS_LABEL_COLOR = "yAxisLabelColor";
public static final String PROPERTY_Y_AXIS_LABEL_EXPRESSION = "yAxisLabelExpression";
public static final String PROPERTY_Y_AXIS_LABEL_FONT = "yAxisLabelFont";
public static final String PROPERTY_Y_AXIS_LINE_COLOR = "yAxisLineColor";
public static final String PROPERTY_Y_AXIS_TICK_LABEL_COLOR = "yAxisTickLabelColor";
public static final String PROPERTY_Y_AXIS_TICK_LABEL_FONT = "yAxisTickLabelFont";
public static final String PROPERTY_Y_AXIS_TICK_LABEL_MASK = "yAxisTickLabelMask";
public JRDesignBubblePlot(JRChartPlot bubblePlot, JRChart chart) {
super(bubblePlot, chart);
}
public void setXAxisLabelExpression(JRExpression xAxisLabelExpression) {
Object old = this.xAxisLabelExpression;
this.xAxisLabelExpression = xAxisLabelExpression;
getEventSupport().firePropertyChange("xAxisLabelExpression", old, this.xAxisLabelExpression);
}
public void setXAxisLabelFont(JRFont xAxisLabelFont) {
Object old = this.xAxisLabelFont;
this.xAxisLabelFont = xAxisLabelFont;
getEventSupport().firePropertyChange("xAxisLabelFont", old, this.xAxisLabelFont);
}
public void setXAxisLabelColor(Color xAxisLabelColor) {
Object old = this.xAxisLabelColor;
this.xAxisLabelColor = xAxisLabelColor;
getEventSupport().firePropertyChange("xAxisLabelColor", old, this.xAxisLabelColor);
}
public void setXAxisTickLabelFont(JRFont xAxisTickLabelFont) {
Object old = this.xAxisTickLabelFont;
this.xAxisTickLabelFont = xAxisTickLabelFont;
getEventSupport().firePropertyChange("xAxisTickLabelFont", old, this.xAxisTickLabelFont);
}
public void setXAxisTickLabelColor(Color xAxisTickLabelColor) {
Object old = this.xAxisTickLabelColor;
this.xAxisTickLabelColor = xAxisTickLabelColor;
getEventSupport().firePropertyChange("xAxisTickLabelColor", old, this.xAxisTickLabelColor);
}
public void setXAxisTickLabelMask(String xAxisTickLabelMask) {
Object old = this.xAxisTickLabelMask;
this.xAxisTickLabelMask = xAxisTickLabelMask;
getEventSupport().firePropertyChange("xAxisTickLabelMask", old, this.xAxisTickLabelMask);
}
public void setXAxisLineColor(Color xAxisLineColor) {
Object old = this.xAxisLineColor;
this.xAxisLineColor = xAxisLineColor;
getEventSupport().firePropertyChange("xAxisLineColor", old, this.xAxisLineColor);
}
public void setYAxisLabelExpression(JRExpression yAxisLabelExpression) {
Object old = this.yAxisLabelExpression;
this.yAxisLabelExpression = yAxisLabelExpression;
getEventSupport().firePropertyChange("yAxisLabelExpression", old, this.yAxisLabelExpression);
}
public void setYAxisLabelFont(JRFont yAxisLabelFont) {
Object old = this.yAxisLabelFont;
this.yAxisLabelFont = yAxisLabelFont;
getEventSupport().firePropertyChange("yAxisLabelFont", old, this.yAxisLabelFont);
}
public void setYAxisLabelColor(Color yAxisLabelColor) {
Object old = this.yAxisLabelColor;
this.yAxisLabelColor = yAxisLabelColor;
getEventSupport().firePropertyChange("yAxisLabelColor", old, this.yAxisLabelColor);
}
public void setYAxisTickLabelFont(JRFont yAxisTickLabelFont) {
Object old = this.yAxisTickLabelFont;
this.yAxisTickLabelFont = yAxisTickLabelFont;
getEventSupport().firePropertyChange("yAxisTickLabelFont", old, this.yAxisTickLabelFont);
}
public void setYAxisTickLabelColor(Color yAxisTickLabelColor) {
Object old = this.yAxisTickLabelColor;
this.yAxisTickLabelColor = yAxisTickLabelColor;
getEventSupport().firePropertyChange("yAxisTickLabelColor", old, this.yAxisTickLabelColor);
}
public void setYAxisTickLabelMask(String yAxisTickLabelMask) {
Object old = this.yAxisTickLabelMask;
this.yAxisTickLabelMask = yAxisTickLabelMask;
getEventSupport().firePropertyChange("yAxisTickLabelMask", old, this.yAxisTickLabelMask);
}
public void setYAxisLineColor(Color yAxisLineColor) {
Object old = this.yAxisLineColor;
this.yAxisLineColor = yAxisLineColor;
getEventSupport().firePropertyChange("yAxisLineColor", old, this.yAxisLineColor);
}
public void setXAxisFormat(JRAxisFormat axisFormat) {
setXAxisLabelColor(axisFormat.getLabelColor());
setXAxisLabelFont(axisFormat.getLabelFont());
setXAxisTickLabelFont(axisFormat.getTickLabelFont());
setXAxisTickLabelColor(axisFormat.getTickLabelColor());
setXAxisTickLabelMask(axisFormat.getTickLabelMask());
setXAxisLineColor(axisFormat.getLineColor());
}
public void setYAxisFormat(JRAxisFormat axisFormat) {
setYAxisLabelColor(axisFormat.getLabelColor());
setYAxisLabelFont(axisFormat.getLabelFont());
setYAxisTickLabelFont(axisFormat.getTickLabelFont());
setYAxisTickLabelColor(axisFormat.getTickLabelColor());
setYAxisTickLabelMask(axisFormat.getTickLabelMask());
setYAxisLineColor(axisFormat.getLineColor());
}
}

View File

@@ -0,0 +1,147 @@
package net.sf.jasperreports.charts.design;
import java.awt.Color;
import net.sf.jasperreports.charts.base.JRBaseCandlestickPlot;
import net.sf.jasperreports.charts.util.JRAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRFont;
public class JRDesignCandlestickPlot extends JRBaseCandlestickPlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_TIME_AXIS_LABEL_COLOR = "timeAxisLabelColor";
public static final String PROPERTY_TIME_AXIS_LABEL_EXPRESSION = "timeAxisLabelExpression";
public static final String PROPERTY_TIME_AXIS_LABEL_FONT = "timeAxisLabelFont";
public static final String PROPERTY_TIME_AXIS_LINE_COLOR = "timeAxisLineColor";
public static final String PROPERTY_TIME_AXIS_TICK_LABEL_COLOR = "timeAxisTickLabelColor";
public static final String PROPERTY_TIME_AXIS_TICK_LABEL_FONT = "timeAxisTickLabelFont";
public static final String PROPERTY_TIME_AXIS_TICK_LABEL_MASK = "timeAxisTickLabelMask";
public static final String PROPERTY_VALUE_AXIS_LABEL_COLOR = "valueAxisLabelColor";
public static final String PROPERTY_VALUE_AXIS_LABEL_EXPRESSION = "valueAxisLabelExpression";
public static final String PROPERTY_VALUE_AXIS_LABEL_FONT = "valueAxisLabelFont";
public static final String PROPERTY_VALUE_AXIS_LINE_COLOR = "valueAxisLineColor";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_COLOR = "valueAxisTickLabelColor";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_FONT = "valueAxisTickLabelFont";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_MASK = "valueAxisTickLabelMask";
public JRDesignCandlestickPlot(JRChartPlot candlestickPlot, JRChart chart) {
super(candlestickPlot, chart);
}
public void setTimeAxisLabelExpression(JRExpression timeAxisLabelExpression) {
Object old = this.timeAxisLabelExpression;
this.timeAxisLabelExpression = timeAxisLabelExpression;
getEventSupport().firePropertyChange("timeAxisLabelExpression", old, this.timeAxisLabelExpression);
}
public void setTimeAxisLabelFont(JRFont timeAxisLabelFont) {
Object old = this.timeAxisLabelFont;
this.timeAxisLabelFont = timeAxisLabelFont;
getEventSupport().firePropertyChange("timeAxisLabelFont", old, this.timeAxisLabelFont);
}
public void setTimeAxisLabelColor(Color timeAxisLabelColor) {
Object old = this.timeAxisLabelColor;
this.timeAxisLabelColor = timeAxisLabelColor;
getEventSupport().firePropertyChange("timeAxisLabelColor", old, this.timeAxisLabelColor);
}
public void setTimeAxisTickLabelFont(JRFont timeAxisTickLabelFont) {
Object old = this.timeAxisTickLabelFont;
this.timeAxisTickLabelFont = timeAxisTickLabelFont;
getEventSupport().firePropertyChange("timeAxisTickLabelFont", old, this.timeAxisTickLabelFont);
}
public void setTimeAxisTickLabelColor(Color timeAxisTickLabelColor) {
Object old = this.timeAxisTickLabelColor;
this.timeAxisTickLabelColor = timeAxisTickLabelColor;
getEventSupport().firePropertyChange("timeAxisTickLabelColor", old, this.timeAxisTickLabelColor);
}
public void setTimeAxisTickLabelMask(String timeAxisTickLabelMask) {
Object old = this.timeAxisTickLabelMask;
this.timeAxisTickLabelMask = timeAxisTickLabelMask;
getEventSupport().firePropertyChange("timeAxisTickLabelMask", old, this.timeAxisTickLabelMask);
}
public void setTimeAxisLineColor(Color timeAxisLineColor) {
Object old = this.timeAxisLineColor;
this.timeAxisLineColor = timeAxisLineColor;
getEventSupport().firePropertyChange("timeAxisLineColor", old, this.timeAxisLineColor);
}
public void setValueAxisLabelExpression(JRExpression valueAxisLabelExpression) {
Object old = this.valueAxisLabelExpression;
this.valueAxisLabelExpression = valueAxisLabelExpression;
getEventSupport().firePropertyChange("valueAxisLabelExpression", old, this.valueAxisLabelExpression);
}
public void setValueAxisLabelFont(JRFont valueAxisLabelFont) {
Object old = this.valueAxisLabelFont;
this.valueAxisLabelFont = valueAxisLabelFont;
getEventSupport().firePropertyChange("valueAxisLabelFont", old, this.valueAxisLabelFont);
}
public void setValueAxisLabelColor(Color valueAxisLabelColor) {
Object old = this.valueAxisLabelColor;
this.valueAxisLabelColor = valueAxisLabelColor;
getEventSupport().firePropertyChange("valueAxisLabelColor", old, this.valueAxisLabelColor);
}
public void setValueAxisTickLabelFont(JRFont valueAxisTickLabelFont) {
Object old = this.valueAxisTickLabelFont;
this.valueAxisTickLabelFont = valueAxisTickLabelFont;
getEventSupport().firePropertyChange("valueAxisTickLabelFont", old, this.valueAxisTickLabelFont);
}
public void setValueAxisTickLabelColor(Color valueAxisTickLabelColor) {
Object old = this.valueAxisTickLabelColor;
this.valueAxisTickLabelColor = valueAxisTickLabelColor;
getEventSupport().firePropertyChange("valueAxisTickLabelColor", old, this.valueAxisTickLabelColor);
}
public void setValueAxisTickLabelMask(String valueAxisTickLabelMask) {
Object old = this.valueAxisTickLabelMask;
this.valueAxisTickLabelMask = valueAxisTickLabelMask;
getEventSupport().firePropertyChange("valueAxisTickLabelMask", old, this.valueAxisTickLabelMask);
}
public void setValueAxisLineColor(Color valueAxisLineColor) {
Object old = this.valueAxisLineColor;
this.valueAxisLineColor = valueAxisLineColor;
getEventSupport().firePropertyChange("valueAxisLineColor", old, this.valueAxisLineColor);
}
public void setTimeAxisFormat(JRAxisFormat axisFormat) {
setTimeAxisLabelFont(axisFormat.getLabelFont());
setTimeAxisLabelColor(axisFormat.getLabelColor());
setTimeAxisTickLabelFont(axisFormat.getTickLabelFont());
setTimeAxisTickLabelColor(axisFormat.getTickLabelColor());
setTimeAxisTickLabelMask(axisFormat.getTickLabelMask());
setTimeAxisLineColor(axisFormat.getLineColor());
}
public void setValueAxisFormat(JRAxisFormat axisFormat) {
setValueAxisLabelFont(axisFormat.getLabelFont());
setValueAxisLabelColor(axisFormat.getLabelColor());
setValueAxisTickLabelFont(axisFormat.getTickLabelFont());
setValueAxisTickLabelColor(axisFormat.getTickLabelColor());
setValueAxisTickLabelMask(axisFormat.getTickLabelMask());
setValueAxisLineColor(axisFormat.getLineColor());
}
}

View File

@@ -0,0 +1,70 @@
package net.sf.jasperreports.charts.design;
import java.util.ArrayList;
import java.util.List;
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.design.JRDesignChartDataset;
import net.sf.jasperreports.engine.design.JRVerifier;
public class JRDesignCategoryDataset extends JRDesignChartDataset implements JRCategoryDataset {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_CATEGORY_SERIES = "categorySeries";
private List categorySeriesList = new ArrayList();
public JRDesignCategoryDataset(JRChartDataset dataset) {
super(dataset);
}
public JRCategorySeries[] getSeries() {
JRCategorySeries[] categorySeriesArray = new JRCategorySeries[this.categorySeriesList.size()];
this.categorySeriesList.toArray((Object[])categorySeriesArray);
return categorySeriesArray;
}
public List getSeriesList() {
return this.categorySeriesList;
}
public void addCategorySeries(JRCategorySeries categorySeries) {
this.categorySeriesList.add(categorySeries);
getEventSupport().fireCollectionElementAddedEvent("categorySeries", categorySeries, this.categorySeriesList.size() - 1);
}
public JRCategorySeries removeCategorySeries(JRCategorySeries categorySeries) {
if (categorySeries != null) {
int idx = this.categorySeriesList.indexOf(categorySeries);
if (idx >= 0) {
this.categorySeriesList.remove(idx);
getEventSupport().fireCollectionElementRemovedEvent("categorySeries", categorySeries, idx);
}
}
return 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() {
JRDesignCategoryDataset clone = (JRDesignCategoryDataset)super.clone();
if (this.categorySeriesList != null) {
clone.categorySeriesList = new ArrayList(this.categorySeriesList.size());
for (int i = 0; i < this.categorySeriesList.size(); i++)
clone.categorySeriesList.add(((JRCategorySeries)this.categorySeriesList.get(i)).clone());
}
return clone;
}
}

View File

@@ -0,0 +1,162 @@
package net.sf.jasperreports.charts.design;
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.design.JRDesignChartDataset;
import net.sf.jasperreports.engine.design.JRVerifier;
public class JRDesignHighLowDataset extends JRDesignChartDataset implements JRHighLowDataset {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_CLOSE_EXPRESSION = "closeExpression";
public static final String PROPERTY_DATE_EXPRESSION = "dateExpression";
public static final String PROPERTY_HIGH_EXPRESSION = "highExpression";
public static final String PROPERTY_ITEM_HYPERLINK = "itemHyperlink";
public static final String PROPERTY_LOW_EXPRESSION = "lowExpression";
public static final String PROPERTY_OPEN_EXPRESSION = "openExpression";
public static final String PROPERTY_SERIES_EXPRESSION = "seriesExpression";
public static final String PROPERTY_VOLUME_EXPRESSION = "volumeExpression";
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 JRDesignHighLowDataset(JRChartDataset dataset) {
super(dataset);
}
public JRExpression getSeriesExpression() {
return this.seriesExpression;
}
public void setSeriesExpression(JRExpression seriesExpression) {
Object old = this.seriesExpression;
this.seriesExpression = seriesExpression;
getEventSupport().firePropertyChange("seriesExpression", old, this.seriesExpression);
}
public JRExpression getDateExpression() {
return this.dateExpression;
}
public void setDateExpression(JRExpression dateExpression) {
Object old = this.dateExpression;
this.dateExpression = dateExpression;
getEventSupport().firePropertyChange("dateExpression", old, this.dateExpression);
}
public JRExpression getHighExpression() {
return this.highExpression;
}
public void setHighExpression(JRExpression highExpression) {
Object old = this.highExpression;
this.highExpression = highExpression;
getEventSupport().firePropertyChange("highExpression", old, this.highExpression);
}
public JRExpression getLowExpression() {
return this.lowExpression;
}
public void setLowExpression(JRExpression lowExpression) {
Object old = this.lowExpression;
this.lowExpression = lowExpression;
getEventSupport().firePropertyChange("lowExpression", old, this.lowExpression);
}
public JRExpression getOpenExpression() {
return this.openExpression;
}
public void setOpenExpression(JRExpression openExpression) {
Object old = this.openExpression;
this.openExpression = openExpression;
getEventSupport().firePropertyChange("openExpression", old, this.openExpression);
}
public JRExpression getCloseExpression() {
return this.closeExpression;
}
public void setCloseExpression(JRExpression closeExpression) {
Object old = this.closeExpression;
this.closeExpression = closeExpression;
getEventSupport().firePropertyChange("closeExpression", old, this.closeExpression);
}
public JRExpression getVolumeExpression() {
return this.volumeExpression;
}
public void setVolumeExpression(JRExpression volumeExpression) {
Object old = this.volumeExpression;
this.volumeExpression = volumeExpression;
getEventSupport().firePropertyChange("volumeExpression", old, this.volumeExpression);
}
public byte getDatasetType() {
return 7;
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public JRHyperlink getItemHyperlink() {
return this.itemHyperlink;
}
public void setItemHyperlink(JRHyperlink itemHyperlink) {
Object old = this.itemHyperlink;
this.itemHyperlink = itemHyperlink;
getEventSupport().firePropertyChange("itemHyperlink", old, this.itemHyperlink);
}
public void validate(JRVerifier verifier) {
verifier.verify(this);
}
public Object clone() {
JRDesignHighLowDataset clone = (JRDesignHighLowDataset)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,147 @@
package net.sf.jasperreports.charts.design;
import java.awt.Color;
import net.sf.jasperreports.charts.base.JRBaseHighLowPlot;
import net.sf.jasperreports.charts.util.JRAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRFont;
public class JRDesignHighLowPlot extends JRBaseHighLowPlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_TIME_AXIS_LABEL_COLOR = "timeAxisLabelColor";
public static final String PROPERTY_TIME_AXIS_LABEL_EXPRESSION = "timeAxisLabelExpression";
public static final String PROPERTY_TIME_AXIS_LABEL_FONT = "timeAxisLabelFont";
public static final String PROPERTY_TIME_AXIS_LINE_COLOR = "timeAxisLineColor";
public static final String PROPERTY_TIME_AXIS_TICK_LABEL_COLOR = "timeAxisTickLabelColor";
public static final String PROPERTY_TIME_AXIS_TICK_LABEL_FONT = "timeAxisTickLabelFont";
public static final String PROPERTY_TIME_AXIS_TICK_LABEL_MASK = "timeAxisTickLabelMask";
public static final String PROPERTY_VALUE_AXIS_LABEL_COLOR = "valueAxisLabelColor";
public static final String PROPERTY_VALUE_AXIS_LABEL_EXPRESSION = "valueAxisLabelExpression";
public static final String PROPERTY_VALUE_AXIS_LABEL_FONT = "valueAxisLabelFont";
public static final String PROPERTY_VALUE_AXIS_LINE_COLOR = "valueAxisLineColor";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_COLOR = "valueAxisTickLabelColor";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_FONT = "valueAxisTickLabelFont";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_MASK = "valueAxisTickLabelMask";
public JRDesignHighLowPlot(JRChartPlot highLowPlot, JRChart chart) {
super(highLowPlot, chart);
}
public void setTimeAxisLabelExpression(JRExpression timeAxisLabelExpression) {
Object old = this.timeAxisLabelExpression;
this.timeAxisLabelExpression = timeAxisLabelExpression;
getEventSupport().firePropertyChange("timeAxisLabelExpression", old, this.timeAxisLabelExpression);
}
public void setTimeAxisLabelFont(JRFont timeAxisLabelFont) {
Object old = this.timeAxisLabelFont;
this.timeAxisLabelFont = timeAxisLabelFont;
getEventSupport().firePropertyChange("timeAxisLabelFont", old, this.timeAxisLabelFont);
}
public void setTimeAxisLabelColor(Color timeAxisLabelColor) {
Object old = this.timeAxisLabelColor;
this.timeAxisLabelColor = timeAxisLabelColor;
getEventSupport().firePropertyChange("timeAxisLabelColor", old, this.timeAxisLabelColor);
}
public void setTimeAxisTickLabelFont(JRFont timeAxisTickLabelFont) {
Object old = this.timeAxisTickLabelFont;
this.timeAxisTickLabelFont = timeAxisTickLabelFont;
getEventSupport().firePropertyChange("timeAxisTickLabelFont", old, this.timeAxisTickLabelFont);
}
public void setTimeAxisTickLabelColor(Color timeAxisTickLabelColor) {
Object old = this.timeAxisTickLabelColor;
this.timeAxisTickLabelColor = timeAxisTickLabelColor;
getEventSupport().firePropertyChange("timeAxisTickLabelColor", old, this.timeAxisTickLabelColor);
}
public void setTimeAxisTickLabelMask(String timeAxisTickLabelMask) {
Object old = this.timeAxisTickLabelMask;
this.timeAxisTickLabelMask = timeAxisTickLabelMask;
getEventSupport().firePropertyChange("timeAxisTickLabelMask", old, this.timeAxisTickLabelMask);
}
public void setTimeAxisLineColor(Color timeAxisLineColor) {
Object old = this.timeAxisLineColor;
this.timeAxisLineColor = timeAxisLineColor;
getEventSupport().firePropertyChange("timeAxisLineColor", old, this.timeAxisLineColor);
}
public void setValueAxisLabelExpression(JRExpression valueAxisLabelExpression) {
Object old = this.valueAxisLabelExpression;
this.valueAxisLabelExpression = valueAxisLabelExpression;
getEventSupport().firePropertyChange("valueAxisLabelExpression", old, this.valueAxisLabelExpression);
}
public void setValueAxisLabelFont(JRFont valueAxisLabelFont) {
Object old = this.valueAxisLabelFont;
this.valueAxisLabelFont = valueAxisLabelFont;
getEventSupport().firePropertyChange("valueAxisLabelFont", old, this.valueAxisLabelFont);
}
public void setValueAxisLabelColor(Color valueAxisLabelColor) {
Object old = this.valueAxisLabelColor;
this.valueAxisLabelColor = valueAxisLabelColor;
getEventSupport().firePropertyChange("valueAxisLabelColor", old, this.valueAxisLabelColor);
}
public void setValueAxisTickLabelFont(JRFont valueAxisTickLabelFont) {
Object old = this.valueAxisTickLabelFont;
this.valueAxisTickLabelFont = valueAxisTickLabelFont;
getEventSupport().firePropertyChange("valueAxisTickLabelFont", old, this.valueAxisTickLabelFont);
}
public void setValueAxisTickLabelColor(Color valueAxisTickLabelColor) {
Object old = this.valueAxisTickLabelColor;
this.valueAxisTickLabelColor = valueAxisTickLabelColor;
getEventSupport().firePropertyChange("valueAxisTickLabelColor", old, this.valueAxisTickLabelColor);
}
public void setValueAxisTickLabelMask(String valueAxisTickLabelMask) {
Object old = this.valueAxisTickLabelMask;
this.valueAxisTickLabelMask = valueAxisTickLabelMask;
getEventSupport().firePropertyChange("valueAxisTickLabelMask", old, this.valueAxisTickLabelMask);
}
public void setValueAxisLineColor(Color valueAxisLineColor) {
Object old = this.valueAxisLineColor;
this.valueAxisLineColor = valueAxisLineColor;
getEventSupport().firePropertyChange("valueAxisLineColor", old, this.valueAxisLineColor);
}
public void setTimeAxisFormat(JRAxisFormat axisFormat) {
setTimeAxisLabelFont(axisFormat.getLabelFont());
setTimeAxisLabelColor(axisFormat.getLabelColor());
setTimeAxisTickLabelFont(axisFormat.getTickLabelFont());
setTimeAxisTickLabelColor(axisFormat.getTickLabelColor());
setTimeAxisTickLabelMask(axisFormat.getTickLabelMask());
setTimeAxisLineColor(axisFormat.getLineColor());
}
public void setValueAxisFormat(JRAxisFormat axisFormat) {
setValueAxisLabelFont(axisFormat.getLabelFont());
setValueAxisLabelColor(axisFormat.getLabelColor());
setValueAxisTickLabelFont(axisFormat.getTickLabelFont());
setValueAxisTickLabelColor(axisFormat.getTickLabelColor());
setValueAxisTickLabelMask(axisFormat.getTickLabelMask());
setValueAxisLineColor(axisFormat.getLineColor());
}
}

View File

@@ -0,0 +1,147 @@
package net.sf.jasperreports.charts.design;
import java.awt.Color;
import net.sf.jasperreports.charts.base.JRBaseLinePlot;
import net.sf.jasperreports.charts.util.JRAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRFont;
public class JRDesignLinePlot extends JRBaseLinePlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_CATEGORY_AXIS_LABEL_COLOR = "categoryAxisLabelColor";
public static final String PROPERTY_CATEGORY_AXIS_LABEL_EXPRESSION = "categoryAxisLabelExpression";
public static final String PROPERTY_CATEGORY_AXIS_LABEL_FONT = "categoryAxisLabelFont";
public static final String PROPERTY_CATEGORY_AXIS_LINE_COLOR = "categoryAxisLineColor";
public static final String PROPERTY_CATEGORY_AXIS_TICK_LABEL_COLOR = "categoryAxisTickLabelColor";
public static final String PROPERTY_CATEGORY_AXIS_TICK_LABEL_FONT = "categoryAxisTickLabelFont";
public static final String PROPERTY_CATEGORY_AXIS_TICK_LABEL_MASK = "categoryAxisTickLabelMask";
public static final String PROPERTY_VALUE_AXIS_LABEL_COLOR = "valueAxisLabelColor";
public static final String PROPERTY_VALUE_AXIS_LABEL_EXPRESSION = "valueAxisLabelExpression";
public static final String PROPERTY_VALUE_AXIS_LABEL_FONT = "valueAxisLabelFont";
public static final String PROPERTY_VALUE_AXIS_LINE_COLOR = "valueAxisLineColor";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_COLOR = "valueAxisTickLabelColor";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_FONT = "valueAxisTickLabelFont";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_MASK = "valueAxisTickLabelMask";
public JRDesignLinePlot(JRChartPlot linePlot, JRChart chart) {
super(linePlot, chart);
}
public void setCategoryAxisLabelExpression(JRExpression categoryAxisLabelExpression) {
Object old = this.categoryAxisLabelExpression;
this.categoryAxisLabelExpression = categoryAxisLabelExpression;
getEventSupport().firePropertyChange("categoryAxisLabelExpression", old, this.categoryAxisLabelExpression);
}
public void setCategoryAxisLabelFont(JRFont categoryAxisLabelFont) {
Object old = this.categoryAxisLabelFont;
this.categoryAxisLabelFont = categoryAxisLabelFont;
getEventSupport().firePropertyChange("categoryAxisLabelFont", old, this.categoryAxisLabelFont);
}
public void setCategoryAxisLabelColor(Color categoryAxisLabelColor) {
Object old = this.categoryAxisLabelColor;
this.categoryAxisLabelColor = categoryAxisLabelColor;
getEventSupport().firePropertyChange("categoryAxisLabelColor", old, this.categoryAxisLabelColor);
}
public void setCategoryAxisTickLabelFont(JRFont categoryAxisTickLabelFont) {
Object old = this.categoryAxisTickLabelFont;
this.categoryAxisTickLabelFont = categoryAxisTickLabelFont;
getEventSupport().firePropertyChange("categoryAxisTickLabelFont", old, this.categoryAxisTickLabelFont);
}
public void setCategoryAxisTickLabelColor(Color categoryAxisTickLabelColor) {
Object old = this.categoryAxisTickLabelColor;
this.categoryAxisTickLabelColor = categoryAxisTickLabelColor;
getEventSupport().firePropertyChange("categoryAxisTickLabelColor", old, this.categoryAxisTickLabelColor);
}
public void setCategoryAxisTickLabelMask(String categoryAxisTickLabelMask) {
Object old = this.categoryAxisTickLabelMask;
this.categoryAxisTickLabelMask = categoryAxisTickLabelMask;
getEventSupport().firePropertyChange("categoryAxisTickLabelMask", old, this.categoryAxisTickLabelMask);
}
public void setCategoryAxisLineColor(Color categoryAxisLineColor) {
Object old = this.categoryAxisLineColor;
this.categoryAxisLineColor = categoryAxisLineColor;
getEventSupport().firePropertyChange("categoryAxisLineColor", old, this.categoryAxisLineColor);
}
public void setValueAxisLabelExpression(JRExpression valueAxisLabelExpression) {
Object old = this.valueAxisLabelExpression;
this.valueAxisLabelExpression = valueAxisLabelExpression;
getEventSupport().firePropertyChange("valueAxisLabelExpression", old, this.valueAxisLabelExpression);
}
public void setValueAxisLabelFont(JRFont valueAxisLabelFont) {
Object old = this.valueAxisLabelFont;
this.valueAxisLabelFont = valueAxisLabelFont;
getEventSupport().firePropertyChange("valueAxisLabelFont", old, this.valueAxisLabelFont);
}
public void setValueAxisLabelColor(Color valueAxisLabelColor) {
Object old = this.valueAxisLabelColor;
this.valueAxisLabelColor = valueAxisLabelColor;
getEventSupport().firePropertyChange("valueAxisLabelColor", old, this.valueAxisLabelColor);
}
public void setValueAxisTickLabelFont(JRFont valueAxisTickLabelFont) {
Object old = this.valueAxisTickLabelFont;
this.valueAxisTickLabelFont = valueAxisTickLabelFont;
getEventSupport().firePropertyChange("valueAxisTickLabelFont", old, this.valueAxisTickLabelFont);
}
public void setValueAxisTickLabelColor(Color valueAxisTickLabelColor) {
Object old = this.valueAxisTickLabelColor;
this.valueAxisTickLabelColor = valueAxisTickLabelColor;
getEventSupport().firePropertyChange("valueAxisTickLabelColor", old, this.valueAxisTickLabelColor);
}
public void setValueAxisTickLabelMask(String valueAxisTickLabelMask) {
Object old = this.valueAxisTickLabelMask;
this.valueAxisTickLabelMask = valueAxisTickLabelMask;
getEventSupport().firePropertyChange("valueAxisTickLabelMask", old, this.valueAxisTickLabelMask);
}
public void setValueAxisLineColor(Color valueAxisLineColor) {
Object old = this.valueAxisLineColor;
this.valueAxisLineColor = valueAxisLineColor;
getEventSupport().firePropertyChange("valueAxisLineColor", old, this.valueAxisLineColor);
}
public void setCategoryAxisFormat(JRAxisFormat axisFormat) {
setCategoryAxisLabelFont(axisFormat.getLabelFont());
setCategoryAxisLabelColor(axisFormat.getLabelColor());
setCategoryAxisTickLabelFont(axisFormat.getTickLabelFont());
setCategoryAxisTickLabelColor(axisFormat.getTickLabelColor());
setCategoryAxisTickLabelMask(axisFormat.getTickLabelMask());
setCategoryAxisLineColor(axisFormat.getLineColor());
}
public void setValueAxisFormat(JRAxisFormat axisFormat) {
setValueAxisLabelFont(axisFormat.getLabelFont());
setValueAxisLabelColor(axisFormat.getLabelColor());
setValueAxisTickLabelFont(axisFormat.getTickLabelFont());
setValueAxisTickLabelColor(axisFormat.getTickLabelColor());
setValueAxisTickLabelMask(axisFormat.getTickLabelMask());
setValueAxisLineColor(axisFormat.getLineColor());
}
}

View File

@@ -0,0 +1,113 @@
package net.sf.jasperreports.charts.design;
import java.awt.Color;
import java.util.ArrayList;
import java.util.Collection;
import net.sf.jasperreports.charts.JRDataRange;
import net.sf.jasperreports.charts.JRValueDisplay;
import net.sf.jasperreports.charts.base.JRBaseMeterPlot;
import net.sf.jasperreports.charts.util.JRMeterInterval;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRException;
public class JRDesignMeterPlot extends JRBaseMeterPlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_DATA_RANGE = "dataRange";
public static final String PROPERTY_METER_ANGLE = "meterAngle";
public static final String PROPERTY_METER_BACKGROUND_COLOR = "meterBackgroundColor";
public static final String PROPERTY_NEEDLE_COLOR = "needleColor";
public static final String PROPERTY_SHAPE = "shape";
public static final String PROPERTY_TICK_COLOR = "tickColor";
public static final String PROPERTY_TICK_INTERVAL = "tickInterval";
public static final String PROPERTY_UNITS = "units";
public static final String PROPERTY_VALUE_DISPLAY = "valueDisplay";
public static final String PROPERTY_INTERVALS = "intervals";
public JRDesignMeterPlot(JRChartPlot meterPlot, JRChart chart) {
super(meterPlot, chart);
}
public void setDataRange(JRDataRange dataRange) throws JRException {
Object old = this.dataRange;
this.dataRange = dataRange;
getEventSupport().firePropertyChange("dataRange", old, this.dataRange);
}
public void setValueDisplay(JRValueDisplay valueDisplay) {
Object old = this.valueDisplay;
this.valueDisplay = valueDisplay;
getEventSupport().firePropertyChange("valueDisplay", old, this.valueDisplay);
}
public void setShape(byte shape) throws JRException {
if (shape < 0 || shape > 2)
throw new JRException("Unknown shape for MeterPlot");
byte old = this.shape;
this.shape = shape;
getEventSupport().firePropertyChange("shape", old, this.shape);
}
public void addInterval(JRMeterInterval interval) {
this.intervals.add(interval);
getEventSupport().fireCollectionElementAddedEvent("intervals", interval, this.intervals.size() - 1);
}
public void clearIntervals() {
setIntervals((Collection)null);
}
public void setIntervals(Collection intervals) {
Object old = new ArrayList(this.intervals);
this.intervals.clear();
if (intervals != null)
this.intervals.addAll(intervals);
getEventSupport().firePropertyChange("intervals", old, this.intervals);
}
public void setMeterAngle(int meterAngle) {
int old = this.meterAngle;
this.meterAngle = meterAngle;
getEventSupport().firePropertyChange("meterAngle", old, this.meterAngle);
}
public void setUnits(String units) {
Object old = this.units;
this.units = units;
getEventSupport().firePropertyChange("units", old, this.units);
}
public void setTickInterval(double tickInterval) {
double old = this.tickInterval;
this.tickInterval = tickInterval;
getEventSupport().firePropertyChange("tickInterval", old, this.tickInterval);
}
public void setMeterBackgroundColor(Color meterBackgroundColor) {
Object old = this.meterBackgroundColor;
this.meterBackgroundColor = meterBackgroundColor;
getEventSupport().firePropertyChange("meterBackgroundColor", old, this.meterBackgroundColor);
}
public void setNeedleColor(Color needleColor) {
Object old = this.needleColor;
this.needleColor = needleColor;
getEventSupport().firePropertyChange("needleColor", old, this.needleColor);
}
public void setTickColor(Color tickColor) {
Object old = this.tickColor;
this.tickColor = tickColor;
getEventSupport().firePropertyChange("tickColor", old, this.tickColor);
}
}

View File

@@ -0,0 +1,43 @@
package net.sf.jasperreports.charts.design;
import net.sf.jasperreports.charts.JRChartAxis;
import net.sf.jasperreports.charts.base.JRBaseMultiAxisPlot;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.design.JRDesignChart;
public class JRDesignMultiAxisPlot extends JRBaseMultiAxisPlot {
public static final String PROPERTY_CHART = "chart";
public static final String PROPERTY_AXES = "axes";
private JRDesignChart chart = null;
private static final long serialVersionUID = 10200L;
public JRDesignMultiAxisPlot(JRChartPlot multiAxisPlot, JRChart chart) {
super(multiAxisPlot, chart);
}
public void addAxis(JRChartAxis axis) {
this.axes.add(axis);
if (this.axes.size() == 1)
this.chart.setDataset(axis.getChart().getDataset());
getEventSupport().fireCollectionElementAddedEvent("axes", axis, this.axes.size() - 1);
}
public void clearAxes() {
this.axes.clear();
this.chart.setDataset(null);
}
public JRChart getChart() {
return (JRChart)this.chart;
}
public void setChart(JRDesignChart chart) {
Object old = this.chart;
this.chart = chart;
getEventSupport().firePropertyChange("chart", old, this.chart);
}
}

View File

@@ -0,0 +1,13 @@
package net.sf.jasperreports.charts.design;
import net.sf.jasperreports.charts.base.JRBasePie3DPlot;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
public class JRDesignPie3DPlot extends JRBasePie3DPlot {
private static final long serialVersionUID = 10200L;
public JRDesignPie3DPlot(JRChartPlot pie3DPlot, JRChart chart) {
super(pie3DPlot, chart);
}
}

View File

@@ -0,0 +1,98 @@
package net.sf.jasperreports.charts.design;
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.design.JRDesignChartDataset;
import net.sf.jasperreports.engine.design.JRVerifier;
public class JRDesignPieDataset extends JRDesignChartDataset implements JRPieDataset {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_KEY_EXPRESSION = "keyExpression";
public static final String PROPERTY_LABEL_EXPRESSION = "labelExpression";
public static final String PROPERTY_SECTION_HYPERLINK = "sectionHyperlink";
public static final String PROPERTY_VALUE_EXPRESSION = "valueExpression";
protected JRExpression keyExpression = null;
protected JRExpression valueExpression = null;
protected JRExpression labelExpression = null;
private JRHyperlink sectionHyperlink;
public JRDesignPieDataset(JRChartDataset dataset) {
super(dataset);
}
public JRExpression getKeyExpression() {
return this.keyExpression;
}
public void setKeyExpression(JRExpression keyExpression) {
Object old = this.keyExpression;
this.keyExpression = keyExpression;
getEventSupport().firePropertyChange("keyExpression", old, this.keyExpression);
}
public JRExpression getValueExpression() {
return this.valueExpression;
}
public void setValueExpression(JRExpression valueExpression) {
Object old = this.valueExpression;
this.valueExpression = valueExpression;
getEventSupport().firePropertyChange("valueExpression", old, this.valueExpression);
}
public JRExpression getLabelExpression() {
return this.labelExpression;
}
public void setLabelExpression(JRExpression labelExpression) {
Object old = this.labelExpression;
this.labelExpression = labelExpression;
getEventSupport().firePropertyChange("labelExpression", old, this.labelExpression);
}
public byte getDatasetType() {
return 1;
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public JRHyperlink getSectionHyperlink() {
return this.sectionHyperlink;
}
public void setSectionHyperlink(JRHyperlink sectionHyperlink) {
Object old = this.sectionHyperlink;
this.sectionHyperlink = sectionHyperlink;
getEventSupport().firePropertyChange("sectionHyperlink", old, this.sectionHyperlink);
}
public void validate(JRVerifier verifier) {
verifier.verify(this);
}
public Object clone() {
JRDesignPieDataset clone = (JRDesignPieDataset)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,13 @@
package net.sf.jasperreports.charts.design;
import net.sf.jasperreports.charts.base.JRBasePiePlot;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
public class JRDesignPiePlot extends JRBasePiePlot {
private static final long serialVersionUID = 10200L;
public JRDesignPiePlot(JRChartPlot piePlot, JRChart chart) {
super(piePlot, chart);
}
}

View File

@@ -0,0 +1,147 @@
package net.sf.jasperreports.charts.design;
import java.awt.Color;
import net.sf.jasperreports.charts.base.JRBaseScatterPlot;
import net.sf.jasperreports.charts.util.JRAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRFont;
public class JRDesignScatterPlot extends JRBaseScatterPlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_X_AXIS_LABEL_COLOR = "xAxisLabelColor";
public static final String PROPERTY_X_AXIS_LABEL_EXPRESSION = "xAxisLabelExpression";
public static final String PROPERTY_X_AXIS_LABEL_FONT = "xAxisLabelFont";
public static final String PROPERTY_X_AXIS_LINE_COLOR = "xAxisLineColor";
public static final String PROPERTY_X_AXIS_TICK_LABEL_COLOR = "xAxisTickLabelColor";
public static final String PROPERTY_X_AXIS_TICK_LABEL_FONT = "xAxisTickLabelFont";
public static final String PROPERTY_X_AXIS_TICK_LABEL_MASK = "xAxisTickLabelMask";
public static final String PROPERTY_Y_AXIS_LABEL_COLOR = "yAxisLabelColor";
public static final String PROPERTY_Y_AXIS_LABEL_EXPRESSION = "yAxisLabelExpression";
public static final String PROPERTY_Y_AXIS_LABEL_FONT = "yAxisLabelFont";
public static final String PROPERTY_Y_AXIS_LINE_COLOR = "yAxisLineColor";
public static final String PROPERTY_Y_AXIS_TICK_LABEL_COLOR = "yAxisTickLabelColor";
public static final String PROPERTY_Y_AXIS_TICK_LABEL_FONT = "yAxisTickLabelFont";
public static final String PROPERTY_Y_AXIS_TICK_LABEL_MASK = "yAxisTickLabelMask";
public JRDesignScatterPlot(JRChartPlot scattedPlot, JRChart chart) {
super(scattedPlot, chart);
}
public void setXAxisLabelExpression(JRExpression xAxisLabelExpression) {
Object old = this.xAxisLabelExpression;
this.xAxisLabelExpression = xAxisLabelExpression;
getEventSupport().firePropertyChange("xAxisLabelExpression", old, this.xAxisLabelExpression);
}
public void setXAxisLabelFont(JRFont xAxisLabelFont) {
Object old = this.xAxisLabelFont;
this.xAxisLabelFont = xAxisLabelFont;
getEventSupport().firePropertyChange("xAxisLabelFont", old, this.xAxisLabelFont);
}
public void setXAxisLabelColor(Color xAxisLabelColor) {
Object old = this.xAxisLabelColor;
this.xAxisLabelColor = xAxisLabelColor;
getEventSupport().firePropertyChange("xAxisLabelColor", old, this.xAxisLabelColor);
}
public void setXAxisTickLabelFont(JRFont xAxisTickLabelFont) {
Object old = this.xAxisTickLabelFont;
this.xAxisTickLabelFont = xAxisTickLabelFont;
getEventSupport().firePropertyChange("xAxisTickLabelFont", old, this.xAxisTickLabelFont);
}
public void setXAxisTickLabelColor(Color xAxisTickLabelColor) {
Object old = this.xAxisTickLabelColor;
this.xAxisTickLabelColor = xAxisTickLabelColor;
getEventSupport().firePropertyChange("xAxisTickLabelColor", old, this.xAxisTickLabelColor);
}
public void setXAxisTickLabelMask(String xAxisTickLabelMask) {
Object old = this.xAxisTickLabelMask;
this.xAxisTickLabelMask = xAxisTickLabelMask;
getEventSupport().firePropertyChange("xAxisTickLabelMask", old, this.xAxisTickLabelMask);
}
public void setXAxisLineColor(Color xAxisLineColor) {
Object old = this.xAxisLineColor;
this.xAxisLineColor = xAxisLineColor;
getEventSupport().firePropertyChange("xAxisLineColor", old, this.xAxisLineColor);
}
public void setYAxisLabelExpression(JRExpression yAxisLabelExpression) {
Object old = this.yAxisLabelExpression;
this.yAxisLabelExpression = yAxisLabelExpression;
getEventSupport().firePropertyChange("yAxisLabelExpression", old, this.yAxisLabelExpression);
}
public void setYAxisLabelFont(JRFont yAxisLabelFont) {
Object old = this.yAxisLabelFont;
this.yAxisLabelFont = yAxisLabelFont;
getEventSupport().firePropertyChange("yAxisLabelFont", old, this.yAxisLabelFont);
}
public void setYAxisLabelColor(Color yAxisLabelColor) {
Object old = this.yAxisLabelColor;
this.yAxisLabelColor = yAxisLabelColor;
getEventSupport().firePropertyChange("yAxisLabelColor", old, this.yAxisLabelColor);
}
public void setYAxisTickLabelFont(JRFont yAxisTickLabelFont) {
Object old = this.yAxisTickLabelFont;
this.yAxisTickLabelFont = yAxisTickLabelFont;
getEventSupport().firePropertyChange("yAxisTickLabelFont", old, this.yAxisTickLabelFont);
}
public void setYAxisTickLabelColor(Color yAxisTickLabelColor) {
Object old = this.yAxisTickLabelColor;
this.yAxisTickLabelColor = yAxisTickLabelColor;
getEventSupport().firePropertyChange("yAxisTickLabelColor", old, this.yAxisTickLabelColor);
}
public void setYAxisTickLabelMask(String yAxisTickLabelMask) {
Object old = this.yAxisTickLabelMask;
this.yAxisTickLabelMask = yAxisTickLabelMask;
getEventSupport().firePropertyChange("yAxisTickLabelMask", old, this.yAxisTickLabelMask);
}
public void setYAxisLineColor(Color yAxisLineColor) {
Object old = this.yAxisLineColor;
this.yAxisLineColor = yAxisLineColor;
getEventSupport().firePropertyChange("yAxisLineColor", old, this.yAxisLineColor);
}
public void setXAxisFormat(JRAxisFormat axisFormat) {
setXAxisLabelColor(axisFormat.getLabelColor());
setXAxisLabelFont(axisFormat.getLabelFont());
setXAxisTickLabelFont(axisFormat.getTickLabelFont());
setXAxisTickLabelColor(axisFormat.getTickLabelColor());
setXAxisTickLabelMask(axisFormat.getTickLabelMask());
setXAxisLineColor(axisFormat.getLineColor());
}
public void setYAxisFormat(JRAxisFormat axisFormat) {
setYAxisLabelColor(axisFormat.getLabelColor());
setYAxisLabelFont(axisFormat.getLabelFont());
setYAxisTickLabelFont(axisFormat.getTickLabelFont());
setYAxisTickLabelColor(axisFormat.getTickLabelColor());
setYAxisTickLabelMask(axisFormat.getTickLabelMask());
setYAxisLineColor(axisFormat.getLineColor());
}
}

View File

@@ -0,0 +1,80 @@
package net.sf.jasperreports.charts.design;
import java.awt.Color;
import net.sf.jasperreports.charts.JRDataRange;
import net.sf.jasperreports.charts.JRValueDisplay;
import net.sf.jasperreports.charts.base.JRBaseThermometerPlot;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
public class JRDesignThermometerPlot extends JRBaseThermometerPlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_DATA_RANGE = "dataRange";
public static final String PROPERTY_HIGH_RANGE = "highRange";
public static final String PROPERTY_LOW_RANGE = "lowRange";
public static final String PROPERTY_MEDIUM_RANGE = "mediumRange";
public static final String PROPERTY_MERCURY_COLOR = "mercuryColor";
public static final String PROPERTY_SHOW_VALUE_LINES = "showValueLines";
public static final String PROPERTY_VALUE_DISPLAY = "valueDisplay";
public static final String PROPERTY_VALUE_LOCATION = "valueLocation";
public JRDesignThermometerPlot(JRChartPlot thermoPlot, JRChart chart) {
super(thermoPlot, chart);
}
public void setDataRange(JRDataRange dataRange) {
Object old = this.dataRange;
this.dataRange = dataRange;
getEventSupport().firePropertyChange("dataRange", old, this.dataRange);
}
public void setValueDisplay(JRValueDisplay valueDisplay) {
Object old = this.valueDisplay;
this.valueDisplay = valueDisplay;
getEventSupport().firePropertyChange("valueDisplay", old, this.valueDisplay);
}
public void setShowValueLines(boolean showValueLines) {
boolean old = this.showValueLines;
this.showValueLines = showValueLines;
getEventSupport().firePropertyChange("showValueLines", old, this.showValueLines);
}
public void setValueLocation(byte valueLocation) {
byte old = this.valueLocation;
this.valueLocation = valueLocation;
getEventSupport().firePropertyChange("valueLocation", old, this.valueLocation);
}
public void setMercuryColor(Color mercuryColor) {
Object old = this.mercuryColor;
this.mercuryColor = mercuryColor;
getEventSupport().firePropertyChange("mercuryColor", old, this.mercuryColor);
}
public void setLowRange(JRDataRange lowRange) {
Object old = this.lowRange;
this.lowRange = lowRange;
getEventSupport().firePropertyChange("lowRange", old, this.lowRange);
}
public void setMediumRange(JRDataRange mediumRange) {
Object old = this.mediumRange;
this.mediumRange = mediumRange;
getEventSupport().firePropertyChange("mediumRange", old, this.mediumRange);
}
public void setHighRange(JRDataRange highRange) {
Object old = this.highRange;
this.highRange = highRange;
getEventSupport().firePropertyChange("highRange", old, this.highRange);
}
}

View File

@@ -0,0 +1,70 @@
package net.sf.jasperreports.charts.design;
import java.util.ArrayList;
import java.util.List;
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.design.JRDesignChartDataset;
import net.sf.jasperreports.engine.design.JRVerifier;
public class JRDesignTimePeriodDataset extends JRDesignChartDataset implements JRTimePeriodDataset {
public static final long serialVersionUID = 10200L;
public static final String PROPERTY_TIME_PERIODS_SERIES = "timePeriodSeries";
private List timePeriodSeriesList = new ArrayList();
public JRDesignTimePeriodDataset(JRChartDataset dataset) {
super(dataset);
}
public JRTimePeriodSeries[] getSeries() {
JRTimePeriodSeries[] timePeriodSeriesArray = new JRTimePeriodSeries[this.timePeriodSeriesList.size()];
this.timePeriodSeriesList.toArray((Object[])timePeriodSeriesArray);
return timePeriodSeriesArray;
}
public List getSeriesList() {
return this.timePeriodSeriesList;
}
public void addTimePeriodSeries(JRTimePeriodSeries timePeriodSeries) {
this.timePeriodSeriesList.add(timePeriodSeries);
getEventSupport().fireCollectionElementAddedEvent("timePeriodSeries", timePeriodSeries, this.timePeriodSeriesList.size() - 1);
}
public JRTimePeriodSeries removeTimePeriodSeries(JRTimePeriodSeries timePeriodSeries) {
if (timePeriodSeries != null) {
int idx = this.timePeriodSeriesList.indexOf(timePeriodSeries);
if (idx >= 0) {
this.timePeriodSeriesList.remove(idx);
getEventSupport().fireCollectionElementRemovedEvent("timePeriodSeries", timePeriodSeries, idx);
}
}
return 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() {
JRDesignTimePeriodDataset clone = (JRDesignTimePeriodDataset)super.clone();
if (this.timePeriodSeriesList != null) {
clone.timePeriodSeriesList = new ArrayList(this.timePeriodSeriesList.size());
for (int i = 0; i < this.timePeriodSeriesList.size(); i++)
clone.timePeriodSeriesList.add(((JRTimePeriodSeries)this.timePeriodSeriesList.get(i)).clone());
}
return clone;
}
}

View File

@@ -0,0 +1,84 @@
package net.sf.jasperreports.charts.design;
import java.util.ArrayList;
import java.util.List;
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.design.JRDesignChartDataset;
import net.sf.jasperreports.engine.design.JRVerifier;
public class JRDesignTimeSeriesDataset extends JRDesignChartDataset implements JRTimeSeriesDataset {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_TIME_PERIOD = "timePeriod";
public static final String PROPERTY_TIME_SERIES = "timeSeries";
private List timeSeriesList = new ArrayList();
private Class timePeriod = null;
public JRDesignTimeSeriesDataset(JRChartDataset dataset) {
super(dataset);
}
public JRTimeSeries[] getSeries() {
JRTimeSeries[] timeSeriesArray = new JRTimeSeries[this.timeSeriesList.size()];
this.timeSeriesList.toArray((Object[])timeSeriesArray);
return timeSeriesArray;
}
public List getSeriesList() {
return this.timeSeriesList;
}
public void addTimeSeries(JRTimeSeries timeSeries) {
this.timeSeriesList.add(timeSeries);
getEventSupport().fireCollectionElementAddedEvent("timeSeries", timeSeries, this.timeSeriesList.size() - 1);
}
public JRTimeSeries removeTimeSeries(JRTimeSeries timeSeries) {
if (timeSeries != null) {
int idx = this.timeSeriesList.indexOf(timeSeries);
if (idx >= 0) {
this.timeSeriesList.remove(idx);
getEventSupport().fireCollectionElementRemovedEvent("timeSeries", timeSeries, idx);
}
}
return 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() {
JRDesignTimeSeriesDataset clone = (JRDesignTimeSeriesDataset)super.clone();
if (this.timeSeriesList != null) {
clone.timeSeriesList = new ArrayList(this.timeSeriesList.size());
for (int i = 0; i < this.timeSeriesList.size(); i++)
clone.timeSeriesList.add(((JRTimeSeries)this.timeSeriesList.get(i)).clone());
}
return clone;
}
}

View File

@@ -0,0 +1,147 @@
package net.sf.jasperreports.charts.design;
import java.awt.Color;
import net.sf.jasperreports.charts.base.JRBaseTimeSeriesPlot;
import net.sf.jasperreports.charts.util.JRAxisFormat;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRFont;
public class JRDesignTimeSeriesPlot extends JRBaseTimeSeriesPlot {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_TIME_AXIS_LABEL_COLOR = "timeAxisLabelColor";
public static final String PROPERTY_TIME_AXIS_LABEL_EXPRESSION = "timeAxisLabelExpression";
public static final String PROPERTY_TIME_AXIS_LABEL_FONT = "timeAxisLabelFont";
public static final String PROPERTY_TIME_AXIS_LINE_COLOR = "timeAxisLineColor";
public static final String PROPERTY_TIME_AXIS_TICK_LABEL_COLOR = "timeAxisTickLabelColor";
public static final String PROPERTY_TIME_AXIS_TICK_LABEL_FONT = "timeAxisTickLabelFont";
public static final String PROPERTY_TIME_AXIS_TICK_LABEL_MASK = "timeAxisTickLabelMask";
public static final String PROPERTY_VALUE_AXIS_LABEL_COLOR = "valueAxisLabelColor";
public static final String PROPERTY_VALUE_AXIS_LABEL_EXPRESSION = "valueAxisLabelExpression";
public static final String PROPERTY_VALUE_AXIS_LABEL_FONT = "valueAxisLabelFont";
public static final String PROPERTY_VALUE_AXIS_LINE_COLOR = "valueAxisLineColor";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_COLOR = "valueAxisTickLabelColor";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_FONT = "valueAxisTickLabelFont";
public static final String PROPERTY_VALUE_AXIS_TICK_LABEL_MASK = "valueAxisTickLabelMask";
public JRDesignTimeSeriesPlot(JRChartPlot plot, JRChart chart) {
super(plot, chart);
}
public void setTimeAxisLabelExpression(JRExpression timeAxisLabelExpression) {
Object old = this.timeAxisLabelExpression;
this.timeAxisLabelExpression = timeAxisLabelExpression;
getEventSupport().firePropertyChange("timeAxisLabelExpression", old, this.timeAxisLabelExpression);
}
public void setTimeAxisLabelFont(JRFont timeAxisLabelFont) {
Object old = this.timeAxisLabelFont;
this.timeAxisLabelFont = timeAxisLabelFont;
getEventSupport().firePropertyChange("timeAxisLabelFont", old, this.timeAxisLabelFont);
}
public void setTimeAxisLabelColor(Color timeAxisLabelColor) {
Object old = this.timeAxisLabelColor;
this.timeAxisLabelColor = timeAxisLabelColor;
getEventSupport().firePropertyChange("timeAxisLabelColor", old, this.timeAxisLabelColor);
}
public void setTimeAxisTickLabelFont(JRFont timeAxisTickLabelFont) {
Object old = this.timeAxisTickLabelFont;
this.timeAxisTickLabelFont = timeAxisTickLabelFont;
getEventSupport().firePropertyChange("timeAxisTickLabelFont", old, this.timeAxisTickLabelFont);
}
public void setTimeAxisTickLabelColor(Color timeAxisTickLabelColor) {
Object old = this.timeAxisTickLabelColor;
this.timeAxisTickLabelColor = timeAxisTickLabelColor;
getEventSupport().firePropertyChange("timeAxisTickLabelColor", old, this.timeAxisTickLabelColor);
}
public void setTimeAxisTickLabelMask(String timeAxisTickLabelMask) {
Object old = this.timeAxisTickLabelMask;
this.timeAxisTickLabelMask = timeAxisTickLabelMask;
getEventSupport().firePropertyChange("timeAxisTickLabelMask", old, this.timeAxisTickLabelMask);
}
public void setTimeAxisLineColor(Color timeAxisLineColor) {
Object old = this.timeAxisLineColor;
this.timeAxisLineColor = timeAxisLineColor;
getEventSupport().firePropertyChange("timeAxisLineColor", old, this.timeAxisLineColor);
}
public void setValueAxisLabelExpression(JRExpression valueAxisLabelExpression) {
Object old = this.valueAxisLabelExpression;
this.valueAxisLabelExpression = valueAxisLabelExpression;
getEventSupport().firePropertyChange("valueAxisLabelExpression", old, this.valueAxisLabelExpression);
}
public void setValueAxisLabelFont(JRFont valueAxisLabelFont) {
Object old = this.valueAxisLabelFont;
this.valueAxisLabelFont = valueAxisLabelFont;
getEventSupport().firePropertyChange("valueAxisLabelFont", old, this.valueAxisLabelFont);
}
public void setValueAxisLabelColor(Color valueAxisLabelColor) {
Object old = this.valueAxisLabelColor;
this.valueAxisLabelColor = valueAxisLabelColor;
getEventSupport().firePropertyChange("valueAxisLabelColor", old, this.valueAxisLabelColor);
}
public void setValueAxisTickLabelFont(JRFont valueAxisTickLabelFont) {
Object old = this.valueAxisTickLabelFont;
this.valueAxisTickLabelFont = valueAxisTickLabelFont;
getEventSupport().firePropertyChange("valueAxisTickLabelFont", old, this.valueAxisTickLabelFont);
}
public void setValueAxisTickLabelColor(Color valueAxisTickLabelColor) {
Object old = this.valueAxisTickLabelColor;
this.valueAxisTickLabelColor = valueAxisTickLabelColor;
getEventSupport().firePropertyChange("valueAxisTickLabelColor", old, this.valueAxisTickLabelColor);
}
public void setValueAxisTickLabelMask(String valueAxisTickLabelMask) {
Object old = this.valueAxisTickLabelMask;
this.valueAxisTickLabelMask = valueAxisTickLabelMask;
getEventSupport().firePropertyChange("valueAxisTickLabelMask", old, this.valueAxisTickLabelMask);
}
public void setValueAxisLineColor(Color valueAxisLineColor) {
Object old = this.valueAxisLineColor;
this.valueAxisLineColor = valueAxisLineColor;
getEventSupport().firePropertyChange("valueAxisLineColor", old, this.valueAxisLineColor);
}
public void setTimeAxisFormat(JRAxisFormat axisFormat) {
setTimeAxisLabelFont(axisFormat.getLabelFont());
setTimeAxisLabelColor(axisFormat.getLabelColor());
setTimeAxisTickLabelFont(axisFormat.getTickLabelFont());
setTimeAxisTickLabelColor(axisFormat.getTickLabelColor());
setTimeAxisTickLabelMask(axisFormat.getTickLabelMask());
setTimeAxisLineColor(axisFormat.getLineColor());
}
public void setValueAxisFormat(JRAxisFormat axisFormat) {
setValueAxisLabelFont(axisFormat.getLabelFont());
setValueAxisLabelColor(axisFormat.getLabelColor());
setValueAxisTickLabelFont(axisFormat.getTickLabelFont());
setValueAxisTickLabelColor(axisFormat.getTickLabelColor());
setValueAxisTickLabelMask(axisFormat.getTickLabelMask());
setValueAxisLineColor(axisFormat.getLineColor());
}
}

View File

@@ -0,0 +1,49 @@
package net.sf.jasperreports.charts.design;
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.design.JRDesignChartDataset;
import net.sf.jasperreports.engine.design.JRVerifier;
public class JRDesignValueDataset extends JRDesignChartDataset implements JRValueDataset {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_VALUE_EXPRESSION = "valueExpression";
protected JRExpression valueExpression = null;
public JRDesignValueDataset(JRChartDataset dataset) {
super(dataset);
}
public JRExpression getValueExpression() {
return this.valueExpression;
}
public void setValueExpression(JRExpression valueExpression) {
Object old = this.valueExpression;
this.valueExpression = valueExpression;
getEventSupport().firePropertyChange("valueExpression", old, 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() {
JRDesignValueDataset clone = (JRDesignValueDataset)super.clone();
if (this.valueExpression != null)
clone.valueExpression = (JRExpression)this.valueExpression.clone();
return clone;
}
}

View File

@@ -0,0 +1,70 @@
package net.sf.jasperreports.charts.design;
import java.util.ArrayList;
import java.util.List;
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.design.JRDesignChartDataset;
import net.sf.jasperreports.engine.design.JRVerifier;
public class JRDesignXyDataset extends JRDesignChartDataset implements JRXyDataset {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_XY_SERIES = "xySeries";
private List xySeriesList = new ArrayList();
public JRDesignXyDataset(JRChartDataset dataset) {
super(dataset);
}
public JRXySeries[] getSeries() {
JRXySeries[] xySeriesArray = new JRXySeries[this.xySeriesList.size()];
this.xySeriesList.toArray((Object[])xySeriesArray);
return xySeriesArray;
}
public List getSeriesList() {
return this.xySeriesList;
}
public void addXySeries(JRXySeries xySeries) {
this.xySeriesList.add(xySeries);
getEventSupport().fireCollectionElementAddedEvent("xySeries", xySeries, this.xySeriesList.size() - 1);
}
public JRXySeries removeXySeries(JRXySeries xySeries) {
if (xySeries != null) {
int idx = this.xySeriesList.indexOf(xySeries);
if (idx >= 0) {
this.xySeriesList.remove(idx);
getEventSupport().fireCollectionElementRemovedEvent("xySeries", xySeries, idx);
}
}
return 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() {
JRDesignXyDataset clone = (JRDesignXyDataset)super.clone();
if (this.xySeriesList != null) {
clone.xySeriesList = new ArrayList(this.xySeriesList.size());
for (int i = 0; i < this.xySeriesList.size(); i++)
clone.xySeriesList.add(((JRXySeries)this.xySeriesList.get(i)).clone());
}
return clone;
}
}

View File

@@ -0,0 +1,71 @@
package net.sf.jasperreports.charts.design;
import java.util.ArrayList;
import java.util.List;
import net.sf.jasperreports.charts.JRXySeries;
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.design.JRDesignChartDataset;
import net.sf.jasperreports.engine.design.JRVerifier;
public class JRDesignXyzDataset extends JRDesignChartDataset implements JRXyzDataset {
private static final long serialVersionUID = 10200L;
public static final String PROPERTY_XYZ_SERIES = "xyzSeries";
private List xyzSeriesList = new ArrayList();
public JRDesignXyzDataset(JRChartDataset dataset) {
super(dataset);
}
public JRXyzSeries[] getSeries() {
JRXyzSeries[] xyzSeriesArray = new JRXyzSeries[this.xyzSeriesList.size()];
this.xyzSeriesList.toArray((Object[])xyzSeriesArray);
return xyzSeriesArray;
}
public List getSeriesList() {
return this.xyzSeriesList;
}
public void addXyzSeries(JRXyzSeries xyzSeries) {
this.xyzSeriesList.add(xyzSeries);
getEventSupport().fireCollectionElementAddedEvent("xyzSeries", xyzSeries, this.xyzSeriesList.size() - 1);
}
public JRXyzSeries removeXyzSeries(JRXyzSeries xyzSeries) {
if (xyzSeries != null) {
int idx = this.xyzSeriesList.indexOf(xyzSeries);
if (idx >= 0) {
this.xyzSeriesList.remove(idx);
getEventSupport().fireCollectionElementRemovedEvent("xyzSeries", xyzSeries, idx);
}
}
return 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() {
JRDesignXyzDataset clone = (JRDesignXyzDataset)super.clone();
if (this.xyzSeriesList != null) {
clone.xyzSeriesList = new ArrayList(this.xyzSeriesList.size());
for (int i = 0; i < this.xyzSeriesList.size(); i++)
clone.xyzSeriesList.add(((JRXySeries)this.xyzSeriesList.get(i)).clone());
}
return clone;
}
}

View File

@@ -0,0 +1,154 @@
package net.sf.jasperreports.charts.fill;
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.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRFont;
import net.sf.jasperreports.engine.JRStyleContainer;
import net.sf.jasperreports.engine.base.JRBaseFont;
import net.sf.jasperreports.engine.fill.JRFillChartPlot;
import net.sf.jasperreports.engine.fill.JRFillObjectFactory;
import net.sf.jasperreports.engine.util.JRStyleResolver;
public class JRFillAreaPlot extends JRFillChartPlot implements JRAreaPlot {
protected JRFont categoryAxisLabelFont = null;
protected Color categoryAxisLabelColor = null;
protected JRFont categoryAxisTickLabelFont = null;
protected Color categoryAxisTickLabelColor = null;
protected Color categoryAxisLineColor = null;
protected JRFont valueAxisLabelFont = null;
protected Color valueAxisLabelColor = null;
protected JRFont valueAxisTickLabelFont = null;
protected Color valueAxisTickLabelColor = null;
protected Color valueAxisLineColor = null;
public JRFillAreaPlot(JRAreaPlot areaPlot, JRFillObjectFactory factory) {
super((JRChartPlot)areaPlot, factory);
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.categoryAxisLineColor = areaPlot.getOwnCategoryAxisLineColor();
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.valueAxisLineColor = areaPlot.getOwnValueAxisLineColor();
}
public JRExpression getCategoryAxisLabelExpression() {
return ((JRAreaPlot)this.parent).getCategoryAxisLabelExpression();
}
public JRFont getCategoryAxisLabelFont() {
return this.categoryAxisLabelFont;
}
public void setCategoryAxisLabelFont(JRFont font) {}
public Color getCategoryAxisLabelColor() {
return JRStyleResolver.getCategoryAxisLabelColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisLabelColor() {
return this.categoryAxisLabelColor;
}
public void setCategoryAxisLabelColor(Color color) {}
public JRFont getCategoryAxisTickLabelFont() {
return this.categoryAxisTickLabelFont;
}
public void setCategoryAxisTickLabelFont(JRFont font) {}
public Color getCategoryAxisTickLabelColor() {
return JRStyleResolver.getCategoryAxisTickLabelColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisTickLabelColor() {
return this.categoryAxisTickLabelColor;
}
public void setCategoryAxisTickLabelColor(Color color) {}
public String getCategoryAxisTickLabelMask() {
return ((JRAreaPlot)this.parent).getCategoryAxisTickLabelMask();
}
public void setCategoryAxisTickLabelMask(String mask) {}
public Color getCategoryAxisLineColor() {
return JRStyleResolver.getCategoryAxisLineColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisLineColor() {
return this.categoryAxisLineColor;
}
public void setCategoryAxisLineColor(Color color) {}
public JRExpression getValueAxisLabelExpression() {
return ((JRAreaPlot)this.parent).getValueAxisLabelExpression();
}
public JRFont getValueAxisLabelFont() {
return this.valueAxisLabelFont;
}
public void setValueAxisLabelFont(JRFont font) {}
public Color getValueAxisLabelColor() {
return JRStyleResolver.getValueAxisLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLabelColor() {
return this.valueAxisLabelColor;
}
public void setValueAxisLabelColor(Color color) {}
public JRFont getValueAxisTickLabelFont() {
return this.valueAxisTickLabelFont;
}
public void setValueAxisTickLabelFont(JRFont font) {}
public Color getValueAxisTickLabelColor() {
return JRStyleResolver.getValueAxisTickLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisTickLabelColor() {
return this.valueAxisTickLabelColor;
}
public void setValueAxisTickLabelColor(Color color) {}
public String getValueAxisTickLabelMask() {
return ((JRAreaPlot)this.parent).getValueAxisTickLabelMask();
}
public void setValueAxisTickLabelMask(String mask) {}
public Color getValueAxisLineColor() {
return JRStyleResolver.getValueAxisLineColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLineColor() {
return this.valueAxisLineColor;
}
public void setValueAxisLineColor(Color color) {}
}

View File

@@ -0,0 +1,172 @@
package net.sf.jasperreports.charts.fill;
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.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRFont;
import net.sf.jasperreports.engine.JRStyleContainer;
import net.sf.jasperreports.engine.base.JRBaseFont;
import net.sf.jasperreports.engine.fill.JRFillChartPlot;
import net.sf.jasperreports.engine.fill.JRFillObjectFactory;
import net.sf.jasperreports.engine.util.JRStyleResolver;
public class JRFillBar3DPlot extends JRFillChartPlot implements JRBar3DPlot {
protected JRFont categoryAxisLabelFont = null;
protected Color categoryAxisLabelColor = null;
protected JRFont categoryAxisTickLabelFont = null;
protected Color categoryAxisTickLabelColor = null;
protected Color categoryAxisLineColor = null;
protected JRFont valueAxisLabelFont = null;
protected Color valueAxisLabelColor = null;
protected JRFont valueAxisTickLabelFont = null;
protected Color valueAxisTickLabelColor = null;
protected Color valueAxisLineColor = null;
public JRFillBar3DPlot(JRBar3DPlot barPlot, JRFillObjectFactory factory) {
super((JRChartPlot)barPlot, factory);
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.categoryAxisLineColor = barPlot.getOwnCategoryAxisLineColor();
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.valueAxisLineColor = barPlot.getOwnValueAxisLineColor();
}
public JRExpression getCategoryAxisLabelExpression() {
return ((JRBar3DPlot)this.parent).getCategoryAxisLabelExpression();
}
public JRFont getCategoryAxisLabelFont() {
return this.categoryAxisLabelFont;
}
public void setCategoryAxisLabelFont(JRFont font) {}
public Color getCategoryAxisLabelColor() {
return JRStyleResolver.getCategoryAxisLabelColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisLabelColor() {
return this.categoryAxisLabelColor;
}
public void setCategoryAxisLabelColor(Color color) {}
public JRFont getCategoryAxisTickLabelFont() {
return this.categoryAxisTickLabelFont;
}
public void setCategoryAxisTickLabelFont(JRFont font) {}
public Color getCategoryAxisTickLabelColor() {
return JRStyleResolver.getCategoryAxisTickLabelColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisTickLabelColor() {
return this.categoryAxisTickLabelColor;
}
public void setCategoryAxisTickLabelColor(Color color) {}
public String getCategoryAxisTickLabelMask() {
return ((JRBar3DPlot)this.parent).getCategoryAxisTickLabelMask();
}
public void setCategoryAxisTickLabelMask(String mask) {}
public Color getCategoryAxisLineColor() {
return JRStyleResolver.getCategoryAxisLineColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisLineColor() {
return this.categoryAxisLineColor;
}
public void setCategoryAxisLineColor(Color color) {}
public JRExpression getValueAxisLabelExpression() {
return ((JRBar3DPlot)this.parent).getValueAxisLabelExpression();
}
public JRFont getValueAxisLabelFont() {
return this.valueAxisLabelFont;
}
public void setValueAxisLabelFont(JRFont font) {}
public Color getValueAxisLabelColor() {
return JRStyleResolver.getValueAxisLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLabelColor() {
return this.valueAxisLabelColor;
}
public void setValueAxisLabelColor(Color color) {}
public JRFont getValueAxisTickLabelFont() {
return this.valueAxisTickLabelFont;
}
public void setValueAxisTickLabelFont(JRFont font) {}
public Color getValueAxisTickLabelColor() {
return JRStyleResolver.getValueAxisTickLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisTickLabelColor() {
return this.valueAxisTickLabelColor;
}
public void setValueAxisTickLabelColor(Color color) {}
public String getValueAxisTickLabelMask() {
return ((JRBar3DPlot)this.parent).getValueAxisTickLabelMask();
}
public void setValueAxisTickLabelMask(String mask) {}
public Color getValueAxisLineColor() {
return JRStyleResolver.getValueAxisLineColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLineColor() {
return this.valueAxisLineColor;
}
public void setValueAxisLineColor(Color color) {}
public double getXOffset() {
return ((JRBar3DPlot)this.parent).getXOffset();
}
public void setXOffset(double xOffset) {}
public double getYOffset() {
return ((JRBar3DPlot)this.parent).getYOffset();
}
public void setYOffset(double yOffset) {}
public boolean isShowLabels() {
return ((JRBar3DPlot)this.parent).isShowLabels();
}
public void setShowLabels(boolean isShowLabels) {}
}

View File

@@ -0,0 +1,172 @@
package net.sf.jasperreports.charts.fill;
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.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRFont;
import net.sf.jasperreports.engine.JRStyleContainer;
import net.sf.jasperreports.engine.base.JRBaseFont;
import net.sf.jasperreports.engine.fill.JRFillChartPlot;
import net.sf.jasperreports.engine.fill.JRFillObjectFactory;
import net.sf.jasperreports.engine.util.JRStyleResolver;
public class JRFillBarPlot extends JRFillChartPlot implements JRBarPlot {
protected JRFont categoryAxisLabelFont = null;
protected Color categoryAxisLabelColor = null;
protected JRFont categoryAxisTickLabelFont = null;
protected Color categoryAxisTickLabelColor = null;
protected Color categoryAxisLineColor = null;
protected JRFont valueAxisLabelFont = null;
protected Color valueAxisLabelColor = null;
protected JRFont valueAxisTickLabelFont = null;
protected Color valueAxisTickLabelColor = null;
protected Color valueAxisLineColor = null;
public JRFillBarPlot(JRBarPlot barPlot, JRFillObjectFactory factory) {
super((JRChartPlot)barPlot, factory);
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.categoryAxisLineColor = barPlot.getOwnCategoryAxisLineColor();
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.valueAxisLineColor = barPlot.getOwnValueAxisLineColor();
}
public JRExpression getCategoryAxisLabelExpression() {
return ((JRBarPlot)this.parent).getCategoryAxisLabelExpression();
}
public JRFont getCategoryAxisLabelFont() {
return this.categoryAxisLabelFont;
}
public void setCategoryAxisLabelFont(JRFont font) {}
public Color getCategoryAxisLabelColor() {
return JRStyleResolver.getCategoryAxisLabelColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisLabelColor() {
return this.categoryAxisLabelColor;
}
public void setCategoryAxisLabelColor(Color color) {}
public JRFont getCategoryAxisTickLabelFont() {
return this.categoryAxisTickLabelFont;
}
public void setCategoryAxisTickLabelFont(JRFont font) {}
public Color getCategoryAxisTickLabelColor() {
return JRStyleResolver.getCategoryAxisTickLabelColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisTickLabelColor() {
return this.categoryAxisTickLabelColor;
}
public void setCategoryAxisTickLabelColor(Color color) {}
public String getCategoryAxisTickLabelMask() {
return ((JRBarPlot)this.parent).getCategoryAxisTickLabelMask();
}
public void setCategoryAxisTickLabelMask(String mask) {}
public Color getCategoryAxisLineColor() {
return JRStyleResolver.getCategoryAxisLineColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisLineColor() {
return this.categoryAxisLineColor;
}
public void setCategoryAxisLineColor(Color color) {}
public JRExpression getValueAxisLabelExpression() {
return ((JRBarPlot)this.parent).getValueAxisLabelExpression();
}
public JRFont getValueAxisLabelFont() {
return this.valueAxisLabelFont;
}
public void setValueAxisLabelFont(JRFont font) {}
public Color getValueAxisLabelColor() {
return JRStyleResolver.getValueAxisLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLabelColor() {
return this.valueAxisLabelColor;
}
public void setValueAxisLabelColor(Color color) {}
public JRFont getValueAxisTickLabelFont() {
return this.valueAxisTickLabelFont;
}
public void setValueAxisTickLabelFont(JRFont font) {}
public Color getValueAxisTickLabelColor() {
return JRStyleResolver.getValueAxisTickLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisTickLabelColor() {
return this.valueAxisTickLabelColor;
}
public void setValueAxisTickLabelColor(Color color) {}
public String getValueAxisTickLabelMask() {
return ((JRBarPlot)this.parent).getValueAxisTickLabelMask();
}
public void setValueAxisTickLabelMask(String mask) {}
public Color getValueAxisLineColor() {
return JRStyleResolver.getValueAxisLineColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLineColor() {
return this.valueAxisLineColor;
}
public void setValueAxisLineColor(Color color) {}
public boolean isShowTickMarks() {
return ((JRBarPlot)this.parent).isShowTickMarks();
}
public void setShowTickMarks(boolean isShowTickMarks) {}
public boolean isShowTickLabels() {
return ((JRBarPlot)this.parent).isShowTickLabels();
}
public void setShowTickLabels(boolean isShowTickLabels) {}
public boolean isShowLabels() {
return ((JRBarPlot)this.parent).isShowLabels();
}
public void setShowLabels(boolean isShowLabels) {}
}

View File

@@ -0,0 +1,136 @@
package net.sf.jasperreports.charts.fill;
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.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRFont;
import net.sf.jasperreports.engine.JRStyleContainer;
import net.sf.jasperreports.engine.base.JRBaseFont;
import net.sf.jasperreports.engine.fill.JRFillChartPlot;
import net.sf.jasperreports.engine.fill.JRFillObjectFactory;
import net.sf.jasperreports.engine.util.JRStyleResolver;
public class JRFillBubblePlot extends JRFillChartPlot implements JRBubblePlot {
protected JRFont xAxisLabelFont = null;
protected Color xAxisLabelColor = null;
protected JRFont xAxisTickLabelFont = null;
protected Color xAxisTickLabelColor = null;
protected Color xAxisLineColor = null;
protected JRFont yAxisLabelFont = null;
protected Color yAxisLabelColor = null;
protected JRFont yAxisTickLabelFont = null;
protected Color yAxisTickLabelColor = null;
protected Color yAxisLineColor = null;
public JRFillBubblePlot(JRBubblePlot bubblePlot, JRFillObjectFactory factory) {
super((JRChartPlot)bubblePlot, factory);
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.xAxisLineColor = bubblePlot.getXAxisLineColor();
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.yAxisLineColor = bubblePlot.getYAxisLineColor();
}
public JRExpression getXAxisLabelExpression() {
return ((JRBubblePlot)this.parent).getXAxisLabelExpression();
}
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 ((JRBubblePlot)this.parent).getXAxisTickLabelMask();
}
public Color getXAxisLineColor() {
return JRStyleResolver.getXAxisLineColor((JRXAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnXAxisLineColor() {
return this.xAxisLineColor;
}
public JRExpression getYAxisLabelExpression() {
return ((JRBubblePlot)this.parent).getYAxisLabelExpression();
}
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 ((JRBubblePlot)this.parent).getYAxisTickLabelMask();
}
public Color getYAxisLineColor() {
return JRStyleResolver.getYAxisLineColor((JRYAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnYAxisLineColor() {
return this.yAxisLineColor;
}
public int getScaleType() {
return ((JRBubblePlot)this.parent).getScaleType();
}
public void setScaleType(int scaleType) {}
}

View File

@@ -0,0 +1,158 @@
package net.sf.jasperreports.charts.fill;
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.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRFont;
import net.sf.jasperreports.engine.JRStyleContainer;
import net.sf.jasperreports.engine.base.JRBaseFont;
import net.sf.jasperreports.engine.fill.JRFillChartPlot;
import net.sf.jasperreports.engine.fill.JRFillObjectFactory;
import net.sf.jasperreports.engine.util.JRStyleResolver;
public class JRFillCandlestickPlot extends JRFillChartPlot implements JRCandlestickPlot {
protected JRFont timeAxisLabelFont = null;
protected Color timeAxisLabelColor = null;
protected JRFont timeAxisTickLabelFont = null;
protected Color timeAxisTickLabelColor = null;
protected Color timeAxisLineColor = null;
protected JRFont valueAxisLabelFont = null;
protected Color valueAxisLabelColor = null;
protected JRFont valueAxisTickLabelFont = null;
protected Color valueAxisTickLabelColor = null;
protected Color valueAxisLineColor = null;
public JRFillCandlestickPlot(JRCandlestickPlot candlestickPlot, JRFillObjectFactory factory) {
super((JRChartPlot)candlestickPlot, factory);
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.timeAxisLineColor = candlestickPlot.getTimeAxisLineColor();
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.valueAxisLineColor = candlestickPlot.getValueAxisTickLabelColor();
}
public JRExpression getTimeAxisLabelExpression() {
return ((JRCandlestickPlot)this.parent).getTimeAxisLabelExpression();
}
public JRFont getTimeAxisLabelFont() {
return this.timeAxisLabelFont;
}
public void setTimeAxisLabelFont(JRFont font) {}
public Color getTimeAxisLabelColor() {
return JRStyleResolver.getTimeAxisLabelColor((JRTimeAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnTimeAxisLabelColor() {
return this.timeAxisLabelColor;
}
public void setTimeAxisLabelColor(Color color) {}
public JRFont getTimeAxisTickLabelFont() {
return this.timeAxisTickLabelFont;
}
public void setTimeAxisTickLabelFont(JRFont font) {}
public Color getTimeAxisTickLabelColor() {
return JRStyleResolver.getTimeAxisTickLabelColor((JRTimeAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnTimeAxisTickLabelColor() {
return this.timeAxisTickLabelColor;
}
public void setTimeAxisTickLabelColor(Color color) {}
public String getTimeAxisTickLabelMask() {
return ((JRCandlestickPlot)this.parent).getTimeAxisTickLabelMask();
}
public void setTimeAxisTickLabelMask(String mask) {}
public Color getTimeAxisLineColor() {
return JRStyleResolver.getTimeAxisLineColor((JRTimeAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnTimeAxisLineColor() {
return this.timeAxisLineColor;
}
public void setTimeAxisLineColor(Color color) {}
public JRExpression getValueAxisLabelExpression() {
return ((JRCandlestickPlot)this.parent).getValueAxisLabelExpression();
}
public JRFont getValueAxisLabelFont() {
return this.valueAxisLabelFont;
}
public void setValueAxisLabelFont(JRFont font) {}
public Color getValueAxisLabelColor() {
return JRStyleResolver.getValueAxisLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLabelColor() {
return this.valueAxisLabelColor;
}
public void setValueAxisLabelColor(Color color) {}
public JRFont getValueAxisTickLabelFont() {
return this.valueAxisTickLabelFont;
}
public void setValueAxisTickLabelFont(JRFont font) {}
public Color getValueAxisTickLabelColor() {
return JRStyleResolver.getValueAxisTickLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisTickLabelColor() {
return this.valueAxisTickLabelColor;
}
public void setValueAxisTickLabelColor(Color color) {}
public String getValueAxisTickLabelMask() {
return ((JRCandlestickPlot)this.parent).getValueAxisTickLabelMask();
}
public void setValueAxisTickLabelMask(String mask) {}
public Color getValueAxisLineColor() {
return JRStyleResolver.getValueAxisLineColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLineColor() {
return this.valueAxisLineColor;
}
public void setValueAxisLineColor(Color color) {}
public boolean isShowVolume() {
return ((JRCandlestickPlot)this.parent).isShowVolume();
}
}

View File

@@ -0,0 +1,120 @@
package net.sf.jasperreports.charts.fill;
import java.util.HashMap;
import java.util.Map;
import net.sf.jasperreports.charts.JRCategoryDataset;
import net.sf.jasperreports.charts.JRCategorySeries;
import net.sf.jasperreports.charts.util.CategoryLabelGenerator;
import net.sf.jasperreports.engine.JRChartDataset;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.JRRuntimeException;
import net.sf.jasperreports.engine.design.JRVerifier;
import net.sf.jasperreports.engine.fill.JRCalculator;
import net.sf.jasperreports.engine.fill.JRExpressionEvalException;
import net.sf.jasperreports.engine.fill.JRFillChartDataset;
import net.sf.jasperreports.engine.fill.JRFillObjectFactory;
import org.jfree.data.category.DefaultCategoryDataset;
import org.jfree.data.general.Dataset;
public class JRFillCategoryDataset extends JRFillChartDataset implements JRCategoryDataset {
protected JRFillCategorySeries[] categorySeries = null;
private DefaultCategoryDataset dataset = null;
private Map labelsMap = null;
private Map itemHyperlinks;
public JRFillCategoryDataset(JRCategoryDataset categoryDataset, JRFillObjectFactory factory) {
super((JRChartDataset)categoryDataset, factory);
JRCategorySeries[] srcCategorySeries = categoryDataset.getSeries();
if (srcCategorySeries != null && srcCategorySeries.length > 0) {
this.categorySeries = new JRFillCategorySeries[srcCategorySeries.length];
for (int i = 0; i < this.categorySeries.length; i++)
this.categorySeries[i] = (JRFillCategorySeries)factory.getCategorySeries(srcCategorySeries[i]);
}
}
public JRCategorySeries[] getSeries() {
return (JRCategorySeries[])this.categorySeries;
}
protected void customInitialize() {
this.dataset = null;
this.labelsMap = null;
this.itemHyperlinks = null;
}
protected void customEvaluate(JRCalculator calculator) throws JRExpressionEvalException {
if (this.categorySeries != null && this.categorySeries.length > 0)
for (int i = 0; i < this.categorySeries.length; i++)
this.categorySeries[i].evaluate(calculator);
}
protected void customIncrement() {
if (this.categorySeries != null && this.categorySeries.length > 0) {
if (this.dataset == null) {
this.dataset = new DefaultCategoryDataset();
this.labelsMap = new HashMap();
this.itemHyperlinks = new HashMap();
}
for (int i = 0; i < this.categorySeries.length; i++) {
JRFillCategorySeries crtCategorySeries = this.categorySeries[i];
Comparable seriesName = crtCategorySeries.getSeries();
if (seriesName == null)
throw new JRRuntimeException("Category series name is null.");
this.dataset.addValue(crtCategorySeries.getValue(), crtCategorySeries.getSeries(), crtCategorySeries.getCategory());
if (crtCategorySeries.getLabelExpression() != null) {
Map seriesLabels = (Map)this.labelsMap.get(seriesName);
if (seriesLabels == null) {
seriesLabels = new HashMap();
this.labelsMap.put(seriesName, seriesLabels);
}
seriesLabels.put(crtCategorySeries.getCategory(), crtCategorySeries.getLabel());
}
if (crtCategorySeries.hasItemHyperlinks()) {
Map seriesLinks = (Map)this.itemHyperlinks.get(seriesName);
if (seriesLinks == null) {
seriesLinks = new HashMap();
this.itemHyperlinks.put(seriesName, seriesLinks);
}
seriesLinks.put(crtCategorySeries.getCategory(), crtCategorySeries.getPrintItemHyperlink());
}
}
}
}
public Dataset getCustomDataset() {
return (Dataset)this.dataset;
}
public byte getDatasetType() {
return 2;
}
public CategoryLabelGenerator getLabelGenerator() {
return new CategoryLabelGenerator(this.labelsMap);
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public Map getItemHyperlinks() {
return this.itemHyperlinks;
}
public boolean hasItemHyperlinks() {
boolean foundLinks = false;
if (this.categorySeries != null && this.categorySeries.length > 0)
for (int i = 0; i < this.categorySeries.length && !foundLinks; i++) {
JRFillCategorySeries serie = this.categorySeries[i];
foundLinks = serie.hasItemHyperlinks();
}
return foundLinks;
}
public void validate(JRVerifier verifier) {
verifier.verify(this);
}
}

View File

@@ -0,0 +1,100 @@
package net.sf.jasperreports.charts.fill;
import net.sf.jasperreports.charts.JRCategorySeries;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRHyperlink;
import net.sf.jasperreports.engine.JRHyperlinkHelper;
import net.sf.jasperreports.engine.JRPrintHyperlink;
import net.sf.jasperreports.engine.JRRuntimeException;
import net.sf.jasperreports.engine.fill.JRCalculator;
import net.sf.jasperreports.engine.fill.JRExpressionEvalException;
import net.sf.jasperreports.engine.fill.JRFillExpressionEvaluator;
import net.sf.jasperreports.engine.fill.JRFillHyperlinkHelper;
import net.sf.jasperreports.engine.fill.JRFillObjectFactory;
public class JRFillCategorySeries implements JRCategorySeries {
protected JRCategorySeries parent = null;
private Comparable series = null;
private Comparable category = null;
private Number value = null;
private String label = null;
private JRPrintHyperlink itemHyperlink;
public JRFillCategorySeries(JRCategorySeries categorySeries, JRFillObjectFactory factory) {
factory.put(categorySeries, this);
this.parent = categorySeries;
}
public JRExpression getSeriesExpression() {
return this.parent.getSeriesExpression();
}
public JRExpression getCategoryExpression() {
return this.parent.getCategoryExpression();
}
public JRExpression getValueExpression() {
return this.parent.getValueExpression();
}
public JRExpression getLabelExpression() {
return this.parent.getLabelExpression();
}
protected Comparable getSeries() {
return this.series;
}
protected Comparable getCategory() {
return this.category;
}
protected Number getValue() {
return this.value;
}
protected String getLabel() {
return this.label;
}
protected JRPrintHyperlink getPrintItemHyperlink() {
return this.itemHyperlink;
}
protected void evaluate(JRCalculator calculator) throws JRExpressionEvalException {
this.series = (Comparable)calculator.evaluate(getSeriesExpression());
this.category = (Comparable)calculator.evaluate(getCategoryExpression());
this.value = (Number)calculator.evaluate(getValueExpression());
this.label = (String)calculator.evaluate(getLabelExpression());
if (hasItemHyperlinks())
evaluateItemHyperlink(calculator);
}
protected void evaluateItemHyperlink(JRCalculator calculator) throws JRExpressionEvalException {
try {
this.itemHyperlink = JRFillHyperlinkHelper.evaluateHyperlink(getItemHyperlink(), (JRFillExpressionEvaluator)calculator, (byte)3);
} catch (JRExpressionEvalException e) {
throw e;
} catch (JRException e) {
throw new JRRuntimeException(e);
}
}
public boolean hasItemHyperlinks() {
return !JRHyperlinkHelper.isEmpty(getItemHyperlink());
}
public JRHyperlink getItemHyperlink() {
return this.parent.getItemHyperlink();
}
public Object clone() {
return null;
}
}

View File

@@ -0,0 +1,37 @@
package net.sf.jasperreports.charts.fill;
import net.sf.jasperreports.charts.JRChartAxis;
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.JRVisitable;
import net.sf.jasperreports.engine.fill.JRFillChart;
import net.sf.jasperreports.engine.fill.JRFillObjectFactory;
public class JRFillChartAxis implements JRChartAxis {
protected JRChartAxis parent;
protected JRFillChart fillChart = null;
private static final long serialVersionUID = 10200L;
public JRFillChartAxis(JRChartAxis axis, JRFillObjectFactory factory) {
factory.put(axis, this);
this.parent = axis;
this.fillChart = (JRFillChart)factory.getVisitResult((JRVisitable)axis.getChart());
}
public JRFillChart getFillChart() {
return this.fillChart;
}
public JRChart getChart() {
return this.parent.getChart();
}
public byte getPosition() {
return this.parent.getPosition();
}
public Object clone(JRChart parentChart) {
return null;
}
}

View File

@@ -0,0 +1,240 @@
package net.sf.jasperreports.charts.fill;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import net.sf.jasperreports.charts.JRHighLowDataset;
import net.sf.jasperreports.engine.JRChartDataset;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.JRHyperlink;
import net.sf.jasperreports.engine.JRHyperlinkHelper;
import net.sf.jasperreports.engine.JRPrintHyperlink;
import net.sf.jasperreports.engine.JRRuntimeException;
import net.sf.jasperreports.engine.design.JRVerifier;
import net.sf.jasperreports.engine.fill.JRCalculator;
import net.sf.jasperreports.engine.fill.JRExpressionEvalException;
import net.sf.jasperreports.engine.fill.JRFillChartDataset;
import net.sf.jasperreports.engine.fill.JRFillExpressionEvaluator;
import net.sf.jasperreports.engine.fill.JRFillHyperlinkHelper;
import net.sf.jasperreports.engine.fill.JRFillObjectFactory;
import org.jfree.data.general.Dataset;
import org.jfree.data.xy.DefaultHighLowDataset;
public class JRFillHighLowDataset extends JRFillChartDataset implements JRHighLowDataset {
private String series = null;
private List elements = new ArrayList();
private Date date = null;
private Number high = null;
private Number low = null;
private Number open = null;
private Number close = null;
private Number volume = null;
private JRPrintHyperlink itemHyperlink;
private List itemHyperlinks;
public JRFillHighLowDataset(JRHighLowDataset dataset, JRFillObjectFactory factory) {
super((JRChartDataset)dataset, factory);
}
protected void customInitialize() {
this.elements = new ArrayList();
this.itemHyperlinks = new ArrayList();
}
protected void customEvaluate(JRCalculator calculator) throws JRExpressionEvalException {
this.series = (String)calculator.evaluate(getSeriesExpression());
this.date = (Date)calculator.evaluate(getDateExpression());
this.high = (Number)calculator.evaluate(getHighExpression());
this.low = (Number)calculator.evaluate(getLowExpression());
this.open = (Number)calculator.evaluate(getOpenExpression());
this.close = (Number)calculator.evaluate(getCloseExpression());
this.volume = (Number)calculator.evaluate(getVolumeExpression());
if (hasItemHyperlink())
evaluateSectionHyperlink(calculator);
}
protected void evaluateSectionHyperlink(JRCalculator calculator) throws JRExpressionEvalException {
try {
this.itemHyperlink = JRFillHyperlinkHelper.evaluateHyperlink(getItemHyperlink(), (JRFillExpressionEvaluator)calculator, (byte)3);
} catch (JRExpressionEvalException e) {
throw e;
} catch (JRException e) {
throw new JRRuntimeException(e);
}
}
protected void customIncrement() {
this.elements.add(new HighLowElement(this.date, this.high, this.low, this.open, this.close, this.volume));
if (hasItemHyperlink())
this.itemHyperlinks.add(this.itemHyperlink);
}
public Dataset getCustomDataset() {
int size = this.elements.size();
if (size > 0) {
Date[] dateArray = new Date[size];
double[] highArray = new double[size];
double[] lowArray = new double[size];
double[] openArray = new double[size];
double[] closeArray = new double[size];
double[] volumeArray = new double[size];
for (int i = 0; i < this.elements.size(); i++) {
HighLowElement bean = this.elements.get(i);
dateArray[i] = new Date(bean.getDate().getTime());
highArray[i] = bean.getHigh().doubleValue();
lowArray[i] = bean.getLow().doubleValue();
openArray[i] = bean.getOpen().doubleValue();
closeArray[i] = bean.getClose().doubleValue();
volumeArray[i] = bean.getVolume().doubleValue();
}
return (Dataset)new DefaultHighLowDataset(this.series, dateArray, highArray, lowArray, openArray, closeArray, volumeArray);
}
return null;
}
public JRExpression getSeriesExpression() {
return ((JRHighLowDataset)this.parent).getSeriesExpression();
}
public JRExpression getDateExpression() {
return ((JRHighLowDataset)this.parent).getDateExpression();
}
public JRExpression getHighExpression() {
return ((JRHighLowDataset)this.parent).getHighExpression();
}
public JRExpression getLowExpression() {
return ((JRHighLowDataset)this.parent).getLowExpression();
}
public JRExpression getOpenExpression() {
return ((JRHighLowDataset)this.parent).getOpenExpression();
}
public JRExpression getCloseExpression() {
return ((JRHighLowDataset)this.parent).getCloseExpression();
}
public JRExpression getVolumeExpression() {
return ((JRHighLowDataset)this.parent).getVolumeExpression();
}
private static class HighLowElement {
Date date;
Number high;
Number low;
Number open;
Number close;
Number volume;
public HighLowElement(Date date, Number high, Number low, Number open, Number close, Number volume) {
if (date == null)
throw new JRRuntimeException("Date value is null in high-low series.");
this.date = date;
if (high == null)
throw new JRRuntimeException("High value is null in high-low series.");
this.high = high;
if (low == null)
throw new JRRuntimeException("Low value is null in high-low series.");
this.low = low;
if (open == null)
throw new JRRuntimeException("Open value is null in high-low series.");
this.open = open;
if (close == null)
throw new JRRuntimeException("Close value is null in high-low series.");
this.close = close;
if (volume == null)
throw new JRRuntimeException("Volume value is null in high-low series.");
this.volume = volume;
}
public Date getDate() {
return this.date;
}
public void setDate(Date date) {
this.date = date;
}
public Number getHigh() {
return this.high;
}
public void setHigh(Number high) {
this.high = high;
}
public Number getLow() {
return this.low;
}
public void setLow(Number low) {
this.low = low;
}
public Number getOpen() {
return this.open;
}
public void setOpen(Number open) {
this.open = open;
}
public Number getClose() {
return this.close;
}
public void setClose(Number close) {
this.close = close;
}
public Number getVolume() {
return this.volume;
}
public void setVolume(Number volume) {
this.volume = volume;
}
}
public byte getDatasetType() {
return 7;
}
public void collectExpressions(JRExpressionCollector collector) {
collector.collect(this);
}
public JRHyperlink getItemHyperlink() {
return ((JRHighLowDataset)this.parent).getItemHyperlink();
}
public boolean hasItemHyperlink() {
return !JRHyperlinkHelper.isEmpty(getItemHyperlink());
}
public List getItemHyperlinks() {
return this.itemHyperlinks;
}
public void validate(JRVerifier verifier) {
verifier.verify(this);
}
}

View File

@@ -0,0 +1,162 @@
package net.sf.jasperreports.charts.fill;
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.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRFont;
import net.sf.jasperreports.engine.JRStyleContainer;
import net.sf.jasperreports.engine.base.JRBaseFont;
import net.sf.jasperreports.engine.fill.JRFillChartPlot;
import net.sf.jasperreports.engine.fill.JRFillObjectFactory;
import net.sf.jasperreports.engine.util.JRStyleResolver;
public class JRFillHighLowPlot extends JRFillChartPlot implements JRHighLowPlot {
protected JRFont timeAxisLabelFont = null;
protected Color timeAxisLabelColor = null;
protected JRFont timeAxisTickLabelFont = null;
protected Color timeAxisTickLabelColor = null;
protected Color timeAxisLineColor = null;
protected JRFont valueAxisLabelFont = null;
protected Color valueAxisLabelColor = null;
protected JRFont valueAxisTickLabelFont = null;
protected Color valueAxisTickLabelColor = null;
protected Color valueAxisLineColor = null;
public JRFillHighLowPlot(JRHighLowPlot highLowPlot, JRFillObjectFactory factory) {
super((JRChartPlot)highLowPlot, factory);
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.timeAxisLineColor = highLowPlot.getTimeAxisLineColor();
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.valueAxisLineColor = highLowPlot.getValueAxisTickLabelColor();
}
public JRExpression getTimeAxisLabelExpression() {
return ((JRHighLowPlot)this.parent).getTimeAxisLabelExpression();
}
public JRFont getTimeAxisLabelFont() {
return this.timeAxisLabelFont;
}
public void setTimeAxisLabelFont(JRFont font) {}
public Color getTimeAxisLabelColor() {
return JRStyleResolver.getTimeAxisLabelColor((JRTimeAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnTimeAxisLabelColor() {
return this.timeAxisLabelColor;
}
public void setTimeAxisLabelColor(Color color) {}
public JRFont getTimeAxisTickLabelFont() {
return this.timeAxisTickLabelFont;
}
public void setTimeAxisTickLabelFont(JRFont font) {}
public Color getTimeAxisTickLabelColor() {
return JRStyleResolver.getTimeAxisTickLabelColor((JRTimeAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnTimeAxisTickLabelColor() {
return this.timeAxisTickLabelColor;
}
public void setTimeAxisTickLabelColor(Color color) {}
public String getTimeAxisTickLabelMask() {
return ((JRHighLowPlot)this.parent).getTimeAxisTickLabelMask();
}
public void setTimeAxisTickLabelMask(String mask) {}
public Color getTimeAxisLineColor() {
return JRStyleResolver.getTimeAxisLineColor((JRTimeAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnTimeAxisLineColor() {
return this.timeAxisLineColor;
}
public void setTimeAxisLineColor(Color color) {}
public JRExpression getValueAxisLabelExpression() {
return ((JRHighLowPlot)this.parent).getValueAxisLabelExpression();
}
public JRFont getValueAxisLabelFont() {
return this.valueAxisLabelFont;
}
public void setValueAxisLabelFont(JRFont font) {}
public Color getValueAxisLabelColor() {
return JRStyleResolver.getValueAxisLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLabelColor() {
return this.valueAxisLabelColor;
}
public void setValueAxisLabelColor(Color color) {}
public JRFont getValueAxisTickLabelFont() {
return this.valueAxisTickLabelFont;
}
public void setValueAxisTickLabelFont(JRFont font) {}
public Color getValueAxisTickLabelColor() {
return JRStyleResolver.getValueAxisTickLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisTickLabelColor() {
return this.valueAxisTickLabelColor;
}
public void setValueAxisTickLabelColor(Color color) {}
public String getValueAxisTickLabelMask() {
return ((JRHighLowPlot)this.parent).getValueAxisTickLabelMask();
}
public void setValueAxisTickLabelMask(String mask) {}
public Color getValueAxisLineColor() {
return JRStyleResolver.getValueAxisLineColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLineColor() {
return this.valueAxisLineColor;
}
public void setValueAxisLineColor(Color color) {}
public boolean isShowOpenTicks() {
return ((JRHighLowPlot)this.parent).isShowOpenTicks();
}
public boolean isShowCloseTicks() {
return ((JRHighLowPlot)this.parent).isShowCloseTicks();
}
}

View File

@@ -0,0 +1,166 @@
package net.sf.jasperreports.charts.fill;
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.JRChartPlot;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.JRFont;
import net.sf.jasperreports.engine.JRStyleContainer;
import net.sf.jasperreports.engine.base.JRBaseFont;
import net.sf.jasperreports.engine.fill.JRFillChartPlot;
import net.sf.jasperreports.engine.fill.JRFillObjectFactory;
import net.sf.jasperreports.engine.util.JRStyleResolver;
public class JRFillLinePlot extends JRFillChartPlot implements JRLinePlot {
protected JRFont categoryAxisLabelFont = null;
protected Color categoryAxisLabelColor = null;
protected JRFont categoryAxisTickLabelFont = null;
protected Color categoryAxisTickLabelColor = null;
protected Color categoryAxisLineColor = null;
protected JRFont valueAxisLabelFont = null;
protected Color valueAxisLabelColor = null;
protected JRFont valueAxisTickLabelFont = null;
protected Color valueAxisTickLabelColor = null;
protected Color valueAxisLineColor = null;
public JRFillLinePlot(JRLinePlot plot, JRFillObjectFactory factory) {
super((JRChartPlot)plot, factory);
this.categoryAxisLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)plot.getChart(), plot.getCategoryAxisLabelFont());
this.categoryAxisLabelColor = plot.getOwnCategoryAxisLabelColor();
this.categoryAxisTickLabelFont = (JRFont)new JRBaseFont(null, null, (JRStyleContainer)plot.getChart(), plot.getCategoryAxisTickLabelFont());
this.categoryAxisTickLabelColor = plot.getOwnCategoryAxisTickLabelColor();
this.categoryAxisLineColor = plot.getOwnCategoryAxisLineColor();
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.valueAxisLineColor = plot.getOwnValueAxisLineColor();
}
public JRExpression getCategoryAxisLabelExpression() {
return ((JRLinePlot)this.parent).getCategoryAxisLabelExpression();
}
public JRFont getCategoryAxisLabelFont() {
return this.categoryAxisLabelFont;
}
public void setCategoryAxisLabelFont(JRFont font) {}
public Color getCategoryAxisLabelColor() {
return JRStyleResolver.getCategoryAxisLabelColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisLabelColor() {
return this.categoryAxisLabelColor;
}
public void setCategoryAxisLabelColor(Color color) {}
public JRFont getCategoryAxisTickLabelFont() {
return this.categoryAxisTickLabelFont;
}
public void setCategoryAxisTickLabelFont(JRFont font) {}
public Color getCategoryAxisTickLabelColor() {
return JRStyleResolver.getCategoryAxisTickLabelColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisTickLabelColor() {
return this.categoryAxisTickLabelColor;
}
public void setCategoryAxisTickLabelColor(Color color) {}
public String getCategoryAxisTickLabelMask() {
return ((JRLinePlot)this.parent).getCategoryAxisTickLabelMask();
}
public void setCategoryAxisTickLabelMask(String mask) {}
public Color getCategoryAxisLineColor() {
return JRStyleResolver.getCategoryAxisLineColor((JRCategoryAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnCategoryAxisLineColor() {
return this.categoryAxisLineColor;
}
public void setCategoryAxisLineColor(Color color) {}
public JRExpression getValueAxisLabelExpression() {
return ((JRLinePlot)this.parent).getValueAxisLabelExpression();
}
public JRFont getValueAxisLabelFont() {
return this.valueAxisLabelFont;
}
public void setValueAxisLabelFont(JRFont font) {}
public Color getValueAxisLabelColor() {
return JRStyleResolver.getValueAxisLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLabelColor() {
return this.valueAxisLabelColor;
}
public void setValueAxisLabelColor(Color color) {}
public JRFont getValueAxisTickLabelFont() {
return this.valueAxisTickLabelFont;
}
public void setValueAxisTickLabelFont(JRFont font) {}
public Color getValueAxisTickLabelColor() {
return JRStyleResolver.getValueAxisTickLabelColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisTickLabelColor() {
return this.valueAxisTickLabelColor;
}
public void setValueAxisTickLabelColor(Color color) {}
public String getValueAxisTickLabelMask() {
return ((JRLinePlot)this.parent).getValueAxisTickLabelMask();
}
public void setValueAxisTickLabelMask(String mask) {}
public Color getValueAxisLineColor() {
return JRStyleResolver.getValueAxisLineColor((JRValueAxisFormat)this, (JRChartPlot)this);
}
public Color getOwnValueAxisLineColor() {
return this.valueAxisLineColor;
}
public void setValueAxisLineColor(Color color) {}
public boolean isShowShapes() {
return ((JRLinePlot)this.parent).isShowShapes();
}
public void setShowShapes(boolean value) {}
public boolean isShowLines() {
return ((JRLinePlot)this.parent).isShowLines();
}
public void setShowLines(boolean value) {}
}

View File

@@ -0,0 +1,56 @@
package net.sf.jasperreports.charts.fill;
import java.awt.Color;
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.engine.JRChartPlot;
import net.sf.jasperreports.engine.fill.JRFillChartPlot;
import net.sf.jasperreports.engine.fill.JRFillObjectFactory;
public class JRFillMeterPlot extends JRFillChartPlot implements JRMeterPlot {
public JRFillMeterPlot(JRMeterPlot meterPlot, JRFillObjectFactory factory) {
super((JRChartPlot)meterPlot, factory);
}
public JRDataRange getDataRange() {
return ((JRMeterPlot)this.parent).getDataRange();
}
public JRValueDisplay getValueDisplay() {
return ((JRMeterPlot)this.parent).getValueDisplay();
}
public byte getShape() {
return ((JRMeterPlot)this.parent).getShape();
}
public List getIntervals() {
return ((JRMeterPlot)this.parent).getIntervals();
}
public int getMeterAngle() {
return ((JRMeterPlot)this.parent).getMeterAngle();
}
public String getUnits() {
return ((JRMeterPlot)this.parent).getUnits();
}
public double getTickInterval() {
return ((JRMeterPlot)this.parent).getTickInterval();
}
public Color getMeterBackgroundColor() {
return ((JRMeterPlot)this.parent).getMeterBackgroundColor();
}
public Color getNeedleColor() {
return ((JRMeterPlot)this.parent).getNeedleColor();
}
public Color getTickColor() {
return ((JRMeterPlot)this.parent).getTickColor();
}
}

View File

@@ -0,0 +1,34 @@
package net.sf.jasperreports.charts.fill;
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.JRChartPlot;
import net.sf.jasperreports.engine.fill.JRFillChartDataset;
import net.sf.jasperreports.engine.fill.JRFillChartPlot;
import net.sf.jasperreports.engine.fill.JRFillObjectFactory;
public class JRFillMultiAxisPlot extends JRFillChartPlot implements JRMultiAxisPlot {
private List axes;
public JRFillMultiAxisPlot(JRMultiAxisPlot multiAxisPlot, JRFillObjectFactory factory) {
super((JRChartPlot)multiAxisPlot, factory);
List parentAxes = multiAxisPlot.getAxes();
this.axes = new ArrayList(parentAxes.size());
Iterator iter = parentAxes.iterator();
while (iter.hasNext()) {
JRChartAxis axis = iter.next();
this.axes.add(factory.getChartAxis(axis));
}
}
public List getAxes() {
return this.axes;
}
public JRFillChartDataset getMainDataset() {
return (JRFillChartDataset)((JRFillChartAxis)this.axes.get(0)).getFillChart().getDataset();
}
}

Some files were not shown because too many files have changed in this diff Show More