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