View Javadoc
1   /*
2    * Copyright (c) 2003, 2005, 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.Graphics;
28  import java.util.LinkedList;
29  
30  import sun.swing.plaf.synth.DefaultSynthStyle;
31  
32  /**
33   * ParsedSynthStyle are the SynthStyle's that SynthParser creates.
34   *
35   * @author Scott Violet
36   */
37  class ParsedSynthStyle extends DefaultSynthStyle {
38      private static SynthPainter DELEGATING_PAINTER_INSTANCE = new
39                          DelegatingPainter();
40      private PainterInfo[] _painters;
41  
42      private static PainterInfo[] mergePainterInfo(PainterInfo[] old,
43                                                    PainterInfo[] newPI) {
44          if (old == null) {
45              return newPI;
46          }
47          if (newPI == null) {
48              return old;
49          }
50          int oldLength = old.length;
51          int newLength = newPI.length;
52          int dups = 0;
53          PainterInfo[] merged = new PainterInfo[oldLength + newLength];
54          System.arraycopy(old, 0, merged, 0, oldLength);
55          for (int newCounter = 0; newCounter < newLength; newCounter++) {
56              boolean found = false;
57              for (int oldCounter = 0; oldCounter < oldLength - dups;
58                       oldCounter++) {
59                  if (newPI[newCounter].equalsPainter(old[oldCounter])) {
60                      merged[oldCounter] = newPI[newCounter];
61                      dups++;
62                      found = true;
63                      break;
64                  }
65              }
66              if (!found) {
67                  merged[oldLength + newCounter - dups] = newPI[newCounter];
68              }
69          }
70          if (dups > 0) {
71              PainterInfo[] tmp = merged;
72              merged = new PainterInfo[merged.length - dups];
73              System.arraycopy(tmp, 0, merged, 0, merged.length);
74          }
75          return merged;
76      }
77  
78  
79      public ParsedSynthStyle() {
80      }
81  
82      public ParsedSynthStyle(DefaultSynthStyle style) {
83          super(style);
84          if (style instanceof ParsedSynthStyle) {
85              ParsedSynthStyle pStyle = (ParsedSynthStyle)style;
86  
87              if (pStyle._painters != null) {
88                  _painters = pStyle._painters;
89              }
90          }
91      }
92  
93      public SynthPainter getPainter(SynthContext ss) {
94          return DELEGATING_PAINTER_INSTANCE;
95      }
96  
97      public void setPainters(PainterInfo[] info) {
98          _painters = info;
99      }
100 
101     public DefaultSynthStyle addTo(DefaultSynthStyle style) {
102         if (!(style instanceof ParsedSynthStyle)) {
103             style = new ParsedSynthStyle(style);
104         }
105         ParsedSynthStyle pStyle = (ParsedSynthStyle)super.addTo(style);
106         pStyle._painters = mergePainterInfo(pStyle._painters, _painters);
107         return pStyle;
108     }
109 
110     private SynthPainter getBestPainter(SynthContext context, String method,
111                                         int direction) {
112         // Check the state info first
113         StateInfo info = (StateInfo)getStateInfo(context.getComponentState());
114         SynthPainter painter;
115         if (info != null) {
116             if ((painter = getBestPainter(info.getPainters(), method,
117                                           direction)) != null) {
118                 return painter;
119             }
120         }
121         if ((painter = getBestPainter(_painters, method, direction)) != null) {
122             return painter;
123         }
124         return SynthPainter.NULL_PAINTER;
125     }
126 
127     private SynthPainter getBestPainter(PainterInfo[] info, String method,
128                                         int direction) {
129         if (info != null) {
130             // Painter specified with no method
131             SynthPainter nullPainter = null;
132             // Painter specified for this method
133             SynthPainter methodPainter = null;
134 
135             for (int counter = info.length - 1; counter >= 0; counter--) {
136                 PainterInfo pi = info[counter];
137 
138                 if (pi.getMethod() == method) {
139                     if (pi.getDirection() == direction) {
140                         return pi.getPainter();
141                     }
142                     else if (methodPainter == null &&pi.getDirection() == -1) {
143                         methodPainter = pi.getPainter();
144                     }
145                 }
146                 else if (nullPainter == null && pi.getMethod() == null) {
147                     nullPainter = pi.getPainter();
148                 }
149             }
150             if (methodPainter != null) {
151                 return methodPainter;
152             }
153             return nullPainter;
154         }
155         return null;
156     }
157 
158     public String toString() {
159         StringBuffer text = new StringBuffer(super.toString());
160         if (_painters != null) {
161             text.append(",painters=[");
162             for (int i = 0; i < +_painters.length; i++) {
163                 text.append(_painters[i].toString());
164             }
165             text.append("]");
166         }
167         return text.toString();
168     }
169 
170 
171     static class StateInfo extends DefaultSynthStyle.StateInfo {
172         private PainterInfo[] _painterInfo;
173 
174         public StateInfo() {
175         }
176 
177         public StateInfo(DefaultSynthStyle.StateInfo info) {
178             super(info);
179             if (info instanceof StateInfo) {
180                 _painterInfo = ((StateInfo)info)._painterInfo;
181             }
182         }
183 
184         public void setPainters(PainterInfo[] painterInfo) {
185             _painterInfo = painterInfo;
186         }
187 
188         public PainterInfo[] getPainters() {
189             return _painterInfo;
190         }
191 
192         public Object clone() {
193             return new StateInfo(this);
194         }
195 
196         public DefaultSynthStyle.StateInfo addTo(
197                            DefaultSynthStyle.StateInfo info) {
198             if (!(info instanceof StateInfo)) {
199                 info = new StateInfo(info);
200             }
201             else {
202                 info = super.addTo(info);
203                 StateInfo si = (StateInfo)info;
204                 si._painterInfo = mergePainterInfo(si._painterInfo,
205                                                    _painterInfo);
206             }
207             return info;
208         }
209 
210         public String toString() {
211             StringBuffer text = new StringBuffer(super.toString());
212             text.append(",painters=[");
213             if (_painterInfo != null) {
214                 for (int i = 0; i < +_painterInfo.length; i++) {
215                     text.append("    ").append(_painterInfo[i].toString());
216                 }
217             }
218             text.append("]");
219             return text.toString();
220         }
221     }
222 
223 
224     static class PainterInfo {
225         private String _method;
226         private SynthPainter _painter;
227         private int _direction;
228 
229         PainterInfo(String method, SynthPainter painter, int direction) {
230             if (method != null) {
231                 _method = method.intern();
232             }
233             _painter = painter;
234             _direction = direction;
235         }
236 
237         void addPainter(SynthPainter painter) {
238             if (!(_painter instanceof AggregatePainter)) {
239                 _painter = new AggregatePainter(_painter);
240             }
241 
242             ((AggregatePainter) _painter).addPainter(painter);
243         }
244 
245         String getMethod() {
246             return _method;
247         }
248 
249         SynthPainter getPainter() {
250             return _painter;
251         }
252 
253         int getDirection() {
254             return _direction;
255         }
256 
257         boolean equalsPainter(PainterInfo info) {
258             return (_method == info._method && _direction == info._direction);
259         }
260 
261         public String toString() {
262             return "PainterInfo {method=" + _method + ",direction=" +
263                 _direction + ",painter=" + _painter +"}";
264         }
265     }
266 
267     private static class AggregatePainter extends SynthPainter {
268         private java.util.List<SynthPainter> painters;
269 
270         AggregatePainter(SynthPainter painter) {
271             painters = new LinkedList<SynthPainter>();
272             painters.add(painter);
273         }
274 
275         void addPainter(SynthPainter painter) {
276             if (painter != null) {
277                 painters.add(painter);
278             }
279         }
280 
281         public void paintArrowButtonBackground(SynthContext context, Graphics g,
282                                                int x, int y, int w, int h) {
283             for (SynthPainter painter: painters) {
284                 painter.paintArrowButtonBackground(context, g, x, y, w, h);
285             }
286         }
287 
288         public void paintArrowButtonBorder(SynthContext context, Graphics g,
289                                            int x, int y, int w, int h) {
290             for (SynthPainter painter: painters) {
291                 painter.paintArrowButtonBorder(context, g, x, y, w, h);
292             }
293         }
294 
295         public void paintArrowButtonForeground(SynthContext context, Graphics g,
296                                                int x, int y, int w, int h,
297                                                int direction) {
298             for (SynthPainter painter: painters) {
299                 painter.paintArrowButtonForeground(context, g,
300                                                    x, y, w, h, direction);
301             }
302         }
303 
304         public void paintButtonBackground(SynthContext context, Graphics g,
305                                           int x, int y, int w, int h) {
306             for (SynthPainter painter: painters) {
307                 painter.paintButtonBackground(context, g, x, y, w, h);
308             }
309         }
310 
311         public void paintButtonBorder(SynthContext context, Graphics g,
312                                       int x, int y, int w, int h) {
313             for (SynthPainter painter: painters) {
314                 painter.paintButtonBorder(context, g, x, y, w, h);
315             }
316         }
317 
318         public void paintCheckBoxMenuItemBackground(SynthContext context,
319                                                     Graphics g, int x, int y,
320                                                     int w, int h) {
321             for (SynthPainter painter: painters) {
322                 painter.paintCheckBoxMenuItemBackground(context, g, x, y, w, h);
323             }
324         }
325 
326         public void paintCheckBoxMenuItemBorder(SynthContext context,
327                                                 Graphics g, int x, int y,
328                                                 int w, int h) {
329             for (SynthPainter painter: painters) {
330                 painter.paintCheckBoxMenuItemBorder(context, g, x, y, w, h);
331             }
332         }
333 
334         public void paintCheckBoxBackground(SynthContext context, Graphics g,
335                                             int x, int y, int w, int h) {
336             for (SynthPainter painter: painters) {
337                 painter.paintCheckBoxBackground(context, g, x, y, w, h);
338             }
339         }
340 
341         public void paintCheckBoxBorder(SynthContext context, Graphics g,
342                                         int x, int y, int w, int h) {
343             for (SynthPainter painter: painters) {
344                 painter.paintCheckBoxBorder(context, g, x, y, w, h);
345             }
346         }
347 
348         public void paintColorChooserBackground(SynthContext context,
349                                                 Graphics g, int x, int y,
350                                                 int w, int h) {
351             for (SynthPainter painter: painters) {
352                 painter.paintColorChooserBackground(context, g, x, y, w, h);
353             }
354         }
355 
356         public void paintColorChooserBorder(SynthContext context, Graphics g,
357                                             int x, int y,
358                                             int w, int h) {
359             for (SynthPainter painter: painters) {
360                 painter.paintColorChooserBorder(context, g, x, y, w, h);
361             }
362         }
363 
364         public void paintComboBoxBackground(SynthContext context, Graphics g,
365                                             int x, int y,
366                                             int w, int h) {
367             for (SynthPainter painter: painters) {
368                 painter.paintComboBoxBackground(context, g, x, y, w, h);
369             }
370         }
371 
372         public void paintComboBoxBorder(SynthContext context, Graphics g,
373                                         int x, int y,
374                                         int w, int h) {
375             for (SynthPainter painter: painters) {
376                 painter.paintComboBoxBorder(context, g, x, y, w, h);
377             }
378         }
379 
380         public void paintDesktopIconBackground(SynthContext context, Graphics g,
381                                                int x, int y,
382                                                int w, int h) {
383             for (SynthPainter painter: painters) {
384                 painter.paintDesktopIconBackground(context, g, x, y, w, h);
385             }
386         }
387 
388         public void paintDesktopIconBorder(SynthContext context, Graphics g,
389                                            int x, int y,
390                                            int w, int h) {
391             for (SynthPainter painter: painters) {
392                 painter.paintDesktopIconBorder(context, g, x, y, w, h);
393             }
394         }
395 
396         public void paintDesktopPaneBackground(SynthContext context, Graphics g,
397                                                int x, int y,
398                                                int w, int h) {
399             for (SynthPainter painter: painters) {
400                 painter.paintDesktopPaneBackground(context, g, x, y, w, h);
401             }
402         }
403 
404         public void paintDesktopPaneBorder(SynthContext context, Graphics g,
405                                            int x, int y,
406                                            int w, int h) {
407             for (SynthPainter painter: painters) {
408                 painter.paintDesktopPaneBorder(context, g, x, y, w, h);
409             }
410         }
411 
412         public void paintEditorPaneBackground(SynthContext context, Graphics g,
413                                               int x, int y, int w, int h) {
414             for (SynthPainter painter: painters) {
415                 painter.paintEditorPaneBackground(context, g, x, y, w, h);
416             }
417         }
418 
419         public void paintEditorPaneBorder(SynthContext context, Graphics g,
420                                           int x, int y, int w, int h) {
421             for (SynthPainter painter: painters) {
422                 painter.paintEditorPaneBorder(context, g, x, y, w, h);
423             }
424         }
425 
426         public void paintFileChooserBackground(SynthContext context, Graphics g,
427                                                int x, int y, int w, int h) {
428             for (SynthPainter painter: painters) {
429                 painter.paintFileChooserBackground(context, g, x, y, w, h);
430             }
431         }
432 
433         public void paintFileChooserBorder(SynthContext context, Graphics g,
434                                            int x, int y, int w, int h) {
435             for (SynthPainter painter: painters) {
436                 painter.paintFileChooserBorder(context, g, x, y, w, h);
437             }
438         }
439 
440         public void paintFormattedTextFieldBackground(SynthContext context,
441                                                       Graphics g, int x, int y,
442                                                       int w, int h) {
443             for (SynthPainter painter: painters) {
444                 painter.paintFormattedTextFieldBackground(context, g, x, y, w, h);
445             }
446         }
447 
448         public void paintFormattedTextFieldBorder(SynthContext context,
449                                                   Graphics g, int x, int y,
450                                                   int w, int h) {
451             for (SynthPainter painter: painters) {
452                 painter.paintFormattedTextFieldBorder(context, g, x, y, w, h);
453             }
454         }
455 
456         public void paintInternalFrameTitlePaneBackground(SynthContext context,
457                                                           Graphics g,
458                                                           int x, int y,
459                                                           int w, int h) {
460             for (SynthPainter painter: painters) {
461                 painter.paintInternalFrameTitlePaneBackground(context, g,
462                                                               x, y, w, h);
463             }
464         }
465 
466         public void paintInternalFrameTitlePaneBorder(SynthContext context,
467                                                       Graphics g,
468                                                       int x, int y,
469                                                       int w, int h) {
470             for (SynthPainter painter: painters) {
471                 painter.paintInternalFrameTitlePaneBorder(context, g,
472                                                           x, y, w, h);
473             }
474         }
475 
476         public void paintInternalFrameBackground(SynthContext context,
477                                                  Graphics g, int x, int y,
478                                                  int w, int h) {
479             for (SynthPainter painter: painters) {
480                 painter.paintInternalFrameBackground(context, g, x, y, w, h);
481             }
482         }
483 
484         public void paintInternalFrameBorder(SynthContext context, Graphics g,
485                                              int x, int y, int w, int h) {
486             for (SynthPainter painter: painters) {
487                 painter.paintInternalFrameBorder(context, g, x, y, w, h);
488             }
489         }
490 
491         public void paintLabelBackground(SynthContext context, Graphics g,
492                                          int x, int y, int w, int h) {
493             for (SynthPainter painter: painters) {
494                 painter.paintLabelBackground(context, g, x, y, w, h);
495             }
496         }
497 
498         public void paintLabelBorder(SynthContext context, Graphics g,
499                                      int x, int y, int w, int h) {
500             for (SynthPainter painter: painters) {
501                 painter.paintLabelBorder(context, g, x, y, w, h);
502             }
503         }
504 
505         public void paintListBackground(SynthContext context, Graphics g,
506                                         int x, int y, int w, int h) {
507             for (SynthPainter painter: painters) {
508                 painter.paintListBackground(context, g, x, y, w, h);
509             }
510         }
511 
512         public void paintListBorder(SynthContext context, Graphics g,
513                                     int x, int y, int w, int h) {
514             for (SynthPainter painter: painters) {
515                 painter.paintListBorder(context, g, x, y, w, h);
516             }
517         }
518 
519         public void paintMenuBarBackground(SynthContext context, Graphics g,
520                                            int x, int y, int w, int h) {
521             for (SynthPainter painter: painters) {
522                 painter.paintMenuBarBackground(context, g, x, y, w, h);
523             }
524         }
525 
526         public void paintMenuBarBorder(SynthContext context, Graphics g,
527                                        int x, int y, int w, int h) {
528             for (SynthPainter painter: painters) {
529                 painter.paintMenuBarBorder(context, g, x, y, w, h);
530             }
531         }
532 
533         public void paintMenuItemBackground(SynthContext context, Graphics g,
534                                             int x, int y, int w, int h) {
535             for (SynthPainter painter: painters) {
536                 painter.paintMenuItemBackground(context, g, x, y, w, h);
537             }
538         }
539 
540         public void paintMenuItemBorder(SynthContext context, Graphics g,
541                                         int x, int y, int w, int h) {
542             for (SynthPainter painter: painters) {
543                 painter.paintMenuItemBorder(context, g, x, y, w, h);
544             }
545         }
546 
547         public void paintMenuBackground(SynthContext context, Graphics g,
548                                         int x, int y, int w, int h) {
549             for (SynthPainter painter: painters) {
550                 painter.paintMenuBackground(context, g, x, y, w, h);
551             }
552         }
553 
554         public void paintMenuBorder(SynthContext context, Graphics g,
555                                     int x, int y, int w, int h) {
556             for (SynthPainter painter: painters) {
557                 painter.paintMenuBorder(context, g, x, y, w, h);
558             }
559         }
560 
561         public void paintOptionPaneBackground(SynthContext context, Graphics g,
562                                               int x, int y, int w, int h) {
563             for (SynthPainter painter: painters) {
564                 painter.paintOptionPaneBackground(context, g, x, y, w, h);
565             }
566         }
567 
568         public void paintOptionPaneBorder(SynthContext context, Graphics g,
569                                           int x, int y, int w, int h) {
570             for (SynthPainter painter: painters) {
571                 painter.paintOptionPaneBorder(context, g, x, y, w, h);
572             }
573         }
574 
575         public void paintPanelBackground(SynthContext context, Graphics g,
576                                          int x, int y, int w, int h) {
577             for (SynthPainter painter: painters) {
578                 painter.paintPanelBackground(context, g, x, y, w, h);
579             }
580         }
581 
582         public void paintPanelBorder(SynthContext context, Graphics g,
583                                      int x, int y, int w, int h) {
584             for (SynthPainter painter: painters) {
585                 painter.paintPanelBorder(context, g, x, y, w, h);
586             }
587         }
588 
589         public void paintPasswordFieldBackground(SynthContext context,
590                                                  Graphics g,
591                                                  int x, int y, int w, int h) {
592             for (SynthPainter painter: painters) {
593                 painter.paintPasswordFieldBackground(context, g, x, y, w, h);
594             }
595         }
596 
597         public void paintPasswordFieldBorder(SynthContext context, Graphics g,
598                                              int x, int y, int w, int h) {
599             for (SynthPainter painter: painters) {
600                 painter.paintPasswordFieldBorder(context, g, x, y, w, h);
601             }
602         }
603 
604         public void paintPopupMenuBackground(SynthContext context, Graphics g,
605                                              int x, int y, int w, int h) {
606             for (SynthPainter painter: painters) {
607                 painter.paintPopupMenuBackground(context, g, x, y, w, h);
608             }
609         }
610 
611         public void paintPopupMenuBorder(SynthContext context, Graphics g,
612                                          int x, int y, int w, int h) {
613             for (SynthPainter painter: painters) {
614                 painter.paintPopupMenuBorder(context, g, x, y, w, h);
615             }
616         }
617 
618         public void paintProgressBarBackground(SynthContext context, Graphics g,
619                                                int x, int y, int w, int h) {
620             for (SynthPainter painter: painters) {
621                 painter.paintProgressBarBackground(context, g, x, y, w, h);
622             }
623         }
624 
625         public void paintProgressBarBackground(SynthContext context, Graphics g,
626                                                int x, int y, int w, int h,
627                                                int orientation) {
628             for (SynthPainter painter: painters) {
629                 painter.paintProgressBarBackground(context, g, x, y, w, h,
630                                                    orientation);
631             }
632         }
633 
634         public void paintProgressBarBorder(SynthContext context, Graphics g,
635                                            int x, int y, int w, int h) {
636             for (SynthPainter painter: painters) {
637                 painter.paintProgressBarBorder(context, g, x, y, w, h);
638             }
639         }
640 
641         public void paintProgressBarBorder(SynthContext context, Graphics g,
642                                            int x, int y, int w, int h,
643                                            int orientation) {
644             for (SynthPainter painter: painters) {
645                 painter.paintProgressBarBorder(context, g, x, y, w, h,
646                                                orientation);
647             }
648         }
649 
650         public void paintProgressBarForeground(SynthContext context, Graphics g,
651                                                int x, int y, int w, int h,
652                                                int orientation) {
653             for (SynthPainter painter: painters) {
654                 painter.paintProgressBarForeground(context, g,
655                                                    x, y, w, h, orientation);
656             }
657         }
658 
659         public void paintRadioButtonMenuItemBackground(SynthContext context,
660                                                        Graphics g,
661                                                        int x, int y,
662                                                        int w, int h) {
663             for (SynthPainter painter: painters) {
664                 painter.paintRadioButtonMenuItemBackground(context, g,
665                                                            x, y, w, h);
666             }
667         }
668 
669         public void paintRadioButtonMenuItemBorder(SynthContext context,
670                                                    Graphics g, int x, int y,
671                                                    int w, int h) {
672             for (SynthPainter painter: painters) {
673                 painter.paintRadioButtonMenuItemBorder(context, g, x, y, w, h);
674             }
675         }
676 
677         public void paintRadioButtonBackground(SynthContext context, Graphics g,
678                                                int x, int y, int w, int h) {
679             for (SynthPainter painter: painters) {
680                 painter.paintRadioButtonBackground(context, g, x, y, w, h);
681             }
682         }
683 
684         public void paintRadioButtonBorder(SynthContext context, Graphics g,
685                                            int x, int y, int w, int h) {
686             for (SynthPainter painter: painters) {
687                 painter.paintRadioButtonBorder(context, g, x, y, w, h);
688             }
689         }
690 
691         public void paintRootPaneBackground(SynthContext context, Graphics g,
692                                             int x, int y, int w, int h) {
693             for (SynthPainter painter: painters) {
694                 painter.paintRootPaneBackground(context, g, x, y, w, h);
695             }
696         }
697 
698         public void paintRootPaneBorder(SynthContext context, Graphics g,
699                                         int x, int y, int w, int h) {
700             for (SynthPainter painter: painters) {
701                 painter.paintRootPaneBorder(context, g, x, y, w, h);
702             }
703         }
704 
705         public void paintScrollBarBackground(SynthContext context, Graphics g,
706                                              int x, int y, int w, int h) {
707             for (SynthPainter painter: painters) {
708                 painter.paintScrollBarBackground(context, g, x, y, w, h);
709             }
710         }
711 
712         public void paintScrollBarBackground(SynthContext context, Graphics g,
713                                              int x, int y,
714                                              int w, int h, int orientation) {
715             for (SynthPainter painter: painters) {
716                 painter.paintScrollBarBackground(context, g, x, y, w, h,
717                                                  orientation);
718             }
719         }
720 
721         public void paintScrollBarBorder(SynthContext context, Graphics g,
722                                          int x, int y, int w, int h) {
723             for (SynthPainter painter: painters) {
724                 painter.paintScrollBarBorder(context, g, x, y, w, h);
725             }
726         }
727 
728         public void paintScrollBarBorder(SynthContext context, Graphics g,
729                                          int x, int y, int w, int h,
730                                          int orientation) {
731             for (SynthPainter painter: painters) {
732                 painter.paintScrollBarBorder(context, g, x, y, w, h,
733                                              orientation);
734             }
735         }
736 
737         public void paintScrollBarThumbBackground(SynthContext context,
738                                                   Graphics g, int x, int y,
739                                                   int w, int h, int orientation) {
740             for (SynthPainter painter: painters) {
741                 painter.paintScrollBarThumbBackground(context, g, x, y, w, h,
742                                                       orientation);
743             }
744         }
745 
746         public void paintScrollBarThumbBorder(SynthContext context, Graphics g,
747                                               int x, int y, int w, int h,
748                                               int orientation) {
749             for (SynthPainter painter: painters) {
750                 painter.paintScrollBarThumbBorder(context, g, x, y, w, h,
751                                                   orientation);
752             }
753         }
754 
755         public void paintScrollBarTrackBackground(SynthContext context,
756                                                   Graphics g, int x, int y,
757                                                   int w, int h) {
758             for (SynthPainter painter: painters) {
759                 painter.paintScrollBarTrackBackground(context, g, x, y, w, h);
760             }
761         }
762 
763         public void paintScrollBarTrackBackground(SynthContext context,
764                                                   Graphics g, int x, int y,
765                                                   int w, int h,
766                                                   int orientation) {
767             for (SynthPainter painter: painters) {
768                 painter.paintScrollBarTrackBackground(context, g, x, y, w, h,
769                                                       orientation);
770             }
771         }
772 
773         public void paintScrollBarTrackBorder(SynthContext context, Graphics g,
774                                               int x, int y, int w, int h) {
775             for (SynthPainter painter: painters) {
776                 painter.paintScrollBarTrackBorder(context, g, x, y, w, h);
777             }
778         }
779 
780         public void paintScrollBarTrackBorder(SynthContext context, Graphics g,
781                                               int x, int y, int w, int h,
782                                               int orientation) {
783             for (SynthPainter painter: painters) {
784                 painter.paintScrollBarTrackBorder(context, g, x, y, w, h,
785                                                   orientation);
786             }
787         }
788 
789         public void paintScrollPaneBackground(SynthContext context, Graphics g,
790                                               int x, int y, int w, int h) {
791             for (SynthPainter painter: painters) {
792                 painter.paintScrollPaneBackground(context, g, x, y, w, h);
793             }
794         }
795 
796         public void paintScrollPaneBorder(SynthContext context, Graphics g,
797                                           int x, int y, int w, int h) {
798             for (SynthPainter painter: painters) {
799                 painter.paintScrollPaneBorder(context, g, x, y, w, h);
800             }
801         }
802 
803         public void paintSeparatorBackground(SynthContext context, Graphics g,
804                                              int x, int y, int w, int h) {
805             for (SynthPainter painter: painters) {
806                 painter.paintSeparatorBackground(context, g, x, y, w, h);
807             }
808         }
809 
810         public void paintSeparatorBackground(SynthContext context, Graphics g,
811                                              int x, int y, int w, int h,
812                                              int orientation) {
813             for (SynthPainter painter: painters) {
814                 painter.paintSeparatorBackground(context, g, x, y, w, h, orientation);
815             }
816         }
817 
818         public void paintSeparatorBorder(SynthContext context, Graphics g,
819                                          int x, int y, int w, int h) {
820             for (SynthPainter painter: painters) {
821                 painter.paintSeparatorBorder(context, g, x, y, w, h);
822             }
823         }
824 
825         public void paintSeparatorBorder(SynthContext context, Graphics g,
826                                          int x, int y, int w, int h, int orientation) {
827             for (SynthPainter painter: painters) {
828                 painter.paintSeparatorBorder(context, g, x, y, w, h, orientation);
829             }
830         }
831 
832         public void paintSeparatorForeground(SynthContext context, Graphics g,
833                                              int x, int y, int w, int h,
834                                              int orientation) {
835             for (SynthPainter painter: painters) {
836                 painter.paintSeparatorForeground(context, g,
837                                                  x, y, w, h, orientation);
838             }
839         }
840 
841         public void paintSliderBackground(SynthContext context, Graphics g,
842                                           int x, int y, int w, int h) {
843             for (SynthPainter painter: painters) {
844                 painter.paintSliderBackground(context, g, x, y, w, h);
845             }
846         }
847 
848         public void paintSliderBackground(SynthContext context, Graphics g,
849                                           int x, int y, int w, int h,
850                                           int orientation) {
851             for (SynthPainter painter: painters) {
852                 painter.paintSliderBackground(context, g, x, y, w, h, orientation);
853             }
854         }
855 
856         public void paintSliderBorder(SynthContext context, Graphics g,
857                                       int x, int y, int w, int h) {
858             for (SynthPainter painter: painters) {
859                 painter.paintSliderBorder(context, g, x, y, w, h);
860             }
861         }
862 
863         public void paintSliderBorder(SynthContext context, Graphics g,
864                                       int x, int y, int w, int h,
865                                       int orientation) {
866             for (SynthPainter painter: painters) {
867                 painter.paintSliderBorder(context, g, x, y, w, h, orientation);
868             }
869         }
870 
871         public void paintSliderThumbBackground(SynthContext context, Graphics g,
872                                                int x, int y, int w, int h,
873                                                int orientation) {
874             for (SynthPainter painter: painters) {
875                 painter.paintSliderThumbBackground(context, g,
876                                                    x, y, w, h, orientation);
877             }
878         }
879 
880         public void paintSliderThumbBorder(SynthContext context, Graphics g,
881                                            int x, int y, int w, int h,
882                                            int orientation) {
883             for (SynthPainter painter: painters) {
884                 painter.paintSliderThumbBorder(context, g,
885                                                x, y, w, h, orientation);
886             }
887         }
888 
889         public void paintSliderTrackBackground(SynthContext context, Graphics g,
890                                                int x, int y, int w, int h) {
891             for (SynthPainter painter: painters) {
892                 painter.paintSliderTrackBackground(context, g, x, y, w, h);
893             }
894         }
895 
896         public void paintSliderTrackBackground(SynthContext context, Graphics g,
897                                                int x, int y, int w, int h,
898                                                int orientation) {
899             for (SynthPainter painter: painters) {
900                 painter.paintSliderTrackBackground(context, g, x, y, w, h,
901                                                    orientation);
902             }
903         }
904 
905         public void paintSliderTrackBorder(SynthContext context, Graphics g,
906                                            int x, int y, int w, int h) {
907             for (SynthPainter painter: painters) {
908                 painter.paintSliderTrackBorder(context, g, x, y, w, h);
909             }
910         }
911 
912         public void paintSliderTrackBorder(SynthContext context, Graphics g,
913                                            int x, int y, int w, int h,
914                                            int orientation) {
915             for (SynthPainter painter: painters) {
916                 painter.paintSliderTrackBorder(context, g, x, y, w, h,
917                                                orientation);
918             }
919         }
920 
921         public void paintSpinnerBackground(SynthContext context, Graphics g,
922                                            int x, int y, int w, int h) {
923             for (SynthPainter painter: painters) {
924                 painter.paintSpinnerBackground(context, g, x, y, w, h);
925             }
926         }
927 
928         public void paintSpinnerBorder(SynthContext context, Graphics g,
929                                        int x, int y, int w, int h) {
930             for (SynthPainter painter: painters) {
931                 painter.paintSpinnerBorder(context, g, x, y, w, h);
932             }
933         }
934 
935         public void paintSplitPaneDividerBackground(SynthContext context,
936                                                     Graphics g, int x, int y,
937                                                     int w, int h) {
938             for (SynthPainter painter: painters) {
939                 painter.paintSplitPaneDividerBackground(context, g, x, y, w, h);
940             }
941         }
942 
943         public void paintSplitPaneDividerBackground(SynthContext context,
944                                                     Graphics g, int x, int y,
945                                                     int w, int h,
946                                                     int orientation) {
947             for (SynthPainter painter: painters) {
948                 painter.paintSplitPaneDividerBackground(context, g, x, y, w, h,
949                                                         orientation);
950             }
951         }
952 
953         public void paintSplitPaneDividerForeground(SynthContext context,
954                                                     Graphics g, int x, int y,
955                                                     int w, int h,
956                                                     int orientation) {
957             for (SynthPainter painter: painters) {
958                 painter.paintSplitPaneDividerForeground(context, g,
959                                                         x, y, w, h,
960                                                         orientation);
961             }
962         }
963 
964         public void paintSplitPaneDragDivider(SynthContext context, Graphics g,
965                                               int x, int y,
966                                               int w, int h, int orientation) {
967             for (SynthPainter painter: painters) {
968                 painter.paintSplitPaneDragDivider(context, g,
969                                                   x, y, w, h, orientation);
970             }
971         }
972 
973         public void paintSplitPaneBackground(SynthContext context, Graphics g,
974                                              int x, int y, int w, int h) {
975             for (SynthPainter painter: painters) {
976                 painter.paintSplitPaneBackground(context, g, x, y, w, h);
977             }
978         }
979 
980         public void paintSplitPaneBorder(SynthContext context, Graphics g,
981                                          int x, int y, int w, int h) {
982             for (SynthPainter painter: painters) {
983                 painter.paintSplitPaneBorder(context, g, x, y, w, h);
984             }
985         }
986 
987         public void paintTabbedPaneBackground(SynthContext context, Graphics g,
988                                               int x, int y, int w, int h) {
989             for (SynthPainter painter: painters) {
990                 painter.paintTabbedPaneBackground(context, g, x, y, w, h);
991             }
992         }
993 
994         public void paintTabbedPaneBorder(SynthContext context, Graphics g,
995                                           int x, int y, int w, int h) {
996             for (SynthPainter painter: painters) {
997                 painter.paintTabbedPaneBorder(context, g, x, y, w, h);
998             }
999         }
1000 
1001         public void paintTabbedPaneTabAreaBackground(SynthContext context,
1002                                                      Graphics g, int x, int y,
1003                                                      int w, int h) {
1004             for (SynthPainter painter: painters) {
1005                 painter.paintTabbedPaneTabAreaBackground(context, g, x, y, w, h);
1006             }
1007         }
1008 
1009         public void paintTabbedPaneTabAreaBackground(SynthContext context,
1010                                                      Graphics g, int x, int y,
1011                                                      int w, int h,
1012                                                      int orientation) {
1013             for (SynthPainter painter: painters) {
1014                 painter.paintTabbedPaneTabAreaBackground(context, g, x, y, w, h,
1015                                                          orientation);
1016             }
1017         }
1018 
1019         public void paintTabbedPaneTabAreaBorder(SynthContext context,
1020                                                  Graphics g, int x, int y,
1021                                                  int w, int h) {
1022             for (SynthPainter painter: painters) {
1023                 painter.paintTabbedPaneTabAreaBorder(context, g, x, y, w, h);
1024             }
1025         }
1026 
1027         public void paintTabbedPaneTabAreaBorder(SynthContext context,
1028                                                  Graphics g, int x, int y,
1029                                                  int w, int h, int orientation) {
1030             for (SynthPainter painter: painters) {
1031                 painter.paintTabbedPaneTabAreaBorder(context, g, x, y, w, h,
1032                                                      orientation);
1033             }
1034         }
1035 
1036         public void paintTabbedPaneTabBackground(SynthContext context,
1037                                                  Graphics g, int x, int y,
1038                                                  int w, int h, int tabIndex) {
1039             for (SynthPainter painter: painters) {
1040                 painter.paintTabbedPaneTabBackground(context, g,
1041                                                      x, y, w, h, tabIndex);
1042             }
1043         }
1044 
1045         public void paintTabbedPaneTabBackground(SynthContext context,
1046                                                  Graphics g, int x, int y,
1047                                                  int w, int h, int tabIndex,
1048                                                  int orientation) {
1049             for (SynthPainter painter: painters) {
1050                 painter.paintTabbedPaneTabBackground(context, g,
1051                                                      x, y, w, h, tabIndex,
1052                                                      orientation);
1053             }
1054         }
1055 
1056         public void paintTabbedPaneTabBorder(SynthContext context, Graphics g,
1057                                              int x, int y, int w, int h,
1058                                              int tabIndex) {
1059             for (SynthPainter painter: painters) {
1060                 painter.paintTabbedPaneTabBorder(context, g,
1061                                                  x, y, w, h, tabIndex);
1062             }
1063         }
1064 
1065         public void paintTabbedPaneTabBorder(SynthContext context, Graphics g,
1066                                              int x, int y, int w, int h,
1067                                              int tabIndex, int orientation) {
1068             for (SynthPainter painter: painters) {
1069                 painter.paintTabbedPaneTabBorder(context, g,
1070                                                  x, y, w, h, tabIndex,
1071                                                  orientation);
1072             }
1073         }
1074 
1075         public void paintTabbedPaneContentBackground(SynthContext context,
1076                                                      Graphics g, int x, int y,
1077                                                      int w, int h) {
1078             for (SynthPainter painter: painters) {
1079                 painter.paintTabbedPaneContentBackground(context, g, x, y, w, h);
1080             }
1081         }
1082 
1083         public void paintTabbedPaneContentBorder(SynthContext context,
1084                                                  Graphics g, int x, int y,
1085                                                  int w, int h) {
1086             for (SynthPainter painter: painters) {
1087                 painter.paintTabbedPaneContentBorder(context, g, x, y, w, h);
1088             }
1089         }
1090 
1091         public void paintTableHeaderBackground(SynthContext context, Graphics g,
1092                                                int x, int y, int w, int h) {
1093             for (SynthPainter painter: painters) {
1094                 painter.paintTableHeaderBackground(context, g, x, y, w, h);
1095             }
1096         }
1097 
1098         public void paintTableHeaderBorder(SynthContext context, Graphics g,
1099                                            int x, int y, int w, int h) {
1100             for (SynthPainter painter: painters) {
1101                 painter.paintTableHeaderBorder(context, g, x, y, w, h);
1102             }
1103         }
1104 
1105         public void paintTableBackground(SynthContext context, Graphics g,
1106                                          int x, int y, int w, int h) {
1107             for (SynthPainter painter: painters) {
1108                 painter.paintTableBackground(context, g, x, y, w, h);
1109             }
1110         }
1111 
1112         public void paintTableBorder(SynthContext context, Graphics g,
1113                                      int x, int y, int w, int h) {
1114             for (SynthPainter painter: painters) {
1115                 painter.paintTableBorder(context, g, x, y, w, h);
1116             }
1117         }
1118 
1119         public void paintTextAreaBackground(SynthContext context, Graphics g,
1120                                             int x, int y, int w, int h) {
1121             for (SynthPainter painter: painters) {
1122                 painter.paintTextAreaBackground(context, g, x, y, w, h);
1123             }
1124         }
1125 
1126         public void paintTextAreaBorder(SynthContext context, Graphics g,
1127                                         int x, int y, int w, int h) {
1128             for (SynthPainter painter: painters) {
1129                 painter.paintTextAreaBorder(context, g, x, y, w, h);
1130             }
1131         }
1132 
1133         public void paintTextPaneBackground(SynthContext context, Graphics g,
1134                                             int x, int y, int w, int h) {
1135             for (SynthPainter painter: painters) {
1136                 painter.paintTextPaneBackground(context, g, x, y, w, h);
1137             }
1138         }
1139 
1140         public void paintTextPaneBorder(SynthContext context, Graphics g,
1141                                         int x, int y, int w, int h) {
1142             for (SynthPainter painter: painters) {
1143                 painter.paintTextPaneBorder(context, g, x, y, w, h);
1144             }
1145         }
1146 
1147         public void paintTextFieldBackground(SynthContext context, Graphics g,
1148                                              int x, int y, int w, int h) {
1149             for (SynthPainter painter: painters) {
1150                 painter.paintTextFieldBackground(context, g, x, y, w, h);
1151             }
1152         }
1153 
1154         public void paintTextFieldBorder(SynthContext context, Graphics g,
1155                                          int x, int y, int w, int h) {
1156             for (SynthPainter painter: painters) {
1157                 painter.paintTextFieldBorder(context, g, x, y, w, h);
1158             }
1159         }
1160 
1161         public void paintToggleButtonBackground(SynthContext context,
1162                                                 Graphics g, int x, int y,
1163                                                 int w, int h) {
1164             for (SynthPainter painter: painters) {
1165                 painter.paintToggleButtonBackground(context, g, x, y, w, h);
1166             }
1167         }
1168 
1169         public void paintToggleButtonBorder(SynthContext context,
1170                                             Graphics g, int x, int y,
1171                                             int w, int h) {
1172             for (SynthPainter painter: painters) {
1173                 painter.paintToggleButtonBorder(context, g, x, y, w, h);
1174             }
1175         }
1176 
1177         public void paintToolBarBackground(SynthContext context, Graphics g,
1178                                            int x, int y, int w, int h) {
1179             for (SynthPainter painter: painters) {
1180                 painter.paintToolBarBackground(context, g, x, y, w, h);
1181             }
1182         }
1183 
1184         public void paintToolBarBackground(SynthContext context, Graphics g,
1185                                            int x, int y, int w, int h,
1186                                            int orientation) {
1187             for (SynthPainter painter: painters) {
1188                 painter.paintToolBarBackground(context, g, x, y, w, h,
1189                                                orientation);
1190             }
1191         }
1192 
1193         public void paintToolBarBorder(SynthContext context, Graphics g,
1194                                        int x, int y, int w, int h) {
1195             for (SynthPainter painter: painters) {
1196                 painter.paintToolBarBorder(context, g, x, y, w, h);
1197             }
1198         }
1199 
1200         public void paintToolBarBorder(SynthContext context, Graphics g,
1201                                        int x, int y, int w, int h,
1202                                        int orientation) {
1203             for (SynthPainter painter: painters) {
1204                 painter.paintToolBarBorder(context, g, x, y, w, h, orientation);
1205             }
1206         }
1207 
1208         public void paintToolBarContentBackground(SynthContext context,
1209                                                   Graphics g, int x, int y,
1210                                                   int w, int h) {
1211             for (SynthPainter painter: painters) {
1212                 painter.paintToolBarContentBackground(context, g, x, y, w, h);
1213             }
1214         }
1215 
1216         public void paintToolBarContentBackground(SynthContext context,
1217                                                   Graphics g, int x, int y,
1218                                                   int w, int h,
1219                                                   int orientation) {
1220             for (SynthPainter painter: painters) {
1221                 painter.paintToolBarContentBackground(context, g, x, y, w, h,
1222                                                       orientation);
1223             }
1224         }
1225 
1226         public void paintToolBarContentBorder(SynthContext context, Graphics g,
1227                                               int x, int y, int w, int h) {
1228             for (SynthPainter painter: painters) {
1229                 painter.paintToolBarContentBorder(context, g, x, y, w, h);
1230             }
1231         }
1232 
1233         public void paintToolBarContentBorder(SynthContext context, Graphics g,
1234                                               int x, int y, int w, int h,
1235                                               int orientation) {
1236             for (SynthPainter painter: painters) {
1237                 painter.paintToolBarContentBorder(context, g, x, y, w, h,
1238                                                   orientation);
1239             }
1240         }
1241 
1242         public void paintToolBarDragWindowBackground(SynthContext context,
1243                                                      Graphics g, int x, int y,
1244                                                      int w, int h) {
1245             for (SynthPainter painter: painters) {
1246                 painter.paintToolBarDragWindowBackground(context, g, x, y, w, h);
1247             }
1248         }
1249 
1250         public void paintToolBarDragWindowBackground(SynthContext context,
1251                                                      Graphics g, int x, int y,
1252                                                      int w, int h,
1253                                                      int orientation) {
1254             for (SynthPainter painter: painters) {
1255                 painter.paintToolBarDragWindowBackground(context, g, x, y, w, h,
1256                                                          orientation);
1257             }
1258         }
1259 
1260         public void paintToolBarDragWindowBorder(SynthContext context,
1261                                                  Graphics g, int x, int y,
1262                                                  int w, int h) {
1263             for (SynthPainter painter: painters) {
1264                 painter.paintToolBarDragWindowBorder(context, g, x, y, w, h);
1265             }
1266         }
1267 
1268         public void paintToolBarDragWindowBorder(SynthContext context,
1269                                                  Graphics g, int x, int y,
1270                                                  int w, int h,
1271                                                  int orientation) {
1272             for (SynthPainter painter: painters) {
1273                 painter.paintToolBarDragWindowBorder(context, g, x, y, w, h,
1274                                                      orientation);
1275             }
1276         }
1277 
1278         public void paintToolTipBackground(SynthContext context,
1279                                            Graphics g, int x, int y,
1280                                            int w, int h) {
1281             for (SynthPainter painter: painters) {
1282                 painter.paintToolTipBackground(context, g, x, y, w, h);
1283             }
1284         }
1285 
1286         public void paintToolTipBorder(SynthContext context, Graphics g,
1287                                        int x, int y, int w, int h) {
1288             for (SynthPainter painter: painters) {
1289                 painter.paintToolTipBorder(context, g, x, y, w, h);
1290             }
1291         }
1292 
1293         public void paintTreeBackground(SynthContext context, Graphics g,
1294                                         int x, int y, int w, int h) {
1295             for (SynthPainter painter: painters) {
1296                 painter.paintTreeBackground(context, g, x, y, w, h);
1297             }
1298         }
1299 
1300         public void paintTreeBorder(SynthContext context, Graphics g,
1301                                     int x, int y, int w, int h) {
1302             for (SynthPainter painter: painters) {
1303                 painter.paintTreeBorder(context, g, x, y, w, h);
1304             }
1305         }
1306 
1307         public void paintTreeCellBackground(SynthContext context, Graphics g,
1308                                             int x, int y, int w, int h) {
1309             for (SynthPainter painter: painters) {
1310                 painter.paintTreeCellBackground(context, g, x, y, w, h);
1311             }
1312         }
1313 
1314         public void paintTreeCellBorder(SynthContext context, Graphics g,
1315                                         int x, int y, int w, int h) {
1316             for (SynthPainter painter: painters) {
1317                 painter.paintTreeCellBorder(context, g, x, y, w, h);
1318             }
1319         }
1320 
1321         public void paintTreeCellFocus(SynthContext context, Graphics g,
1322                                        int x, int y, int w, int h) {
1323             for (SynthPainter painter: painters) {
1324                 painter.paintTreeCellFocus(context, g, x, y, w, h);
1325             }
1326         }
1327 
1328         public void paintViewportBackground(SynthContext context, Graphics g,
1329                                             int x, int y, int w, int h) {
1330             for (SynthPainter painter: painters) {
1331                 painter.paintViewportBackground(context, g, x, y, w, h);
1332             }
1333         }
1334 
1335         public void paintViewportBorder(SynthContext context, Graphics g,
1336                                         int x, int y, int w, int h) {
1337             for (SynthPainter painter: painters) {
1338                 painter.paintViewportBorder(context, g, x, y, w, h);
1339             }
1340         }
1341     }
1342 
1343     private static class DelegatingPainter extends SynthPainter {
1344         private static SynthPainter getPainter(SynthContext context,
1345                                                String method, int direction) {
1346             return ((ParsedSynthStyle)context.getStyle()).getBestPainter(
1347                                context, method, direction);
1348         }
1349 
1350         public void paintArrowButtonBackground(SynthContext context,
1351                      Graphics g, int x, int y, int w, int h) {
1352             getPainter(context, "arrowbuttonbackground", -1).
1353                 paintArrowButtonBackground(context, g, x, y, w, h);
1354         }
1355 
1356         public void paintArrowButtonBorder(SynthContext context,
1357                      Graphics g, int x, int y, int w, int h) {
1358             getPainter(context, "arrowbuttonborder", -1).
1359                 paintArrowButtonBorder(context, g, x, y, w, h);
1360         }
1361 
1362         public void paintArrowButtonForeground(SynthContext context,
1363                      Graphics g, int x, int y, int w, int h, int direction) {
1364             getPainter(context, "arrowbuttonforeground", direction).
1365                 paintArrowButtonForeground(context, g, x, y, w, h, direction);
1366         }
1367 
1368         public void paintButtonBackground(SynthContext context,
1369                      Graphics g, int x, int y, int w, int h) {
1370             getPainter(context, "buttonbackground", -1).
1371                 paintButtonBackground(context, g, x, y, w, h);
1372         }
1373 
1374         public void paintButtonBorder(SynthContext context,
1375                      Graphics g, int x, int y, int w, int h) {
1376             getPainter(context, "buttonborder", -1).
1377                 paintButtonBorder(context, g, x, y, w, h);
1378         }
1379 
1380         public void paintCheckBoxMenuItemBackground(SynthContext context,
1381                      Graphics g, int x, int y, int w, int h) {
1382             getPainter(context, "checkboxmenuitembackground", -1).
1383                 paintCheckBoxMenuItemBackground(context, g, x, y, w, h);
1384         }
1385 
1386         public void paintCheckBoxMenuItemBorder(SynthContext context,
1387                      Graphics g, int x, int y, int w, int h) {
1388             getPainter(context, "checkboxmenuitemborder", -1).
1389                 paintCheckBoxMenuItemBorder(context, g, x, y, w, h);
1390         }
1391 
1392         public void paintCheckBoxBackground(SynthContext context,
1393                      Graphics g, int x, int y, int w, int h) {
1394             getPainter(context, "checkboxbackground", -1).
1395                 paintCheckBoxBackground(context, g, x, y, w, h);
1396         }
1397 
1398         public void paintCheckBoxBorder(SynthContext context,
1399                      Graphics g, int x, int y, int w, int h) {
1400             getPainter(context, "checkboxborder", -1).
1401                 paintCheckBoxBorder(context, g, x, y, w, h);
1402         }
1403 
1404         public void paintColorChooserBackground(SynthContext context,
1405                      Graphics g, int x, int y, int w, int h) {
1406             getPainter(context, "colorchooserbackground", -1).
1407                 paintColorChooserBackground(context, g, x, y, w, h);
1408         }
1409 
1410         public void paintColorChooserBorder(SynthContext context,
1411                      Graphics g, int x, int y, int w, int h) {
1412             getPainter(context, "colorchooserborder", -1).
1413                 paintColorChooserBorder(context, g, x, y, w, h);
1414         }
1415 
1416         public void paintComboBoxBackground(SynthContext context,
1417                      Graphics g, int x, int y, int w, int h) {
1418             getPainter(context, "comboboxbackground", -1).
1419                 paintComboBoxBackground(context, g, x, y, w, h);
1420         }
1421 
1422         public void paintComboBoxBorder(SynthContext context,
1423                      Graphics g, int x, int y, int w, int h) {
1424             getPainter(context, "comboboxborder", -1).
1425                 paintComboBoxBorder(context, g, x, y, w, h);
1426         }
1427 
1428         public void paintDesktopIconBackground(SynthContext context,
1429                      Graphics g, int x, int y, int w, int h) {
1430             getPainter(context, "desktopiconbackground", -1).
1431                 paintDesktopIconBackground(context, g, x, y, w, h);
1432         }
1433 
1434         public void paintDesktopIconBorder(SynthContext context,
1435                      Graphics g, int x, int y, int w, int h) {
1436             getPainter(context, "desktopiconborder", -1).
1437                 paintDesktopIconBorder(context, g, x, y, w, h);
1438         }
1439 
1440         public void paintDesktopPaneBackground(SynthContext context,
1441                      Graphics g, int x, int y, int w, int h) {
1442             getPainter(context, "desktoppanebackground", -1).
1443                 paintDesktopPaneBackground(context, g, x, y, w, h);
1444         }
1445 
1446         public void paintDesktopPaneBorder(SynthContext context,
1447                      Graphics g, int x, int y, int w, int h) {
1448             getPainter(context, "desktoppaneborder", -1).
1449                 paintDesktopPaneBorder(context, g, x, y, w, h);
1450         }
1451 
1452         public void paintEditorPaneBackground(SynthContext context,
1453                      Graphics g, int x, int y, int w, int h) {
1454             getPainter(context, "editorpanebackground", -1).
1455                 paintEditorPaneBackground(context, g, x, y, w, h);
1456         }
1457 
1458         public void paintEditorPaneBorder(SynthContext context,
1459                      Graphics g, int x, int y, int w, int h) {
1460             getPainter(context, "editorpaneborder", -1).
1461                 paintEditorPaneBorder(context, g, x, y, w, h);
1462         }
1463 
1464         public void paintFileChooserBackground(SynthContext context,
1465                      Graphics g, int x, int y, int w, int h) {
1466             getPainter(context, "filechooserbackground", -1).
1467                 paintFileChooserBackground(context, g, x, y, w, h);
1468         }
1469 
1470         public void paintFileChooserBorder(SynthContext context,
1471                      Graphics g, int x, int y, int w, int h) {
1472             getPainter(context, "filechooserborder", -1).
1473                 paintFileChooserBorder(context, g, x, y, w, h);
1474         }
1475 
1476         public void paintFormattedTextFieldBackground(SynthContext context,
1477                      Graphics g, int x, int y, int w, int h) {
1478             getPainter(context, "formattedtextfieldbackground", -1).
1479                 paintFormattedTextFieldBackground(context, g, x, y, w, h);
1480         }
1481 
1482         public void paintFormattedTextFieldBorder(SynthContext context,
1483                      Graphics g, int x, int y, int w, int h) {
1484             getPainter(context, "formattedtextfieldborder", -1).
1485                 paintFormattedTextFieldBorder(context, g, x, y, w, h);
1486         }
1487 
1488         public void paintInternalFrameTitlePaneBackground(SynthContext context,
1489                      Graphics g, int x, int y, int w, int h) {
1490             getPainter(context, "internalframetitlepanebackground", -1).
1491                 paintInternalFrameTitlePaneBackground(context, g, x, y, w, h);
1492         }
1493 
1494         public void paintInternalFrameTitlePaneBorder(SynthContext context,
1495                      Graphics g, int x, int y, int w, int h) {
1496             getPainter(context, "internalframetitlepaneborder", -1).
1497                 paintInternalFrameTitlePaneBorder(context, g, x, y, w, h);
1498         }
1499 
1500         public void paintInternalFrameBackground(SynthContext context,
1501                      Graphics g, int x, int y, int w, int h) {
1502             getPainter(context, "internalframebackground", -1).
1503                 paintInternalFrameBackground(context, g, x, y, w, h);
1504         }
1505 
1506         public void paintInternalFrameBorder(SynthContext context,
1507                      Graphics g, int x, int y, int w, int h) {
1508             getPainter(context, "internalframeborder", -1).
1509                 paintInternalFrameBorder(context, g, x, y, w, h);
1510         }
1511 
1512         public void paintLabelBackground(SynthContext context,
1513                      Graphics g, int x, int y, int w, int h) {
1514             getPainter(context, "labelbackground", -1).
1515                 paintLabelBackground(context, g, x, y, w, h);
1516         }
1517 
1518         public void paintLabelBorder(SynthContext context,
1519                      Graphics g, int x, int y, int w, int h) {
1520             getPainter(context, "labelborder", -1).
1521                 paintLabelBorder(context, g, x, y, w, h);
1522         }
1523 
1524         public void paintListBackground(SynthContext context,
1525                      Graphics g, int x, int y, int w, int h) {
1526             getPainter(context, "listbackground", -1).
1527                 paintListBackground(context, g, x, y, w, h);
1528         }
1529 
1530         public void paintListBorder(SynthContext context,
1531                      Graphics g, int x, int y, int w, int h) {
1532             getPainter(context, "listborder", -1).
1533                 paintListBorder(context, g, x, y, w, h);
1534         }
1535 
1536         public void paintMenuBarBackground(SynthContext context,
1537                      Graphics g, int x, int y, int w, int h) {
1538             getPainter(context, "menubarbackground", -1).
1539                 paintMenuBarBackground(context, g, x, y, w, h);
1540         }
1541 
1542         public void paintMenuBarBorder(SynthContext context,
1543                      Graphics g, int x, int y, int w, int h) {
1544             getPainter(context, "menubarborder", -1).
1545                 paintMenuBarBorder(context, g, x, y, w, h);
1546         }
1547 
1548         public void paintMenuItemBackground(SynthContext context,
1549                      Graphics g, int x, int y, int w, int h) {
1550             getPainter(context, "menuitembackground", -1).
1551                 paintMenuItemBackground(context, g, x, y, w, h);
1552         }
1553 
1554         public void paintMenuItemBorder(SynthContext context,
1555                      Graphics g, int x, int y, int w, int h) {
1556             getPainter(context, "menuitemborder", -1).
1557                 paintMenuItemBorder(context, g, x, y, w, h);
1558         }
1559 
1560         public void paintMenuBackground(SynthContext context,
1561                      Graphics g, int x, int y, int w, int h) {
1562             getPainter(context, "menubackground", -1).
1563                 paintMenuBackground(context, g, x, y, w, h);
1564         }
1565 
1566         public void paintMenuBorder(SynthContext context,
1567                      Graphics g, int x, int y, int w, int h) {
1568             getPainter(context, "menuborder", -1).
1569                 paintMenuBorder(context, g, x, y, w, h);
1570         }
1571 
1572         public void paintOptionPaneBackground(SynthContext context,
1573                      Graphics g, int x, int y, int w, int h) {
1574             getPainter(context, "optionpanebackground", -1).
1575                 paintOptionPaneBackground(context, g, x, y, w, h);
1576         }
1577 
1578         public void paintOptionPaneBorder(SynthContext context,
1579                      Graphics g, int x, int y, int w, int h) {
1580             getPainter(context, "optionpaneborder", -1).
1581                 paintOptionPaneBorder(context, g, x, y, w, h);
1582         }
1583 
1584         public void paintPanelBackground(SynthContext context,
1585                      Graphics g, int x, int y, int w, int h) {
1586             getPainter(context, "panelbackground", -1).
1587                 paintPanelBackground(context, g, x, y, w, h);
1588         }
1589 
1590         public void paintPanelBorder(SynthContext context,
1591                      Graphics g, int x, int y, int w, int h) {
1592             getPainter(context, "panelborder", -1).
1593                 paintPanelBorder(context, g, x, y, w, h);
1594         }
1595 
1596         public void paintPasswordFieldBackground(SynthContext context,
1597                      Graphics g, int x, int y, int w, int h) {
1598             getPainter(context, "passwordfieldbackground", -1).
1599                 paintPasswordFieldBackground(context, g, x, y, w, h);
1600         }
1601 
1602         public void paintPasswordFieldBorder(SynthContext context,
1603                      Graphics g, int x, int y, int w, int h) {
1604             getPainter(context, "passwordfieldborder", -1).
1605                 paintPasswordFieldBorder(context, g, x, y, w, h);
1606         }
1607 
1608         public void paintPopupMenuBackground(SynthContext context,
1609                      Graphics g, int x, int y, int w, int h) {
1610             getPainter(context, "popupmenubackground", -1).
1611                 paintPopupMenuBackground(context, g, x, y, w, h);
1612         }
1613 
1614         public void paintPopupMenuBorder(SynthContext context,
1615                      Graphics g, int x, int y, int w, int h) {
1616             getPainter(context, "popupmenuborder", -1).
1617                 paintPopupMenuBorder(context, g, x, y, w, h);
1618         }
1619 
1620         public void paintProgressBarBackground(SynthContext context,
1621                      Graphics g, int x, int y, int w, int h) {
1622             getPainter(context, "progressbarbackground", -1).
1623                 paintProgressBarBackground(context, g, x, y, w, h);
1624         }
1625 
1626         public void paintProgressBarBackground(SynthContext context,
1627                      Graphics g, int x, int y, int w, int h, int direction) {
1628             getPainter(context, "progressbarbackground", direction).
1629                 paintProgressBarBackground(context, g, x, y, w, h, direction);
1630         }
1631 
1632         public void paintProgressBarBorder(SynthContext context,
1633                      Graphics g, int x, int y, int w, int h) {
1634             getPainter(context, "progressbarborder", -1).
1635                 paintProgressBarBorder(context, g, x, y, w, h);
1636         }
1637 
1638         public void paintProgressBarBorder(SynthContext context,
1639                      Graphics g, int x, int y, int w, int h, int direction) {
1640             getPainter(context, "progressbarborder", direction).
1641                 paintProgressBarBorder(context, g, x, y, w, h, direction);
1642         }
1643 
1644         public void paintProgressBarForeground(SynthContext context,
1645                      Graphics g, int x, int y, int w, int h, int direction) {
1646             getPainter(context, "progressbarforeground", direction).
1647                 paintProgressBarForeground(context, g, x, y, w, h, direction);
1648         }
1649 
1650         public void paintRadioButtonMenuItemBackground(SynthContext context,
1651                      Graphics g, int x, int y, int w, int h) {
1652             getPainter(context, "radiobuttonmenuitembackground", -1).
1653                 paintRadioButtonMenuItemBackground(context, g, x, y, w, h);
1654         }
1655 
1656         public void paintRadioButtonMenuItemBorder(SynthContext context,
1657                      Graphics g, int x, int y, int w, int h) {
1658             getPainter(context, "radiobuttonmenuitemborder", -1).
1659                 paintRadioButtonMenuItemBorder(context, g, x, y, w, h);
1660         }
1661 
1662         public void paintRadioButtonBackground(SynthContext context,
1663                      Graphics g, int x, int y, int w, int h) {
1664             getPainter(context, "radiobuttonbackground", -1).
1665                 paintRadioButtonBackground(context, g, x, y, w, h);
1666         }
1667 
1668         public void paintRadioButtonBorder(SynthContext context,
1669                      Graphics g, int x, int y, int w, int h) {
1670             getPainter(context, "radiobuttonborder", -1).
1671                 paintRadioButtonBorder(context, g, x, y, w, h);
1672         }
1673 
1674         public void paintRootPaneBackground(SynthContext context,
1675                      Graphics g, int x, int y, int w, int h) {
1676             getPainter(context, "rootpanebackground", -1).
1677                 paintRootPaneBackground(context, g, x, y, w, h);
1678         }
1679 
1680         public void paintRootPaneBorder(SynthContext context,
1681                      Graphics g, int x, int y, int w, int h) {
1682             getPainter(context, "rootpaneborder", -1).
1683                 paintRootPaneBorder(context, g, x, y, w, h);
1684         }
1685 
1686         public void paintScrollBarBackground(SynthContext context,
1687                      Graphics g, int x, int y, int w, int h) {
1688             getPainter(context, "scrollbarbackground", -1).
1689                paintScrollBarBackground(context, g, x, y, w, h);
1690         }
1691 
1692         public void paintScrollBarBackground(SynthContext context,
1693                       Graphics g, int x, int y, int w, int h, int direction) {
1694             getPainter(context, "scrollbarbackground", direction).
1695                 paintScrollBarBackground(context, g, x, y, w, h, direction);
1696         }
1697 
1698 
1699         public void paintScrollBarBorder(SynthContext context,
1700                      Graphics g, int x, int y, int w, int h) {
1701             getPainter(context, "scrollbarborder", -1).
1702                 paintScrollBarBorder(context, g, x, y, w, h);
1703         }
1704 
1705         public void paintScrollBarBorder(SynthContext context,
1706                                          Graphics g, int x, int y, int w, int h,
1707                                          int orientation) {
1708             getPainter(context, "scrollbarborder", orientation).
1709                 paintScrollBarBorder(context, g, x, y, w, h, orientation);
1710         }
1711 
1712         public void paintScrollBarThumbBackground(SynthContext context,
1713                      Graphics g, int x, int y, int w, int h, int direction) {
1714             getPainter(context, "scrollbarthumbbackground", direction).
1715                 paintScrollBarThumbBackground(context, g, x, y, w, h, direction);
1716         }
1717 
1718         public void paintScrollBarThumbBorder(SynthContext context,
1719                      Graphics g, int x, int y, int w, int h, int direction) {
1720             getPainter(context, "scrollbarthumbborder", direction).
1721                 paintScrollBarThumbBorder(context, g, x, y, w, h, direction);
1722         }
1723 
1724         public void paintScrollBarTrackBackground(SynthContext context,
1725                      Graphics g, int x, int y, int w, int h) {
1726             getPainter(context, "scrollbartrackbackground", -1).
1727                 paintScrollBarTrackBackground(context, g, x, y, w, h);
1728         }
1729 
1730         public void paintScrollBarTrackBackground(SynthContext context,
1731                      Graphics g, int x, int y, int w, int h, int direction) {
1732              getPainter(context, "scrollbartrackbackground", direction).
1733                  paintScrollBarTrackBackground(context, g, x, y, w, h, direction);
1734          }
1735 
1736         public void paintScrollBarTrackBorder(SynthContext context,
1737                      Graphics g, int x, int y, int w, int h) {
1738             getPainter(context, "scrollbartrackborder", -1).
1739                 paintScrollBarTrackBorder(context, g, x, y, w, h);
1740         }
1741 
1742         public void paintScrollBarTrackBorder(SynthContext context,
1743                      Graphics g, int x, int y, int w, int h, int orientation) {
1744             getPainter(context, "scrollbartrackborder", orientation).
1745                 paintScrollBarTrackBorder(context, g, x, y, w, h, orientation);
1746         }
1747 
1748         public void paintScrollPaneBackground(SynthContext context,
1749                      Graphics g, int x, int y, int w, int h) {
1750             getPainter(context, "scrollpanebackground", -1).
1751                 paintScrollPaneBackground(context, g, x, y, w, h);
1752         }
1753 
1754         public void paintScrollPaneBorder(SynthContext context,
1755                      Graphics g, int x, int y, int w, int h) {
1756             getPainter(context, "scrollpaneborder", -1).
1757                 paintScrollPaneBorder(context, g, x, y, w, h);
1758         }
1759 
1760         public void paintSeparatorBackground(SynthContext context,
1761                      Graphics g, int x, int y, int w, int h) {
1762             getPainter(context, "separatorbackground", -1).
1763                 paintSeparatorBackground(context, g, x, y, w, h);
1764         }
1765 
1766         public void paintSeparatorBackground(SynthContext context,
1767                      Graphics g, int x, int y, int w, int h, int orientation) {
1768             getPainter(context, "separatorbackground", orientation).
1769                 paintSeparatorBackground(context, g, x, y, w, h, orientation);
1770         }
1771 
1772         public void paintSeparatorBorder(SynthContext context,
1773                      Graphics g, int x, int y, int w, int h) {
1774             getPainter(context, "separatorborder", -1).
1775                 paintSeparatorBorder(context, g, x, y, w, h);
1776         }
1777 
1778         public void paintSeparatorBorder(SynthContext context,
1779                      Graphics g, int x, int y, int w, int h, int orientation) {
1780             getPainter(context, "separatorborder", orientation).
1781                 paintSeparatorBorder(context, g, x, y, w, h, orientation);
1782         }
1783 
1784         public void paintSeparatorForeground(SynthContext context,
1785                      Graphics g, int x, int y, int w, int h, int direction) {
1786             getPainter(context, "separatorforeground", direction).
1787                 paintSeparatorForeground(context, g, x, y, w, h, direction);
1788         }
1789 
1790         public void paintSliderBackground(SynthContext context,
1791                      Graphics g, int x, int y, int w, int h) {
1792             getPainter(context, "sliderbackground", -1).
1793                 paintSliderBackground(context, g, x, y, w, h);
1794         }
1795 
1796         public void paintSliderBackground(SynthContext context,
1797                      Graphics g, int x, int y, int w, int h, int direction) {
1798             getPainter(context, "sliderbackground", direction).
1799             paintSliderBackground(context, g, x, y, w, h, direction);
1800         }
1801 
1802         public void paintSliderBorder(SynthContext context,
1803                      Graphics g, int x, int y, int w, int h) {
1804             getPainter(context, "sliderborder", -1).
1805                 paintSliderBorder(context, g, x, y, w, h);
1806         }
1807 
1808         public void paintSliderBorder(SynthContext context,
1809                      Graphics g, int x, int y, int w, int h, int direction) {
1810             getPainter(context, "sliderborder", direction).
1811                 paintSliderBorder(context, g, x, y, w, h, direction);
1812         }
1813 
1814         public void paintSliderThumbBackground(SynthContext context,
1815                      Graphics g, int x, int y, int w, int h, int direction) {
1816             getPainter(context, "sliderthumbbackground", direction).
1817                 paintSliderThumbBackground(context, g, x, y, w, h, direction);
1818         }
1819 
1820         public void paintSliderThumbBorder(SynthContext context,
1821                      Graphics g, int x, int y, int w, int h, int direction) {
1822             getPainter(context, "sliderthumbborder", direction).
1823                 paintSliderThumbBorder(context, g, x, y, w, h, direction);
1824         }
1825 
1826         public void paintSliderTrackBackground(SynthContext context,
1827                      Graphics g, int x, int y, int w, int h) {
1828             getPainter(context, "slidertrackbackground", -1).
1829                 paintSliderTrackBackground(context, g, x, y, w, h);
1830         }
1831 
1832         public void paintSliderTrackBackground(SynthContext context,
1833                      Graphics g, int x, int y, int w, int h, int direction) {
1834             getPainter(context, "slidertrackbackground", direction).
1835                 paintSliderTrackBackground(context, g, x, y, w, h, direction);
1836         }
1837 
1838         public void paintSliderTrackBorder(SynthContext context,
1839                      Graphics g, int x, int y, int w, int h) {
1840             getPainter(context, "slidertrackborder", -1).
1841                 paintSliderTrackBorder(context, g, x, y, w, h);
1842         }
1843 
1844         public void paintSliderTrackBorder(SynthContext context,
1845                      Graphics g, int x, int y, int w, int h, int direction) {
1846             getPainter(context, "slidertrackborder", direction).
1847             paintSliderTrackBorder(context, g, x, y, w, h, direction);
1848         }
1849 
1850         public void paintSpinnerBackground(SynthContext context,
1851                      Graphics g, int x, int y, int w, int h) {
1852             getPainter(context, "spinnerbackground", -1).
1853                 paintSpinnerBackground(context, g, x, y, w, h);
1854         }
1855 
1856         public void paintSpinnerBorder(SynthContext context,
1857                      Graphics g, int x, int y, int w, int h) {
1858             getPainter(context, "spinnerborder", -1).
1859                 paintSpinnerBorder(context, g, x, y, w, h);
1860         }
1861 
1862         public void paintSplitPaneDividerBackground(SynthContext context,
1863                      Graphics g, int x, int y, int w, int h) {
1864             getPainter(context, "splitpanedividerbackground", -1).
1865                 paintSplitPaneDividerBackground(context, g, x, y, w, h);
1866         }
1867 
1868         public void paintSplitPaneDividerBackground(SynthContext context,
1869                      Graphics g, int x, int y, int w, int h, int orientation) {
1870             getPainter(context, "splitpanedividerbackground", orientation).
1871             paintSplitPaneDividerBackground(context, g, x, y, w, h, orientation);
1872         }
1873 
1874         public void paintSplitPaneDividerForeground(SynthContext context,
1875                      Graphics g, int x, int y, int w, int h, int direction) {
1876             getPainter(context, "splitpanedividerforeground", direction).
1877                 paintSplitPaneDividerForeground(context, g,
1878                                                 x, y, w, h, direction);
1879         }
1880 
1881         public void paintSplitPaneDragDivider(SynthContext context,
1882                      Graphics g, int x, int y, int w, int h, int direction) {
1883             getPainter(context, "splitpanedragdivider", direction).
1884                 paintSplitPaneDragDivider(context, g, x, y, w, h, direction);
1885         }
1886 
1887         public void paintSplitPaneBackground(SynthContext context,
1888                      Graphics g, int x, int y, int w, int h) {
1889             getPainter(context, "splitpanebackground", -1).
1890                 paintSplitPaneBackground(context, g, x, y, w, h);
1891         }
1892 
1893         public void paintSplitPaneBorder(SynthContext context,
1894                      Graphics g, int x, int y, int w, int h) {
1895             getPainter(context, "splitpaneborder", -1).
1896                 paintSplitPaneBorder(context, g, x, y, w, h);
1897         }
1898 
1899         public void paintTabbedPaneBackground(SynthContext context,
1900                      Graphics g, int x, int y, int w, int h) {
1901             getPainter(context, "tabbedpanebackground", -1).
1902                 paintTabbedPaneBackground(context, g, x, y, w, h);
1903         }
1904 
1905         public void paintTabbedPaneBorder(SynthContext context,
1906                      Graphics g, int x, int y, int w, int h) {
1907             getPainter(context, "tabbedpaneborder", -1).
1908                 paintTabbedPaneBorder(context, g, x, y, w, h);
1909         }
1910 
1911         public void paintTabbedPaneTabAreaBackground(SynthContext context,
1912                      Graphics g, int x, int y, int w, int h) {
1913             getPainter(context, "tabbedpanetabareabackground", -1).
1914                 paintTabbedPaneTabAreaBackground(context, g, x, y, w, h);
1915         }
1916 
1917         public void paintTabbedPaneTabAreaBackground(SynthContext context,
1918                      Graphics g, int x, int y, int w, int h, int orientation) {
1919             getPainter(context, "tabbedpanetabareabackground", orientation).
1920                 paintTabbedPaneTabAreaBackground(context, g, x, y, w, h,
1921                                                  orientation);
1922         }
1923 
1924         public void paintTabbedPaneTabAreaBorder(SynthContext context,
1925                      Graphics g, int x, int y, int w, int h) {
1926             getPainter(context, "tabbedpanetabareaborder", -1).
1927                 paintTabbedPaneTabAreaBorder(context, g, x, y, w, h);
1928         }
1929 
1930         public void paintTabbedPaneTabAreaBorder(SynthContext context,
1931                      Graphics g, int x, int y, int w, int h, int orientation) {
1932             getPainter(context, "tabbedpanetabareaborder", orientation).
1933                 paintTabbedPaneTabAreaBorder(context, g, x, y, w, h,
1934                                              orientation);
1935         }
1936 
1937         public void paintTabbedPaneTabBackground(SynthContext context,
1938                      Graphics g, int x, int y, int w, int h, int direction) {
1939             getPainter(context, "tabbedpanetabbackground", -1).
1940                 paintTabbedPaneTabBackground(context, g, x, y, w, h, direction);
1941         }
1942 
1943         public void paintTabbedPaneTabBackground(SynthContext context,
1944                      Graphics g, int x, int y, int w, int h, int tabIndex,
1945                      int direction) {
1946             getPainter(context, "tabbedpanetabbackground", direction).
1947                 paintTabbedPaneTabBackground(context, g, x, y, w, h, tabIndex,
1948                                              direction);
1949         }
1950 
1951         public void paintTabbedPaneTabBorder(SynthContext context,
1952                      Graphics g, int x, int y, int w, int h, int direction) {
1953             getPainter(context, "tabbedpanetabborder", -1).
1954                 paintTabbedPaneTabBorder(context, g, x, y, w, h, direction);
1955         }
1956 
1957         public void paintTabbedPaneTabBorder(SynthContext context,
1958                      Graphics g, int x, int y, int w, int h, int tabIndex,
1959                      int direction) {
1960             getPainter(context, "tabbedpanetabborder", direction).
1961                 paintTabbedPaneTabBorder(context, g, x, y, w, h, tabIndex,
1962                                          direction);
1963         }
1964 
1965         public void paintTabbedPaneContentBackground(SynthContext context,
1966                      Graphics g, int x, int y, int w, int h) {
1967             getPainter(context, "tabbedpanecontentbackground", -1).
1968                 paintTabbedPaneContentBackground(context, g, x, y, w, h);
1969         }
1970 
1971         public void paintTabbedPaneContentBorder(SynthContext context,
1972                      Graphics g, int x, int y, int w, int h) {
1973             getPainter(context, "tabbedpanecontentborder", -1).
1974                 paintTabbedPaneContentBorder(context, g, x, y, w, h);
1975         }
1976 
1977         public void paintTableHeaderBackground(SynthContext context,
1978                      Graphics g, int x, int y, int w, int h) {
1979             getPainter(context, "tableheaderbackground", -1).
1980                 paintTableHeaderBackground(context, g, x, y, w, h);
1981         }
1982 
1983         public void paintTableHeaderBorder(SynthContext context,
1984                      Graphics g, int x, int y, int w, int h) {
1985             getPainter(context, "tableheaderborder", -1).
1986                 paintTableHeaderBorder(context, g, x, y, w, h);
1987         }
1988 
1989         public void paintTableBackground(SynthContext context,
1990                      Graphics g, int x, int y, int w, int h) {
1991             getPainter(context, "tablebackground", -1).
1992                 paintTableBackground(context, g, x, y, w, h);
1993         }
1994 
1995         public void paintTableBorder(SynthContext context,
1996                      Graphics g, int x, int y, int w, int h) {
1997             getPainter(context, "tableborder", -1).
1998                 paintTableBorder(context, g, x, y, w, h);
1999         }
2000 
2001         public void paintTextAreaBackground(SynthContext context,
2002                      Graphics g, int x, int y, int w, int h) {
2003             getPainter(context, "textareabackground", -1).
2004                 paintTextAreaBackground(context, g, x, y, w, h);
2005         }
2006 
2007         public void paintTextAreaBorder(SynthContext context,
2008                      Graphics g, int x, int y, int w, int h) {
2009             getPainter(context, "textareaborder", -1).
2010                 paintTextAreaBorder(context, g, x, y, w, h);
2011         }
2012 
2013         public void paintTextPaneBackground(SynthContext context,
2014                      Graphics g, int x, int y, int w, int h) {
2015             getPainter(context, "textpanebackground", -1).
2016                 paintTextPaneBackground(context, g, x, y, w, h);
2017         }
2018 
2019         public void paintTextPaneBorder(SynthContext context,
2020                      Graphics g, int x, int y, int w, int h) {
2021             getPainter(context, "textpaneborder", -1).
2022                 paintTextPaneBorder(context, g, x, y, w, h);
2023         }
2024 
2025         public void paintTextFieldBackground(SynthContext context,
2026                      Graphics g, int x, int y, int w, int h) {
2027             getPainter(context, "textfieldbackground", -1).
2028                 paintTextFieldBackground(context, g, x, y, w, h);
2029         }
2030 
2031         public void paintTextFieldBorder(SynthContext context,
2032                      Graphics g, int x, int y, int w, int h) {
2033             getPainter(context, "textfieldborder", -1).
2034                 paintTextFieldBorder(context, g, x, y, w, h);
2035         }
2036 
2037         public void paintToggleButtonBackground(SynthContext context,
2038                      Graphics g, int x, int y, int w, int h) {
2039             getPainter(context, "togglebuttonbackground", -1).
2040                 paintToggleButtonBackground(context, g, x, y, w, h);
2041         }
2042 
2043         public void paintToggleButtonBorder(SynthContext context,
2044                      Graphics g, int x, int y, int w, int h) {
2045             getPainter(context, "togglebuttonborder", -1).
2046                 paintToggleButtonBorder(context, g, x, y, w, h);
2047         }
2048 
2049         public void paintToolBarBackground(SynthContext context,
2050                      Graphics g, int x, int y, int w, int h) {
2051             getPainter(context, "toolbarbackground", -1).
2052                 paintToolBarBackground(context, g, x, y, w, h);
2053         }
2054 
2055         public void paintToolBarBackground(SynthContext context,
2056                      Graphics g, int x, int y, int w, int h, int orientation) {
2057             getPainter(context, "toolbarbackground", orientation).
2058                 paintToolBarBackground(context, g, x, y, w, h, orientation);
2059         }
2060 
2061         public void paintToolBarBorder(SynthContext context,
2062                      Graphics g, int x, int y, int w, int h) {
2063             getPainter(context, "toolbarborder", -1).
2064                 paintToolBarBorder(context, g, x, y, w, h);
2065         }
2066 
2067         public void paintToolBarBorder(SynthContext context,
2068                      Graphics g, int x, int y, int w, int h, int orientation) {
2069             getPainter(context, "toolbarborder", orientation).
2070                 paintToolBarBorder(context, g, x, y, w, h, orientation);
2071         }
2072 
2073         public void paintToolBarContentBackground(SynthContext context,
2074                      Graphics g, int x, int y, int w, int h) {
2075             getPainter(context, "toolbarcontentbackground", -1).
2076                 paintToolBarContentBackground(context, g, x, y, w, h);
2077         }
2078 
2079         public void paintToolBarContentBackground(SynthContext context,
2080                      Graphics g, int x, int y, int w, int h, int orientation) {
2081             getPainter(context, "toolbarcontentbackground", orientation).
2082                 paintToolBarContentBackground(context, g, x, y, w, h, orientation);
2083         }
2084 
2085         public void paintToolBarContentBorder(SynthContext context,
2086                      Graphics g, int x, int y, int w, int h) {
2087             getPainter(context, "toolbarcontentborder", -1).
2088                 paintToolBarContentBorder(context, g, x, y, w, h);
2089         }
2090 
2091         public void paintToolBarContentBorder(SynthContext context,
2092                      Graphics g, int x, int y, int w, int h, int orientation) {
2093             getPainter(context, "toolbarcontentborder", orientation).
2094                 paintToolBarContentBorder(context, g, x, y, w, h, orientation);
2095         }
2096 
2097         public void paintToolBarDragWindowBackground(SynthContext context,
2098                      Graphics g, int x, int y, int w, int h) {
2099             getPainter(context, "toolbardragwindowbackground", -1).
2100                 paintToolBarDragWindowBackground(context, g, x, y, w, h);
2101         }
2102 
2103         public void paintToolBarDragWindowBackground(SynthContext context,
2104                      Graphics g, int x, int y, int w, int h, int orientation) {
2105             getPainter(context, "toolbardragwindowbackground", orientation).
2106                 paintToolBarDragWindowBackground(context, g, x, y, w, h, orientation);
2107         }
2108 
2109         public void paintToolBarDragWindowBorder(SynthContext context,
2110                      Graphics g, int x, int y, int w, int h) {
2111             getPainter(context, "toolbardragwindowborder", -1).
2112                 paintToolBarDragWindowBorder(context, g, x, y, w, h);
2113         }
2114 
2115         public void paintToolBarDragWindowBorder(SynthContext context,
2116                      Graphics g, int x, int y, int w, int h, int orientation) {
2117             getPainter(context, "toolbardragwindowborder", orientation).
2118                 paintToolBarDragWindowBorder(context, g, x, y, w, h, orientation);
2119         }
2120 
2121         public void paintToolTipBackground(SynthContext context,
2122                      Graphics g, int x, int y, int w, int h) {
2123             getPainter(context, "tooltipbackground", -1).
2124                 paintToolTipBackground(context, g, x, y, w, h);
2125         }
2126 
2127         public void paintToolTipBorder(SynthContext context,
2128                      Graphics g, int x, int y, int w, int h) {
2129             getPainter(context, "tooltipborder", -1).
2130                 paintToolTipBorder(context, g, x, y, w, h);
2131         }
2132 
2133         public void paintTreeBackground(SynthContext context,
2134                      Graphics g, int x, int y, int w, int h) {
2135             getPainter(context, "treebackground", -1).
2136                 paintTreeBackground(context, g, x, y, w, h);
2137         }
2138 
2139         public void paintTreeBorder(SynthContext context,
2140                      Graphics g, int x, int y, int w, int h) {
2141             getPainter(context, "treeborder", -1).
2142                 paintTreeBorder(context, g, x, y, w, h);
2143         }
2144 
2145         public void paintTreeCellBackground(SynthContext context,
2146                      Graphics g, int x, int y, int w, int h) {
2147             getPainter(context, "treecellbackground", -1).
2148                 paintTreeCellBackground(context, g, x, y, w, h);
2149         }
2150 
2151         public void paintTreeCellBorder(SynthContext context,
2152                      Graphics g, int x, int y, int w, int h) {
2153             getPainter(context, "treecellborder", -1).
2154                 paintTreeCellBorder(context, g, x, y, w, h);
2155         }
2156 
2157         public void paintTreeCellFocus(SynthContext context,
2158                      Graphics g, int x, int y, int w, int h) {
2159             getPainter(context, "treecellfocus", -1).
2160                 paintTreeCellFocus(context, g, x, y, w, h);
2161         }
2162 
2163         public void paintViewportBackground(SynthContext context,
2164                      Graphics g, int x, int y, int w, int h) {
2165             getPainter(context, "viewportbackground", -1).
2166                 paintViewportBackground(context, g, x, y, w, h);
2167         }
2168 
2169         public void paintViewportBorder(SynthContext context,
2170                      Graphics g, int x, int y, int w, int h) {
2171             getPainter(context, "viewportborder", -1).
2172                 paintViewportBorder(context, g, x, y, w, h);
2173         }
2174     }
2175 }