59 lines
1.5 KiB
Java
59 lines
1.5 KiB
Java
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);
|
|
}
|
|
}
|
|
}
|