1 28 package net.sf.jasperreports.engine.base; 29 30 import java.awt.Color ; 31 import java.util.ArrayList ; 32 import java.util.List ; 33 34 import net.sf.jasperreports.engine.JRBox; 35 import net.sf.jasperreports.engine.JRConstants; 36 import net.sf.jasperreports.engine.JRDefaultStyleProvider; 37 import net.sf.jasperreports.engine.JRElement; 38 import net.sf.jasperreports.engine.JRPrintElement; 39 import net.sf.jasperreports.engine.JRPrintFrame; 40 import net.sf.jasperreports.engine.util.JRStyleResolver; 41 42 48 public class JRBasePrintFrame extends JRBasePrintElement implements JRPrintFrame 49 { 50 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 51 52 private List elements; 53 private JRBox box; 54 55 public JRBasePrintFrame(JRDefaultStyleProvider defaultStyleProvider) 56 { 57 super(defaultStyleProvider); 58 59 elements = new ArrayList (); 60 } 61 62 65 public byte getMode() 66 { 67 return JRStyleResolver.getMode(this, JRElement.MODE_TRANSPARENT); 68 } 69 70 public void setBox(JRBox box) 71 { 72 this.box = box; 73 } 74 75 public JRBox getBox() 76 { 77 return box; 78 } 79 80 public void addElement(JRPrintElement element) 81 { 82 elements.add(element); 83 } 84 85 public List getElements() 86 { 87 return elements; 88 } 89 90 protected Byte border; 92 protected Byte topBorder = null; 93 protected Byte leftBorder = null; 94 protected Byte bottomBorder = null; 95 protected Byte rightBorder = null; 96 protected Color borderColor = null; 97 protected Color topBorderColor = null; 98 protected Color leftBorderColor = null; 99 protected Color bottomBorderColor = null; 100 protected Color rightBorderColor = null; 101 protected Integer padding; 102 protected Integer topPadding = null; 103 protected Integer leftPadding = null; 104 protected Integer bottomPadding = null; 105 protected Integer rightPadding = null; 106 107 108 111 public byte getBorder() 112 { 113 return JRStyleResolver.getBorder(this); 114 } 115 116 public Byte getOwnBorder() 117 { 118 return border; 119 } 120 121 124 public void setBorder(byte border) 125 { 126 this.border = new Byte (border); 127 } 128 129 132 public Color getBorderColor() 133 { 134 return JRStyleResolver.getBorderColor(this, getForecolor()); 135 } 136 137 public Color getOwnBorderColor() 138 { 139 return borderColor; 140 } 141 142 145 public void setBorderColor(Color borderColor) 146 { 147 this.borderColor = borderColor; 148 } 149 150 153 public int getPadding() 154 { 155 return JRStyleResolver.getPadding(this); 156 } 157 158 public Integer getOwnPadding() 159 { 160 return padding; 161 } 162 163 166 public void setPadding(int padding) 167 { 168 this.padding = new Integer (padding); 169 } 170 171 174 public byte getTopBorder() 175 { 176 return JRStyleResolver.getTopBorder(this); 177 } 178 179 182 public Byte getOwnTopBorder() 183 { 184 return topBorder; 185 } 186 187 190 public void setTopBorder(byte topBorder) 191 { 192 this.topBorder = new Byte (topBorder); 193 } 194 195 198 public Color getTopBorderColor() 199 { 200 return JRStyleResolver.getTopBorderColor(this, getForecolor()); 201 } 202 203 206 public Color getOwnTopBorderColor() 207 { 208 return topBorderColor; 209 } 210 211 214 public void setTopBorderColor(Color topBorderColor) 215 { 216 this.topBorderColor = topBorderColor; 217 } 218 219 222 public int getTopPadding() 223 { 224 return JRStyleResolver.getTopPadding(this); 225 } 226 227 230 public Integer getOwnTopPadding() 231 { 232 return topPadding; 233 } 234 235 238 public void setTopPadding(int topPadding) 239 { 240 this.topPadding = new Integer (topPadding); 241 } 242 243 246 public byte getLeftBorder() 247 { 248 return JRStyleResolver.getLeftBorder(this); 249 } 250 251 254 public Byte getOwnLeftBorder() 255 { 256 return leftBorder; 257 } 258 259 262 public void setLeftBorder(byte leftBorder) 263 { 264 this.leftBorder = new Byte (leftBorder); 265 } 266 267 270 public Color getLeftBorderColor() 271 { 272 return JRStyleResolver.getLeftBorderColor(this, getForecolor()); 273 } 274 275 278 public Color getOwnLeftBorderColor() 279 { 280 return leftBorderColor; 281 } 282 283 286 public void setLeftBorderColor(Color leftBorderColor) 287 { 288 this.leftBorderColor = leftBorderColor; 289 } 290 291 294 public int getLeftPadding() 295 { 296 return JRStyleResolver.getLeftPadding(this); 297 } 298 299 302 public Integer getOwnLeftPadding() 303 { 304 return leftPadding; 305 } 306 307 310 public void setLeftPadding(int leftPadding) 311 { 312 this.leftPadding = new Integer (leftPadding); 313 } 314 315 318 public byte getBottomBorder() 319 { 320 return JRStyleResolver.getBottomBorder(this); 321 } 322 323 326 public Byte getOwnBottomBorder() 327 { 328 return bottomBorder; 329 } 330 331 334 public void setBottomBorder(byte bottomBorder) 335 { 336 this.bottomBorder = new Byte (bottomBorder); 337 } 338 339 342 public Color getBottomBorderColor() 343 { 344 return JRStyleResolver.getBottomBorderColor(this, getForecolor()); 345 } 346 347 350 public Color getOwnBottomBorderColor() 351 { 352 return bottomBorderColor; 353 } 354 355 358 public void setBottomBorderColor(Color bottomBorderColor) 359 { 360 this.bottomBorderColor = bottomBorderColor; 361 } 362 363 366 public int getBottomPadding() 367 { 368 return JRStyleResolver.getBottomPadding(this); 369 } 370 371 374 public Integer getOwnBottomPadding() 375 { 376 return bottomPadding; 377 } 378 379 382 public void setBottomPadding(int bottomPadding) 383 { 384 this.bottomPadding = new Integer (bottomPadding); 385 } 386 387 390 public byte getRightBorder() 391 { 392 return JRStyleResolver.getRightBorder(this); 393 } 394 395 398 public Byte getOwnRightBorder() 399 { 400 return rightBorder; 401 } 402 403 406 public void setRightBorder(byte rightBorder) 407 { 408 this.rightBorder = new Byte (rightBorder); 409 } 410 411 414 public Color getRightBorderColor() 415 { 416 return JRStyleResolver.getRightBorderColor(this, getForecolor()); 417 } 418 419 422 public Color getOwnRightBorderColor() 423 { 424 return rightBorderColor; 425 } 426 427 430 public void setRightBorderColor(Color rightBorderColor) 431 { 432 this.rightBorderColor = rightBorderColor; 433 } 434 435 438 public int getRightPadding() 439 { 440 return JRStyleResolver.getRightPadding(this); 441 } 442 443 446 public Integer getOwnRightPadding() 447 { 448 return rightPadding; 449 } 450 451 454 public void setRightPadding(int rightPadding) 455 { 456 this.rightPadding = new Integer (rightPadding); 457 } 458 459 462 public void setBorder(Byte border) 463 { 464 this.border = border; 465 } 466 467 470 public void setPadding(Integer padding) 471 { 472 this.padding = padding; 473 } 474 475 478 public void setTopBorder(Byte topBorder) 479 { 480 this.topBorder = topBorder; 481 } 482 483 486 public void setTopPadding(Integer topPadding) 487 { 488 this.topPadding = topPadding; 489 } 490 491 494 public void setLeftBorder(Byte leftBorder) 495 { 496 this.leftBorder = leftBorder; 497 } 498 499 502 public void setLeftPadding(Integer leftPadding) 503 { 504 this.leftPadding = leftPadding; 505 } 506 507 510 public void setBottomBorder(Byte bottomBorder) 511 { 512 this.bottomBorder = bottomBorder; 513 } 514 515 518 public void setBottomPadding(Integer bottomPadding) 519 { 520 this.bottomPadding = bottomPadding; 521 } 522 523 526 public void setRightBorder(Byte rightBorder) 527 { 528 this.rightBorder = rightBorder; 529 } 530 531 534 public void setRightPadding(Integer rightPadding) 535 { 536 this.rightPadding = rightPadding; 537 } 538 539 } 540 | Popular Tags |