KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)ImagePainter.java 1.8 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 java.net.*;
11 import javax.swing.*;
12
13 /**
14  * ImagePainter fills in the specified region using an Image. The Image
15  * is split into 9 segments: north, north east, east, south east, south,
16  * south west, west, north west and the center. The corners are defined
17  * by way of an insets, and the remaining regions are either tiled or
18  * scaled to fit.
19  *
20  * @version 1.8, 12/19/03
21  * @author Scott Violet
22  */

23 class ImagePainter extends SynthPainter JavaDoc {
24     private Image image;
25     private Insets sInsets;
26     private Insets dInsets;
27     private URL path;
28     private boolean tiles;
29     private boolean paintCenter;
30     private Object JavaDoc renderingHint;
31
32     ImagePainter(boolean tiles, boolean paintCenter, Object JavaDoc renderingHint,
33                  Insets sourceInsets, Insets destinationInsets) {
34         this.sInsets = (Insets)sourceInsets.clone();
35         if (destinationInsets == null) {
36             dInsets = sInsets;
37         }
38         else {
39             this.dInsets = (Insets)destinationInsets.clone();
40         }
41         this.tiles = tiles;
42         this.paintCenter = paintCenter;
43         this.renderingHint = renderingHint;
44     }
45
46     public ImagePainter(boolean tiles, boolean paintCenter,
47                         Object JavaDoc renderingHint, Insets sourceInsets,
48                         Insets destinationInsets, Image image) {
49         this(tiles, paintCenter, renderingHint, sourceInsets,
50              destinationInsets);
51         this.image = image;
52     }
53
54     public ImagePainter(boolean tiles, boolean paintCenter,
55                         Object JavaDoc renderingHint, Insets sourceInsets,
56                         Insets destinationInsets, URL path) {
57         this(tiles, paintCenter, renderingHint, sourceInsets,
58              destinationInsets);
59         this.path = path;
60     }
61
62     public boolean getTiles() {
63         return tiles;
64     }
65
66     public boolean getPaintsCenter() {
67         return paintCenter;
68     }
69
70     public Object JavaDoc getRenderingHint() {
71         return renderingHint;
72     }
73
74     public Insets getInsets(Insets insets) {
75         if (insets == null) {
76             return (Insets)this.dInsets.clone();
77         }
78         insets.left = this.dInsets.left;
79         insets.right = this.dInsets.right;
80         insets.top = this.dInsets.top;
81         insets.bottom = this.dInsets.bottom;
82         return insets;
83     }
84
85     public Image getImage() {
86         if (image == null) {
87             image = new ImageIcon(path, null).getImage();
88         }
89         return image;
90     }
91
92     private void paint(Graphics g, int x, int y, int w, int h) {
93         Image image;
94         Object JavaDoc lastHint;
95         Object JavaDoc renderingHint = getRenderingHint();
96
97         if (renderingHint != null) {
98             Graphics2D g2 = (Graphics2D)g;
99
100             lastHint = g2.getRenderingHint(RenderingHints.KEY_INTERPOLATION);
101             if (lastHint == null) {
102                 lastHint = RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR;
103             }
104             g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
105                                 renderingHint);
106         }
107         else {
108             lastHint = null;
109         }
110
111         if ((image = getImage()) != null) {
112             Insets sInsets = this.sInsets;
113             Insets dInsets = this.dInsets;
114             int iw = image.getWidth(null);
115             int ih = image.getHeight(null);
116
117             boolean stretch = !getTiles();
118
119             // top left
120
g.drawImage(image, x, y, x + dInsets.left, y + dInsets.top,
121                             0, 0, sInsets.left, sInsets.top, null);
122             // top
123
drawChunk(image, g, stretch, x + dInsets.left, y,
124                       x + w - dInsets.right, y + dInsets.top, sInsets.left, 0,
125                           iw - sInsets.right, sInsets.top, true);
126             // top right
127
g.drawImage(image, x + w - dInsets.right, y, x + w,
128                         y + dInsets.top, iw - sInsets.right, 0, iw,
129                         sInsets.top, null);
130             // right
131
drawChunk(image, g, stretch, x + w - dInsets.right,
132                       y + dInsets.top, x + w, y + h - dInsets.bottom,
133                       iw - sInsets.right, sInsets.top, iw,
134                       ih - sInsets.bottom, false);
135             // bottom right
136
g.drawImage(image, x + w - dInsets.right,
137                         y + h - dInsets.bottom, x + w, y + h,
138                         iw - sInsets.right, ih - sInsets.bottom, iw, ih,
139                         null);
140             // bottom
141
drawChunk(image, g, stretch, x + dInsets.left,
142                       y + h - dInsets.bottom, x + w - dInsets.right,
143                       y + h, sInsets.left, ih - sInsets.bottom,
144                       iw - sInsets.right, ih, true);
145             // bottom left
146
g.drawImage(image, x, y + h - dInsets.bottom, x + dInsets.left,
147                         y + h, 0, ih - sInsets.bottom, sInsets.left, ih,
148                         null);
149             // left
150

151             drawChunk(image, g, stretch, x, y + dInsets.top,
152                       x + dInsets.left, y + h - dInsets.bottom,
153                       0, sInsets.top, sInsets.left, ih - sInsets.bottom,
154                       false);
155
156             // center
157
if (getPaintsCenter()) {
158                 g.drawImage(image, x + dInsets.left, y + dInsets.top,
159                             x + w - dInsets.right, y + h - dInsets.bottom,
160                             sInsets.left, sInsets.top, iw - sInsets.right,
161                             ih - sInsets.bottom, null);
162             }
163         }
164
165         if (renderingHint != null) {
166             ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_INTERPOLATION,
167                                              lastHint);
168         }
169     }
170
171     private void drawChunk(Image image, Graphics g, boolean stretch,
172                            int dx1, int dy1, int dx2, int dy2, int sx1,
173                            int sy1, int sx2, int sy2,
174                            boolean xDirection) {
175         if (stretch) {
176             g.drawImage(image, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, null);
177         }
178         else {
179             int xSize = sx2 - sx1;
180             int ySize = sy2 - sy1;
181             int deltaX;
182             int deltaY;
183
184             if (xDirection) {
185                 deltaX = xSize;
186                 deltaY = 0;
187             }
188             else {
189                 deltaX = 0;
190                 deltaY = ySize;
191             }
192             while (dx1 < dx2 && dy1 < dy2) {
193                 int newDX2 = Math.min(dx2, dx1 + xSize);
194                 int newDY2 = Math.min(dy2, dy1 + ySize);
195
196                 g.drawImage(image, dx1, dy1, newDX2, newDY2,
197                             sx1, sy1, sx1 + newDX2 - dx1,
198                             sy1 + newDY2 - dy1, null);
199                 dx1 += deltaX;
200                 dy1 += deltaY;
201             }
202         }
203     }
204
205
206     // SynthPainter
207
public void paintArrowButtonBackground(SynthContext JavaDoc context,
208                                            Graphics g, int x, int y,
209                                            int w, int h) {
210         paint(g, x, y, w, h);
211     }
212
213     public void paintArrowButtonBorder(SynthContext JavaDoc context,
214                                        Graphics g, int x, int y,
215                                        int w, int h) {
216         paint(g, x, y, w, h);
217     }
218
219     public void paintArrowButtonForeground(SynthContext JavaDoc context,
220                                            Graphics g, int x, int y,
221                                            int w, int h,
222                                            int direction) {
223         paint(g, x, y, w, h);
224     }
225
226     // BUTTON
227
public void paintButtonBackground(SynthContext JavaDoc context,
228                                       Graphics g, int x, int y,
229                                       int w, int h) {
230         paint(g, x, y, w, h);
231     }
232
233     public void paintButtonBorder(SynthContext JavaDoc context,
234                                   Graphics g, int x, int y,
235                                   int w, int h) {
236         paint(g, x, y, w, h);
237     }
238
239     // CHECK_BOX_MENU_ITEM
240
public void paintCheckBoxMenuItemBackground(SynthContext JavaDoc context,
241                                                 Graphics g, int x, int y,
242                                                 int w, int h) {
243         paint(g, x, y, w, h);
244     }
245
246     public void paintCheckBoxMenuItemBorder(SynthContext JavaDoc context,
247                                             Graphics g, int x, int y,
248                                             int w, int h) {
249         paint(g, x, y, w, h);
250     }
251
252     // CHECK_BOX
253
public void paintCheckBoxBackground(SynthContext JavaDoc context,
254                                         Graphics g, int x, int y,
255                                         int w, int h) {
256         paint(g, x, y, w, h);
257     }
258
259     public void paintCheckBoxBorder(SynthContext JavaDoc context,
260                                     Graphics g, int x, int y,
261                                     int w, int h) {
262         paint(g, x, y, w, h);
263     }
264
265     // COLOR_CHOOSER
266
public void paintColorChooserBackground(SynthContext JavaDoc context,
267                                             Graphics g, int x, int y,
268                                             int w, int h) {
269         paint(g, x, y, w, h);
270     }
271
272     public void paintColorChooserBorder(SynthContext JavaDoc context,
273                                         Graphics g, int x, int y,
274                                         int w, int h) {
275         paint(g, x, y, w, h);
276     }
277
278     // COMBO_BOX
279
public void paintComboBoxBackground(SynthContext JavaDoc context,
280                                         Graphics g, int x, int y,
281                                         int w, int h) {
282         paint(g, x, y, w, h);
283     }
284
285     public void paintComboBoxBorder(SynthContext JavaDoc context,
286                                         Graphics g, int x, int y,
287                                         int w, int h) {
288         paint(g, x, y, w, h);
289     }
290
291     // DESKTOP_ICON
292
public void paintDesktopIconBackground(SynthContext JavaDoc context,
293                                         Graphics g, int x, int y,
294                                         int w, int h) {
295         paint(g, x, y, w, h);
296     }
297
298     public void paintDesktopIconBorder(SynthContext JavaDoc context,
299                                            Graphics g, int x, int y,
300                                            int w, int h) {
301         paint(g, x, y, w, h);
302     }
303
304     // DESKTOP_PANE
305
public void paintDesktopPaneBackground(SynthContext JavaDoc context,
306                                            Graphics g, int x, int y,
307                                            int w, int h) {
308         paint(g, x, y, w, h);
309     }
310
311     public void paintDesktopPaneBorder(SynthContext JavaDoc context,
312                                        Graphics g, int x, int y,
313                                        int w, int h) {
314         paint(g, x, y, w, h);
315     }
316
317     // EDITOR_PANE
318
public void paintEditorPaneBackground(SynthContext JavaDoc context,
319                                           Graphics g, int x, int y,
320                                           int w, int h) {
321         paint(g, x, y, w, h);
322     }
323
324     public void paintEditorPaneBorder(SynthContext JavaDoc context,
325                                       Graphics g, int x, int y,
326                                       int w, int h) {
327         paint(g, x, y, w, h);
328     }
329
330     // FILE_CHOOSER
331
public void paintFileChooserBackground(SynthContext JavaDoc context,
332                                           Graphics g, int x, int y,
333                                           int w, int h) {
334         paint(g, x, y, w, h);
335     }
336
337     public void paintFileChooserBorder(SynthContext JavaDoc context,
338                                       Graphics g, int x, int y,
339                                       int w, int h) {
340         paint(g, x, y, w, h);
341     }
342
343     // FORMATTED_TEXT_FIELD
344
public void paintFormattedTextFieldBackground(SynthContext JavaDoc context,
345                                           Graphics g, int x, int y,
346                                           int w, int h) {
347         paint(g, x, y, w, h);
348     }
349
350     public void paintFormattedTextFieldBorder(SynthContext JavaDoc context,
351                                       Graphics g, int x, int y,
352                                       int w, int h) {
353         paint(g, x, y, w, h);
354     }
355
356     // INTERNAL_FRAME_TITLE_PANE
357
public void paintInternalFrameTitlePaneBackground(SynthContext JavaDoc context,
358                                           Graphics g, int x, int y,
359                                           int w, int h) {
360         paint(g, x, y, w, h);
361     }
362
363     public void paintInternalFrameTitlePaneBorder(SynthContext JavaDoc context,
364                                       Graphics g, int x, int y,
365                                       int w, int h) {
366         paint(g, x, y, w, h);
367     }
368
369     // INTERNAL_FRAME
370
public void paintInternalFrameBackground(SynthContext JavaDoc context,
371                                           Graphics g, int x, int y,
372                                           int w, int h) {
373         paint(g, x, y, w, h);
374     }
375
376     public void paintInternalFrameBorder(SynthContext JavaDoc context,
377                                       Graphics g, int x, int y,
378                                       int w, int h) {
379         paint(g, x, y, w, h);
380     }
381
382     // LABEL
383
public void paintLabelBackground(SynthContext JavaDoc context,
384                                      Graphics g, int x, int y,
385                                      int w, int h) {
386         paint(g, x, y, w, h);
387     }
388
389     public void paintLabelBorder(SynthContext JavaDoc context,
390                                  Graphics g, int x, int y,
391                                  int w, int h) {
392         paint(g, x, y, w, h);
393     }
394
395     // LIST
396
public void paintListBackground(SynthContext JavaDoc context,
397                                      Graphics g, int x, int y,
398                                      int w, int h) {
399         paint(g, x, y, w, h);
400     }
401
402     public void paintListBorder(SynthContext JavaDoc context,
403                                  Graphics g, int x, int y,
404                                  int w, int h) {
405         paint(g, x, y, w, h);
406     }
407
408     // MENU_BAR
409
public void paintMenuBarBackground(SynthContext JavaDoc context,
410                                      Graphics g, int x, int y,
411                                      int w, int h) {
412         paint(g, x, y, w, h);
413     }
414
415     public void paintMenuBarBorder(SynthContext JavaDoc context,
416                                  Graphics g, int x, int y,
417                                  int w, int h) {
418         paint(g, x, y, w, h);
419     }
420
421     // MENU_ITEM
422
public void paintMenuItemBackground(SynthContext JavaDoc context,
423                                      Graphics g, int x, int y,
424                                      int w, int h) {
425         paint(g, x, y, w, h);
426     }
427
428     public void paintMenuItemBorder(SynthContext JavaDoc context,
429                                  Graphics g, int x, int y,
430                                  int w, int h) {
431         paint(g, x, y, w, h);
432     }
433
434     // MENU
435
public void paintMenuBackground(SynthContext JavaDoc context,
436                                      Graphics g, int x, int y,
437                                      int w, int h) {
438         paint(g, x, y, w, h);
439     }
440
441     public void paintMenuBorder(SynthContext JavaDoc context,
442                                  Graphics g, int x, int y,
443                                  int w, int h) {
444         paint(g, x, y, w, h);
445     }
446
447     // OPTION_PANE
448
public void paintOptionPaneBackground(SynthContext JavaDoc context,
449                                      Graphics g, int x, int y,
450                                      int w, int h) {
451         paint(g, x, y, w, h);
452     }
453
454     public void paintOptionPaneBorder(SynthContext JavaDoc context,
455                                  Graphics g, int x, int y,
456                                  int w, int h) {
457         paint(g, x, y, w, h);
458     }
459
460     // PANEL
461
public void paintPanelBackground(SynthContext JavaDoc context,
462                                      Graphics g, int x, int y,
463                                      int w, int h) {
464         paint(g, x, y, w, h);
465     }
466
467     public void paintPanelBorder(SynthContext JavaDoc context,
468                                  Graphics g, int x, int y,
469                                  int w, int h) {
470         paint(g, x, y, w, h);
471     }
472
473     // PANEL
474
public void paintPasswordFieldBackground(SynthContext JavaDoc context,
475                                      Graphics g, int x, int y,
476                                      int w, int h) {
477         paint(g, x, y, w, h);
478     }
479
480     public void paintPasswordFieldBorder(SynthContext JavaDoc context,
481                                  Graphics g, int x, int y,
482                                  int w, int h) {
483         paint(g, x, y, w, h);
484     }
485
486     // POPUP_MENU
487
public void paintPopupMenuBackground(SynthContext JavaDoc context,
488                                      Graphics g, int x, int y,
489                                      int w, int h) {
490         paint(g, x, y, w, h);
491     }
492
493     public void paintPopupMenuBorder(SynthContext JavaDoc context,
494                                  Graphics g, int x, int y,
495                                  int w, int h) {
496         paint(g, x, y, w, h);
497     }
498
499     // PROGRESS_BAR
500
public void paintProgressBarBackground(SynthContext JavaDoc context,
501                                      Graphics g, int x, int y,
502                                      int w, int h) {
503         paint(g, x, y, w, h);
504     }
505
506     public void paintProgressBarBorder(SynthContext JavaDoc context,
507                                  Graphics g, int x, int y,
508                                  int w, int h) {
509         paint(g, x, y, w, h);
510     }
511
512     public void paintProgressBarForeground(SynthContext JavaDoc context,
513                                  Graphics g, int x, int y,
514                                  int w, int h, int orientation) {
515         paint(g, x, y, w, h);
516     }
517
518     // RADIO_BUTTON_MENU_ITEM
519
public void paintRadioButtonMenuItemBackground(SynthContext JavaDoc context,
520                                      Graphics g, int x, int y,
521                                      int w, int h) {
522         paint(g, x, y, w, h);
523     }
524
525     public void paintRadioButtonMenuItemBorder(SynthContext JavaDoc context,
526                                  Graphics g, int x, int y,
527                                  int w, int h) {
528         paint(g, x, y, w, h);
529     }
530
531     // RADIO_BUTTON
532
public void paintRadioButtonBackground(SynthContext JavaDoc context,
533                                      Graphics g, int x, int y,
534                                      int w, int h) {
535         paint(g, x, y, w, h);
536     }
537
538     public void paintRadioButtonBorder(SynthContext JavaDoc context,
539                                  Graphics g, int x, int y,
540                                  int w, int h) {
541         paint(g, x, y, w, h);
542     }
543
544     // ROOT_PANE
545
public void paintRootPaneBackground(SynthContext JavaDoc context,
546                                      Graphics g, int x, int y,
547                                      int w, int h) {
548         paint(g, x, y, w, h);
549     }
550
551     public void paintRootPaneBorder(SynthContext JavaDoc context,
552                                  Graphics g, int x, int y,
553                                  int w, int h) {
554         paint(g, x, y, w, h);
555     }
556
557     // SCROLL_BAR
558
public void paintScrollBarBackground(SynthContext JavaDoc context,
559                                      Graphics g, int x, int y,
560                                      int w, int h) {
561         paint(g, x, y, w, h);
562     }
563
564     public void paintScrollBarBorder(SynthContext JavaDoc context,
565                                  Graphics g, int x, int y,
566                                  int w, int h) {
567         paint(g, x, y, w, h);
568     }
569
570     // SCROLL_BAR_THUMB
571
public void paintScrollBarThumbBackground(SynthContext JavaDoc context,
572                                      Graphics g, int x, int y,
573                                      int w, int h, int orientation) {
574         paint(g, x, y, w, h);
575     }
576
577     public void paintScrollBarThumbBorder(SynthContext JavaDoc context,
578                                  Graphics g, int x, int y,
579                                  int w, int h, int orientation) {
580         paint(g, x, y, w, h);
581     }
582
583     // SCROLL_BAR_TRACK
584
public void paintScrollBarTrackBackground(SynthContext JavaDoc context,
585                                      Graphics g, int x, int y,
586                                      int w, int h) {
587         paint(g, x, y, w, h);
588     }
589
590     public void paintScrollBarTrackBorder(SynthContext JavaDoc context,
591                                  Graphics g, int x, int y,
592                                  int w, int h) {
593         paint(g, x, y, w, h);
594     }
595
596     // SCROLL_PANE
597
public void paintScrollPaneBackground(SynthContext JavaDoc context,
598                                      Graphics g, int x, int y,
599                                      int w, int h) {
600         paint(g, x, y, w, h);
601     }
602
603     public void paintScrollPaneBorder(SynthContext JavaDoc context,
604                                  Graphics g, int x, int y,
605                                  int w, int h) {
606         paint(g, x, y, w, h);
607     }
608
609     // SEPARATOR
610
public void paintSeparatorBackground(SynthContext JavaDoc context,
611                                      Graphics g, int x, int y,
612                                      int w, int h) {
613         paint(g, x, y, w, h);
614     }
615
616     public void paintSeparatorBorder(SynthContext JavaDoc context,
617                                  Graphics g, int x, int y,
618                                  int w, int h) {
619         paint(g, x, y, w, h);
620     }
621
622     public void paintSeparatorForeground(SynthContext JavaDoc context,
623                                  Graphics g, int x, int y,
624                                  int w, int h, int orientation) {
625         paint(g, x, y, w, h);
626     }
627
628     // SLIDER
629
public void paintSliderBackground(SynthContext JavaDoc context,
630                                      Graphics g, int x, int y,
631                                      int w, int h) {
632         paint(g, x, y, w, h);
633     }
634
635     public void paintSliderBorder(SynthContext JavaDoc context,
636                                  Graphics g, int x, int y,
637                                  int w, int h) {
638         paint(g, x, y, w, h);
639     }
640
641     // SLIDER_THUMB
642
public void paintSliderThumbBackground(SynthContext JavaDoc context,
643                                      Graphics g, int x, int y,
644                                      int w, int h, int orientation) {
645         paint(g, x, y, w, h);
646     }
647
648     public void paintSliderThumbBorder(SynthContext JavaDoc context,
649                                  Graphics g, int x, int y,
650                                  int w, int h, int orientation) {
651         paint(g, x, y, w, h);
652     }
653
654     // SLIDER_TRACK
655
public void paintSliderTrackBackground(SynthContext JavaDoc context,
656                                      Graphics g, int x, int y,
657                                      int w, int h) {
658         paint(g, x, y, w, h);
659     }
660
661     public void paintSliderTrackBorder(SynthContext JavaDoc context,
662                                  Graphics g, int x, int y,
663                                  int w, int h) {
664         paint(g, x, y, w, h);
665     }
666
667     // SPINNER
668
public void paintSpinnerBackground(SynthContext JavaDoc context,
669                                      Graphics g, int x, int y,
670                                      int w, int h) {
671         paint(g, x, y, w, h);
672     }
673
674     public void paintSpinnerBorder(SynthContext JavaDoc context,
675                                  Graphics g, int x, int y,
676                                  int w, int h) {
677         paint(g, x, y, w, h);
678     }
679
680     // SPLIT_PANE_DIVIDER
681
public void paintSplitPaneDividerBackground(SynthContext JavaDoc context,
682                                      Graphics g, int x, int y,
683                                      int w, int h) {
684         paint(g, x, y, w, h);
685     }
686
687     public void paintSplitPaneDividerForeground(SynthContext JavaDoc context,
688                                      Graphics g, int x, int y,
689                                      int w, int h, int orientation) {
690         paint(g, x, y, w, h);
691     }
692
693     public void paintSplitPaneDragDivider(SynthContext JavaDoc context,
694                                      Graphics g, int x, int y,
695                                      int w, int h, int orientation) {
696         paint(g, x, y, w, h);
697     }
698
699     // SPLIT_PANE
700
public void paintSplitPaneBackground(SynthContext JavaDoc context,
701                                      Graphics g, int x, int y,
702                                      int w, int h) {
703         paint(g, x, y, w, h);
704     }
705
706     public void paintSplitPaneBorder(SynthContext JavaDoc context,
707                                  Graphics g, int x, int y,
708                                  int w, int h) {
709         paint(g, x, y, w, h);
710     }
711
712     // TABBED_PANE
713
public void paintTabbedPaneBackground(SynthContext JavaDoc context,
714                                      Graphics g, int x, int y,
715                                      int w, int h) {
716         paint(g, x, y, w, h);
717     }
718
719     public void paintTabbedPaneBorder(SynthContext JavaDoc context,
720                                  Graphics g, int x, int y,
721                                  int w, int h) {
722         paint(g, x, y, w, h);
723     }
724
725     // TABBED_PANE_TAB_AREA
726
public void paintTabbedPaneTabAreaBackground(SynthContext JavaDoc context,
727                                      Graphics g, int x, int y,
728                                      int w, int h) {
729         paint(g, x, y, w, h);
730     }
731
732     public void paintTabbedPaneTabAreaBorder(SynthContext JavaDoc context,
733                                  Graphics g, int x, int y,
734                                  int w, int h) {
735         paint(g, x, y, w, h);
736     }
737
738     // TABBED_PANE_TAB
739
public void paintTabbedPaneTabBackground(SynthContext JavaDoc context, Graphics g,
740                                          int x, int y, int w, int h,
741                                          int tabIndex) {
742         paint(g, x, y, w, h);
743     }
744
745     public void paintTabbedPaneTabBorder(SynthContext JavaDoc context, Graphics g,
746                                          int x, int y, int w, int h,
747                                          int tabIndex) {
748         paint(g, x, y, w, h);
749     }
750
751     // TABBED_PANE_CONTENT
752
public void paintTabbedPaneContentBackground(SynthContext JavaDoc context,
753                                          Graphics g, int x, int y, int w,
754                                          int h) {
755         paint(g, x, y, w, h);
756     }
757
758     public void paintTabbedPaneContentBorder(SynthContext JavaDoc context, Graphics g,
759                                          int x, int y, int w, int h) {
760         paint(g, x, y, w, h);
761     }
762
763     // TABLE_HEADER
764
public void paintTableHeaderBackground(SynthContext JavaDoc context,
765                                      Graphics g, int x, int y,
766                                      int w, int h) {
767         paint(g, x, y, w, h);
768     }
769
770     public void paintTableHeaderBorder(SynthContext JavaDoc context,
771                                  Graphics g, int x, int y,
772                                  int w, int h) {
773         paint(g, x, y, w, h);
774     }
775
776     // TABLE
777
public void paintTableBackground(SynthContext JavaDoc context,
778                                      Graphics g, int x, int y,
779                                      int w, int h) {
780         paint(g, x, y, w, h);
781     }
782
783     public void paintTableBorder(SynthContext JavaDoc context,
784                                  Graphics g, int x, int y,
785                                  int w, int h) {
786         paint(g, x, y, w, h);
787     }
788
789     // TEXT_AREA
790
public void paintTextAreaBackground(SynthContext JavaDoc context,
791                                      Graphics g, int x, int y,
792                                      int w, int h) {
793         paint(g, x, y, w, h);
794     }
795
796     public void paintTextAreaBorder(SynthContext JavaDoc context,
797                                  Graphics g, int x, int y,
798                                  int w, int h) {
799         paint(g, x, y, w, h);
800     }
801
802     // TEXT_PANE
803
public void paintTextPaneBackground(SynthContext JavaDoc context,
804                                      Graphics g, int x, int y,
805                                      int w, int h) {
806         paint(g, x, y, w, h);
807     }
808
809     public void paintTextPaneBorder(SynthContext JavaDoc context,
810                                  Graphics g, int x, int y,
811                                  int w, int h) {
812         paint(g, x, y, w, h);
813     }
814
815     // TEXT_FIELD
816
public void paintTextFieldBackground(SynthContext JavaDoc context,
817                                           Graphics g, int x, int y,
818                                           int w, int h) {
819         paint(g, x, y, w, h);
820     }
821
822     public void paintTextFieldBorder(SynthContext JavaDoc context,
823                                       Graphics g, int x, int y,
824                                       int w, int h) {
825         paint(g, x, y, w, h);
826     }
827
828     // TOGGLE_BUTTON
829
public void paintToggleButtonBackground(SynthContext JavaDoc context,
830                                      Graphics g, int x, int y,
831                                      int w, int h) {
832         paint(g, x, y, w, h);
833     }
834
835     public void paintToggleButtonBorder(SynthContext JavaDoc context,
836                                  Graphics g, int x, int y,
837                                  int w, int h) {
838         paint(g, x, y, w, h);
839     }
840
841     // TOOL_BAR
842
public void paintToolBarBackground(SynthContext JavaDoc context,
843                                      Graphics g, int x, int y,
844                                      int w, int h) {
845         paint(g, x, y, w, h);
846     }
847
848     public void paintToolBarBorder(SynthContext JavaDoc context,
849                                  Graphics g, int x, int y,
850                                  int w, int h) {
851         paint(g, x, y, w, h);
852     }
853
854     // TOOL_BAR_CONTENT
855
public void paintToolBarContentBackground(SynthContext JavaDoc context,
856                                      Graphics g, int x, int y,
857                                      int w, int h) {
858         paint(g, x, y, w, h);
859     }
860
861     public void paintToolBarContentBorder(SynthContext JavaDoc context,
862                                  Graphics g, int x, int y,
863                                  int w, int h) {
864         paint(g, x, y, w, h);
865     }
866
867     // TOOL_DRAG_WINDOW
868
public void paintToolBarDragWindowBackground(SynthContext JavaDoc context,
869                                      Graphics g, int x, int y,
870                                      int w, int h) {
871         paint(g, x, y, w, h);
872     }
873
874     public void paintToolBarDragWindowBorder(SynthContext JavaDoc context,
875                                  Graphics g, int x, int y,
876                                  int w, int h) {
877         paint(g, x, y, w, h);
878     }
879
880     // TOOL_TIP
881
public void paintToolTipBackground(SynthContext JavaDoc context,
882                                      Graphics g, int x, int y,
883                                      int w, int h) {
884         paint(g, x, y, w, h);
885     }
886
887     public void paintToolTipBorder(SynthContext JavaDoc context,
888                                  Graphics g, int x, int y,
889                                  int w, int h) {
890         paint(g, x, y, w, h);
891     }
892
893     // TREE
894
public void paintTreeBackground(SynthContext JavaDoc context,
895                                      Graphics g, int x, int y,
896                                      int w, int h) {
897         paint(g, x, y, w, h);
898     }
899
900     public void paintTreeBorder(SynthContext JavaDoc context,
901                                  Graphics g, int x, int y,
902                                  int w, int h) {
903         paint(g, x, y, w, h);
904     }
905
906     // TREE_CELL
907
public void paintTreeCellBackground(SynthContext JavaDoc context,
908                                      Graphics g, int x, int y,
909                                      int w, int h) {
910         paint(g, x, y, w, h);
911     }
912
913     public void paintTreeCellBorder(SynthContext JavaDoc context,
914                                  Graphics g, int x, int y,
915                                  int w, int h) {
916         paint(g, x, y, w, h);
917     }
918
919     public void paintTreeCellFocus(SynthContext JavaDoc context,
920                                    Graphics g, int x, int y,
921                                    int w, int h) {
922         paint(g, x, y, w, h);
923     }
924
925     // VIEWPORT
926
public void paintViewportBackground(SynthContext JavaDoc context,
927                                      Graphics g, int x, int y,
928                                      int w, int h) {
929         paint(g, x, y, w, h);
930     }
931
932     public void paintViewportBorder(SynthContext JavaDoc context,
933                                  Graphics g, int x, int y,
934                                  int w, int h) {
935         paint(g, x, y, w, h);
936     }
937 }
938
Popular Tags