1 7 package javax.swing.plaf.synth; 8 9 import java.awt.*; 10 import java.net.*; 11 import javax.swing.*; 12 13 23 class ImagePainter extends SynthPainter { 24 private Image image; 25 private Insets sInsets; 26 private Insets dInsets; 27 private URL path; 28 private boolean tiles; 29 private boolean paintCenter; 30 private Object renderingHint; 31 32 ImagePainter(boolean tiles, boolean paintCenter, Object renderingHint, 33 Insets sourceInsets, Insets destinationInsets) { 34 this.sInsets = (Insets)sourceInsets.clone(); 35 if (destinationInsets == null) { 36 dInsets = sInsets; 37 } 38 else { 39 this.dInsets = (Insets)destinationInsets.clone(); 40 } 41 this.tiles = tiles; 42 this.paintCenter = paintCenter; 43 this.renderingHint = renderingHint; 44 } 45 46 public ImagePainter(boolean tiles, boolean paintCenter, 47 Object renderingHint, Insets sourceInsets, 48 Insets destinationInsets, Image image) { 49 this(tiles, paintCenter, renderingHint, sourceInsets, 50 destinationInsets); 51 this.image = image; 52 } 53 54 public ImagePainter(boolean tiles, boolean paintCenter, 55 Object renderingHint, Insets sourceInsets, 56 Insets destinationInsets, URL path) { 57 this(tiles, paintCenter, renderingHint, sourceInsets, 58 destinationInsets); 59 this.path = path; 60 } 61 62 public boolean getTiles() { 63 return tiles; 64 } 65 66 public boolean getPaintsCenter() { 67 return paintCenter; 68 } 69 70 public Object getRenderingHint() { 71 return renderingHint; 72 } 73 74 public Insets getInsets(Insets insets) { 75 if (insets == null) { 76 return (Insets)this.dInsets.clone(); 77 } 78 insets.left = this.dInsets.left; 79 insets.right = this.dInsets.right; 80 insets.top = this.dInsets.top; 81 insets.bottom = this.dInsets.bottom; 82 return insets; 83 } 84 85 public Image getImage() { 86 if (image == null) { 87 image = new ImageIcon(path, null).getImage(); 88 } 89 return image; 90 } 91 92 private void paint(Graphics g, int x, int y, int w, int h) { 93 Image image; 94 Object lastHint; 95 Object renderingHint = getRenderingHint(); 96 97 if (renderingHint != null) { 98 Graphics2D g2 = (Graphics2D)g; 99 100 lastHint = g2.getRenderingHint(RenderingHints.KEY_INTERPOLATION); 101 if (lastHint == null) { 102 lastHint = RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR; 103 } 104 g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, 105 renderingHint); 106 } 107 else { 108 lastHint = null; 109 } 110 111 if ((image = getImage()) != null) { 112 Insets sInsets = this.sInsets; 113 Insets dInsets = this.dInsets; 114 int iw = image.getWidth(null); 115 int ih = image.getHeight(null); 116 117 boolean stretch = !getTiles(); 118 119 g.drawImage(image, x, y, x + dInsets.left, y + dInsets.top, 121 0, 0, sInsets.left, sInsets.top, null); 122 drawChunk(image, g, stretch, x + dInsets.left, y, 124 x + w - dInsets.right, y + dInsets.top, sInsets.left, 0, 125 iw - sInsets.right, sInsets.top, true); 126 g.drawImage(image, x + w - dInsets.right, y, x + w, 128 y + dInsets.top, iw - sInsets.right, 0, iw, 129 sInsets.top, null); 130 drawChunk(image, g, stretch, x + w - dInsets.right, 132 y + dInsets.top, x + w, y + h - dInsets.bottom, 133 iw - sInsets.right, sInsets.top, iw, 134 ih - sInsets.bottom, false); 135 g.drawImage(image, x + w - dInsets.right, 137 y + h - dInsets.bottom, x + w, y + h, 138 iw - sInsets.right, ih - sInsets.bottom, iw, ih, 139 null); 140 drawChunk(image, g, stretch, x + dInsets.left, 142 y + h - dInsets.bottom, x + w - dInsets.right, 143 y + h, sInsets.left, ih - sInsets.bottom, 144 iw - sInsets.right, ih, true); 145 g.drawImage(image, x, y + h - dInsets.bottom, x + dInsets.left, 147 y + h, 0, ih - sInsets.bottom, sInsets.left, ih, 148 null); 149 151 drawChunk(image, g, stretch, x, y + dInsets.top, 152 x + dInsets.left, y + h - dInsets.bottom, 153 0, sInsets.top, sInsets.left, ih - sInsets.bottom, 154 false); 155 156 if (getPaintsCenter()) { 158 g.drawImage(image, x + dInsets.left, y + dInsets.top, 159 x + w - dInsets.right, y + h - dInsets.bottom, 160 sInsets.left, sInsets.top, iw - sInsets.right, 161 ih - sInsets.bottom, null); 162 } 163 } 164 165 if (renderingHint != null) { 166 ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_INTERPOLATION, 167 lastHint); 168 } 169 } 170 171 private void drawChunk(Image image, Graphics g, boolean stretch, 172 int dx1, int dy1, int dx2, int dy2, int sx1, 173 int sy1, int sx2, int sy2, 174 boolean xDirection) { 175 if (stretch) { 176 g.drawImage(image, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, null); 177 } 178 else { 179 int xSize = sx2 - sx1; 180 int ySize = sy2 - sy1; 181 int deltaX; 182 int deltaY; 183 184 if (xDirection) { 185 deltaX = xSize; 186 deltaY = 0; 187 } 188 else { 189 deltaX = 0; 190 deltaY = ySize; 191 } 192 while (dx1 < dx2 && dy1 < dy2) { 193 int newDX2 = Math.min(dx2, dx1 + xSize); 194 int newDY2 = Math.min(dy2, dy1 + ySize); 195 196 g.drawImage(image, dx1, dy1, newDX2, newDY2, 197 sx1, sy1, sx1 + newDX2 - dx1, 198 sy1 + newDY2 - dy1, null); 199 dx1 += deltaX; 200 dy1 += deltaY; 201 } 202 } 203 } 204 205 206 public void paintArrowButtonBackground(SynthContext context, 208 Graphics g, int x, int y, 209 int w, int h) { 210 paint(g, x, y, w, h); 211 } 212 213 public void paintArrowButtonBorder(SynthContext context, 214 Graphics g, int x, int y, 215 int w, int h) { 216 paint(g, x, y, w, h); 217 } 218 219 public void paintArrowButtonForeground(SynthContext context, 220 Graphics g, int x, int y, 221 int w, int h, 222 int direction) { 223 paint(g, x, y, w, h); 224 } 225 226 public void paintButtonBackground(SynthContext context, 228 Graphics g, int x, int y, 229 int w, int h) { 230 paint(g, x, y, w, h); 231 } 232 233 public void paintButtonBorder(SynthContext context, 234 Graphics g, int x, int y, 235 int w, int h) { 236 paint(g, x, y, w, h); 237 } 238 239 public void paintCheckBoxMenuItemBackground(SynthContext context, 241 Graphics g, int x, int y, 242 int w, int h) { 243 paint(g, x, y, w, h); 244 } 245 246 public void paintCheckBoxMenuItemBorder(SynthContext context, 247 Graphics g, int x, int y, 248 int w, int h) { 249 paint(g, x, y, w, h); 250 } 251 252 public void paintCheckBoxBackground(SynthContext context, 254 Graphics g, int x, int y, 255 int w, int h) { 256 paint(g, x, y, w, h); 257 } 258 259 public void paintCheckBoxBorder(SynthContext context, 260 Graphics g, int x, int y, 261 int w, int h) { 262 paint(g, x, y, w, h); 263 } 264 265 public void paintColorChooserBackground(SynthContext context, 267 Graphics g, int x, int y, 268 int w, int h) { 269 paint(g, x, y, w, h); 270 } 271 272 public void paintColorChooserBorder(SynthContext context, 273 Graphics g, int x, int y, 274 int w, int h) { 275 paint(g, x, y, w, h); 276 } 277 278 public void paintComboBoxBackground(SynthContext context, 280 Graphics g, int x, int y, 281 int w, int h) { 282 paint(g, x, y, w, h); 283 } 284 285 public void paintComboBoxBorder(SynthContext context, 286 Graphics g, int x, int y, 287 int w, int h) { 288 paint(g, x, y, w, h); 289 } 290 291 public void paintDesktopIconBackground(SynthContext context, 293 Graphics g, int x, int y, 294 int w, int h) { 295 paint(g, x, y, w, h); 296 } 297 298 public void paintDesktopIconBorder(SynthContext context, 299 Graphics g, int x, int y, 300 int w, int h) { 301 paint(g, x, y, w, h); 302 } 303 304 public void paintDesktopPaneBackground(SynthContext context, 306 Graphics g, int x, int y, 307 int w, int h) { 308 paint(g, x, y, w, h); 309 } 310 311 public void paintDesktopPaneBorder(SynthContext context, 312 Graphics g, int x, int y, 313 int w, int h) { 314 paint(g, x, y, w, h); 315 } 316 317 public void paintEditorPaneBackground(SynthContext context, 319 Graphics g, int x, int y, 320 int w, int h) { 321 paint(g, x, y, w, h); 322 } 323 324 public void paintEditorPaneBorder(SynthContext context, 325 Graphics g, int x, int y, 326 int w, int h) { 327 paint(g, x, y, w, h); 328 } 329 330 public void paintFileChooserBackground(SynthContext context, 332 Graphics g, int x, int y, 333 int w, int h) { 334 paint(g, x, y, w, h); 335 } 336 337 public void paintFileChooserBorder(SynthContext context, 338 Graphics g, int x, int y, 339 int w, int h) { 340 paint(g, x, y, w, h); 341 } 342 343 public void paintFormattedTextFieldBackground(SynthContext context, 345 Graphics g, int x, int y, 346 int w, int h) { 347 paint(g, x, y, w, h); 348 } 349 350 public void paintFormattedTextFieldBorder(SynthContext context, 351 Graphics g, int x, int y, 352 int w, int h) { 353 paint(g, x, y, w, h); 354 } 355 356 public void paintInternalFrameTitlePaneBackground(SynthContext context, 358 Graphics g, int x, int y, 359 int w, int h) { 360 paint(g, x, y, w, h); 361 } 362 363 public void paintInternalFrameTitlePaneBorder(SynthContext context, 364 Graphics g, int x, int y, 365 int w, int h) { 366 paint(g, x, y, w, h); 367 } 368 369 public void paintInternalFrameBackground(SynthContext context, 371 Graphics g, int x, int y, 372 int w, int h) { 373 paint(g, x, y, w, h); 374 } 375 376 public void paintInternalFrameBorder(SynthContext context, 377 Graphics g, int x, int y, 378 int w, int h) { 379 paint(g, x, y, w, h); 380 } 381 382 public void paintLabelBackground(SynthContext context, 384 Graphics g, int x, int y, 385 int w, int h) { 386 paint(g, x, y, w, h); 387 } 388 389 public void paintLabelBorder(SynthContext context, 390 Graphics g, int x, int y, 391 int w, int h) { 392 paint(g, x, y, w, h); 393 } 394 395 public void paintListBackground(SynthContext context, 397 Graphics g, int x, int y, 398 int w, int h) { 399 paint(g, x, y, w, h); 400 } 401 402 public void paintListBorder(SynthContext context, 403 Graphics g, int x, int y, 404 int w, int h) { 405 paint(g, x, y, w, h); 406 } 407 408 public void paintMenuBarBackground(SynthContext context, 410 Graphics g, int x, int y, 411 int w, int h) { 412 paint(g, x, y, w, h); 413 } 414 415 public void paintMenuBarBorder(SynthContext context, 416 Graphics g, int x, int y, 417 int w, int h) { 418 paint(g, x, y, w, h); 419 } 420 421 public void paintMenuItemBackground(SynthContext context, 423 Graphics g, int x, int y, 424 int w, int h) { 425 paint(g, x, y, w, h); 426 } 427 428 public void paintMenuItemBorder(SynthContext context, 429 Graphics g, int x, int y, 430 int w, int h) { 431 paint(g, x, y, w, h); 432 } 433 434 public void paintMenuBackground(SynthContext context, 436 Graphics g, int x, int y, 437 int w, int h) { 438 paint(g, x, y, w, h); 439 } 440 441 public void paintMenuBorder(SynthContext context, 442 Graphics g, int x, int y, 443 int w, int h) { 444 paint(g, x, y, w, h); 445 } 446 447 public void paintOptionPaneBackground(SynthContext context, 449 Graphics g, int x, int y, 450 int w, int h) { 451 paint(g, x, y, w, h); 452 } 453 454 public void paintOptionPaneBorder(SynthContext context, 455 Graphics g, int x, int y, 456 int w, int h) { 457 paint(g, x, y, w, h); 458 } 459 460 public void paintPanelBackground(SynthContext context, 462 Graphics g, int x, int y, 463 int w, int h) { 464 paint(g, x, y, w, h); 465 } 466 467 public void paintPanelBorder(SynthContext context, 468 Graphics g, int x, int y, 469 int w, int h) { 470 paint(g, x, y, w, h); 471 } 472 473 public void paintPasswordFieldBackground(SynthContext context, 475 Graphics g, int x, int y, 476 int w, int h) { 477 paint(g, x, y, w, h); 478 } 479 480 public void paintPasswordFieldBorder(SynthContext context, 481 Graphics g, int x, int y, 482 int w, int h) { 483 paint(g, x, y, w, h); 484 } 485 486 public void paintPopupMenuBackground(SynthContext context, 488 Graphics g, int x, int y, 489 int w, int h) { 490 paint(g, x, y, w, h); 491 } 492 493 public void paintPopupMenuBorder(SynthContext context, 494 Graphics g, int x, int y, 495 int w, int h) { 496 paint(g, x, y, w, h); 497 } 498 499 public void paintProgressBarBackground(SynthContext context, 501 Graphics g, int x, int y, 502 int w, int h) { 503 paint(g, x, y, w, h); 504 } 505 506 public void paintProgressBarBorder(SynthContext context, 507 Graphics g, int x, int y, 508 int w, int h) { 509 paint(g, x, y, w, h); 510 } 511 512 public void paintProgressBarForeground(SynthContext context, 513 Graphics g, int x, int y, 514 int w, int h, int orientation) { 515 paint(g, x, y, w, h); 516 } 517 518 public void paintRadioButtonMenuItemBackground(SynthContext context, 520 Graphics g, int x, int y, 521 int w, int h) { 522 paint(g, x, y, w, h); 523 } 524 525 public void paintRadioButtonMenuItemBorder(SynthContext context, 526 Graphics g, int x, int y, 527 int w, int h) { 528 paint(g, x, y, w, h); 529 } 530 531 public void paintRadioButtonBackground(SynthContext context, 533 Graphics g, int x, int y, 534 int w, int h) { 535 paint(g, x, y, w, h); 536 } 537 538 public void paintRadioButtonBorder(SynthContext context, 539 Graphics g, int x, int y, 540 int w, int h) { 541 paint(g, x, y, w, h); 542 } 543 544 public void paintRootPaneBackground(SynthContext context, 546 Graphics g, int x, int y, 547 int w, int h) { 548 paint(g, x, y, w, h); 549 } 550 551 public void paintRootPaneBorder(SynthContext context, 552 Graphics g, int x, int y, 553 int w, int h) { 554 paint(g, x, y, w, h); 555 } 556 557 public void paintScrollBarBackground(SynthContext context, 559 Graphics g, int x, int y, 560 int w, int h) { 561 paint(g, x, y, w, h); 562 } 563 564 public void paintScrollBarBorder(SynthContext context, 565 Graphics g, int x, int y, 566 int w, int h) { 567 paint(g, x, y, w, h); 568 } 569 570 public void paintScrollBarThumbBackground(SynthContext context, 572 Graphics g, int x, int y, 573 int w, int h, int orientation) { 574 paint(g, x, y, w, h); 575 } 576 577 public void paintScrollBarThumbBorder(SynthContext context, 578 Graphics g, int x, int y, 579 int w, int h, int orientation) { 580 paint(g, x, y, w, h); 581 } 582 583 public void paintScrollBarTrackBackground(SynthContext context, 585 Graphics g, int x, int y, 586 int w, int h) { 587 paint(g, x, y, w, h); 588 } 589 590 public void paintScrollBarTrackBorder(SynthContext context, 591 Graphics g, int x, int y, 592 int w, int h) { 593 paint(g, x, y, w, h); 594 } 595 596 public void paintScrollPaneBackground(SynthContext context, 598 Graphics g, int x, int y, 599 int w, int h) { 600 paint(g, x, y, w, h); 601 } 602 603 public void paintScrollPaneBorder(SynthContext context, 604 Graphics g, int x, int y, 605 int w, int h) { 606 paint(g, x, y, w, h); 607 } 608 609 public void paintSeparatorBackground(SynthContext context, 611 Graphics g, int x, int y, 612 int w, int h) { 613 paint(g, x, y, w, h); 614 } 615 616 public void paintSeparatorBorder(SynthContext context, 617 Graphics g, int x, int y, 618 int w, int h) { 619 paint(g, x, y, w, h); 620 } 621 622 public void paintSeparatorForeground(SynthContext context, 623 Graphics g, int x, int y, 624 int w, int h, int orientation) { 625 paint(g, x, y, w, h); 626 } 627 628 public void paintSliderBackground(SynthContext context, 630 Graphics g, int x, int y, 631 int w, int h) { 632 paint(g, x, y, w, h); 633 } 634 635 public void paintSliderBorder(SynthContext context, 636 Graphics g, int x, int y, 637 int w, int h) { 638 paint(g, x, y, w, h); 639 } 640 641 public void paintSliderThumbBackground(SynthContext context, 643 Graphics g, int x, int y, 644 int w, int h, int orientation) { 645 paint(g, x, y, w, h); 646 } 647 648 public void paintSliderThumbBorder(SynthContext context, 649 Graphics g, int x, int y, 650 int w, int h, int orientation) { 651 paint(g, x, y, w, h); 652 } 653 654 public void paintSliderTrackBackground(SynthContext context, 656 Graphics g, int x, int y, 657 int w, int h) { 658 paint(g, x, y, w, h); 659 } 660 661 public void paintSliderTrackBorder(SynthContext context, 662 Graphics g, int x, int y, 663 int w, int h) { 664 paint(g, x, y, w, h); 665 } 666 667 public void paintSpinnerBackground(SynthContext context, 669 Graphics g, int x, int y, 670 int w, int h) { 671 paint(g, x, y, w, h); 672 } 673 674 public void paintSpinnerBorder(SynthContext context, 675 Graphics g, int x, int y, 676 int w, int h) { 677 paint(g, x, y, w, h); 678 } 679 680 public void paintSplitPaneDividerBackground(SynthContext context, 682 Graphics g, int x, int y, 683 int w, int h) { 684 paint(g, x, y, w, h); 685 } 686 687 public void paintSplitPaneDividerForeground(SynthContext context, 688 Graphics g, int x, int y, 689 int w, int h, int orientation) { 690 paint(g, x, y, w, h); 691 } 692 693 public void paintSplitPaneDragDivider(SynthContext context, 694 Graphics g, int x, int y, 695 int w, int h, int orientation) { 696 paint(g, x, y, w, h); 697 } 698 699 public void paintSplitPaneBackground(SynthContext context, 701 Graphics g, int x, int y, 702 int w, int h) { 703 paint(g, x, y, w, h); 704 } 705 706 public void paintSplitPaneBorder(SynthContext context, 707 Graphics g, int x, int y, 708 int w, int h) { 709 paint(g, x, y, w, h); 710 } 711 712 public void paintTabbedPaneBackground(SynthContext context, 714 Graphics g, int x, int y, 715 int w, int h) { 716 paint(g, x, y, w, h); 717 } 718 719 public void paintTabbedPaneBorder(SynthContext context, 720 Graphics g, int x, int y, 721 int w, int h) { 722 paint(g, x, y, w, h); 723 } 724 725 public void paintTabbedPaneTabAreaBackground(SynthContext context, 727 Graphics g, int x, int y, 728 int w, int h) { 729 paint(g, x, y, w, h); 730 } 731 732 public void paintTabbedPaneTabAreaBorder(SynthContext context, 733 Graphics g, int x, int y, 734 int w, int h) { 735 paint(g, x, y, w, h); 736 } 737 738 public void paintTabbedPaneTabBackground(SynthContext context, Graphics g, 740 int x, int y, int w, int h, 741 int tabIndex) { 742 paint(g, x, y, w, h); 743 } 744 745 public void paintTabbedPaneTabBorder(SynthContext context, Graphics g, 746 int x, int y, int w, int h, 747 int tabIndex) { 748 paint(g, x, y, w, h); 749 } 750 751 public void paintTabbedPaneContentBackground(SynthContext context, 753 Graphics g, int x, int y, int w, 754 int h) { 755 paint(g, x, y, w, h); 756 } 757 758 public void paintTabbedPaneContentBorder(SynthContext context, Graphics g, 759 int x, int y, int w, int h) { 760 paint(g, x, y, w, h); 761 } 762 763 public void paintTableHeaderBackground(SynthContext context, 765 Graphics g, int x, int y, 766 int w, int h) { 767 paint(g, x, y, w, h); 768 } 769 770 public void paintTableHeaderBorder(SynthContext context, 771 Graphics g, int x, int y, 772 int w, int h) { 773 paint(g, x, y, w, h); 774 } 775 776 public void paintTableBackground(SynthContext context, 778 Graphics g, int x, int y, 779 int w, int h) { 780 paint(g, x, y, w, h); 781 } 782 783 public void paintTableBorder(SynthContext context, 784 Graphics g, int x, int y, 785 int w, int h) { 786 paint(g, x, y, w, h); 787 } 788 789 public void paintTextAreaBackground(SynthContext context, 791 Graphics g, int x, int y, 792 int w, int h) { 793 paint(g, x, y, w, h); 794 } 795 796 public void paintTextAreaBorder(SynthContext context, 797 Graphics g, int x, int y, 798 int w, int h) { 799 paint(g, x, y, w, h); 800 } 801 802 public void paintTextPaneBackground(SynthContext context, 804 Graphics g, int x, int y, 805 int w, int h) { 806 paint(g, x, y, w, h); 807 } 808 809 public void paintTextPaneBorder(SynthContext context, 810 Graphics g, int x, int y, 811 int w, int h) { 812 paint(g, x, y, w, h); 813 } 814 815 public void paintTextFieldBackground(SynthContext context, 817 Graphics g, int x, int y, 818 int w, int h) { 819 paint(g, x, y, w, h); 820 } 821 822 public void paintTextFieldBorder(SynthContext context, 823 Graphics g, int x, int y, 824 int w, int h) { 825 paint(g, x, y, w, h); 826 } 827 828 public void paintToggleButtonBackground(SynthContext context, 830 Graphics g, int x, int y, 831 int w, int h) { 832 paint(g, x, y, w, h); 833 } 834 835 public void paintToggleButtonBorder(SynthContext context, 836 Graphics g, int x, int y, 837 int w, int h) { 838 paint(g, x, y, w, h); 839 } 840 841 public void paintToolBarBackground(SynthContext context, 843 Graphics g, int x, int y, 844 int w, int h) { 845 paint(g, x, y, w, h); 846 } 847 848 public void paintToolBarBorder(SynthContext context, 849 Graphics g, int x, int y, 850 int w, int h) { 851 paint(g, x, y, w, h); 852 } 853 854 public void paintToolBarContentBackground(SynthContext context, 856 Graphics g, int x, int y, 857 int w, int h) { 858 paint(g, x, y, w, h); 859 } 860 861 public void paintToolBarContentBorder(SynthContext context, 862 Graphics g, int x, int y, 863 int w, int h) { 864 paint(g, x, y, w, h); 865 } 866 867 public void paintToolBarDragWindowBackground(SynthContext context, 869 Graphics g, int x, int y, 870 int w, int h) { 871 paint(g, x, y, w, h); 872 } 873 874 public void paintToolBarDragWindowBorder(SynthContext context, 875 Graphics g, int x, int y, 876 int w, int h) { 877 paint(g, x, y, w, h); 878 } 879 880 public void paintToolTipBackground(SynthContext context, 882 Graphics g, int x, int y, 883 int w, int h) { 884 paint(g, x, y, w, h); 885 } 886 887 public void paintToolTipBorder(SynthContext context, 888 Graphics g, int x, int y, 889 int w, int h) { 890 paint(g, x, y, w, h); 891 } 892 893 public void paintTreeBackground(SynthContext context, 895 Graphics g, int x, int y, 896 int w, int h) { 897 paint(g, x, y, w, h); 898 } 899 900 public void paintTreeBorder(SynthContext context, 901 Graphics g, int x, int y, 902 int w, int h) { 903 paint(g, x, y, w, h); 904 } 905 906 public void paintTreeCellBackground(SynthContext context, 908 Graphics g, int x, int y, 909 int w, int h) { 910 paint(g, x, y, w, h); 911 } 912 913 public void paintTreeCellBorder(SynthContext context, 914 Graphics g, int x, int y, 915 int w, int h) { 916 paint(g, x, y, w, h); 917 } 918 919 public void paintTreeCellFocus(SynthContext context, 920 Graphics g, int x, int y, 921 int w, int h) { 922 paint(g, x, y, w, h); 923 } 924 925 public void paintViewportBackground(SynthContext context, 927 Graphics g, int x, int y, 928 int w, int h) { 929 paint(g, x, y, w, h); 930 } 931 932 public void paintViewportBorder(SynthContext context, 933 Graphics g, int x, int y, 934 int w, int h) { 935 paint(g, x, y, w, h); 936 } 937 } 938 | Popular Tags |