1 28 package net.sf.jasperreports.engine.base; 29 30 import net.sf.jasperreports.engine.JRConstants; 31 import net.sf.jasperreports.engine.JRGraphicElement; 32 import net.sf.jasperreports.engine.util.JRStyleResolver; 33 34 35 41 public abstract class JRBaseGraphicElement extends JRBaseElement implements JRGraphicElement 42 { 43 44 45 48 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 49 50 53 protected Byte pen; 54 protected Byte fill; 55 56 57 74 protected JRBaseGraphicElement(JRGraphicElement graphicElement, JRBaseObjectFactory factory) 75 { 76 super(graphicElement, factory); 77 78 pen = graphicElement.getOwnPen(); 79 fill = graphicElement.getOwnFill(); 80 } 81 82 83 86 public byte getPen() 87 { 88 return JRStyleResolver.getPen(this, PEN_1_POINT); 89 } 90 91 public Byte getOwnPen() 92 { 93 return this.pen; 94 } 95 96 99 public void setPen(byte pen) 100 { 101 this.pen = new Byte (pen); 102 } 103 104 107 public void setPen(Byte pen) 108 { 109 this.pen = pen; 110 } 111 112 115 public byte getFill() 116 { 117 return JRStyleResolver.getFill(this, FILL_SOLID); 118 } 119 120 public Byte getOwnFill() 121 { 122 return this.fill; 123 } 124 125 128 public void setFill(byte fill) 129 { 130 this.fill = new Byte (fill); 131 } 132 133 136 public void setFill(Byte fill) 137 { 138 this.fill = fill; 139 } 140 141 142 } 143 | Popular Tags |