45 lines
1.1 KiB
Java
45 lines
1.1 KiB
Java
package net.sf.jasperreports.engine.base;
|
|
|
|
import java.awt.Color;
|
|
import net.sf.jasperreports.engine.JRLineBox;
|
|
import net.sf.jasperreports.engine.JRPen;
|
|
import net.sf.jasperreports.engine.JRPenContainer;
|
|
import net.sf.jasperreports.engine.util.JRStyleResolver;
|
|
|
|
public class JRBaseBoxPen extends JRBasePen implements JRBoxPen {
|
|
private static final long serialVersionUID = 10200L;
|
|
|
|
protected JRLineBox lineBox = null;
|
|
|
|
public JRBaseBoxPen(JRLineBox box) {
|
|
super((JRPenContainer)box);
|
|
this.lineBox = box;
|
|
}
|
|
|
|
public JRLineBox getBox() {
|
|
return this.lineBox;
|
|
}
|
|
|
|
public Float getLineWidth() {
|
|
return JRStyleResolver.getLineWidth(this, this.penContainer.getDefaultLineWidth());
|
|
}
|
|
|
|
public Byte getLineStyle() {
|
|
return JRStyleResolver.getLineStyle(this);
|
|
}
|
|
|
|
public Color getLineColor() {
|
|
return JRStyleResolver.getLineColor(this, this.penContainer.getDefaultLineColor());
|
|
}
|
|
|
|
public JRPen getPen(JRLineBox box) {
|
|
return box.getPen();
|
|
}
|
|
|
|
public JRBoxPen clone(JRLineBox lineBox) {
|
|
JRBaseBoxPen clone = (JRBaseBoxPen)clone((JRPenContainer)lineBox);
|
|
clone.lineBox = lineBox;
|
|
return clone;
|
|
}
|
|
}
|