1 /* 2 * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 package javax.swing.plaf.synth; 26 27 import java.awt.*; 28 import java.lang.ref.WeakReference; 29 import java.net.*; 30 import javax.swing.*; 31 import sun.awt.AppContext; 32 import sun.swing.plaf.synth.Paint9Painter; 33 34 /** 35 * ImagePainter fills in the specified region using an Image. The Image 36 * is split into 9 segments: north, north east, east, south east, south, 37 * south west, west, north west and the center. The corners are defined 38 * by way of an insets, and the remaining regions are either tiled or 39 * scaled to fit. 40 * 41 * @author Scott Violet 42 */ 43 class ImagePainter extends SynthPainter { 44 private static final StringBuffer CACHE_KEY = 45 new StringBuffer("SynthCacheKey"); 46 47 private Image image; 48 private Insets sInsets; 49 private Insets dInsets; 50 private URL path; 51 private boolean tiles; 52 private boolean paintCenter; 53 private Paint9Painter imageCache; 54 private boolean center; 55 56 private static Paint9Painter getPaint9Painter() { 57 // A SynthPainter is created per <imagePainter>. We want the 58 // cache to be shared by all, and we don't use a static because we 59 // don't want it to persist between look and feels. For that reason 60 // we use a AppContext specific Paint9Painter. It's backed via 61 // a WeakRef so that it can go away if the look and feel changes. 62 synchronized(CACHE_KEY) { 63 @SuppressWarnings("unchecked") 64 WeakReference<Paint9Painter> cacheRef = 65 (WeakReference<Paint9Painter>)AppContext.getAppContext(). 66 get(CACHE_KEY); 67 Paint9Painter painter; 68 if (cacheRef == null || (painter = cacheRef.get()) == null) { 69 painter = new Paint9Painter(30); 70 cacheRef = new WeakReference<Paint9Painter>(painter); 71 AppContext.getAppContext().put(CACHE_KEY, cacheRef); 72 } 73 return painter; 74 } 75 } 76 77 ImagePainter(boolean tiles, boolean paintCenter, 78 Insets sourceInsets, Insets destinationInsets, URL path, 79 boolean center) { 80 if (sourceInsets != null) { 81 this.sInsets = (Insets)sourceInsets.clone(); 82 } 83 if (destinationInsets == null) { 84 dInsets = sInsets; 85 } 86 else { 87 this.dInsets = (Insets)destinationInsets.clone(); 88 } 89 this.tiles = tiles; 90 this.paintCenter = paintCenter; 91 this.imageCache = getPaint9Painter(); 92 this.path = path; 93 this.center = center; 94 } 95 96 public boolean getTiles() { 97 return tiles; 98 } 99 100 public boolean getPaintsCenter() { 101 return paintCenter; 102 } 103 104 public boolean getCenter() { 105 return center; 106 } 107 108 public Insets getInsets(Insets insets) { 109 if (insets == null) { 110 return (Insets)this.dInsets.clone(); 111 } 112 insets.left = this.dInsets.left; 113 insets.right = this.dInsets.right; 114 insets.top = this.dInsets.top; 115 insets.bottom = this.dInsets.bottom; 116 return insets; 117 } 118 119 public Image getImage() { 120 if (image == null) { 121 image = new ImageIcon(path, null).getImage(); 122 } 123 return image; 124 } 125 126 private void paint(SynthContext context, Graphics g, int x, int y, int w, 127 int h) { 128 Image image = getImage(); 129 if (Paint9Painter.validImage(image)) { 130 Paint9Painter.PaintType type; 131 if (getCenter()) { 132 type = Paint9Painter.PaintType.CENTER; 133 } 134 else if (!getTiles()) { 135 type = Paint9Painter.PaintType.PAINT9_STRETCH; 136 } 137 else { 138 type = Paint9Painter.PaintType.PAINT9_TILE; 139 } 140 int mask = Paint9Painter.PAINT_ALL; 141 if (!getCenter() && !getPaintsCenter()) { 142 mask |= Paint9Painter.PAINT_CENTER; 143 } 144 imageCache.paint(context.getComponent(), g, x, y, w, h, 145 image, sInsets, dInsets, type, 146 mask); 147 } 148 } 149 150 151 // SynthPainter 152 public void paintArrowButtonBackground(SynthContext context, 153 Graphics g, int x, int y, 154 int w, int h) { 155 paint(context, g, x, y, w, h); 156 } 157 158 public void paintArrowButtonBorder(SynthContext context, 159 Graphics g, int x, int y, 160 int w, int h) { 161 paint(context, g, x, y, w, h); 162 } 163 164 public void paintArrowButtonForeground(SynthContext context, 165 Graphics g, int x, int y, 166 int w, int h, 167 int direction) { 168 paint(context, g, x, y, w, h); 169 } 170 171 // BUTTON 172 public void paintButtonBackground(SynthContext context, 173 Graphics g, int x, int y, 174 int w, int h) { 175 paint(context, g, x, y, w, h); 176 } 177 178 public void paintButtonBorder(SynthContext context, 179 Graphics g, int x, int y, 180 int w, int h) { 181 paint(context, g, x, y, w, h); 182 } 183 184 // CHECK_BOX_MENU_ITEM 185 public void paintCheckBoxMenuItemBackground(SynthContext context, 186 Graphics g, int x, int y, 187 int w, int h) { 188 paint(context, g, x, y, w, h); 189 } 190 191 public void paintCheckBoxMenuItemBorder(SynthContext context, 192 Graphics g, int x, int y, 193 int w, int h) { 194 paint(context, g, x, y, w, h); 195 } 196 197 // CHECK_BOX 198 public void paintCheckBoxBackground(SynthContext context, 199 Graphics g, int x, int y, 200 int w, int h) { 201 paint(context, g, x, y, w, h); 202 } 203 204 public void paintCheckBoxBorder(SynthContext context, 205 Graphics g, int x, int y, 206 int w, int h) { 207 paint(context, g, x, y, w, h); 208 } 209 210 // COLOR_CHOOSER 211 public void paintColorChooserBackground(SynthContext context, 212 Graphics g, int x, int y, 213 int w, int h) { 214 paint(context, g, x, y, w, h); 215 } 216 217 public void paintColorChooserBorder(SynthContext context, 218 Graphics g, int x, int y, 219 int w, int h) { 220 paint(context, g, x, y, w, h); 221 } 222 223 // COMBO_BOX 224 public void paintComboBoxBackground(SynthContext context, 225 Graphics g, int x, int y, 226 int w, int h) { 227 paint(context, g, x, y, w, h); 228 } 229 230 public void paintComboBoxBorder(SynthContext context, 231 Graphics g, int x, int y, 232 int w, int h) { 233 paint(context, g, x, y, w, h); 234 } 235 236 // DESKTOP_ICON 237 public void paintDesktopIconBackground(SynthContext context, 238 Graphics g, int x, int y, 239 int w, int h) { 240 paint(context, g, x, y, w, h); 241 } 242 243 public void paintDesktopIconBorder(SynthContext context, 244 Graphics g, int x, int y, 245 int w, int h) { 246 paint(context, g, x, y, w, h); 247 } 248 249 // DESKTOP_PANE 250 public void paintDesktopPaneBackground(SynthContext context, 251 Graphics g, int x, int y, 252 int w, int h) { 253 paint(context, g, x, y, w, h); 254 } 255 256 public void paintDesktopPaneBorder(SynthContext context, 257 Graphics g, int x, int y, 258 int w, int h) { 259 paint(context, g, x, y, w, h); 260 } 261 262 // EDITOR_PANE 263 public void paintEditorPaneBackground(SynthContext context, 264 Graphics g, int x, int y, 265 int w, int h) { 266 paint(context, g, x, y, w, h); 267 } 268 269 public void paintEditorPaneBorder(SynthContext context, 270 Graphics g, int x, int y, 271 int w, int h) { 272 paint(context, g, x, y, w, h); 273 } 274 275 // FILE_CHOOSER 276 public void paintFileChooserBackground(SynthContext context, 277 Graphics g, int x, int y, 278 int w, int h) { 279 paint(context, g, x, y, w, h); 280 } 281 282 public void paintFileChooserBorder(SynthContext context, 283 Graphics g, int x, int y, 284 int w, int h) { 285 paint(context, g, x, y, w, h); 286 } 287 288 // FORMATTED_TEXT_FIELD 289 public void paintFormattedTextFieldBackground(SynthContext context, 290 Graphics g, int x, int y, 291 int w, int h) { 292 paint(context, g, x, y, w, h); 293 } 294 295 public void paintFormattedTextFieldBorder(SynthContext context, 296 Graphics g, int x, int y, 297 int w, int h) { 298 paint(context, g, x, y, w, h); 299 } 300 301 // INTERNAL_FRAME_TITLE_PANE 302 public void paintInternalFrameTitlePaneBackground(SynthContext context, 303 Graphics g, int x, int y, 304 int w, int h) { 305 paint(context, g, x, y, w, h); 306 } 307 308 public void paintInternalFrameTitlePaneBorder(SynthContext context, 309 Graphics g, int x, int y, 310 int w, int h) { 311 paint(context, g, x, y, w, h); 312 } 313 314 // INTERNAL_FRAME 315 public void paintInternalFrameBackground(SynthContext context, 316 Graphics g, int x, int y, 317 int w, int h) { 318 paint(context, g, x, y, w, h); 319 } 320 321 public void paintInternalFrameBorder(SynthContext context, 322 Graphics g, int x, int y, 323 int w, int h) { 324 paint(context, g, x, y, w, h); 325 } 326 327 // LABEL 328 public void paintLabelBackground(SynthContext context, 329 Graphics g, int x, int y, 330 int w, int h) { 331 paint(context, g, x, y, w, h); 332 } 333 334 public void paintLabelBorder(SynthContext context, 335 Graphics g, int x, int y, 336 int w, int h) { 337 paint(context, g, x, y, w, h); 338 } 339 340 // LIST 341 public void paintListBackground(SynthContext context, 342 Graphics g, int x, int y, 343 int w, int h) { 344 paint(context, g, x, y, w, h); 345 } 346 347 public void paintListBorder(SynthContext context, 348 Graphics g, int x, int y, 349 int w, int h) { 350 paint(context, g, x, y, w, h); 351 } 352 353 // MENU_BAR 354 public void paintMenuBarBackground(SynthContext context, 355 Graphics g, int x, int y, 356 int w, int h) { 357 paint(context, g, x, y, w, h); 358 } 359 360 public void paintMenuBarBorder(SynthContext context, 361 Graphics g, int x, int y, 362 int w, int h) { 363 paint(context, g, x, y, w, h); 364 } 365 366 // MENU_ITEM 367 public void paintMenuItemBackground(SynthContext context, 368 Graphics g, int x, int y, 369 int w, int h) { 370 paint(context, g, x, y, w, h); 371 } 372 373 public void paintMenuItemBorder(SynthContext context, 374 Graphics g, int x, int y, 375 int w, int h) { 376 paint(context, g, x, y, w, h); 377 } 378 379 // MENU 380 public void paintMenuBackground(SynthContext context, 381 Graphics g, int x, int y, 382 int w, int h) { 383 paint(context, g, x, y, w, h); 384 } 385 386 public void paintMenuBorder(SynthContext context, 387 Graphics g, int x, int y, 388 int w, int h) { 389 paint(context, g, x, y, w, h); 390 } 391 392 // OPTION_PANE 393 public void paintOptionPaneBackground(SynthContext context, 394 Graphics g, int x, int y, 395 int w, int h) { 396 paint(context, g, x, y, w, h); 397 } 398 399 public void paintOptionPaneBorder(SynthContext context, 400 Graphics g, int x, int y, 401 int w, int h) { 402 paint(context, g, x, y, w, h); 403 } 404 405 // PANEL 406 public void paintPanelBackground(SynthContext context, 407 Graphics g, int x, int y, 408 int w, int h) { 409 paint(context, g, x, y, w, h); 410 } 411 412 public void paintPanelBorder(SynthContext context, 413 Graphics g, int x, int y, 414 int w, int h) { 415 paint(context, g, x, y, w, h); 416 } 417 418 // PANEL 419 public void paintPasswordFieldBackground(SynthContext context, 420 Graphics g, int x, int y, 421 int w, int h) { 422 paint(context, g, x, y, w, h); 423 } 424 425 public void paintPasswordFieldBorder(SynthContext context, 426 Graphics g, int x, int y, 427 int w, int h) { 428 paint(context, g, x, y, w, h); 429 } 430 431 // POPUP_MENU 432 public void paintPopupMenuBackground(SynthContext context, 433 Graphics g, int x, int y, 434 int w, int h) { 435 paint(context, g, x, y, w, h); 436 } 437 438 public void paintPopupMenuBorder(SynthContext context, 439 Graphics g, int x, int y, 440 int w, int h) { 441 paint(context, g, x, y, w, h); 442 } 443 444 // PROGRESS_BAR 445 public void paintProgressBarBackground(SynthContext context, 446 Graphics g, int x, int y, 447 int w, int h) { 448 paint(context, g, x, y, w, h); 449 } 450 451 public void paintProgressBarBackground(SynthContext context, 452 Graphics g, int x, int y, 453 int w, int h, int orientation) { 454 paint(context, g, x, y, w, h); 455 } 456 457 public void paintProgressBarBorder(SynthContext context, 458 Graphics g, int x, int y, 459 int w, int h) { 460 paint(context, g, x, y, w, h); 461 } 462 463 public void paintProgressBarBorder(SynthContext context, 464 Graphics g, int x, int y, 465 int w, int h, int orientation) { 466 paint(context, g, x, y, w, h); 467 } 468 469 public void paintProgressBarForeground(SynthContext context, 470 Graphics g, int x, int y, 471 int w, int h, int orientation) { 472 paint(context, g, x, y, w, h); 473 } 474 475 // RADIO_BUTTON_MENU_ITEM 476 public void paintRadioButtonMenuItemBackground(SynthContext context, 477 Graphics g, int x, int y, 478 int w, int h) { 479 paint(context, g, x, y, w, h); 480 } 481 482 public void paintRadioButtonMenuItemBorder(SynthContext context, 483 Graphics g, int x, int y, 484 int w, int h) { 485 paint(context, g, x, y, w, h); 486 } 487 488 // RADIO_BUTTON 489 public void paintRadioButtonBackground(SynthContext context, 490 Graphics g, int x, int y, 491 int w, int h) { 492 paint(context, g, x, y, w, h); 493 } 494 495 public void paintRadioButtonBorder(SynthContext context, 496 Graphics g, int x, int y, 497 int w, int h) { 498 paint(context, g, x, y, w, h); 499 } 500 501 // ROOT_PANE 502 public void paintRootPaneBackground(SynthContext context, 503 Graphics g, int x, int y, 504 int w, int h) { 505 paint(context, g, x, y, w, h); 506 } 507 508 public void paintRootPaneBorder(SynthContext context, 509 Graphics g, int x, int y, 510 int w, int h) { 511 paint(context, g, x, y, w, h); 512 } 513 514 // SCROLL_BAR 515 public void paintScrollBarBackground(SynthContext context, 516 Graphics g, int x, int y, 517 int w, int h) { 518 paint(context, g, x, y, w, h); 519 } 520 521 public void paintScrollBarBackground(SynthContext context, 522 Graphics g, int x, int y, 523 int w, int h, int orientation) { 524 paint(context, g, x, y, w, h); 525 } 526 527 public void paintScrollBarBorder(SynthContext context, 528 Graphics g, int x, int y, 529 int w, int h) { 530 paint(context, g, x, y, w, h); 531 } 532 533 public void paintScrollBarBorder(SynthContext context, 534 Graphics g, int x, int y, 535 int w, int h, int orientation) { 536 paint(context, g, x, y, w, h); 537 } 538 539 // SCROLL_BAR_THUMB 540 public void paintScrollBarThumbBackground(SynthContext context, 541 Graphics g, int x, int y, 542 int w, int h, int orientation) { 543 paint(context, g, x, y, w, h); 544 } 545 546 public void paintScrollBarThumbBorder(SynthContext context, 547 Graphics g, int x, int y, 548 int w, int h, int orientation) { 549 paint(context, g, x, y, w, h); 550 } 551 552 // SCROLL_BAR_TRACK 553 public void paintScrollBarTrackBackground(SynthContext context, 554 Graphics g, int x, int y, 555 int w, int h) { 556 paint(context, g, x, y, w, h); 557 } 558 559 public void paintScrollBarTrackBackground(SynthContext context, 560 Graphics g, int x, int y, 561 int w, int h, int orientation) { 562 paint(context, g, x, y, w, h); 563 } 564 565 public void paintScrollBarTrackBorder(SynthContext context, 566 Graphics g, int x, int y, 567 int w, int h) { 568 paint(context, g, x, y, w, h); 569 } 570 571 public void paintScrollBarTrackBorder(SynthContext context, 572 Graphics g, int x, int y, 573 int w, int h, int orientation) { 574 paint(context, g, x, y, w, h); 575 } 576 577 // SCROLL_PANE 578 public void paintScrollPaneBackground(SynthContext context, 579 Graphics g, int x, int y, 580 int w, int h) { 581 paint(context, g, x, y, w, h); 582 } 583 584 public void paintScrollPaneBorder(SynthContext context, 585 Graphics g, int x, int y, 586 int w, int h) { 587 paint(context, g, x, y, w, h); 588 } 589 590 // SEPARATOR 591 public void paintSeparatorBackground(SynthContext context, 592 Graphics g, int x, int y, 593 int w, int h) { 594 paint(context, g, x, y, w, h); 595 } 596 597 public void paintSeparatorBackground(SynthContext context, 598 Graphics g, int x, int y, 599 int w, int h, int orientation) { 600 paint(context, g, x, y, w, h); 601 } 602 603 public void paintSeparatorBorder(SynthContext context, 604 Graphics g, int x, int y, 605 int w, int h) { 606 paint(context, g, x, y, w, h); 607 } 608 609 public void paintSeparatorBorder(SynthContext context, 610 Graphics g, int x, int y, 611 int w, int h, int orientation) { 612 paint(context, g, x, y, w, h); 613 } 614 615 public void paintSeparatorForeground(SynthContext context, 616 Graphics g, int x, int y, 617 int w, int h, int orientation) { 618 paint(context, g, x, y, w, h); 619 } 620 621 // SLIDER 622 public void paintSliderBackground(SynthContext context, 623 Graphics g, int x, int y, 624 int w, int h) { 625 paint(context, g, x, y, w, h); 626 } 627 628 public void paintSliderBackground(SynthContext context, 629 Graphics g, int x, int y, 630 int w, int h, int orientation) { 631 paint(context, g, x, y, w, h); 632 } 633 634 public void paintSliderBorder(SynthContext context, 635 Graphics g, int x, int y, 636 int w, int h) { 637 paint(context, g, x, y, w, h); 638 } 639 640 public void paintSliderBorder(SynthContext context, 641 Graphics g, int x, int y, 642 int w, int h, int orientation) { 643 paint(context, g, x, y, w, h); 644 } 645 646 // SLIDER_THUMB 647 public void paintSliderThumbBackground(SynthContext context, 648 Graphics g, int x, int y, 649 int w, int h, int orientation) { 650 paint(context, g, x, y, w, h); 651 } 652 653 public void paintSliderThumbBorder(SynthContext context, 654 Graphics g, int x, int y, 655 int w, int h, int orientation) { 656 paint(context, g, x, y, w, h); 657 } 658 659 // SLIDER_TRACK 660 public void paintSliderTrackBackground(SynthContext context, 661 Graphics g, int x, int y, 662 int w, int h) { 663 paint(context, g, x, y, w, h); 664 } 665 666 public void paintSliderTrackBackground(SynthContext context, 667 Graphics g, int x, int y, 668 int w, int h, int orientation) { 669 paint(context, g, x, y, w, h); 670 } 671 672 public void paintSliderTrackBorder(SynthContext context, 673 Graphics g, int x, int y, 674 int w, int h) { 675 paint(context, g, x, y, w, h); 676 } 677 678 679 public void paintSliderTrackBorder(SynthContext context, 680 Graphics g, int x, int y, 681 int w, int h, int orientation) { 682 paint(context, g, x, y, w, h); 683 } 684 685 // SPINNER 686 public void paintSpinnerBackground(SynthContext context, 687 Graphics g, int x, int y, 688 int w, int h) { 689 paint(context, g, x, y, w, h); 690 } 691 692 public void paintSpinnerBorder(SynthContext context, 693 Graphics g, int x, int y, 694 int w, int h) { 695 paint(context, g, x, y, w, h); 696 } 697 698 // SPLIT_PANE_DIVIDER 699 public void paintSplitPaneDividerBackground(SynthContext context, 700 Graphics g, int x, int y, 701 int w, int h) { 702 paint(context, g, x, y, w, h); 703 } 704 705 public void paintSplitPaneDividerBackground(SynthContext context, 706 Graphics g, int x, int y, 707 int w, int h, int orientation) { 708 paint(context, g, x, y, w, h); 709 } 710 711 public void paintSplitPaneDividerForeground(SynthContext context, 712 Graphics g, int x, int y, 713 int w, int h, int orientation) { 714 paint(context, g, x, y, w, h); 715 } 716 717 public void paintSplitPaneDragDivider(SynthContext context, 718 Graphics g, int x, int y, 719 int w, int h, int orientation) { 720 paint(context, g, x, y, w, h); 721 } 722 723 // SPLIT_PANE 724 public void paintSplitPaneBackground(SynthContext context, 725 Graphics g, int x, int y, 726 int w, int h) { 727 paint(context, g, x, y, w, h); 728 } 729 730 public void paintSplitPaneBorder(SynthContext context, 731 Graphics g, int x, int y, 732 int w, int h) { 733 paint(context, g, x, y, w, h); 734 } 735 736 // TABBED_PANE 737 public void paintTabbedPaneBackground(SynthContext context, 738 Graphics g, int x, int y, 739 int w, int h) { 740 paint(context, g, x, y, w, h); 741 } 742 743 public void paintTabbedPaneBorder(SynthContext context, 744 Graphics g, int x, int y, 745 int w, int h) { 746 paint(context, g, x, y, w, h); 747 } 748 749 // TABBED_PANE_TAB_AREA 750 public void paintTabbedPaneTabAreaBackground(SynthContext context, 751 Graphics g, int x, int y, 752 int w, int h) { 753 paint(context, g, x, y, w, h); 754 } 755 756 public void paintTabbedPaneTabAreaBackground(SynthContext context, 757 Graphics g, int x, int y, 758 int w, int h, int orientation) { 759 paint(context, g, x, y, w, h); 760 } 761 762 public void paintTabbedPaneTabAreaBorder(SynthContext context, 763 Graphics g, int x, int y, 764 int w, int h) { 765 paint(context, g, x, y, w, h); 766 } 767 768 public void paintTabbedPaneTabAreaBorder(SynthContext context, 769 Graphics g, int x, int y, 770 int w, int h, int orientation) { 771 paint(context, g, x, y, w, h); 772 } 773 774 // TABBED_PANE_TAB 775 public void paintTabbedPaneTabBackground(SynthContext context, Graphics g, 776 int x, int y, int w, int h, 777 int tabIndex) { 778 paint(context, g, x, y, w, h); 779 } 780 781 public void paintTabbedPaneTabBackground(SynthContext context, Graphics g, 782 int x, int y, int w, int h, 783 int tabIndex, int orientation) { 784 paint(context, g, x, y, w, h); 785 } 786 787 public void paintTabbedPaneTabBorder(SynthContext context, Graphics g, 788 int x, int y, int w, int h, 789 int tabIndex) { 790 paint(context, g, x, y, w, h); 791 } 792 793 public void paintTabbedPaneTabBorder(SynthContext context, Graphics g, 794 int x, int y, int w, int h, 795 int tabIndex, int orientation) { 796 paint(context, g, x, y, w, h); 797 } 798 799 // TABBED_PANE_CONTENT 800 public void paintTabbedPaneContentBackground(SynthContext context, 801 Graphics g, int x, int y, int w, 802 int h) { 803 paint(context, g, x, y, w, h); 804 } 805 806 public void paintTabbedPaneContentBorder(SynthContext context, Graphics g, 807 int x, int y, int w, int h) { 808 paint(context, g, x, y, w, h); 809 } 810 811 // TABLE_HEADER 812 public void paintTableHeaderBackground(SynthContext context, 813 Graphics g, int x, int y, 814 int w, int h) { 815 paint(context, g, x, y, w, h); 816 } 817 818 public void paintTableHeaderBorder(SynthContext context, 819 Graphics g, int x, int y, 820 int w, int h) { 821 paint(context, g, x, y, w, h); 822 } 823 824 // TABLE 825 public void paintTableBackground(SynthContext context, 826 Graphics g, int x, int y, 827 int w, int h) { 828 paint(context, g, x, y, w, h); 829 } 830 831 public void paintTableBorder(SynthContext context, 832 Graphics g, int x, int y, 833 int w, int h) { 834 paint(context, g, x, y, w, h); 835 } 836 837 // TEXT_AREA 838 public void paintTextAreaBackground(SynthContext context, 839 Graphics g, int x, int y, 840 int w, int h) { 841 paint(context, g, x, y, w, h); 842 } 843 844 public void paintTextAreaBorder(SynthContext context, 845 Graphics g, int x, int y, 846 int w, int h) { 847 paint(context, g, x, y, w, h); 848 } 849 850 // TEXT_PANE 851 public void paintTextPaneBackground(SynthContext context, 852 Graphics g, int x, int y, 853 int w, int h) { 854 paint(context, g, x, y, w, h); 855 } 856 857 public void paintTextPaneBorder(SynthContext context, 858 Graphics g, int x, int y, 859 int w, int h) { 860 paint(context, g, x, y, w, h); 861 } 862 863 // TEXT_FIELD 864 public void paintTextFieldBackground(SynthContext context, 865 Graphics g, int x, int y, 866 int w, int h) { 867 paint(context, g, x, y, w, h); 868 } 869 870 public void paintTextFieldBorder(SynthContext context, 871 Graphics g, int x, int y, 872 int w, int h) { 873 paint(context, g, x, y, w, h); 874 } 875 876 // TOGGLE_BUTTON 877 public void paintToggleButtonBackground(SynthContext context, 878 Graphics g, int x, int y, 879 int w, int h) { 880 paint(context, g, x, y, w, h); 881 } 882 883 public void paintToggleButtonBorder(SynthContext context, 884 Graphics g, int x, int y, 885 int w, int h) { 886 paint(context, g, x, y, w, h); 887 } 888 889 // TOOL_BAR 890 public void paintToolBarBackground(SynthContext context, 891 Graphics g, int x, int y, 892 int w, int h) { 893 paint(context, g, x, y, w, h); 894 } 895 896 public void paintToolBarBackground(SynthContext context, 897 Graphics g, int x, int y, 898 int w, int h, int orientation) { 899 paint(context, g, x, y, w, h); 900 } 901 902 public void paintToolBarBorder(SynthContext context, 903 Graphics g, int x, int y, 904 int w, int h) { 905 paint(context, g, x, y, w, h); 906 } 907 908 public void paintToolBarBorder(SynthContext context, 909 Graphics g, int x, int y, 910 int w, int h, int orientation) { 911 paint(context, g, x, y, w, h); 912 } 913 914 // TOOL_BAR_CONTENT 915 public void paintToolBarContentBackground(SynthContext context, 916 Graphics g, int x, int y, 917 int w, int h) { 918 paint(context, g, x, y, w, h); 919 } 920 921 public void paintToolBarContentBackground(SynthContext context, 922 Graphics g, int x, int y, 923 int w, int h, int orientation) { 924 paint(context, g, x, y, w, h); 925 } 926 927 public void paintToolBarContentBorder(SynthContext context, 928 Graphics g, int x, int y, 929 int w, int h) { 930 paint(context, g, x, y, w, h); 931 } 932 933 public void paintToolBarContentBorder(SynthContext context, 934 Graphics g, int x, int y, 935 int w, int h, int orientation) { 936 paint(context, g, x, y, w, h); 937 } 938 939 // TOOL_DRAG_WINDOW 940 public void paintToolBarDragWindowBackground(SynthContext context, 941 Graphics g, int x, int y, 942 int w, int h) { 943 paint(context, g, x, y, w, h); 944 } 945 946 public void paintToolBarDragWindowBackground(SynthContext context, 947 Graphics g, int x, int y, 948 int w, int h, int orientation) { 949 paint(context, g, x, y, w, h); 950 } 951 952 public void paintToolBarDragWindowBorder(SynthContext context, 953 Graphics g, int x, int y, 954 int w, int h) { 955 paint(context, g, x, y, w, h); 956 } 957 958 public void paintToolBarDragWindowBorder(SynthContext context, 959 Graphics g, int x, int y, 960 int w, int h, int orientation) { 961 paint(context, g, x, y, w, h); 962 } 963 964 // TOOL_TIP 965 public void paintToolTipBackground(SynthContext context, 966 Graphics g, int x, int y, 967 int w, int h) { 968 paint(context, g, x, y, w, h); 969 } 970 971 public void paintToolTipBorder(SynthContext context, 972 Graphics g, int x, int y, 973 int w, int h) { 974 paint(context, g, x, y, w, h); 975 } 976 977 // TREE 978 public void paintTreeBackground(SynthContext context, 979 Graphics g, int x, int y, 980 int w, int h) { 981 paint(context, g, x, y, w, h); 982 } 983 984 public void paintTreeBorder(SynthContext context, 985 Graphics g, int x, int y, 986 int w, int h) { 987 paint(context, g, x, y, w, h); 988 } 989 990 // TREE_CELL 991 public void paintTreeCellBackground(SynthContext context, 992 Graphics g, int x, int y, 993 int w, int h) { 994 paint(context, g, x, y, w, h); 995 } 996 997 public void paintTreeCellBorder(SynthContext context, 998 Graphics g, int x, int y, 999 int w, int h) { 1000 paint(context, g, x, y, w, h); 1001 } 1002 1003 public void paintTreeCellFocus(SynthContext context, 1004 Graphics g, int x, int y, 1005 int w, int h) { 1006 paint(context, g, x, y, w, h); 1007 } 1008 1009 // VIEWPORT 1010 public void paintViewportBackground(SynthContext context, 1011 Graphics g, int x, int y, 1012 int w, int h) { 1013 paint(context, g, x, y, w, h); 1014 } 1015 1016 public void paintViewportBorder(SynthContext context, 1017 Graphics g, int x, int y, 1018 int w, int h) { 1019 paint(context, g, x, y, w, h); 1020 } 1021 }