KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > swing > plaf > synth > ParsedSynthStyle


1 /*
2  * @(#)ParsedSynthStyle.java 1.3 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 package javax.swing.plaf.synth;
8
9 import java.awt.*;
10 import javax.swing.*;
11 import sun.swing.plaf.synth.*;
12
13 /**
14  * ParsedSynthStyle are the SynthStyle's that SynthParser creates.
15  *
16  * @version 1.3, 12/19/03
17  * @author Scott Violet
18  */

19 class ParsedSynthStyle extends DefaultSynthStyle {
20     private static SynthPainter JavaDoc DELEGATING_PAINTER_INSTANCE = new
21                         DelegatingPainter();
22     private PainterInfo[] _painters;
23
24     private static PainterInfo[] mergePainterInfo(PainterInfo[] old,
25                                                   PainterInfo[] newPI) {
26         if (old == null) {
27             return newPI;
28         }
29         if (newPI == null) {
30             return old;
31         }
32         int oldLength = old.length;
33         int newLength = newPI.length;
34         int dups = 0;
35         PainterInfo[] merged = new PainterInfo[oldLength + newLength];
36         System.arraycopy(old, 0, merged, 0, oldLength);
37         for (int newCounter = 0; newCounter < newLength; newCounter++) {
38             boolean found = false;
39             for (int oldCounter = 0; oldCounter < oldLength - dups;
40                      oldCounter++) {
41                 if (newPI[newCounter].equalsPainter(old[oldCounter])) {
42                     merged[oldCounter] = newPI[newCounter];
43                     dups++;
44                     found = true;
45                     break;
46                 }
47             }
48             if (!found) {
49                 merged[oldLength + newCounter - dups] = newPI[newCounter];
50             }
51         }
52         if (dups > 0) {
53             PainterInfo[] tmp = merged;
54             merged = new PainterInfo[merged.length - dups];
55             System.arraycopy(tmp, 0, merged, 0, merged.length);
56         }
57         return merged;
58     }
59
60
61     public ParsedSynthStyle() {
62     }
63
64     public ParsedSynthStyle(DefaultSynthStyle style) {
65         super(style);
66         if (style instanceof ParsedSynthStyle JavaDoc) {
67             ParsedSynthStyle JavaDoc pStyle = (ParsedSynthStyle JavaDoc)style;
68
69             if (pStyle._painters != null) {
70                 _painters = pStyle._painters;
71             }
72         }
73     }
74
75     public SynthPainter JavaDoc getPainter(SynthContext JavaDoc ss) {
76         return DELEGATING_PAINTER_INSTANCE;
77     }
78
79     public void setPainters(PainterInfo[] info) {
80         _painters = info;
81     }
82
83     public DefaultSynthStyle addTo(DefaultSynthStyle style) {
84         if (!(style instanceof ParsedSynthStyle JavaDoc)) {
85             style = new ParsedSynthStyle JavaDoc(style);
86         }
87         ParsedSynthStyle JavaDoc pStyle = (ParsedSynthStyle JavaDoc)super.addTo(style);
88         pStyle._painters = mergePainterInfo(pStyle._painters, _painters);
89         return pStyle;
90     }
91
92     private SynthPainter JavaDoc getBestPainter(SynthContext JavaDoc context, String JavaDoc method,
93                                         int direction) {
94         // Check the state info first
95
StateInfo info = (StateInfo)getStateInfo(context.getComponentState());
96         SynthPainter JavaDoc painter;
97         if (info != null) {
98             if ((painter = getBestPainter(info.getPainters(), method,
99                                           direction)) != null) {
100                 return painter;
101             }
102         }
103         if ((painter = getBestPainter(_painters, method, direction)) != null) {
104             return painter;
105         }
106         return SynthPainter.NULL_PAINTER;
107     }
108
109     private SynthPainter JavaDoc getBestPainter(PainterInfo[] info, String JavaDoc method,
110                                         int direction) {
111         if (info != null) {
112             // Painter specified with no method
113
SynthPainter JavaDoc nullPainter = null;
114             // Painter specified for this method
115
SynthPainter JavaDoc methodPainter = null;
116
117             for (int counter = info.length - 1; counter >= 0; counter--) {
118                 PainterInfo pi = info[counter];
119
120                 if (pi.getMethod() == method) {
121                     if (pi.getDirection() == direction) {
122                         return pi.getPainter();
123                     }
124                     else if (methodPainter == null &&pi.getDirection() == -1) {
125                         methodPainter = pi.getPainter();
126                     }
127                 }
128                 else if (nullPainter == null && pi.getMethod() == null) {
129                     nullPainter = pi.getPainter();
130                 }
131             }
132             if (methodPainter != null) {
133                 return methodPainter;
134             }
135             return nullPainter;
136         }
137         return null;
138     }
139
140     public String JavaDoc toString() {
141         StringBuffer JavaDoc text = new StringBuffer JavaDoc(super.toString());
142         if (_painters != null) {
143             text.append(",painters=[");
144             for (int i = 0; i < +_painters.length; i++) {
145                 text.append(_painters[i].toString());
146             }
147             text.append("]");
148         }
149         return text.toString();
150     }
151
152
153     static class StateInfo extends DefaultSynthStyle.StateInfo {
154         private PainterInfo[] _painterInfo;
155
156         public StateInfo() {
157         }
158
159         public StateInfo(DefaultSynthStyle.StateInfo info) {
160             super(info);
161             if (info instanceof StateInfo) {
162                 _painterInfo = ((StateInfo)info)._painterInfo;
163             }
164         }
165
166         public void setPainters(PainterInfo[] painterInfo) {
167             _painterInfo = painterInfo;
168         }
169
170         public PainterInfo[] getPainters() {
171             return _painterInfo;
172         }
173
174         public Object JavaDoc clone() {
175             return new StateInfo(this);
176         }
177
178         public DefaultSynthStyle.StateInfo addTo(
179                            DefaultSynthStyle.StateInfo info) {
180             if (!(info instanceof StateInfo)) {
181                 info = new StateInfo(info);
182             }
183             else {
184                 info = super.addTo(info);
185                 StateInfo si = (StateInfo)info;
186                 si._painterInfo = mergePainterInfo(si._painterInfo,
187                                                    _painterInfo);
188             }
189             return info;
190         }
191
192         public String JavaDoc toString() {
193             StringBuffer JavaDoc text = new StringBuffer JavaDoc(super.toString());
194             text.append(",painters=[");
195             if (_painterInfo != null) {
196                 for (int i = 0; i < +_painterInfo.length; i++) {
197                     text.append(" ").append(_painterInfo[i].toString());
198                 }
199             }
200             text.append("]");
201             return text.toString();
202         }
203     }
204
205
206     static class PainterInfo {
207         private String JavaDoc _method;
208         private SynthPainter JavaDoc _painter;
209         private int _direction;
210
211         PainterInfo(String JavaDoc method, SynthPainter JavaDoc painter, int direction) {
212             if (method != null) {
213                 _method = method.intern();
214             }
215             _painter = painter;
216             _direction = direction;
217         }
218
219         String JavaDoc getMethod() {
220             return _method;
221         }
222
223         SynthPainter JavaDoc getPainter() {
224             return _painter;
225         }
226
227         int getDirection() {
228             return _direction;
229         }
230
231         private boolean equalsPainter(PainterInfo info) {
232             return (_method == info._method && _direction == info._direction);
233         }
234
235         public String JavaDoc toString() {
236             return "PainterInfo {method=" + _method + ",direction=" +
237                 _direction + ",painter=" + _painter +"}";
238         }
239     }
240
241
242     private static class DelegatingPainter extends SynthPainter JavaDoc {
243         private static SynthPainter JavaDoc getPainter(SynthContext JavaDoc context,
244                                                String JavaDoc method, int direction) {
245             return ((ParsedSynthStyle JavaDoc)context.getStyle()).getBestPainter(
246                                context, method, direction);
247         }
248
249         public void paintArrowButtonBackground(SynthContext JavaDoc context,
250                      Graphics g, int x, int y, int w, int h) {
251             getPainter(context, "arrowButtonBackground", -1).
252                 paintArrowButtonBackground(context, g, x, y, w, h);
253         }
254
255         public void paintArrowButtonBorder(SynthContext JavaDoc context,
256                      Graphics g, int x, int y, int w, int h) {
257             getPainter(context, "arrowButtonBorder", -1).
258                 paintArrowButtonBorder(context, g, x, y, w, h);
259         }
260
261         public void paintArrowButtonForeground(SynthContext JavaDoc context,
262                      Graphics g, int x, int y, int w, int h, int direction) {
263             getPainter(context, "arrowButtonForeground", direction).
264                 paintArrowButtonForeground(context, g, x, y, w, h, direction);
265         }
266
267         public void paintButtonBackground(SynthContext JavaDoc context,
268                      Graphics g, int x, int y, int w, int h) {
269             getPainter(context, "buttonBackground", -1).
270                 paintButtonBackground(context, g, x, y, w, h);
271         }
272
273         public void paintButtonBorder(SynthContext JavaDoc context,
274                      Graphics g, int x, int y, int w, int h) {
275             getPainter(context, "buttonBorder", -1).
276                 paintButtonBorder(context, g, x, y, w, h);
277         }
278
279         public void paintCheckBoxMenuItemBackground(SynthContext JavaDoc context,
280                      Graphics g, int x, int y, int w, int h) {
281             getPainter(context, "checkBoxMenuItemBackground", -1).
282                 paintCheckBoxMenuItemBackground(context, g, x, y, w, h);
283         }
284
285         public void paintCheckBoxMenuItemBorder(SynthContext JavaDoc context,
286                      Graphics g, int x, int y, int w, int h) {
287             getPainter(context, "checkBoxMenuItemBorder", -1).
288                 paintCheckBoxMenuItemBorder(context, g, x, y, w, h);
289         }
290
291         public void paintCheckBoxBackground(SynthContext JavaDoc context,
292                      Graphics g, int x, int y, int w, int h) {
293             getPainter(context, "checkBoxBackground", -1).
294                 paintCheckBoxBackground(context, g, x, y, w, h);
295         }
296
297         public void paintCheckBoxBorder(SynthContext JavaDoc context,
298                      Graphics g, int x, int y, int w, int h) {
299             getPainter(context, "checkBoxBorder", -1).
300                 paintCheckBoxBorder(context, g, x, y, w, h);
301         }
302
303         public void paintColorChooserBackground(SynthContext JavaDoc context,
304                      Graphics g, int x, int y, int w, int h) {
305             getPainter(context, "colorChooserBackground", -1).
306                 paintColorChooserBackground(context, g, x, y, w, h);
307         }
308
309         public void paintColorChooserBorder(SynthContext JavaDoc context,
310                      Graphics g, int x, int y, int w, int h) {
311             getPainter(context, "colorChooserBorder", -1).
312                 paintColorChooserBorder(context, g, x, y, w, h);
313         }
314
315         public void paintComboBoxBackground(SynthContext JavaDoc context,
316                      Graphics g, int x, int y, int w, int h) {
317             getPainter(context, "comboBoxBackground", -1).
318                 paintComboBoxBackground(context, g, x, y, w, h);
319         }
320
321         public void paintComboBoxBorder(SynthContext JavaDoc context,
322                      Graphics g, int x, int y, int w, int h) {
323             getPainter(context, "comboBoxBorder", -1).
324                 paintComboBoxBorder(context, g, x, y, w, h);
325         }
326
327         public void paintDesktopIconBackground(SynthContext JavaDoc context,
328                      Graphics g, int x, int y, int w, int h) {
329             getPainter(context, "desktopIconBackground", -1).
330                 paintDesktopIconBackground(context, g, x, y, w, h);
331         }
332
333         public void paintDesktopIconBorder(SynthContext JavaDoc context,
334                      Graphics g, int x, int y, int w, int h) {
335             getPainter(context, "desktopIconBorder", -1).
336                 paintDesktopIconBorder(context, g, x, y, w, h);
337         }
338
339         public void paintDesktopPaneBackground(SynthContext JavaDoc context,
340                      Graphics g, int x, int y, int w, int h) {
341             getPainter(context, "desktopPaneBackground", -1).
342                 paintDesktopPaneBackground(context, g, x, y, w, h);
343         }
344
345         public void paintDesktopPaneBorder(SynthContext JavaDoc context,
346                      Graphics g, int x, int y, int w, int h) {
347             getPainter(context, "desktopPaneBorder", -1).
348                 paintDesktopPaneBorder(context, g, x, y, w, h);
349         }
350
351         public void paintEditorPaneBackground(SynthContext JavaDoc context,
352                      Graphics g, int x, int y, int w, int h) {
353             getPainter(context, "editorPaneBackground", -1).
354                 paintEditorPaneBackground(context, g, x, y, w, h);
355         }
356
357         public void paintEditorPaneBorder(SynthContext JavaDoc context,
358                      Graphics g, int x, int y, int w, int h) {
359             getPainter(context, "editorPaneBorder", -1).
360                 paintEditorPaneBorder(context, g, x, y, w, h);
361         }
362
363         public void paintFileChooserBackground(SynthContext JavaDoc context,
364                      Graphics g, int x, int y, int w, int h) {
365             getPainter(context, "fileChooserBackground", -1).
366                 paintFileChooserBackground(context, g, x, y, w, h);
367         }
368
369         public void paintFileChooserBorder(SynthContext JavaDoc context,
370                      Graphics g, int x, int y, int w, int h) {
371             getPainter(context, "fileChooserBorder", -1).
372                 paintFileChooserBorder(context, g, x, y, w, h);
373         }
374
375         public void paintFormattedTextFieldBackground(SynthContext JavaDoc context,
376                      Graphics g, int x, int y, int w, int h) {
377             getPainter(context, "formattedTextFieldBackground", -1).
378                 paintFormattedTextFieldBackground(context, g, x, y, w, h);
379         }
380
381         public void paintFormattedTextFieldBorder(SynthContext JavaDoc context,
382                      Graphics g, int x, int y, int w, int h) {
383             getPainter(context, "formattedTextFieldBorder", -1).
384                 paintFormattedTextFieldBorder(context, g, x, y, w, h);
385         }
386
387         public void paintInternalFrameTitlePaneBackground(SynthContext JavaDoc context,
388                      Graphics g, int x, int y, int w, int h) {
389             getPainter(context, "internalFrameTitlePaneBackground", -1).
390                 paintInternalFrameTitlePaneBackground(context, g, x, y, w, h);
391         }
392
393         public void paintInternalFrameTitlePaneBorder(SynthContext JavaDoc context,
394                      Graphics g, int x, int y, int w, int h) {
395             getPainter(context, "internalFrameTitlePaneBorder", -1).
396                 paintInternalFrameTitlePaneBorder(context, g, x, y, w, h);
397         }
398
399         public void paintInternalFrameBackground(SynthContext JavaDoc context,
400                      Graphics g, int x, int y, int w, int h) {
401             getPainter(context, "internalFrameBackground", -1).
402                 paintInternalFrameBackground(context, g, x, y, w, h);
403         }
404
405         public void paintInternalFrameBorder(SynthContext JavaDoc context,
406                      Graphics g, int x, int y, int w, int h) {
407             getPainter(context, "internalFrameBorder", -1).
408                 paintInternalFrameBorder(context, g, x, y, w, h);
409         }
410
411         public void paintLabelBackground(SynthContext JavaDoc context,
412                      Graphics g, int x, int y, int w, int h) {
413             getPainter(context, "labelBackground", -1).
414                 paintLabelBackground(context, g, x, y, w, h);
415         }
416
417         public void paintLabelBorder(SynthContext JavaDoc context,
418                      Graphics g, int x, int y, int w, int h) {
419             getPainter(context, "labelBorder", -1).
420                 paintLabelBorder(context, g, x, y, w, h);
421         }
422
423         public void paintListBackground(SynthContext JavaDoc context,
424                      Graphics g, int x, int y, int w, int h) {
425             getPainter(context, "listBackground", -1).
426                 paintListBackground(context, g, x, y, w, h);
427         }
428
429         public void paintListBorder(SynthContext JavaDoc context,
430                      Graphics g, int x, int y, int w, int h) {
431             getPainter(context, "listBorder", -1).
432                 paintListBorder(context, g, x, y, w, h);
433         }
434
435         public void paintMenuBarBackground(SynthContext JavaDoc context,
436                      Graphics g, int x, int y, int w, int h) {
437             getPainter(context, "menuBarBackground", -1).
438                 paintMenuBarBackground(context, g, x, y, w, h);
439         }
440
441         public void paintMenuBarBorder(SynthContext JavaDoc context,
442                      Graphics g, int x, int y, int w, int h) {
443             getPainter(context, "menuBarBorder", -1).
444                 paintMenuBarBorder(context, g, x, y, w, h);
445         }
446
447         public void paintMenuItemBackground(SynthContext JavaDoc context,
448                      Graphics g, int x, int y, int w, int h) {
449             getPainter(context, "menuItemBackground", -1).
450                 paintMenuItemBackground(context, g, x, y, w, h);
451         }
452
453         public void paintMenuItemBorder(SynthContext JavaDoc context,
454                      Graphics g, int x, int y, int w, int h) {
455             getPainter(context, "menuItemBorder", -1).
456                 paintMenuItemBorder(context, g, x, y, w, h);
457         }
458
459         public void paintMenuBackground(SynthContext JavaDoc context,
460                      Graphics g, int x, int y, int w, int h) {
461             getPainter(context, "menuBackground", -1).
462                 paintMenuBackground(context, g, x, y, w, h);
463         }
464
465         public void paintMenuBorder(SynthContext JavaDoc context,
466                      Graphics g, int x, int y, int w, int h) {
467             getPainter(context, "menuBorder", -1).
468                 paintMenuBorder(context, g, x, y, w, h);
469         }
470
471         public void paintOptionPaneBackground(SynthContext JavaDoc context,
472                      Graphics g, int x, int y, int w, int h) {
473             getPainter(context, "optionPaneBackground", -1).
474                 paintOptionPaneBackground(context, g, x, y, w, h);
475         }
476
477         public void paintOptionPaneBorder(SynthContext JavaDoc context,
478                      Graphics g, int x, int y, int w, int h) {
479             getPainter(context, "optionPaneBorder", -1).
480                 paintOptionPaneBorder(context, g, x, y, w, h);
481         }
482
483         public void paintPanelBackground(SynthContext JavaDoc context,
484                      Graphics g, int x, int y, int w, int h) {
485             getPainter(context, "panelBackground", -1).
486                 paintPanelBackground(context, g, x, y, w, h);
487         }
488
489         public void paintPanelBorder(SynthContext JavaDoc context,
490                      Graphics g, int x, int y, int w, int h) {
491             getPainter(context, "panelBorder", -1).
492                 paintPanelBorder(context, g, x, y, w, h);
493         }
494
495         public void paintPasswordFieldBackground(SynthContext JavaDoc context,
496                      Graphics g, int x, int y, int w, int h) {
497             getPainter(context, "passwordFieldBackground", -1).
498                 paintPasswordFieldBackground(context, g, x, y, w, h);
499         }
500
501         public void paintPasswordFieldBorder(SynthContext JavaDoc context,
502                      Graphics g, int x, int y, int w, int h) {
503             getPainter(context, "passwordFieldBorder", -1).
504                 paintPasswordFieldBorder(context, g, x, y, w, h);
505         }
506
507         public void paintPopupMenuBackground(SynthContext JavaDoc context,
508                      Graphics g, int x, int y, int w, int h) {
509             getPainter(context, "popupMenuBackground", -1).
510                 paintPopupMenuBackground(context, g, x, y, w, h);
511         }
512
513         public void paintPopupMenuBorder(SynthContext JavaDoc context,
514                      Graphics g, int x, int y, int w, int h) {
515             getPainter(context, "popupMenuBorder", -1).
516                 paintPopupMenuBorder(context, g, x, y, w, h);
517         }
518
519         public void paintProgressBarBackground(SynthContext JavaDoc context,
520                      Graphics g, int x, int y, int w, int h) {
521             getPainter(context, "progressBarBackground", -1).
522                 paintProgressBarBackground(context, g, x, y, w, h);
523         }
524
525         public void paintProgressBarBorder(SynthContext JavaDoc context,
526                      Graphics g, int x, int y, int w, int h) {
527             getPainter(context, "progressBarBorder", -1).
528                 paintProgressBarBorder(context, g, x, y, w, h);
529         }
530
531         public void paintProgressBarForeground(SynthContext JavaDoc context,
532                      Graphics g, int x, int y, int w, int h, int direction) {
533             getPainter(context, "progressBarForeground", direction).
534                 paintProgressBarForeground(context, g, x, y, w, h, direction);
535         }
536
537         public void paintRadioButtonMenuItemBackground(SynthContext JavaDoc context,
538                      Graphics g, int x, int y, int w, int h) {
539             getPainter(context, "radioButtonMenuItemBackground", -1).
540                 paintRadioButtonMenuItemBackground(context, g, x, y, w, h);
541         }
542
543         public void paintRadioButtonMenuItemBorder(SynthContext JavaDoc context,
544                      Graphics g, int x, int y, int w, int h) {
545             getPainter(context, "radioButtonMenuItemBorder", -1).
546                 paintRadioButtonMenuItemBorder(context, g, x, y, w, h);
547         }
548
549         public void paintRadioButtonBackground(SynthContext JavaDoc context,
550                      Graphics g, int x, int y, int w, int h) {
551             getPainter(context, "radioButtonBackground", -1).
552                 paintRadioButtonBackground(context, g, x, y, w, h);
553         }
554
555         public void paintRadioButtonBorder(SynthContext JavaDoc context,
556                      Graphics g, int x, int y, int w, int h) {
557             getPainter(context, "radioButtonBorder", -1).
558                 paintRadioButtonBorder(context, g, x, y, w, h);
559         }
560
561         public void paintRootPaneBackground(SynthContext JavaDoc context,
562                      Graphics g, int x, int y, int w, int h) {
563             getPainter(context, "rootPaneBackground", -1).
564                 paintRootPaneBackground(context, g, x, y, w, h);
565         }
566
567         public void paintRootPaneBorder(SynthContext JavaDoc context,
568                      Graphics g, int x, int y, int w, int h) {
569             getPainter(context, "rootPaneBorder", -1).
570                 paintRootPaneBorder(context, g, x, y, w, h);
571         }
572
573         public void paintScrollBarBackground(SynthContext JavaDoc context,
574                      Graphics g, int x, int y, int w, int h) {
575             getPainter(context, "scrollBarBackground", -1).
576                 paintScrollBarBackground(context, g, x, y, w, h);
577         }
578
579         public void paintScrollBarBorder(SynthContext JavaDoc context,
580                      Graphics g, int x, int y, int w, int h) {
581             getPainter(context, "scrollBarBorder", -1).
582                 paintScrollBarBorder(context, g, x, y, w, h);
583         }
584
585         public void paintScrollBarThumbBackground(SynthContext JavaDoc context,
586                      Graphics g, int x, int y, int w, int h, int direction) {
587             getPainter(context, "scrollBarThumbBackground", direction).
588                 paintScrollBarThumbBackground(context, g, x, y, w, h, direction);
589         }
590
591         public void paintScrollBarThumbBorder(SynthContext JavaDoc context,
592                      Graphics g, int x, int y, int w, int h, int direction) {
593             getPainter(context, "scrollBarThumbBorder", direction).
594                 paintScrollBarThumbBorder(context, g, x, y, w, h, direction);
595         }
596
597         public void paintScrollBarTrackBackground(SynthContext JavaDoc context,
598                      Graphics g, int x, int y, int w, int h) {
599             getPainter(context, "scrollBarTrackBackground", -1).
600                 paintScrollBarTrackBackground(context, g, x, y, w, h);
601         }
602
603         public void paintScrollBarTrackBorder(SynthContext JavaDoc context,
604                      Graphics g, int x, int y, int w, int h) {
605             getPainter(context, "scrollBarTrackBorder", -1).
606                 paintScrollBarTrackBorder(context, g, x, y, w, h);
607         }
608
609         public void paintScrollPaneBackground(SynthContext JavaDoc context,
610                      Graphics g, int x, int y, int w, int h) {
611             getPainter(context, "scrollPaneBackground", -1).
612                 paintScrollPaneBackground(context, g, x, y, w, h);
613         }
614
615         public void paintScrollPaneBorder(SynthContext JavaDoc context,
616                      Graphics g, int x, int y, int w, int h) {
617             getPainter(context, "scrollPaneBorder", -1).
618                 paintScrollPaneBorder(context, g, x, y, w, h);
619         }
620
621         public void paintSeparatorBackground(SynthContext JavaDoc context,
622                      Graphics g, int x, int y, int w, int h) {
623             getPainter(context, "separatorBackground", -1).
624                 paintSeparatorBackground(context, g, x, y, w, h);
625         }
626
627         public void paintSeparatorBorder(SynthContext JavaDoc context,
628                      Graphics g, int x, int y, int w, int h) {
629             getPainter(context, "separatorBorder", -1).
630                 paintSeparatorBorder(context, g, x, y, w, h);
631         }
632
633         public void paintSeparatorForeground(SynthContext JavaDoc context,
634                      Graphics g, int x, int y, int w, int h, int direction) {
635             getPainter(context, "separatorForeground", direction).
636                 paintSeparatorForeground(context, g, x, y, w, h, direction);
637         }
638
639         public void paintSliderBackground(SynthContext JavaDoc context,
640                      Graphics g, int x, int y, int w, int h) {
641             getPainter(context, "sliderBackground", -1).
642                 paintSliderBackground(context, g, x, y, w, h);
643         }
644
645         public void paintSliderBorder(SynthContext JavaDoc context,
646                      Graphics g, int x, int y, int w, int h) {
647             getPainter(context, "sliderBorder", -1).
648                 paintSliderBorder(context, g, x, y, w, h);
649         }
650
651         public void paintSliderThumbBackground(SynthContext JavaDoc context,
652                      Graphics g, int x, int y, int w, int h, int direction) {
653             getPainter(context, "sliderThumbBackground", direction).
654                 paintSliderThumbBackground(context, g, x, y, w, h, direction);
655         }
656
657         public void paintSliderThumbBorder(SynthContext JavaDoc context,
658                      Graphics g, int x, int y, int w, int h, int direction) {
659             getPainter(context, "sliderThumbBorder", direction).
660                 paintSliderThumbBorder(context, g, x, y, w, h, direction);
661         }
662
663         public void paintSliderTrackBackground(SynthContext JavaDoc context,
664                      Graphics g, int x, int y, int w, int h) {
665             getPainter(context, "sliderTrackBackground", -1).
666                 paintSliderTrackBackground(context, g, x, y, w, h);
667         }
668
669         public void paintSliderTrackBorder(SynthContext JavaDoc context,
670                      Graphics g, int x, int y, int w, int h) {
671             getPainter(context, "sliderTrackBorder", -1).
672                 paintSliderTrackBorder(context, g, x, y, w, h);
673         }
674
675         public void paintSpinnerBackground(SynthContext JavaDoc context,
676                      Graphics g, int x, int y, int w, int h) {
677             getPainter(context, "spinnerBackground", -1).
678                 paintSpinnerBackground(context, g, x, y, w, h);
679         }
680
681         public void paintSpinnerBorder(SynthContext JavaDoc context,
682                      Graphics g, int x, int y, int w, int h) {
683             getPainter(context, "spinnerBorder", -1).
684                 paintSpinnerBorder(context, g, x, y, w, h);
685         }
686
687         public void paintSplitPaneDividerBackground(SynthContext JavaDoc context,
688                      Graphics g, int x, int y, int w, int h) {
689             getPainter(context, "splitPaneDividerBackground", -1).
690                 paintSplitPaneDividerBackground(context, g, x, y, w, h);
691         }
692
693         public void paintSplitPaneDividerForeground(SynthContext JavaDoc context,
694                      Graphics g, int x, int y, int w, int h, int direction) {
695             getPainter(context, "splitPaneDividerForeground", direction).
696                 paintSplitPaneDividerForeground(context, g, x, y, w, h, direction);
697         }
698
699         public void paintSplitPaneDragDivider(SynthContext JavaDoc context,
700                      Graphics g, int x, int y, int w, int h, int direction) {
701             getPainter(context, "splitPaneDragDivider", direction).
702                 paintSplitPaneDragDivider(context, g, x, y, w, h, direction);
703         }
704
705         public void paintSplitPaneBackground(SynthContext JavaDoc context,
706                      Graphics g, int x, int y, int w, int h) {
707             getPainter(context, "splitPaneBackground", -1).
708                 paintSplitPaneBackground(context, g, x, y, w, h);
709         }
710
711         public void paintSplitPaneBorder(SynthContext JavaDoc context,
712                      Graphics g, int x, int y, int w, int h) {
713             getPainter(context, "splitPaneBorder", -1).
714                 paintSplitPaneBorder(context, g, x, y, w, h);
715         }
716
717         public void paintTabbedPaneBackground(SynthContext JavaDoc context,
718                      Graphics g, int x, int y, int w, int h) {
719             getPainter(context, "tabbedPaneBackground", -1).
720                 paintTabbedPaneBackground(context, g, x, y, w, h);
721         }
722
723         public void paintTabbedPaneBorder(SynthContext JavaDoc context,
724                      Graphics g, int x, int y, int w, int h) {
725             getPainter(context, "tabbedPaneBorder", -1).
726                 paintTabbedPaneBorder(context, g, x, y, w, h);
727         }
728
729         public void paintTabbedPaneTabAreaBackground(SynthContext JavaDoc context,
730                      Graphics g, int x, int y, int w, int h) {
731             getPainter(context, "tabbedPaneTabAreaBackground", -1).
732                 paintTabbedPaneTabAreaBackground(context, g, x, y, w, h);
733         }
734
735         public void paintTabbedPaneTabAreaBorder(SynthContext JavaDoc context,
736                      Graphics g, int x, int y, int w, int h) {
737             getPainter(context, "tabbedPaneTabAreaBorder", -1).
738                 paintTabbedPaneTabAreaBorder(context, g, x, y, w, h);
739         }
740
741         public void paintTabbedPaneTabBackground(SynthContext JavaDoc context,
742                      Graphics g, int x, int y, int w, int h, int direction) {
743             getPainter(context, "tabbedPaneTabBackground", -1).
744                 paintTabbedPaneTabBackground(context, g, x, y, w, h, direction);
745         }
746
747         public void paintTabbedPaneTabBorder(SynthContext JavaDoc context,
748                      Graphics g, int x, int y, int w, int h, int direction) {
749             getPainter(context, "tabbedPaneTabBorder", -1).
750                 paintTabbedPaneTabBorder(context, g, x, y, w, h, direction);
751         }
752
753         public void paintTabbedPaneContentBackground(SynthContext JavaDoc context,
754                      Graphics g, int x, int y, int w, int h) {
755             getPainter(context, "tabbedPaneContentBackground", -1).
756                 paintTabbedPaneContentBackground(context, g, x, y, w, h);
757         }
758
759         public void paintTabbedPaneContentBorder(SynthContext JavaDoc context,
760                      Graphics g, int x, int y, int w, int h) {
761             getPainter(context, "tabbedPaneContentBorder", -1).
762                 paintTabbedPaneContentBorder(context, g, x, y, w, h);
763         }
764
765         public void paintTableHeaderBackground(SynthContext JavaDoc context,
766                      Graphics g, int x, int y, int w, int h) {
767             getPainter(context, "tableHeaderBackground", -1).
768                 paintTableHeaderBackground(context, g, x, y, w, h);
769         }
770
771         public void paintTableHeaderBorder(SynthContext JavaDoc context,
772                      Graphics g, int x, int y, int w, int h) {
773             getPainter(context, "tableHeaderBorder", -1).
774                 paintTableHeaderBorder(context, g, x, y, w, h);
775         }
776
777         public void paintTableBackground(SynthContext JavaDoc context,
778                      Graphics g, int x, int y, int w, int h) {
779             getPainter(context, "tableBackground", -1).
780                 paintTableBackground(context, g, x, y, w, h);
781         }
782
783         public void paintTableBorder(SynthContext JavaDoc context,
784                      Graphics g, int x, int y, int w, int h) {
785             getPainter(context, "tableBorder", -1).
786                 paintTableBorder(context, g, x, y, w, h);
787         }
788
789         public void paintTextAreaBackground(SynthContext JavaDoc context,
790                      Graphics g, int x, int y, int w, int h) {
791             getPainter(context, "textAreaBackground", -1).
792                 paintTextAreaBackground(context, g, x, y, w, h);
793         }
794
795         public void paintTextAreaBorder(SynthContext JavaDoc context,
796                      Graphics g, int x, int y, int w, int h) {
797             getPainter(context, "textAreaBorder", -1).
798                 paintTextAreaBorder(context, g, x, y, w, h);
799         }
800
801         public void paintTextPaneBackground(SynthContext JavaDoc context,
802                      Graphics g, int x, int y, int w, int h) {
803             getPainter(context, "textPaneBackground", -1).
804                 paintTextPaneBackground(context, g, x, y, w, h);
805         }
806
807         public void paintTextPaneBorder(SynthContext JavaDoc context,
808                      Graphics g, int x, int y, int w, int h) {
809             getPainter(context, "textPaneBorder", -1).
810                 paintTextPaneBorder(context, g, x, y, w, h);
811         }
812
813         public void paintTextFieldBackground(SynthContext JavaDoc context,
814                      Graphics g, int x, int y, int w, int h) {
815             getPainter(context, "textFieldBackground", -1).
816                 paintTextFieldBackground(context, g, x, y, w, h);
817         }
818
819         public void paintTextFieldBorder(SynthContext JavaDoc context,
820                      Graphics g, int x, int y, int w, int h) {
821             getPainter(context, "textFieldBorder", -1).
822                 paintTextFieldBorder(context, g, x, y, w, h);
823         }
824
825         public void paintToggleButtonBackground(SynthContext JavaDoc context,
826                      Graphics g, int x, int y, int w, int h) {
827             getPainter(context, "toggleButtonBackground", -1).
828                 paintToggleButtonBackground(context, g, x, y, w, h);
829         }
830
831         public void paintToggleButtonBorder(SynthContext JavaDoc context,
832                      Graphics g, int x, int y, int w, int h) {
833             getPainter(context, "toggleButtonBorder", -1).
834                 paintToggleButtonBorder(context, g, x, y, w, h);
835         }
836
837         public void paintToolBarBackground(SynthContext JavaDoc context,
838                      Graphics g, int x, int y, int w, int h) {
839             getPainter(context, "toolBarBackground", -1).
840                 paintToolBarBackground(context, g, x, y, w, h);
841         }
842
843         public void paintToolBarBorder(SynthContext JavaDoc context,
844                      Graphics g, int x, int y, int w, int h) {
845             getPainter(context, "toolBarBorder", -1).
846                 paintToolBarBorder(context, g, x, y, w, h);
847         }
848
849         public void paintToolBarContentBackground(SynthContext JavaDoc context,
850                      Graphics g, int x, int y, int w, int h) {
851             getPainter(context, "toolBarContentBackground", -1).
852                 paintToolBarContentBackground(context, g, x, y, w, h);
853         }
854
855         public void paintToolBarContentBorder(SynthContext JavaDoc context,
856                      Graphics g, int x, int y, int w, int h) {
857             getPainter(context, "toolBarContentBorder", -1).
858                 paintToolBarContentBorder(context, g, x, y, w, h);
859         }
860
861         public void paintToolBarDragWindowBackground(SynthContext JavaDoc context,
862                      Graphics g, int x, int y, int w, int h) {
863             getPainter(context, "toolBarDragWindowBackground", -1).
864                 paintToolBarDragWindowBackground(context, g, x, y, w, h);
865         }
866
867         public void paintToolBarDragWindowBorder(SynthContext JavaDoc context,
868                      Graphics g, int x, int y, int w, int h) {
869             getPainter(context, "toolBarDragWindowBorder", -1).
870                 paintToolBarDragWindowBorder(context, g, x, y, w, h);
871         }
872
873         public void paintToolTipBackground(SynthContext JavaDoc context,
874                      Graphics g, int x, int y, int w, int h) {
875             getPainter(context, "toolTipBackground", -1).
876                 paintToolTipBackground(context, g, x, y, w, h);
877         }
878
879         public void paintToolTipBorder(SynthContext JavaDoc context,
880                      Graphics g, int x, int y, int w, int h) {
881             getPainter(context, "toolTipBorder", -1).
882                 paintToolTipBorder(context, g, x, y, w, h);
883         }
884
885         public void paintTreeBackground(SynthContext JavaDoc context,
886                      Graphics g, int x, int y, int w, int h) {
887             getPainter(context, "treeBackground", -1).
888                 paintTreeBackground(context, g, x, y, w, h);
889         }
890
891         public void paintTreeBorder(SynthContext JavaDoc context,
892                      Graphics g, int x, int y, int w, int h) {
893             getPainter(context, "treeBorder", -1).
894                 paintTreeBorder(context, g, x, y, w, h);
895         }
896
897         public void paintTreeCellBackground(SynthContext JavaDoc context,
898                      Graphics g, int x, int y, int w, int h) {
899             getPainter(context, "treeCellBackground", -1).
900                 paintTreeCellBackground(context, g, x, y, w, h);
901         }
902
903         public void paintTreeCellBorder(SynthContext JavaDoc context,
904                      Graphics g, int x, int y, int w, int h) {
905             getPainter(context, "treeCellBorder", -1).
906                 paintTreeCellBorder(context, g, x, y, w, h);
907         }
908
909         public void paintTreeCellFocus(SynthContext JavaDoc context,
910                      Graphics g, int x, int y, int w, int h) {
911             getPainter(context, "treeCellFocus", -1).
912                 paintTreeCellFocus(context, g, x, y, w, h);
913         }
914
915         public void paintViewportBackground(SynthContext JavaDoc context,
916                      Graphics g, int x, int y, int w, int h) {
917             getPainter(context, "viewportBackground", -1).
918                 paintViewportBackground(context, g, x, y, w, h);
919         }
920
921         public void paintViewportBorder(SynthContext JavaDoc context,
922                      Graphics g, int x, int y, int w, int h) {
923             getPainter(context, "viewportBorder", -1).
924                 paintViewportBorder(context, g, x, y, w, h);
925         }
926     }
927 }
928
Popular Tags