KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > java > swing > plaf > nimbus > SynthPainterImpl


1 /*
2  * @(#)SynthPainterImpl.java 1.7 08/01/30
3  *
4  * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 package com.sun.java.swing.plaf.nimbus;
8
9 import java.awt.*;
10 import java.awt.geom.AffineTransform JavaDoc;
11 import java.awt.geom.NoninvertibleTransformException JavaDoc;
12 import java.awt.image.BufferedImage JavaDoc;
13 import java.util.*;
14 import javax.swing.*;
15 import javax.swing.plaf.synth.SynthContext JavaDoc;
16 import javax.swing.plaf.synth.SynthPainter JavaDoc;
17 import javax.swing.plaf.synth.SynthConstants JavaDoc;
18
19 import com.sun.java.swing.Painter;
20
21
22 /**
23  *
24  * @author rbair
25  */

26 class SynthPainterImpl extends SynthPainter JavaDoc {
27     private NimbusStyle style;
28
29     SynthPainterImpl(NimbusStyle style) {
30         this.style = style;
31     }
32
33     /**
34      * Paint the provided painter using the provided transform at the specified
35      * position and size. Handles if g is a non 2D Graphics by painting via a
36      * BufferedImage.
37      */

38     private void paint(Painter JavaDoc p, SynthContext JavaDoc ctx, Graphics g, int x, int y,
39                        int w, int h, AffineTransform JavaDoc transform) {
40         if (p != null) {
41             if (g instanceof Graphics2D){
42                 Graphics2D gfx = (Graphics2D)g;
43                 if (transform!=null){
44                     gfx.transform(transform);
45                 }
46                 gfx.translate(x, y);
47                 p.paint(gfx, ctx.getComponent(), w, h);
48                 gfx.translate(-x, -y);
49                 if (transform!=null){
50                     try {
51                         gfx.transform(transform.createInverse());
52                     } catch (NoninvertibleTransformException JavaDoc e) {
53                         // this should never happen as we are in control of all
54
// calls into this method and only ever pass in simple
55
// transforms of rotate, flip and translates
56
e.printStackTrace();
57                     }
58                 }
59             } else {
60                 // use image if we are printing to a Java 1.1 PrintGraphics as
61
// it is not a instance of Graphics2D
62
BufferedImage JavaDoc img = new BufferedImage JavaDoc(w,h,
63                         BufferedImage.TYPE_INT_ARGB);
64                 Graphics2D gfx = img.createGraphics();
65                 if (transform!=null){
66                     gfx.transform(transform);
67                 }
68                 p.paint(gfx, ctx.getComponent(), w, h);
69                 gfx.dispose();
70                 g.drawImage(img,x,y,null);
71                 img = null;
72             }
73         }
74     }
75
76     private void paintBackground(SynthContext JavaDoc ctx, Graphics g, int x, int y,
77                                  int w, int h, AffineTransform JavaDoc transform) {
78         Painter JavaDoc backgroundPainter = style.getBackgroundPainter(ctx);
79         if (backgroundPainter != null) {
80             paint(backgroundPainter, ctx, g, x, y, w, h,transform);
81         }
82     }
83
84     private void paintForeground(SynthContext JavaDoc ctx, Graphics g, int x, int y,
85                                  int w, int h, AffineTransform JavaDoc transform) {
86         Painter JavaDoc foregroundPainter = style.getForegroundPainter(ctx);
87         if (foregroundPainter != null) {
88             paint(foregroundPainter, ctx, g, x, y, w, h,transform);
89         }
90     }
91
92     private void paintBorder(SynthContext JavaDoc ctx, Graphics g, int x, int y, int w,
93                              int h, AffineTransform JavaDoc transform) {
94         Painter JavaDoc borderPainter = style.getBorderPainter(ctx);
95         if (borderPainter != null) {
96             paint(borderPainter, ctx, g, x, y, w, h,transform);
97         }
98     }
99
100     private void paintBackground(SynthContext JavaDoc ctx, Graphics g, int x, int y, int w, int h, int orientation) {
101         Component c = ctx.getComponent();
102         boolean ltr = c.getComponentOrientation().isLeftToRight();
103         // Don't RTL flip JSpliders as they handle it internaly
104
if (ctx.getComponent() instanceof JSlider) ltr = true;
105
106         if (orientation == SwingConstants.VERTICAL && ltr) {
107             AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
108             transform.scale(-1, 1);
109             transform.rotate(Math.toRadians(90));
110             paintBackground(ctx, g, y, x, h, w, transform);
111         } else if (orientation == SwingConstants.VERTICAL) {
112             AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
113             transform.rotate(Math.toRadians(90));
114             transform.translate(0,-(x+w));
115             paintBackground(ctx, g, y, x, h, w, transform);
116         } else if (orientation == SwingConstants.HORIZONTAL && ltr) {
117             paintBackground(ctx, g, x, y, w, h, null);
118         } else {
119             //horizontal and right-to-left orientation
120
AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
121             transform.translate(x,y);
122             transform.scale(-1, 1);
123             transform.translate(-w,0);
124             paintBackground(ctx, g, 0, 0, w, h, transform);
125         }
126     }
127
128     private void paintBorder(SynthContext JavaDoc ctx, Graphics g, int x, int y, int w, int h, int orientation) {
129         Component c = ctx.getComponent();
130         boolean ltr = c.getComponentOrientation().isLeftToRight();
131         if (orientation == SwingConstants.VERTICAL && ltr) {
132             AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
133             transform.scale(-1, 1);
134             transform.rotate(Math.toRadians(90));
135             paintBorder(ctx, g, y, x, h, w, transform);
136         } else if (orientation == SwingConstants.VERTICAL) {
137             AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
138             transform.rotate(Math.toRadians(90));
139             transform.translate(0, -(x + w));
140             paintBorder(ctx, g, y, 0, h, w, transform);
141         } else if (orientation == SwingConstants.HORIZONTAL && ltr) {
142             paintBorder(ctx, g, x, y, w, h, null);
143         } else {
144             //horizontal and right-to-left orientation
145
paintBorder(ctx, g, x, y, w, h, null);
146         }
147     }
148
149     private void paintForeground(SynthContext JavaDoc ctx, Graphics g, int x, int y, int w, int h, int orientation) {
150         Component c = ctx.getComponent();
151         boolean ltr = c.getComponentOrientation().isLeftToRight();
152         if (orientation == SwingConstants.VERTICAL && ltr) {
153             AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
154             transform.scale(-1, 1);
155             transform.rotate(Math.toRadians(90));
156             paintForeground(ctx, g, y, x, h, w, transform);
157         } else if (orientation == SwingConstants.VERTICAL) {
158             AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
159             transform.rotate(Math.toRadians(90));
160             transform.translate(0, -(x + w));
161             paintForeground(ctx, g, y, 0, h, w, transform);
162         } else if (orientation == SwingConstants.HORIZONTAL && ltr) {
163             paintForeground(ctx, g, x, y, w, h, null);
164         } else {
165             //horizontal and right-to-left orientation
166
paintForeground(ctx, g, x, y, w, h, null);
167         }
168     }
169
170     /**
171      * Paints the background of an arrow button. Arrow buttons are created by
172      * some components, such as <code>JScrollBar</code>.
173      *
174      * @param context SynthContext identifying the <code>JComponent</code> and
175      * <code>Region</code> to paint to
176      * @param g <code>Graphics</code> to paint to
177      * @param x X coordinate of the area to paint to
178      * @param y Y coordinate of the area to paint to
179      * @param w Width of the area to paint to
180      * @param h Height of the area to paint to
181      */

182     public void paintArrowButtonBackground(SynthContext JavaDoc context,
183                                            Graphics g, int x, int y,
184                                            int w, int h) {
185         if (context.getComponent().getComponentOrientation().isLeftToRight()){
186             paintBackground(context, g, x, y, w, h, null);
187         } else {
188             AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
189             transform.translate(x,y);
190             transform.scale(-1, 1);
191             transform.translate(-w,0);
192             paintBackground(context, g, 0, 0, w, h, transform);
193         }
194     }
195
196     /**
197      * Paints the border of an arrow button. Arrow buttons are created by
198      * some components, such as <code>JScrollBar</code>.
199      *
200      * @param context SynthContext identifying the <code>JComponent</code> and
201      * <code>Region</code> to paint to
202      * @param g <code>Graphics</code> to paint to
203      * @param x X coordinate of the area to paint to
204      * @param y Y coordinate of the area to paint to
205      * @param w Width of the area to paint to
206      * @param h Height of the area to paint to
207      */

208     public void paintArrowButtonBorder(SynthContext JavaDoc context,
209                                        Graphics g, int x, int y,
210                                        int w, int h) {
211         paintBorder(context, g, x, y, w, h, null);
212     }
213
214     /**
215      * Paints the foreground of an arrow button. This method is responsible
216      * for drawing a graphical representation of a direction, typically
217      * an arrow. Arrow buttons are created by
218      * some components, such as <code>JScrollBar</code>
219      *
220      * @param context SynthContext identifying the <code>JComponent</code> and
221      * <code>Region</code> to paint to
222      * @param g <code>Graphics</code> to paint to
223      * @param x X coordinate of the area to paint to
224      * @param y Y coordinate of the area to paint to
225      * @param w Width of the area to paint to
226      * @param h Height of the area to paint to
227      * @param direction One of SwingConstants.NORTH, SwingConstants.SOUTH
228      * SwingConstants.EAST or SwingConstants.WEST
229      */

230     public void paintArrowButtonForeground(SynthContext JavaDoc context,
231                                            Graphics g, int x, int y,
232                                            int w, int h,
233                                            int direction) {
234         //assume that the painter is arranged with the arrow pointing... LEFT?
235
String JavaDoc compName = context.getComponent().getName();
236         boolean ltr = context.getComponent().
237                 getComponentOrientation().isLeftToRight();
238         // The hard coding for spinners here needs to be replaced by a more
239
// general method for disabling rotation
240
if ("Spinner.nextButton".equals(compName) ||
241                 "Spinner.previousButton".equals(compName)) {
242             if (ltr){
243                 paintForeground(context, g, x, y, w, h, null);
244             } else {
245                 AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
246                 transform.translate(w, 0);
247                 transform.scale(-1, 1);
248                 paintForeground(context, g, x, y, w, h, transform);
249             }
250         } else if (direction == SwingConstants.WEST) {
251             paintForeground(context, g, x, y, w, h, null);
252         } else if (direction == SwingConstants.NORTH) {
253             if (ltr){
254                 AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
255                 transform.scale(-1, 1);
256                 transform.rotate(Math.toRadians(90));
257                 paintForeground(context, g, y, 0, h, w, transform);
258             } else {
259                 AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
260                 transform.rotate(Math.toRadians(90));
261                 transform.translate(0, -(x + w));
262                 paintForeground(context, g, y, 0, h, w, transform);
263             }
264         } else if (direction == SwingConstants.EAST) {
265             AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
266             transform.translate(w, 0);
267             transform.scale(-1, 1);
268             paintForeground(context, g, x, y, w, h, transform);
269         } else if (direction == SwingConstants.SOUTH) {
270             if (ltr){
271                 AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
272                 transform.rotate(Math.toRadians(-90));
273                 transform.translate(-h, 0);
274                 paintForeground(context, g, y, x, h, w, transform);
275             } else {
276                 AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
277                 transform.scale(-1, 1);
278                 transform.rotate(Math.toRadians(-90));
279                 transform.translate(-(h+y), -(w+x));
280                 paintForeground(context, g, y, x, h, w, transform);
281             }
282         }
283     }
284
285     /**
286      * Paints the background of a button.
287      *
288      * @param context SynthContext identifying the <code>JComponent</code> and
289      * <code>Region</code> to paint to
290      * @param g <code>Graphics</code> to paint to
291      * @param x X coordinate of the area to paint to
292      * @param y Y coordinate of the area to paint to
293      * @param w Width of the area to paint to
294      * @param h Height of the area to paint to
295      */

296     public void paintButtonBackground(SynthContext JavaDoc context,
297                                       Graphics g, int x, int y,
298                                       int w, int h) {
299         paintBackground(context, g, x, y, w, h, null);
300     }
301
302     /**
303      * Paints the border of a button.
304      *
305      * @param context SynthContext identifying the <code>JComponent</code> and
306      * <code>Region</code> to paint to
307      * @param g <code>Graphics</code> to paint to
308      * @param x X coordinate of the area to paint to
309      * @param y Y coordinate of the area to paint to
310      * @param w Width of the area to paint to
311      * @param h Height of the area to paint to
312      */

313     public void paintButtonBorder(SynthContext JavaDoc context,
314                                   Graphics g, int x, int y,
315                                   int w, int h) {
316         paintBorder(context, g, x, y, w, h, null);
317     }
318
319     /**
320      * Paints the background of a check box menu item.
321      *
322      * @param context SynthContext identifying the <code>JComponent</code> and
323      * <code>Region</code> to paint to
324      * @param g <code>Graphics</code> to paint to
325      * @param x X coordinate of the area to paint to
326      * @param y Y coordinate of the area to paint to
327      * @param w Width of the area to paint to
328      * @param h Height of the area to paint to
329      */

330     public void paintCheckBoxMenuItemBackground(SynthContext JavaDoc context,
331                                                 Graphics g, int x, int y,
332                                                 int w, int h) {
333         paintBackground(context, g, x, y, w, h, null);
334     }
335
336     /**
337      * Paints the border of a check box menu item.
338      *
339      * @param context SynthContext identifying the <code>JComponent</code> and
340      * <code>Region</code> to paint to
341      * @param g <code>Graphics</code> to paint to
342      * @param x X coordinate of the area to paint to
343      * @param y Y coordinate of the area to paint to
344      * @param w Width of the area to paint to
345      * @param h Height of the area to paint to
346      */

347     public void paintCheckBoxMenuItemBorder(SynthContext JavaDoc context,
348                                             Graphics g, int x, int y,
349                                             int w, int h) {
350         paintBorder(context, g, x, y, w, h, null);
351     }
352
353     /**
354      * Paints the background of a check box.
355      *
356      * @param context SynthContext identifying the <code>JComponent</code> and
357      * <code>Region</code> to paint to
358      * @param g <code>Graphics</code> to paint to
359      * @param x X coordinate of the area to paint to
360      * @param y Y coordinate of the area to paint to
361      * @param w Width of the area to paint to
362      * @param h Height of the area to paint to
363      */

364     public void paintCheckBoxBackground(SynthContext JavaDoc context,
365                                         Graphics g, int x, int y,
366                                         int w, int h) {
367         paintBackground(context, g, x, y, w, h, null);
368     }
369
370     /**
371      * Paints the border of a check box.
372      *
373      * @param context SynthContext identifying the <code>JComponent</code> and
374      * <code>Region</code> to paint to
375      * @param g <code>Graphics</code> to paint to
376      * @param x X coordinate of the area to paint to
377      * @param y Y coordinate of the area to paint to
378      * @param w Width of the area to paint to
379      * @param h Height of the area to paint to
380      */

381     public void paintCheckBoxBorder(SynthContext JavaDoc context,
382                                     Graphics g, int x, int y,
383                                     int w, int h) {
384         paintBorder(context, g, x, y, w, h, null);
385     }
386
387     /**
388      * Paints the background of a color chooser.
389      *
390      * @param context SynthContext identifying the <code>JComponent</code> and
391      * <code>Region</code> to paint to
392      * @param g <code>Graphics</code> to paint to
393      * @param x X coordinate of the area to paint to
394      * @param y Y coordinate of the area to paint to
395      * @param w Width of the area to paint to
396      * @param h Height of the area to paint to
397      */

398     public void paintColorChooserBackground(SynthContext JavaDoc context,
399                                             Graphics g, int x, int y,
400                                             int w, int h) {
401         paintBackground(context, g, x, y, w, h, null);
402     }
403
404     /**
405      * Paints the border of a color chooser.
406      *
407      * @param context SynthContext identifying the <code>JComponent</code> and
408      * <code>Region</code> to paint to
409      * @param g <code>Graphics</code> to paint to
410      * @param x X coordinate of the area to paint to
411      * @param y Y coordinate of the area to paint to
412      * @param w Width of the area to paint to
413      * @param h Height of the area to paint to
414      */

415     public void paintColorChooserBorder(SynthContext JavaDoc context,
416                                         Graphics g, int x, int y,
417                                         int w, int h) {
418         paintBorder(context, g, x, y, w, h, null);
419     }
420
421     /**
422      * Paints the background of a combo box.
423      *
424      * @param context SynthContext identifying the <code>JComponent</code> and
425      * <code>Region</code> to paint to
426      * @param g <code>Graphics</code> to paint to
427      * @param x X coordinate of the area to paint to
428      * @param y Y coordinate of the area to paint to
429      * @param w Width of the area to paint to
430      * @param h Height of the area to paint to
431      */

432     public void paintComboBoxBackground(SynthContext JavaDoc context,
433                                         Graphics g, int x, int y,
434                                         int w, int h) {
435         if (context.getComponent().getComponentOrientation().isLeftToRight()){
436             paintBackground(context, g, x, y, w, h, null);
437         } else {
438             AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
439             transform.translate(x,y);
440             transform.scale(-1, 1);
441             transform.translate(-w,0);
442             paintBackground(context, g, 0, 0, w, h, transform);
443         }
444     }
445
446     /**
447      * Paints the border of a combo box.
448      *
449      * @param context SynthContext identifying the <code>JComponent</code> and
450      * <code>Region</code> to paint to
451      * @param g <code>Graphics</code> to paint to
452      * @param x X coordinate of the area to paint to
453      * @param y Y coordinate of the area to paint to
454      * @param w Width of the area to paint to
455      * @param h Height of the area to paint to
456      */

457     public void paintComboBoxBorder(SynthContext JavaDoc context,
458                                         Graphics g, int x, int y,
459                                         int w, int h) {
460         paintBorder(context, g, x, y, w, h, null);
461     }
462
463     /**
464      * Paints the background of a desktop icon.
465      *
466      * @param context SynthContext identifying the <code>JComponent</code> and
467      * <code>Region</code> to paint to
468      * @param g <code>Graphics</code> to paint to
469      * @param x X coordinate of the area to paint to
470      * @param y Y coordinate of the area to paint to
471      * @param w Width of the area to paint to
472      * @param h Height of the area to paint to
473      */

474     public void paintDesktopIconBackground(SynthContext JavaDoc context,
475                                         Graphics g, int x, int y,
476                                         int w, int h) {
477         paintBackground(context, g, x, y, w, h, null);
478     }
479
480     /**
481      * Paints the border of a desktop icon.
482      *
483      * @param context SynthContext identifying the <code>JComponent</code> and
484      * <code>Region</code> to paint to
485      * @param g <code>Graphics</code> to paint to
486      * @param x X coordinate of the area to paint to
487      * @param y Y coordinate of the area to paint to
488      * @param w Width of the area to paint to
489      * @param h Height of the area to paint to
490      */

491     public void paintDesktopIconBorder(SynthContext JavaDoc context,
492                                            Graphics g, int x, int y,
493                                            int w, int h) {
494         paintBorder(context, g, x, y, w, h, null);
495     }
496
497     /**
498      * Paints the background of a desktop pane.
499      *
500      * @param context SynthContext identifying the <code>JComponent</code> and
501      * <code>Region</code> to paint to
502      * @param g <code>Graphics</code> to paint to
503      * @param x X coordinate of the area to paint to
504      * @param y Y coordinate of the area to paint to
505      * @param w Width of the area to paint to
506      * @param h Height of the area to paint to
507      */

508     public void paintDesktopPaneBackground(SynthContext JavaDoc context,
509                                            Graphics g, int x, int y,
510                                            int w, int h) {
511         paintBackground(context, g, x, y, w, h, null);
512     }
513
514     /**
515      * Paints the background of a desktop pane.
516      *
517      * @param context SynthContext identifying the <code>JComponent</code> and
518      * <code>Region</code> to paint to
519      * @param g <code>Graphics</code> to paint to
520      * @param x X coordinate of the area to paint to
521      * @param y Y coordinate of the area to paint to
522      * @param w Width of the area to paint to
523      * @param h Height of the area to paint to
524      */

525     public void paintDesktopPaneBorder(SynthContext JavaDoc context,
526                                        Graphics g, int x, int y,
527                                        int w, int h) {
528         paintBorder(context, g, x, y, w, h, null);
529     }
530
531     /**
532      * Paints the background of an editor pane.
533      *
534      * @param context SynthContext identifying the <code>JComponent</code> and
535      * <code>Region</code> to paint to
536      * @param g <code>Graphics</code> to paint to
537      * @param x X coordinate of the area to paint to
538      * @param y Y coordinate of the area to paint to
539      * @param w Width of the area to paint to
540      * @param h Height of the area to paint to
541      */

542     public void paintEditorPaneBackground(SynthContext JavaDoc context,
543                                           Graphics g, int x, int y,
544                                           int w, int h) {
545         paintBackground(context, g, x, y, w, h, null);
546     }
547
548     /**
549      * Paints the border of an editor pane.
550      *
551      * @param context SynthContext identifying the <code>JComponent</code> and
552      * <code>Region</code> to paint to
553      * @param g <code>Graphics</code> to paint to
554      * @param x X coordinate of the area to paint to
555      * @param y Y coordinate of the area to paint to
556      * @param w Width of the area to paint to
557      * @param h Height of the area to paint to
558      */

559     public void paintEditorPaneBorder(SynthContext JavaDoc context,
560                                       Graphics g, int x, int y,
561                                       int w, int h) {
562         paintBorder(context, g, x, y, w, h, null);
563     }
564
565     /**
566      * Paints the background of a file chooser.
567      *
568      * @param context SynthContext identifying the <code>JComponent</code> and
569      * <code>Region</code> to paint to
570      * @param g <code>Graphics</code> to paint to
571      * @param x X coordinate of the area to paint to
572      * @param y Y coordinate of the area to paint to
573      * @param w Width of the area to paint to
574      * @param h Height of the area to paint to
575      */

576     public void paintFileChooserBackground(SynthContext JavaDoc context,
577                                           Graphics g, int x, int y,
578                                           int w, int h) {
579         paintBackground(context, g, x, y, w, h, null);
580     }
581
582     /**
583      * Paints the border of a file chooser.
584      *
585      * @param context SynthContext identifying the <code>JComponent</code> and
586      * <code>Region</code> to paint to
587      * @param g <code>Graphics</code> to paint to
588      * @param x X coordinate of the area to paint to
589      * @param y Y coordinate of the area to paint to
590      * @param w Width of the area to paint to
591      * @param h Height of the area to paint to
592      */

593     public void paintFileChooserBorder(SynthContext JavaDoc context,
594                                       Graphics g, int x, int y,
595                                       int w, int h) {
596         paintBorder(context, g, x, y, w, h, null);
597     }
598
599     /**
600      * Paints the background of a formatted text field.
601      *
602      * @param context SynthContext identifying the <code>JComponent</code> and
603      * <code>Region</code> to paint to
604      * @param g <code>Graphics</code> to paint to
605      * @param x X coordinate of the area to paint to
606      * @param y Y coordinate of the area to paint to
607      * @param w Width of the area to paint to
608      * @param h Height of the area to paint to
609      */

610     public void paintFormattedTextFieldBackground(SynthContext JavaDoc context,
611                                           Graphics g, int x, int y,
612                                           int w, int h) {
613         if (context.getComponent().getComponentOrientation().isLeftToRight()){
614             paintBackground(context, g, x, y, w, h, null);
615         } else {
616             AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
617             transform.translate(x,y);
618             transform.scale(-1, 1);
619             transform.translate(-w,0);
620             paintBackground(context, g, 0, 0, w, h, transform);
621         }
622     }
623
624     /**
625      * Paints the border of a formatted text field.
626      *
627      * @param context SynthContext identifying the <code>JComponent</code> and
628      * <code>Region</code> to paint to
629      * @param g <code>Graphics</code> to paint to
630      * @param x X coordinate of the area to paint to
631      * @param y Y coordinate of the area to paint to
632      * @param w Width of the area to paint to
633      * @param h Height of the area to paint to
634      */

635     public void paintFormattedTextFieldBorder(SynthContext JavaDoc context,
636                                       Graphics g, int x, int y,
637                                       int w, int h) {
638         if (context.getComponent().getComponentOrientation().isLeftToRight()){
639             paintBorder(context, g, x, y, w, h, null);
640         } else {
641             AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
642             transform.translate(x,y);
643             transform.scale(-1, 1);
644             transform.translate(-w,0);
645             paintBorder(context, g, 0, 0, w, h, transform);
646         }
647     }
648
649     /**
650      * Paints the background of an internal frame title pane.
651      *
652      * @param context SynthContext identifying the <code>JComponent</code> and
653      * <code>Region</code> to paint to
654      * @param g <code>Graphics</code> to paint to
655      * @param x X coordinate of the area to paint to
656      * @param y Y coordinate of the area to paint to
657      * @param w Width of the area to paint to
658      * @param h Height of the area to paint to
659      */

660     public void paintInternalFrameTitlePaneBackground(SynthContext JavaDoc context,
661                                           Graphics g, int x, int y,
662                                           int w, int h) {
663         paintBackground(context, g, x, y, w, h, null);
664     }
665
666     /**
667      * Paints the border of an internal frame title pane.
668      *
669      * @param context SynthContext identifying the <code>JComponent</code> and
670      * <code>Region</code> to paint to
671      * @param g <code>Graphics</code> to paint to
672      * @param x X coordinate of the area to paint to
673      * @param y Y coordinate of the area to paint to
674      * @param w Width of the area to paint to
675      * @param h Height of the area to paint to
676      */

677     public void paintInternalFrameTitlePaneBorder(SynthContext JavaDoc context,
678                                       Graphics g, int x, int y,
679                                       int w, int h) {
680         paintBorder(context, g, x, y, w, h, null);
681     }
682
683     /**
684      * Paints the background of an internal frame.
685      *
686      * @param context SynthContext identifying the <code>JComponent</code> and
687      * <code>Region</code> to paint to
688      * @param g <code>Graphics</code> to paint to
689      * @param x X coordinate of the area to paint to
690      * @param y Y coordinate of the area to paint to
691      * @param w Width of the area to paint to
692      * @param h Height of the area to paint to
693      */

694     public void paintInternalFrameBackground(SynthContext JavaDoc context,
695                                           Graphics g, int x, int y,
696                                           int w, int h) {
697         paintBackground(context, g, x, y, w, h, null);
698     }
699
700     /**
701      * Paints the border of an internal frame.
702      *
703      * @param context SynthContext identifying the <code>JComponent</code> and
704      * <code>Region</code> to paint to
705      * @param g <code>Graphics</code> to paint to
706      * @param x X coordinate of the area to paint to
707      * @param y Y coordinate of the area to paint to
708      * @param w Width of the area to paint to
709      * @param h Height of the area to paint to
710      */

711     public void paintInternalFrameBorder(SynthContext JavaDoc context,
712                                       Graphics g, int x, int y,
713                                       int w, int h) {
714         paintBorder(context, g, x, y, w, h, null);
715     }
716
717     /**
718      * Paints the background of a label.
719      *
720      * @param context SynthContext identifying the <code>JComponent</code> and
721      * <code>Region</code> to paint to
722      * @param g <code>Graphics</code> to paint to
723      * @param x X coordinate of the area to paint to
724      * @param y Y coordinate of the area to paint to
725      * @param w Width of the area to paint to
726      * @param h Height of the area to paint to
727      */

728     public void paintLabelBackground(SynthContext JavaDoc context,
729                                      Graphics g, int x, int y,
730                                      int w, int h) {
731         paintBackground(context, g, x, y, w, h, null);
732     }
733
734     /**
735      * Paints the border of a label.
736      *
737      * @param context SynthContext identifying the <code>JComponent</code> and
738      * <code>Region</code> to paint to
739      * @param g <code>Graphics</code> to paint to
740      * @param x X coordinate of the area to paint to
741      * @param y Y coordinate of the area to paint to
742      * @param w Width of the area to paint to
743      * @param h Height of the area to paint to
744      */

745     public void paintLabelBorder(SynthContext JavaDoc context,
746                                  Graphics g, int x, int y,
747                                  int w, int h) {
748         paintBorder(context, g, x, y, w, h, null);
749     }
750
751     /**
752      * Paints the background of a list.
753      *
754      * @param context SynthContext identifying the <code>JComponent</code> and
755      * <code>Region</code> to paint to
756      * @param g <code>Graphics</code> to paint to
757      * @param x X coordinate of the area to paint to
758      * @param y Y coordinate of the area to paint to
759      * @param w Width of the area to paint to
760      * @param h Height of the area to paint to
761      */

762     public void paintListBackground(SynthContext JavaDoc context,
763                                      Graphics g, int x, int y,
764                                      int w, int h) {
765         paintBackground(context, g, x, y, w, h, null);
766     }
767
768     /**
769      * Paints the border of a list.
770      *
771      * @param context SynthContext identifying the <code>JComponent</code> and
772      * <code>Region</code> to paint to
773      * @param g <code>Graphics</code> to paint to
774      * @param x X coordinate of the area to paint to
775      * @param y Y coordinate of the area to paint to
776      * @param w Width of the area to paint to
777      * @param h Height of the area to paint to
778      */

779     public void paintListBorder(SynthContext JavaDoc context,
780                                  Graphics g, int x, int y,
781                                  int w, int h) {
782         paintBorder(context, g, x, y, w, h, null);
783     }
784
785     /**
786      * Paints the background of a menu bar.
787      *
788      * @param context SynthContext identifying the <code>JComponent</code> and
789      * <code>Region</code> to paint to
790      * @param g <code>Graphics</code> to paint to
791      * @param x X coordinate of the area to paint to
792      * @param y Y coordinate of the area to paint to
793      * @param w Width of the area to paint to
794      * @param h Height of the area to paint to
795      */

796     public void paintMenuBarBackground(SynthContext JavaDoc context,
797                                      Graphics g, int x, int y,
798                                      int w, int h) {
799         paintBackground(context, g, x, y, w, h, null);
800     }
801
802     /**
803      * Paints the border of a menu bar.
804      *
805      * @param context SynthContext identifying the <code>JComponent</code> and
806      * <code>Region</code> to paint to
807      * @param g <code>Graphics</code> to paint to
808      * @param x X coordinate of the area to paint to
809      * @param y Y coordinate of the area to paint to
810      * @param w Width of the area to paint to
811      * @param h Height of the area to paint to
812      */

813     public void paintMenuBarBorder(SynthContext JavaDoc context,
814                                  Graphics g, int x, int y,
815                                  int w, int h) {
816         paintBorder(context, g, x, y, w, h, null);
817     }
818
819     /**
820      * Paints the background of a menu item.
821      *
822      * @param context SynthContext identifying the <code>JComponent</code> and
823      * <code>Region</code> to paint to
824      * @param g <code>Graphics</code> to paint to
825      * @param x X coordinate of the area to paint to
826      * @param y Y coordinate of the area to paint to
827      * @param w Width of the area to paint to
828      * @param h Height of the area to paint to
829      */

830     public void paintMenuItemBackground(SynthContext JavaDoc context,
831                                      Graphics g, int x, int y,
832                                      int w, int h) {
833         paintBackground(context, g, x, y, w, h, null);
834     }
835
836     /**
837      * Paints the border of a menu item.
838      *
839      * @param context SynthContext identifying the <code>JComponent</code> and
840      * <code>Region</code> to paint to
841      * @param g <code>Graphics</code> to paint to
842      * @param x X coordinate of the area to paint to
843      * @param y Y coordinate of the area to paint to
844      * @param w Width of the area to paint to
845      * @param h Height of the area to paint to
846      */

847     public void paintMenuItemBorder(SynthContext JavaDoc context,
848                                  Graphics g, int x, int y,
849                                  int w, int h) {
850         paintBorder(context, g, x, y, w, h, null);
851     }
852
853     /**
854      * Paints the background of a menu.
855      *
856      * @param context SynthContext identifying the <code>JComponent</code> and
857      * <code>Region</code> to paint to
858      * @param g <code>Graphics</code> to paint to
859      * @param x X coordinate of the area to paint to
860      * @param y Y coordinate of the area to paint to
861      * @param w Width of the area to paint to
862      * @param h Height of the area to paint to
863      */

864     public void paintMenuBackground(SynthContext JavaDoc context,
865                                      Graphics g, int x, int y,
866                                      int w, int h) {
867         paintBackground(context, g, x, y, w, h, null);
868     }
869
870     /**
871      * Paints the border of a menu.
872      *
873      * @param context SynthContext identifying the <code>JComponent</code> and
874      * <code>Region</code> to paint to
875      * @param g <code>Graphics</code> to paint to
876      * @param x X coordinate of the area to paint to
877      * @param y Y coordinate of the area to paint to
878      * @param w Width of the area to paint to
879      * @param h Height of the area to paint to
880      */

881     public void paintMenuBorder(SynthContext JavaDoc context,
882                                  Graphics g, int x, int y,
883                                  int w, int h) {
884         paintBorder(context, g, x, y, w, h, null);
885     }
886
887     /**
888      * Paints the background of an option pane.
889      *
890      * @param context SynthContext identifying the <code>JComponent</code> and
891      * <code>Region</code> to paint to
892      * @param g <code>Graphics</code> to paint to
893      * @param x X coordinate of the area to paint to
894      * @param y Y coordinate of the area to paint to
895      * @param w Width of the area to paint to
896      * @param h Height of the area to paint to
897      */

898     public void paintOptionPaneBackground(SynthContext JavaDoc context,
899                                      Graphics g, int x, int y,
900                                      int w, int h) {
901         paintBackground(context, g, x, y, w, h, null);
902     }
903
904     /**
905      * Paints the border of an option pane.
906      *
907      * @param context SynthContext identifying the <code>JComponent</code> and
908      * <code>Region</code> to paint to
909      * @param g <code>Graphics</code> to paint to
910      * @param x X coordinate of the area to paint to
911      * @param y Y coordinate of the area to paint to
912      * @param w Width of the area to paint to
913      * @param h Height of the area to paint to
914      */

915     public void paintOptionPaneBorder(SynthContext JavaDoc context,
916                                  Graphics g, int x, int y,
917                                  int w, int h) {
918         paintBorder(context, g, x, y, w, h, null);
919     }
920
921     /**
922      * Paints the background of a panel.
923      *
924      * @param context SynthContext identifying the <code>JComponent</code> and
925      * <code>Region</code> to paint to
926      * @param g <code>Graphics</code> to paint to
927      * @param x X coordinate of the area to paint to
928      * @param y Y coordinate of the area to paint to
929      * @param w Width of the area to paint to
930      * @param h Height of the area to paint to
931      */

932     public void paintPanelBackground(SynthContext JavaDoc context,
933                                      Graphics g, int x, int y,
934                                      int w, int h) {
935         paintBackground(context, g, x, y, w, h, null);
936     }
937
938     /**
939      * Paints the border of a panel.
940      *
941      * @param context SynthContext identifying the <code>JComponent</code> and
942      * <code>Region</code> to paint to
943      * @param g <code>Graphics</code> to paint to
944      * @param x X coordinate of the area to paint to
945      * @param y Y coordinate of the area to paint to
946      * @param w Width of the area to paint to
947      * @param h Height of the area to paint to
948      */

949     public void paintPanelBorder(SynthContext JavaDoc context,
950                                  Graphics g, int x, int y,
951                                  int w, int h) {
952         paintBorder(context, g, x, y, w, h, null);
953     }
954
955     /**
956      * Paints the background of a password field.
957      *
958      * @param context SynthContext identifying the <code>JComponent</code> and
959      * <code>Region</code> to paint to
960      * @param g <code>Graphics</code> to paint to
961      * @param x X coordinate of the area to paint to
962      * @param y Y coordinate of the area to paint to
963      * @param w Width of the area to paint to
964      * @param h Height of the area to paint to
965      */

966     public void paintPasswordFieldBackground(SynthContext JavaDoc context,
967                                      Graphics g, int x, int y,
968                                      int w, int h) {
969         paintBackground(context, g, x, y, w, h, null);
970     }
971
972     /**
973      * Paints the border of a password field.
974      *
975      * @param context SynthContext identifying the <code>JComponent</code> and
976      * <code>Region</code> to paint to
977      * @param g <code>Graphics</code> to paint to
978      * @param x X coordinate of the area to paint to
979      * @param y Y coordinate of the area to paint to
980      * @param w Width of the area to paint to
981      * @param h Height of the area to paint to
982      */

983     public void paintPasswordFieldBorder(SynthContext JavaDoc context,
984                                  Graphics g, int x, int y,
985                                  int w, int h) {
986         paintBorder(context, g, x, y, w, h, null);
987     }
988
989     /**
990      * Paints the background of a popup menu.
991      *
992      * @param context SynthContext identifying the <code>JComponent</code> and
993      * <code>Region</code> to paint to
994      * @param g <code>Graphics</code> to paint to
995      * @param x X coordinate of the area to paint to
996      * @param y Y coordinate of the area to paint to
997      * @param w Width of the area to paint to
998      * @param h Height of the area to paint to
999      */

1000    public void paintPopupMenuBackground(SynthContext JavaDoc context,
1001                                     Graphics g, int x, int y,
1002                                     int w, int h) {
1003        paintBackground(context, g, x, y, w, h, null);
1004    }
1005
1006    /**
1007     * Paints the border of a popup menu.
1008     *
1009     * @param context SynthContext identifying the <code>JComponent</code> and
1010     * <code>Region</code> to paint to
1011     * @param g <code>Graphics</code> to paint to
1012     * @param x X coordinate of the area to paint to
1013     * @param y Y coordinate of the area to paint to
1014     * @param w Width of the area to paint to
1015     * @param h Height of the area to paint to
1016     */

1017    public void paintPopupMenuBorder(SynthContext JavaDoc context,
1018                                 Graphics g, int x, int y,
1019                                 int w, int h) {
1020        paintBorder(context, g, x, y, w, h, null);
1021    }
1022
1023    /**
1024     * Paints the background of a progress bar.
1025     *
1026     * @param context SynthContext identifying the <code>JComponent</code> and
1027     * <code>Region</code> to paint to
1028     * @param g <code>Graphics</code> to paint to
1029     * @param x X coordinate of the area to paint to
1030     * @param y Y coordinate of the area to paint to
1031     * @param w Width of the area to paint to
1032     * @param h Height of the area to paint to
1033     */

1034    public void paintProgressBarBackground(SynthContext JavaDoc context,
1035                                     Graphics g, int x, int y,
1036                                     int w, int h) {
1037        paintBackground(context, g, x, y, w, h, null);
1038    }
1039
1040    /**
1041     * Paints the background of a progress bar. This implementation invokes the
1042     * method of the same name without the orientation.
1043     *
1044     * @param context SynthContext identifying the <code>JComponent</code> and
1045     * <code>Region</code> to paint to
1046     * @param g <code>Graphics</code> to paint to
1047     * @param x X coordinate of the area to paint to
1048     * @param y Y coordinate of the area to paint to
1049     * @param w Width of the area to paint to
1050     * @param h Height of the area to paint to
1051     * @param orientation one of <code>JProgressBar.HORIZONTAL</code> or
1052     * <code>JProgressBar.VERTICAL</code>
1053     * @since 1.6
1054     */

1055    public void paintProgressBarBackground(SynthContext JavaDoc context,
1056                                     Graphics g, int x, int y,
1057                                     int w, int h, int orientation) {
1058        paintBackground(context, g, x, y, w, h, orientation);
1059    }
1060
1061    /**
1062     * Paints the border of a progress bar.
1063     *
1064     * @param context SynthContext identifying the <code>JComponent</code> and
1065     * <code>Region</code> to paint to
1066     * @param g <code>Graphics</code> to paint to
1067     * @param x X coordinate of the area to paint to
1068     * @param y Y coordinate of the area to paint to
1069     * @param w Width of the area to paint to
1070     * @param h Height of the area to paint to
1071     */

1072    public void paintProgressBarBorder(SynthContext JavaDoc context,
1073                                 Graphics g, int x, int y,
1074                                 int w, int h) {
1075        paintBorder(context, g, x, y, w, h, null);
1076    }
1077
1078    /**
1079     * Paints the border of a progress bar. This implementation invokes the
1080     * method of the same name without the orientation.
1081     *
1082     * @param context SynthContext identifying the <code>JComponent</code> and
1083     * <code>Region</code> to paint to
1084     * @param g <code>Graphics</code> to paint to
1085     * @param x X coordinate of the area to paint to
1086     * @param y Y coordinate of the area to paint to
1087     * @param w Width of the area to paint to
1088     * @param h Height of the area to paint to
1089     * @param orientation one of <code>JProgressBar.HORIZONTAL</code> or
1090     * <code>JProgressBar.VERTICAL</code>
1091     * @since 1.6
1092     */

1093    public void paintProgressBarBorder(SynthContext JavaDoc context,
1094                                 Graphics g, int x, int y,
1095                                 int w, int h, int orientation) {
1096        paintBorder(context, g, x, y, w, h, orientation);
1097    }
1098
1099    /**
1100     * Paints the foreground of a progress bar. is responsible for
1101     * providing an indication of the progress of the progress bar.
1102     *
1103     * @param context SynthContext identifying the <code>JComponent</code> and
1104     * <code>Region</code> to paint to
1105     * @param g <code>Graphics</code> to paint to
1106     * @param x X coordinate of the area to paint to
1107     * @param y Y coordinate of the area to paint to
1108     * @param w Width of the area to paint to
1109     * @param h Height of the area to paint to
1110     * @param orientation one of <code>JProgressBar.HORIZONTAL</code> or
1111     * <code>JProgressBar.VERTICAL</code>
1112     */

1113    public void paintProgressBarForeground(SynthContext JavaDoc context,
1114                                 Graphics g, int x, int y,
1115                                 int w, int h, int orientation) {
1116        paintForeground(context, g, x, y, w, h, orientation);
1117    }
1118
1119    /**
1120     * Paints the background of a radio button menu item.
1121     *
1122     * @param context SynthContext identifying the <code>JComponent</code> and
1123     * <code>Region</code> to paint to
1124     * @param g <code>Graphics</code> to paint to
1125     * @param x X coordinate of the area to paint to
1126     * @param y Y coordinate of the area to paint to
1127     * @param w Width of the area to paint to
1128     * @param h Height of the area to paint to
1129     */

1130    public void paintRadioButtonMenuItemBackground(SynthContext JavaDoc context,
1131                                     Graphics g, int x, int y,
1132                                     int w, int h) {
1133        paintBackground(context, g, x, y, w, h, null);
1134    }
1135
1136    /**
1137     * Paints the border of a radio button menu item.
1138     *
1139     * @param context SynthContext identifying the <code>JComponent</code> and
1140     * <code>Region</code> to paint to
1141     * @param g <code>Graphics</code> to paint to
1142     * @param x X coordinate of the area to paint to
1143     * @param y Y coordinate of the area to paint to
1144     * @param w Width of the area to paint to
1145     * @param h Height of the area to paint to
1146     */

1147    public void paintRadioButtonMenuItemBorder(SynthContext JavaDoc context,
1148                                 Graphics g, int x, int y,
1149                                 int w, int h) {
1150        paintBorder(context, g, x, y, w, h, null);
1151    }
1152
1153    /**
1154     * Paints the background of a radio button.
1155     *
1156     * @param context SynthContext identifying the <code>JComponent</code> and
1157     * <code>Region</code> to paint to
1158     * @param g <code>Graphics</code> to paint to
1159     * @param x X coordinate of the area to paint to
1160     * @param y Y coordinate of the area to paint to
1161     * @param w Width of the area to paint to
1162     * @param h Height of the area to paint to
1163     */

1164    public void paintRadioButtonBackground(SynthContext JavaDoc context,
1165                                     Graphics g, int x, int y,
1166                                     int w, int h) {
1167        paintBackground(context, g, x, y, w, h, null);
1168    }
1169
1170    /**
1171     * Paints the border of a radio button.
1172     *
1173     * @param context SynthContext identifying the <code>JComponent</code> and
1174     * <code>Region</code> to paint to
1175     * @param g <code>Graphics</code> to paint to
1176     * @param x X coordinate of the area to paint to
1177     * @param y Y coordinate of the area to paint to
1178     * @param w Width of the area to paint to
1179     * @param h Height of the area to paint to
1180     */

1181    public void paintRadioButtonBorder(SynthContext JavaDoc context,
1182                                 Graphics g, int x, int y,
1183                                 int w, int h) {
1184        paintBorder(context, g, x, y, w, h, null);
1185    }
1186
1187    /**
1188     * Paints the background of a root pane.
1189     *
1190     * @param context SynthContext identifying the <code>JComponent</code> and
1191     * <code>Region</code> to paint to
1192     * @param g <code>Graphics</code> to paint to
1193     * @param x X coordinate of the area to paint to
1194     * @param y Y coordinate of the area to paint to
1195     * @param w Width of the area to paint to
1196     * @param h Height of the area to paint to
1197     */

1198    public void paintRootPaneBackground(SynthContext JavaDoc context,
1199                                     Graphics g, int x, int y,
1200                                     int w, int h) {
1201        paintBackground(context, g, x, y, w, h, null);
1202    }
1203
1204    /**
1205     * Paints the border of a root pane.
1206     *
1207     * @param context SynthContext identifying the <code>JComponent</code> and
1208     * <code>Region</code> to paint to
1209     * @param g <code>Graphics</code> to paint to
1210     * @param x X coordinate of the area to paint to
1211     * @param y Y coordinate of the area to paint to
1212     * @param w Width of the area to paint to
1213     * @param h Height of the area to paint to
1214     */

1215    public void paintRootPaneBorder(SynthContext JavaDoc context,
1216                                 Graphics g, int x, int y,
1217                                 int w, int h) {
1218        paintBorder(context, g, x, y, w, h, null);
1219    }
1220
1221    /**
1222     * Paints the background of a scrollbar.
1223     *
1224     * @param context SynthContext identifying the <code>JComponent</code> and
1225     * <code>Region</code> to paint to
1226     * @param g <code>Graphics</code> to paint to
1227     * @param x X coordinate of the area to paint to
1228     * @param y Y coordinate of the area to paint to
1229     * @param w Width of the area to paint to
1230     * @param h Height of the area to paint to
1231     */

1232    public void paintScrollBarBackground(SynthContext JavaDoc context,
1233                                     Graphics g, int x, int y,
1234                                     int w, int h) {
1235        paintBackground(context, g, x, y, w, h, null);
1236    }
1237
1238    /**
1239     * Paints the background of a scrollbar. This implementation invokes the
1240     * method of the same name without the orientation.
1241     *
1242     * @param context SynthContext identifying the <code>JComponent</code> and
1243     * <code>Region</code> to paint to
1244     * @param g <code>Graphics</code> to paint to
1245     * @param x X coordinate of the area to paint to
1246     * @param y Y coordinate of the area to paint to
1247     * @param w Width of the area to paint to
1248     * @param h Height of the area to paint to
1249     * @param orientation Orientation of the JScrollBar, one of
1250     * <code>JScrollBar.HORIZONTAL</code> or
1251     * <code>JScrollBar.VERTICAL</code>
1252     * @since 1.6
1253     */

1254    public void paintScrollBarBackground(SynthContext JavaDoc context,
1255                                     Graphics g, int x, int y,
1256                                     int w, int h, int orientation) {
1257        paintBackground(context, g, x, y, w, h, orientation);
1258    }
1259
1260    /**
1261     * Paints the border of a scrollbar.
1262     *
1263     * @param context SynthContext identifying the <code>JComponent</code> and
1264     * <code>Region</code> to paint to
1265     * @param g <code>Graphics</code> to paint to
1266     * @param x X coordinate of the area to paint to
1267     * @param y Y coordinate of the area to paint to
1268     * @param w Width of the area to paint to
1269     * @param h Height of the area to paint to
1270     */

1271    public void paintScrollBarBorder(SynthContext JavaDoc context,
1272                                 Graphics g, int x, int y,
1273                                 int w, int h) {
1274        paintBorder(context, g, x, y, w, h, null);
1275    }
1276
1277    /**
1278     * Paints the border of a scrollbar. This implementation invokes the
1279     * method of the same name without the orientation.
1280     *
1281     * @param context SynthContext identifying the <code>JComponent</code> and
1282     * <code>Region</code> to paint to
1283     * @param g <code>Graphics</code> to paint to
1284     * @param x X coordinate of the area to paint to
1285     * @param y Y coordinate of the area to paint to
1286     * @param w Width of the area to paint to
1287     * @param h Height of the area to paint to
1288     * @param orientation Orientation of the JScrollBar, one of
1289     * <code>JScrollBar.HORIZONTAL</code> or
1290     * <code>JScrollBar.VERTICAL</code>
1291     * @since 1.6
1292     */

1293    public void paintScrollBarBorder(SynthContext JavaDoc context,
1294                                 Graphics g, int x, int y,
1295                                 int w, int h, int orientation) {
1296        paintBorder(context, g, x, y, w, h, orientation);
1297    }
1298
1299    /**
1300     * Paints the background of the thumb of a scrollbar. The thumb provides
1301     * a graphical indication as to how much of the Component is visible in a
1302     * <code>JScrollPane</code>.
1303     *
1304     * @param context SynthContext identifying the <code>JComponent</code> and
1305     * <code>Region</code> to paint to
1306     * @param g <code>Graphics</code> to paint to
1307     * @param x X coordinate of the area to paint to
1308     * @param y Y coordinate of the area to paint to
1309     * @param w Width of the area to paint to
1310     * @param h Height of the area to paint to
1311     * @param orientation Orientation of the JScrollBar, one of
1312     * <code>JScrollBar.HORIZONTAL</code> or
1313     * <code>JScrollBar.VERTICAL</code>
1314     */

1315    public void paintScrollBarThumbBackground(SynthContext JavaDoc context,
1316                                     Graphics g, int x, int y,
1317                                     int w, int h, int orientation) {
1318        paintBackground(context, g, x, y, w, h, orientation);
1319    }
1320
1321    /**
1322     * Paints the border of the thumb of a scrollbar. The thumb provides
1323     * a graphical indication as to how much of the Component is visible in a
1324     * <code>JScrollPane</code>.
1325     *
1326     * @param context SynthContext identifying the <code>JComponent</code> and
1327     * <code>Region</code> to paint to
1328     * @param g <code>Graphics</code> to paint to
1329     * @param x X coordinate of the area to paint to
1330     * @param y Y coordinate of the area to paint to
1331     * @param w Width of the area to paint to
1332     * @param h Height of the area to paint to
1333     * @param orientation Orientation of the JScrollBar, one of
1334     * <code>JScrollBar.HORIZONTAL</code> or
1335     * <code>JScrollBar.VERTICAL</code>
1336     */

1337    public void paintScrollBarThumbBorder(SynthContext JavaDoc context,
1338                                 Graphics g, int x, int y,
1339                                 int w, int h, int orientation) {
1340        paintBorder(context, g, x, y, w, h, orientation);
1341    }
1342
1343    /**
1344     * Paints the background of the track of a scrollbar. The track contains
1345     * the thumb.
1346     *
1347     * @param context SynthContext identifying the <code>JComponent</code> and
1348     * <code>Region</code> to paint to
1349     * @param g <code>Graphics</code> to paint to
1350     * @param x X coordinate of the area to paint to
1351     * @param y Y coordinate of the area to paint to
1352     * @param w Width of the area to paint to
1353     * @param h Height of the area to paint to
1354     */

1355    public void paintScrollBarTrackBackground(SynthContext JavaDoc context,
1356                                     Graphics g, int x, int y,
1357                                     int w, int h) {
1358        paintBackground(context, g, x, y, w, h, null);
1359    }
1360
1361    /**
1362     * Paints the background of the track of a scrollbar. The track contains
1363     * the thumb. This implementation invokes the method of the same name without
1364     * the orientation.
1365     *
1366     * @param context SynthContext identifying the <code>JComponent</code> and
1367     * <code>Region</code> to paint to
1368     * @param g <code>Graphics</code> to paint to
1369     * @param x X coordinate of the area to paint to
1370     * @param y Y coordinate of the area to paint to
1371     * @param w Width of the area to paint to
1372     * @param h Height of the area to paint to
1373     * @param orientation Orientation of the JScrollBar, one of
1374     * <code>JScrollBar.HORIZONTAL</code> or
1375     * <code>JScrollBar.VERTICAL</code>
1376     * @since 1.6
1377     */

1378    public void paintScrollBarTrackBackground(SynthContext JavaDoc context,
1379                                     Graphics g, int x, int y,
1380                                     int w, int h, int orientation) {
1381        paintBackground(context, g, x, y, w, h, orientation);
1382    }
1383
1384    /**
1385     * Paints the border of the track of a scrollbar. The track contains
1386     * the thumb.
1387     *
1388     * @param context SynthContext identifying the <code>JComponent</code> and
1389     * <code>Region</code> to paint to
1390     * @param g <code>Graphics</code> to paint to
1391     * @param x X coordinate of the area to paint to
1392     * @param y Y coordinate of the area to paint to
1393     * @param w Width of the area to paint to
1394     * @param h Height of the area to paint to
1395     */

1396    public void paintScrollBarTrackBorder(SynthContext JavaDoc context,
1397                                 Graphics g, int x, int y,
1398                                 int w, int h) {
1399        paintBorder(context, g, x, y, w, h, null);
1400    }
1401
1402    /**
1403     * Paints the border of the track of a scrollbar. The track contains
1404     * the thumb. This implementation invokes the method of the same name without
1405     * the orientation.
1406     *
1407     * @param context SynthContext identifying the <code>JComponent</code> and
1408     * <code>Region</code> to paint to
1409     * @param g <code>Graphics</code> to paint to
1410     * @param x X coordinate of the area to paint to
1411     * @param y Y coordinate of the area to paint to
1412     * @param w Width of the area to paint to
1413     * @param h Height of the area to paint to
1414     * @param orientation Orientation of the JScrollBar, one of
1415     * <code>JScrollBar.HORIZONTAL</code> or
1416     * <code>JScrollBar.VERTICAL</code>
1417     * @since 1.6
1418     */

1419    public void paintScrollBarTrackBorder(SynthContext JavaDoc context,
1420                                 Graphics g, int x, int y,
1421                                 int w, int h, int orientation) {
1422        paintBorder(context, g, x, y, w, h, orientation);
1423    }
1424
1425    /**
1426     * Paints the background of a scroll pane.
1427     *
1428     * @param context SynthContext identifying the <code>JComponent</code> and
1429     * <code>Region</code> to paint to
1430     * @param g <code>Graphics</code> to paint to
1431     * @param x X coordinate of the area to paint to
1432     * @param y Y coordinate of the area to paint to
1433     * @param w Width of the area to paint to
1434     * @param h Height of the area to paint to
1435     */

1436    public void paintScrollPaneBackground(SynthContext JavaDoc context,
1437                                     Graphics g, int x, int y,
1438                                     int w, int h) {
1439        paintBackground(context, g, x, y, w, h, null);
1440    }
1441
1442    /**
1443     * Paints the border of a scroll pane.
1444     *
1445     * @param context SynthContext identifying the <code>JComponent</code> and
1446     * <code>Region</code> to paint to
1447     * @param g <code>Graphics</code> to paint to
1448     * @param x X coordinate of the area to paint to
1449     * @param y Y coordinate of the area to paint to
1450     * @param w Width of the area to paint to
1451     * @param h Height of the area to paint to
1452     */

1453    public void paintScrollPaneBorder(SynthContext JavaDoc context,
1454                                 Graphics g, int x, int y,
1455                                 int w, int h) {
1456        paintBorder(context, g, x, y, w, h, null);
1457    }
1458
1459    /**
1460     * Paints the background of a separator.
1461     *
1462     * @param context SynthContext identifying the <code>JComponent</code> and
1463     * <code>Region</code> to paint to
1464     * @param g <code>Graphics</code> to paint to
1465     * @param x X coordinate of the area to paint to
1466     * @param y Y coordinate of the area to paint to
1467     * @param w Width of the area to paint to
1468     * @param h Height of the area to paint to
1469     */

1470    public void paintSeparatorBackground(SynthContext JavaDoc context,
1471                                     Graphics g, int x, int y,
1472                                     int w, int h) {
1473        paintBackground(context, g, x, y, w, h, null);
1474    }
1475
1476    /**
1477     * Paints the background of a separator. This implementation invokes the
1478     * method of the same name without the orientation.
1479     *
1480     * @param context SynthContext identifying the <code>JComponent</code> and
1481     * <code>Region</code> to paint to
1482     * @param g <code>Graphics</code> to paint to
1483     * @param x X coordinate of the area to paint to
1484     * @param y Y coordinate of the area to paint to
1485     * @param w Width of the area to paint to
1486     * @param h Height of the area to paint to
1487     * @param orientation One of <code>JSeparator.HORIZONTAL</code> or
1488     * <code>JSeparator.VERTICAL</code>
1489     * @since 1.6
1490     */

1491    public void paintSeparatorBackground(SynthContext JavaDoc context,
1492                                     Graphics g, int x, int y,
1493                                     int w, int h, int orientation) {
1494        paintBackground(context, g, x, y, w, h, orientation);
1495    }
1496
1497    /**
1498     * Paints the border of a separator.
1499     *
1500     * @param context SynthContext identifying the <code>JComponent</code> and
1501     * <code>Region</code> to paint to
1502     * @param g <code>Graphics</code> to paint to
1503     * @param x X coordinate of the area to paint to
1504     * @param y Y coordinate of the area to paint to
1505     * @param w Width of the area to paint to
1506     * @param h Height of the area to paint to
1507     */

1508    public void paintSeparatorBorder(SynthContext JavaDoc context,
1509                                 Graphics g, int x, int y,
1510                                 int w, int h) {
1511        paintBorder(context, g, x, y, w, h, null);
1512    }
1513
1514    /**
1515     * Paints the border of a separator. This implementation invokes the
1516     * method of the same name without the orientation.
1517     *
1518     * @param context SynthContext identifying the <code>JComponent</code> and
1519     * <code>Region</code> to paint to
1520     * @param g <code>Graphics</code> to paint to
1521     * @param x X coordinate of the area to paint to
1522     * @param y Y coordinate of the area to paint to
1523     * @param w Width of the area to paint to
1524     * @param h Height of the area to paint to
1525     * @param orientation One of <code>JSeparator.HORIZONTAL</code> or
1526     * <code>JSeparator.VERTICAL</code>
1527     * @since 1.6
1528     */

1529    public void paintSeparatorBorder(SynthContext JavaDoc context,
1530                                 Graphics g, int x, int y,
1531                                 int w, int h, int orientation) {
1532        paintBorder(context, g, x, y, w, h, orientation);
1533    }
1534
1535    /**
1536     * Paints the foreground of a separator.
1537     *
1538     * @param context SynthContext identifying the <code>JComponent</code> and
1539     * <code>Region</code> to paint to
1540     * @param g <code>Graphics</code> to paint to
1541     * @param x X coordinate of the area to paint to
1542     * @param y Y coordinate of the area to paint to
1543     * @param w Width of the area to paint to
1544     * @param h Height of the area to paint to
1545     * @param orientation One of <code>JSeparator.HORIZONTAL</code> or
1546     * <code>JSeparator.VERTICAL</code>
1547     */

1548    public void paintSeparatorForeground(SynthContext JavaDoc context,
1549                                 Graphics g, int x, int y,
1550                                 int w, int h, int orientation) {
1551        paintForeground(context, g, x, y, w, h, orientation);
1552    }
1553
1554    /**
1555     * Paints the background of a slider.
1556     *
1557     * @param context SynthContext identifying the <code>JComponent</code> and
1558     * <code>Region</code> to paint to
1559     * @param g <code>Graphics</code> to paint to
1560     * @param x X coordinate of the area to paint to
1561     * @param y Y coordinate of the area to paint to
1562     * @param w Width of the area to paint to
1563     * @param h Height of the area to paint to
1564     */

1565    public void paintSliderBackground(SynthContext JavaDoc context,
1566                                     Graphics g, int x, int y,
1567                                     int w, int h) {
1568        paintBackground(context, g, x, y, w, h, null);
1569    }
1570
1571    /**
1572     * Paints the background of a slider. This implementation invokes the
1573     * method of the same name without the orientation.
1574     *
1575     * @param context SynthContext identifying the <code>JComponent</code> and
1576     * <code>Region</code> to paint to
1577     * @param g <code>Graphics</code> to paint to
1578     * @param x X coordinate of the area to paint to
1579     * @param y Y coordinate of the area to paint to
1580     * @param w Width of the area to paint to
1581     * @param h Height of the area to paint to
1582     * @param orientation One of <code>JSlider.HORIZONTAL</code> or
1583     * <code>JSlider.VERTICAL</code>
1584     * @since 1.6
1585     */

1586    public void paintSliderBackground(SynthContext JavaDoc context,
1587                                     Graphics g, int x, int y,
1588                                     int w, int h, int orientation) {
1589        paintBackground(context, g, x, y, w, h, orientation);
1590    }
1591
1592    /**
1593     * Paints the border of a slider.
1594     *
1595     * @param context SynthContext identifying the <code>JComponent</code> and
1596     * <code>Region</code> to paint to
1597     * @param g <code>Graphics</code> to paint to
1598     * @param x X coordinate of the area to paint to
1599     * @param y Y coordinate of the area to paint to
1600     * @param w Width of the area to paint to
1601     * @param h Height of the area to paint to
1602     */

1603    public void paintSliderBorder(SynthContext JavaDoc context,
1604                                 Graphics g, int x, int y,
1605                                 int w, int h) {
1606        paintBorder(context, g, x, y, w, h, null);
1607    }
1608
1609    /**
1610     * Paints the border of a slider. This implementation invokes the
1611     * method of the same name without the orientation.
1612     *
1613     * @param context SynthContext identifying the <code>JComponent</code> and
1614     * <code>Region</code> to paint to
1615     * @param g <code>Graphics</code> to paint to
1616     * @param x X coordinate of the area to paint to
1617     * @param y Y coordinate of the area to paint to
1618     * @param w Width of the area to paint to
1619     * @param h Height of the area to paint to
1620     * @param orientation One of <code>JSlider.HORIZONTAL</code> or
1621     * <code>JSlider.VERTICAL</code>
1622     * @since 1.6
1623     */

1624    public void paintSliderBorder(SynthContext JavaDoc context,
1625                                 Graphics g, int x, int y,
1626                                 int w, int h, int orientation) {
1627        paintBorder(context, g, x, y, w, h, orientation);
1628    }
1629
1630    /**
1631     * Paints the background of the thumb of a slider.
1632     *
1633     * @param context SynthContext identifying the <code>JComponent</code> and
1634     * <code>Region</code> to paint to
1635     * @param g <code>Graphics</code> to paint to
1636     * @param x X coordinate of the area to paint to
1637     * @param y Y coordinate of the area to paint to
1638     * @param w Width of the area to paint to
1639     * @param h Height of the area to paint to
1640     * @param orientation One of <code>JSlider.HORIZONTAL</code> or
1641     * <code>JSlider.VERTICAL</code>
1642     */

1643    public void paintSliderThumbBackground(SynthContext JavaDoc context,
1644                                     Graphics g, int x, int y,
1645                                     int w, int h, int orientation) {
1646        if (context.getComponent().getClientProperty(
1647                "Slider.paintThumbArrowShape") == Boolean.TRUE){
1648            if (orientation == JSlider.HORIZONTAL){
1649                orientation = JSlider.VERTICAL;
1650            } else {
1651                orientation = JSlider.HORIZONTAL;
1652            }
1653            paintBackground(context, g, x, y, w, h, orientation);
1654        } else {
1655            paintBackground(context, g, x, y, w, h, orientation);
1656        }
1657    }
1658
1659    /**
1660     * Paints the border of the thumb of a slider.
1661     *
1662     * @param context SynthContext identifying the <code>JComponent</code> and
1663     * <code>Region</code> to paint to
1664     * @param g <code>Graphics</code> to paint to
1665     * @param x X coordinate of the area to paint to
1666     * @param y Y coordinate of the area to paint to
1667     * @param w Width of the area to paint to
1668     * @param h Height of the area to paint to
1669     * @param orientation One of <code>JSlider.HORIZONTAL</code> or
1670     * <code>JSlider.VERTICAL</code>
1671     */

1672    public void paintSliderThumbBorder(SynthContext JavaDoc context,
1673                                 Graphics g, int x, int y,
1674                                 int w, int h, int orientation) {
1675        paintBorder(context, g, x, y, w, h, orientation);
1676    }
1677
1678    /**
1679     * Paints the background of the track of a slider.
1680     *
1681     * @param context SynthContext identifying the <code>JComponent</code> and
1682     * <code>Region</code> to paint to
1683     * @param g <code>Graphics</code> to paint to
1684     * @param x X coordinate of the area to paint to
1685     * @param y Y coordinate of the area to paint to
1686     * @param w Width of the area to paint to
1687     * @param h Height of the area to paint to
1688     */

1689    public void paintSliderTrackBackground(SynthContext JavaDoc context,
1690                                     Graphics g, int x, int y,
1691                                     int w, int h) {
1692        paintBackground(context, g, x, y, w, h, null);
1693    }
1694
1695    /**
1696     * Paints the background of the track of a slider. This implementation invokes
1697     * the method of the same name without the orientation.
1698     *
1699     * @param context SynthContext identifying the <code>JComponent</code> and
1700     * <code>Region</code> to paint to
1701     * @param g <code>Graphics</code> to paint to
1702     * @param x X coordinate of the area to paint to
1703     * @param y Y coordinate of the area to paint to
1704     * @param w Width of the area to paint to
1705     * @param h Height of the area to paint to
1706     * @param orientation One of <code>JSlider.HORIZONTAL</code> or
1707     * <code>JSlider.VERTICAL</code>
1708     * @since 1.6
1709     */

1710    public void paintSliderTrackBackground(SynthContext JavaDoc context,
1711                                     Graphics g, int x, int y,
1712                                     int w, int h, int orientation) {
1713        paintBackground(context, g, x, y, w, h, orientation);
1714    }
1715
1716    /**
1717     * Paints the border of the track of a slider.
1718     *
1719     * @param context SynthContext identifying the <code>JComponent</code> and
1720     * <code>Region</code> to paint to
1721     * @param g <code>Graphics</code> to paint to
1722     * @param x X coordinate of the area to paint to
1723     * @param y Y coordinate of the area to paint to
1724     * @param w Width of the area to paint to
1725     * @param h Height of the area to paint to
1726     */

1727    public void paintSliderTrackBorder(SynthContext JavaDoc context,
1728                                 Graphics g, int x, int y,
1729                                 int w, int h) {
1730        paintBorder(context, g, x, y, w, h, null);
1731    }
1732
1733    /**
1734     * Paints the border of the track of a slider. This implementation invokes the
1735     * method of the same name without the orientation.
1736     *
1737     * @param context SynthContext identifying the <code>JComponent</code> and
1738     * <code>Region</code> to paint to
1739     * @param g <code>Graphics</code> to paint to
1740     * @param x X coordinate of the area to paint to
1741     * @param y Y coordinate of the area to paint to
1742     * @param w Width of the area to paint to
1743     * @param h Height of the area to paint to
1744     * @param orientation One of <code>JSlider.HORIZONTAL</code> or
1745     * <code>JSlider.VERTICAL</code>
1746     * @since 1.6
1747     */

1748    public void paintSliderTrackBorder(SynthContext JavaDoc context,
1749                                 Graphics g, int x, int y,
1750                                 int w, int h, int orientation) {
1751        paintBorder(context, g, x, y, w, h, orientation);
1752    }
1753
1754    /**
1755     * Paints the background of a spinner.
1756     *
1757     * @param context SynthContext identifying the <code>JComponent</code> and
1758     * <code>Region</code> to paint to
1759     * @param g <code>Graphics</code> to paint to
1760     * @param x X coordinate of the area to paint to
1761     * @param y Y coordinate of the area to paint to
1762     * @param w Width of the area to paint to
1763     * @param h Height of the area to paint to
1764     */

1765    public void paintSpinnerBackground(SynthContext JavaDoc context,
1766                                     Graphics g, int x, int y,
1767                                     int w, int h) {
1768        paintBackground(context, g, x, y, w, h, null);
1769    }
1770
1771    /**
1772     * Paints the border of a spinner.
1773     *
1774     * @param context SynthContext identifying the <code>JComponent</code> and
1775     * <code>Region</code> to paint to
1776     * @param g <code>Graphics</code> to paint to
1777     * @param x X coordinate of the area to paint to
1778     * @param y Y coordinate of the area to paint to
1779     * @param w Width of the area to paint to
1780     * @param h Height of the area to paint to
1781     */

1782    public void paintSpinnerBorder(SynthContext JavaDoc context,
1783                                 Graphics g, int x, int y,
1784                                 int w, int h) {
1785        paintBorder(context, g, x, y, w, h, null);
1786    }
1787
1788    /**
1789     * Paints the background of the divider of a split pane.
1790     *
1791     * @param context SynthContext identifying the <code>JComponent</code> and
1792     * <code>Region</code> to paint to
1793     * @param g <code>Graphics</code> to paint to
1794     * @param x X coordinate of the area to paint to
1795     * @param y Y coordinate of the area to paint to
1796     * @param w Width of the area to paint to
1797     * @param h Height of the area to paint to
1798     */

1799    public void paintSplitPaneDividerBackground(SynthContext JavaDoc context,
1800                                     Graphics g, int x, int y,
1801                                     int w, int h) {
1802        paintBackground(context, g, x, y, w, h, null);
1803    }
1804
1805    /**
1806     * Paints the background of the divider of a split pane. This implementation
1807     * invokes the method of the same name without the orientation.
1808     *
1809     * @param context SynthContext identifying the <code>JComponent</code> and
1810     * <code>Region</code> to paint to
1811     * @param g <code>Graphics</code> to paint to
1812     * @param x X coordinate of the area to paint to
1813     * @param y Y coordinate of the area to paint to
1814     * @param w Width of the area to paint to
1815     * @param h Height of the area to paint to
1816     * @param orientation One of <code>JSplitPane.HORIZONTAL_SPLIT</code> or
1817     * <code>JSplitPane.VERTICAL_SPLIT</code>
1818     * @since 1.6
1819     */

1820    public void paintSplitPaneDividerBackground(SynthContext JavaDoc context,
1821                                     Graphics g, int x, int y,
1822                                     int w, int h, int orientation) {
1823       if (orientation == JSplitPane.HORIZONTAL_SPLIT) {
1824            AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
1825            transform.scale(-1, 1);
1826            transform.rotate(Math.toRadians(90));
1827            paintBackground(context, g, y, x, h, w, transform);
1828       } else {
1829            paintBackground(context, g, x, y, w, h, null);
1830        }
1831    }
1832
1833    /**
1834     * Paints the foreground of the divider of a split pane.
1835     *
1836     * @param context SynthContext identifying the <code>JComponent</code> and
1837     * <code>Region</code> to paint to
1838     * @param g <code>Graphics</code> to paint to
1839     * @param x X coordinate of the area to paint to
1840     * @param y Y coordinate of the area to paint to
1841     * @param w Width of the area to paint to
1842     * @param h Height of the area to paint to
1843     * @param orientation One of <code>JSplitPane.HORIZONTAL_SPLIT</code> or
1844     * <code>JSplitPane.VERTICAL_SPLIT</code>
1845     */

1846    public void paintSplitPaneDividerForeground(SynthContext JavaDoc context,
1847                                     Graphics g, int x, int y,
1848                                     int w, int h, int orientation) {
1849        paintForeground(context, g, x, y, w, h, null);
1850    }
1851
1852    /**
1853     * Paints the divider, when the user is dragging the divider, of a
1854     * split pane.
1855     *
1856     * @param context SynthContext identifying the <code>JComponent</code> and
1857     * <code>Region</code> to paint to
1858     * @param g <code>Graphics</code> to paint to
1859     * @param x X coordinate of the area to paint to
1860     * @param y Y coordinate of the area to paint to
1861     * @param w Width of the area to paint to
1862     * @param h Height of the area to paint to
1863     * @param orientation One of <code>JSplitPane.HORIZONTAL_SPLIT</code> or
1864     * <code>JSplitPane.VERTICAL_SPLIT</code>
1865     */

1866    public void paintSplitPaneDragDivider(SynthContext JavaDoc context,
1867                                     Graphics g, int x, int y,
1868                                     int w, int h, int orientation) {
1869        paintBackground(context, g, x, y, w, h, null);
1870    }
1871
1872    /**
1873     * Paints the background of a split pane.
1874     *
1875     * @param context SynthContext identifying the <code>JComponent</code> and
1876     * <code>Region</code> to paint to
1877     * @param g <code>Graphics</code> to paint to
1878     * @param x X coordinate of the area to paint to
1879     * @param y Y coordinate of the area to paint to
1880     * @param w Width of the area to paint to
1881     * @param h Height of the area to paint to
1882     */

1883    public void paintSplitPaneBackground(SynthContext JavaDoc context,
1884                                     Graphics g, int x, int y,
1885                                     int w, int h) {
1886        paintBackground(context, g, x, y, w, h, null);
1887    }
1888
1889    /**
1890     * Paints the border of a split pane.
1891     *
1892     * @param context SynthContext identifying the <code>JComponent</code> and
1893     * <code>Region</code> to paint to
1894     * @param g <code>Graphics</code> to paint to
1895     * @param x X coordinate of the area to paint to
1896     * @param y Y coordinate of the area to paint to
1897     * @param w Width of the area to paint to
1898     * @param h Height of the area to paint to
1899     */

1900    public void paintSplitPaneBorder(SynthContext JavaDoc context,
1901                                 Graphics g, int x, int y,
1902                                 int w, int h) {
1903        paintBorder(context, g, x, y, w, h, null);
1904    }
1905
1906    /**
1907     * Paints the background of a tabbed pane.
1908     *
1909     * @param context SynthContext identifying the <code>JComponent</code> and
1910     * <code>Region</code> to paint to
1911     * @param g <code>Graphics</code> to paint to
1912     * @param x X coordinate of the area to paint to
1913     * @param y Y coordinate of the area to paint to
1914     * @param w Width of the area to paint to
1915     * @param h Height of the area to paint to
1916     */

1917    public void paintTabbedPaneBackground(SynthContext JavaDoc context,
1918                                     Graphics g, int x, int y,
1919                                     int w, int h) {
1920        paintBackground(context, g, x, y, w, h, null);
1921    }
1922
1923    /**
1924     * Paints the border of a tabbed pane.
1925     *
1926     * @param context SynthContext identifying the <code>JComponent</code> and
1927     * <code>Region</code> to paint to
1928     * @param g <code>Graphics</code> to paint to
1929     * @param x X coordinate of the area to paint to
1930     * @param y Y coordinate of the area to paint to
1931     * @param w Width of the area to paint to
1932     * @param h Height of the area to paint to
1933     */

1934    public void paintTabbedPaneBorder(SynthContext JavaDoc context,
1935                                 Graphics g, int x, int y,
1936                                 int w, int h) {
1937        paintBorder(context, g, x, y, w, h, null);
1938    }
1939
1940    /**
1941     * Paints the background of the area behind the tabs of a tabbed pane.
1942     *
1943     * @param context SynthContext identifying the <code>JComponent</code> and
1944     * <code>Region</code> to paint to
1945     * @param g <code>Graphics</code> to paint to
1946     * @param x X coordinate of the area to paint to
1947     * @param y Y coordinate of the area to paint to
1948     * @param w Width of the area to paint to
1949     * @param h Height of the area to paint to
1950     */

1951    public void paintTabbedPaneTabAreaBackground(SynthContext JavaDoc context,
1952                                     Graphics g, int x, int y,
1953                                     int w, int h) {
1954        paintBackground(context, g, x, y, w, h, null);
1955    }
1956
1957    /**
1958     * Paints the background of the area behind the tabs of a tabbed pane.
1959     * This implementation invokes the method of the same name without the
1960     * orientation.
1961     *
1962     * @param context SynthContext identifying the <code>JComponent</code> and
1963     * <code>Region</code> to paint to
1964     * @param g <code>Graphics</code> to paint to
1965     * @param x X coordinate of the area to paint to
1966     * @param y Y coordinate of the area to paint to
1967     * @param w Width of the area to paint to
1968     * @param h Height of the area to paint to
1969     * @param orientation One of <code>JTabbedPane.TOP</code>,
1970     * <code>JTabbedPane.LEFT</code>,
1971     * <code>JTabbedPane.BOTTOM</code>, or
1972     * <code>JTabbedPane.RIGHT</code>
1973     * @since 1.6
1974     */

1975    public void paintTabbedPaneTabAreaBackground(SynthContext JavaDoc context,
1976                                     Graphics g, int x, int y,
1977                                     int w, int h, int orientation) {
1978        if (orientation == JTabbedPane.LEFT) {
1979            AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
1980            transform.scale(-1, 1);
1981            transform.rotate(Math.toRadians(90));
1982            paintBackground(context, g, y, x, h, w, transform);
1983        } else if (orientation == JTabbedPane.RIGHT) {
1984            AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
1985            transform.rotate(Math.toRadians(90));
1986            transform.translate(0, -(x + w));
1987            paintBackground(context, g, y, 0, h, w, transform);
1988        } else if (orientation == JTabbedPane.BOTTOM) {
1989            AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
1990            transform.translate(x,y);
1991            transform.scale(1, -1);
1992            transform.translate(0,-h);
1993            paintBackground(context, g, 0, 0, w, h, transform);
1994        } else {
1995            paintBackground(context, g, x, y, w, h, null);
1996        }
1997    }
1998
1999    /**
2000     * Paints the border of the area behind the tabs of a tabbed pane.
2001     *
2002     * @param context SynthContext identifying the <code>JComponent</code> and
2003     * <code>Region</code> to paint to
2004     * @param g <code>Graphics</code> to paint to
2005     * @param x X coordinate of the area to paint to
2006     * @param y Y coordinate of the area to paint to
2007     * @param w Width of the area to paint to
2008     * @param h Height of the area to paint to
2009     */

2010    public void paintTabbedPaneTabAreaBorder(SynthContext JavaDoc context,
2011                                 Graphics g, int x, int y,
2012                                 int w, int h) {
2013        paintBorder(context, g, x, y, w, h, null);
2014    }
2015
2016    /**
2017     * Paints the border of the area behind the tabs of a tabbed pane. This
2018     * implementation invokes the method of the same name without the orientation.
2019     *
2020     * @param context SynthContext identifying the <code>JComponent</code> and
2021     * <code>Region</code> to paint to
2022     * @param g <code>Graphics</code> to paint to
2023     * @param x X coordinate of the area to paint to
2024     * @param y Y coordinate of the area to paint to
2025     * @param w Width of the area to paint to
2026     * @param h Height of the area to paint to
2027     * @param orientation One of <code>JTabbedPane.TOP</code>,
2028     * <code>JTabbedPane.LEFT</code>,
2029     * <code>JTabbedPane.BOTTOM</code>, or
2030     * <code>JTabbedPane.RIGHT</code>
2031     * @since 1.6
2032     */

2033    public void paintTabbedPaneTabAreaBorder(SynthContext JavaDoc context,
2034                                 Graphics g, int x, int y,
2035                                 int w, int h, int orientation) {
2036        paintBorder(context, g, x, y, w, h, null);
2037    }
2038
2039    /**
2040     * Paints the background of a tab of a tabbed pane.
2041     *
2042     * @param context SynthContext identifying the <code>JComponent</code> and
2043     * <code>Region</code> to paint to
2044     * @param g <code>Graphics</code> to paint to
2045     * @param x X coordinate of the area to paint to
2046     * @param y Y coordinate of the area to paint to
2047     * @param w Width of the area to paint to
2048     * @param h Height of the area to paint to
2049     * @param tabIndex Index of tab being painted.
2050     */

2051    public void paintTabbedPaneTabBackground(SynthContext JavaDoc context, Graphics g,
2052                                         int x, int y, int w, int h,
2053                                         int tabIndex) {
2054        paintBackground(context, g, x, y, w, h, null);
2055    }
2056
2057    /**
2058     * Paints the background of a tab of a tabbed pane. This implementation
2059     * invokes the method of the same name without the orientation.
2060     *
2061     * @param context SynthContext identifying the <code>JComponent</code> and
2062     * <code>Region</code> to paint to
2063     * @param g <code>Graphics</code> to paint to
2064     * @param x X coordinate of the area to paint to
2065     * @param y Y coordinate of the area to paint to
2066     * @param w Width of the area to paint to
2067     * @param h Height of the area to paint to
2068     * @param tabIndex Index of tab being painted.
2069     * @param orientation One of <code>JTabbedPane.TOP</code>,
2070     * <code>JTabbedPane.LEFT</code>,
2071     * <code>JTabbedPane.BOTTOM</code>, or
2072     * <code>JTabbedPane.RIGHT</code>
2073     * @since 1.6
2074     */

2075    public void paintTabbedPaneTabBackground(SynthContext JavaDoc context, Graphics g,
2076                                         int x, int y, int w, int h,
2077                                         int tabIndex, int orientation) {
2078        if (orientation == JTabbedPane.LEFT) {
2079            AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
2080            transform.scale(-1, 1);
2081            transform.rotate(Math.toRadians(90));
2082            paintBackground(context, g, y, x, h, w, transform);
2083        } else if (orientation == JTabbedPane.RIGHT) {
2084            AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
2085            transform.rotate(Math.toRadians(90));
2086            transform.translate(0, -(x + w));
2087            paintBackground(context, g, y, 0, h, w, transform);
2088        } else if (orientation == JTabbedPane.BOTTOM) {
2089            AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
2090            transform.translate(x,y);
2091            transform.scale(1, -1);
2092            transform.translate(0,-h);
2093            paintBackground(context, g, 0, 0, w, h, transform);
2094        } else {
2095            paintBackground(context, g, x, y, w, h, null);
2096        }
2097    }
2098
2099    /**
2100     * Paints the border of a tab of a tabbed pane.
2101     *
2102     * @param context SynthContext identifying the <code>JComponent</code> and
2103     * <code>Region</code> to paint to
2104     * @param g <code>Graphics</code> to paint to
2105     * @param x X coordinate of the area to paint to
2106     * @param y Y coordinate of the area to paint to
2107     * @param w Width of the area to paint to
2108     * @param h Height of the area to paint to
2109     * @param tabIndex Index of tab being painted.
2110     */

2111    public void paintTabbedPaneTabBorder(SynthContext JavaDoc context, Graphics g,
2112                                         int x, int y, int w, int h,
2113                                         int tabIndex) {
2114        paintBorder(context, g, x, y, w, h, null);
2115    }
2116
2117    /**
2118     * Paints the border of a tab of a tabbed pane. This implementation invokes
2119     * the method of the same name without the orientation.
2120     *
2121     * @param context SynthContext identifying the <code>JComponent</code> and
2122     * <code>Region</code> to paint to
2123     * @param g <code>Graphics</code> to paint to
2124     * @param x X coordinate of the area to paint to
2125     * @param y Y coordinate of the area to paint to
2126     * @param w Width of the area to paint to
2127     * @param h Height of the area to paint to
2128     * @param tabIndex Index of tab being painted.
2129     * @param orientation One of <code>JTabbedPane.TOP</code>,
2130     * <code>JTabbedPane.LEFT</code>,
2131     * <code>JTabbedPane.BOTTOM</code>, or
2132     * <code>JTabbedPane.RIGHT</code>
2133     * @since 1.6
2134     */

2135    public void paintTabbedPaneTabBorder(SynthContext JavaDoc context, Graphics g,
2136                                         int x, int y, int w, int h,
2137                                         int tabIndex, int orientation) {
2138        paintBorder(context, g, x, y, w, h, null);
2139    }
2140
2141    /**
2142     * Paints the background of the area that contains the content of the
2143     * selected tab of a tabbed pane.
2144     *
2145     * @param context SynthContext identifying the <code>JComponent</code> and
2146     * <code>Region</code> to paint to
2147     * @param g <code>Graphics</code> to paint to
2148     * @param x X coordinate of the area to paint to
2149     * @param y Y coordinate of the area to paint to
2150     * @param w Width of the area to paint to
2151     * @param h Height of the area to paint to
2152     */

2153    public void paintTabbedPaneContentBackground(SynthContext JavaDoc context,
2154                                         Graphics g, int x, int y, int w,
2155                                         int h) {
2156        paintBackground(context, g, x, y, w, h, null);
2157    }
2158
2159    /**
2160     * Paints the border of the area that contains the content of the
2161     * selected tab of a tabbed pane.
2162     *
2163     * @param context SynthContext identifying the <code>JComponent</code> and
2164     * <code>Region</code> to paint to
2165     * @param g <code>Graphics</code> to paint to
2166     * @param x X coordinate of the area to paint to
2167     * @param y Y coordinate of the area to paint to
2168     * @param w Width of the area to paint to
2169     * @param h Height of the area to paint to
2170     */

2171    public void paintTabbedPaneContentBorder(SynthContext JavaDoc context, Graphics g,
2172                                         int x, int y, int w, int h) {
2173        paintBorder(context, g, x, y, w, h, null);
2174    }
2175
2176    /**
2177     * Paints the background of the header of a table.
2178     *
2179     * @param context SynthContext identifying the <code>JComponent</code> and
2180     * <code>Region</code> to paint to
2181     * @param g <code>Graphics</code> to paint to
2182     * @param x X coordinate of the area to paint to
2183     * @param y Y coordinate of the area to paint to
2184     * @param w Width of the area to paint to
2185     * @param h Height of the area to paint to
2186     */

2187    public void paintTableHeaderBackground(SynthContext JavaDoc context,
2188                                     Graphics g, int x, int y,
2189                                     int w, int h) {
2190        paintBackground(context, g, x, y, w, h, null);
2191    }
2192
2193    /**
2194     * Paints the border of the header of a table.
2195     *
2196     * @param context SynthContext identifying the <code>JComponent</code> and
2197     * <code>Region</code> to paint to
2198     * @param g <code>Graphics</code> to paint to
2199     * @param x X coordinate of the area to paint to
2200     * @param y Y coordinate of the area to paint to
2201     * @param w Width of the area to paint to
2202     * @param h Height of the area to paint to
2203     */

2204    public void paintTableHeaderBorder(SynthContext JavaDoc context,
2205                                 Graphics g, int x, int y,
2206                                 int w, int h) {
2207        paintBorder(context, g, x, y, w, h, null);
2208    }
2209
2210    /**
2211     * Paints the background of a table.
2212     *
2213     * @param context SynthContext identifying the <code>JComponent</code> and
2214     * <code>Region</code> to paint to
2215     * @param g <code>Graphics</code> to paint to
2216     * @param x X coordinate of the area to paint to
2217     * @param y Y coordinate of the area to paint to
2218     * @param w Width of the area to paint to
2219     * @param h Height of the area to paint to
2220     */

2221    public void paintTableBackground(SynthContext JavaDoc context,
2222                                     Graphics g, int x, int y,
2223                                     int w, int h) {
2224        paintBackground(context, g, x, y, w, h, null);
2225    }
2226
2227    /**
2228     * Paints the border of a table.
2229     *
2230     * @param context SynthContext identifying the <code>JComponent</code> and
2231     * <code>Region</code> to paint to
2232     * @param g <code>Graphics</code> to paint to
2233     * @param x X coordinate of the area to paint to
2234     * @param y Y coordinate of the area to paint to
2235     * @param w Width of the area to paint to
2236     * @param h Height of the area to paint to
2237     */

2238    public void paintTableBorder(SynthContext JavaDoc context,
2239                                 Graphics g, int x, int y,
2240                                 int w, int h) {
2241        paintBorder(context, g, x, y, w, h, null);
2242    }
2243
2244    /**
2245     * Paints the background of a text area.
2246     *
2247     * @param context SynthContext identifying the <code>JComponent</code> and
2248     * <code>Region</code> to paint to
2249     * @param g <code>Graphics</code> to paint to
2250     * @param x X coordinate of the area to paint to
2251     * @param y Y coordinate of the area to paint to
2252     * @param w Width of the area to paint to
2253     * @param h Height of the area to paint to
2254     */

2255    public void paintTextAreaBackground(SynthContext JavaDoc context,
2256                                     Graphics g, int x, int y,
2257                                     int w, int h) {
2258        paintBackground(context, g, x, y, w, h, null);
2259    }
2260
2261    /**
2262     * Paints the border of a text area.
2263     *
2264     * @param context SynthContext identifying the <code>JComponent</code> and
2265     * <code>Region</code> to paint to
2266     * @param g <code>Graphics</code> to paint to
2267     * @param x X coordinate of the area to paint to
2268     * @param y Y coordinate of the area to paint to
2269     * @param w Width of the area to paint to
2270     * @param h Height of the area to paint to
2271     */

2272    public void paintTextAreaBorder(SynthContext JavaDoc context,
2273                                 Graphics g, int x, int y,
2274                                 int w, int h) {
2275        paintBorder(context, g, x, y, w, h, null);
2276    }
2277
2278    /**
2279     * Paints the background of a text pane.
2280     *
2281     * @param context SynthContext identifying the <code>JComponent</code> and
2282     * <code>Region</code> to paint to
2283     * @param g <code>Graphics</code> to paint to
2284     * @param x X coordinate of the area to paint to
2285     * @param y Y coordinate of the area to paint to
2286     * @param w Width of the area to paint to
2287     * @param h Height of the area to paint to
2288     */

2289    public void paintTextPaneBackground(SynthContext JavaDoc context,
2290                                     Graphics g, int x, int y,
2291                                     int w, int h) {
2292        paintBackground(context, g, x, y, w, h, null);
2293    }
2294
2295    /**
2296     * Paints the border of a text pane.
2297     *
2298     * @param context SynthContext identifying the <code>JComponent</code> and
2299     * <code>Region</code> to paint to
2300     * @param g <code>Graphics</code> to paint to
2301     * @param x X coordinate of the area to paint to
2302     * @param y Y coordinate of the area to paint to
2303     * @param w Width of the area to paint to
2304     * @param h Height of the area to paint to
2305     */

2306    public void paintTextPaneBorder(SynthContext JavaDoc context,
2307                                 Graphics g, int x, int y,
2308                                 int w, int h) {
2309        paintBorder(context, g, x, y, w, h, null);
2310    }
2311
2312    /**
2313     * Paints the background of a text field.
2314     *
2315     * @param context SynthContext identifying the <code>JComponent</code> and
2316     * <code>Region</code> to paint to
2317     * @param g <code>Graphics</code> to paint to
2318     * @param x X coordinate of the area to paint to
2319     * @param y Y coordinate of the area to paint to
2320     * @param w Width of the area to paint to
2321     * @param h Height of the area to paint to
2322     */

2323    public void paintTextFieldBackground(SynthContext JavaDoc context,
2324                                          Graphics g, int x, int y,
2325                                          int w, int h) {
2326        if (context.getComponent().getComponentOrientation().isLeftToRight()){
2327            paintBackground(context, g, x, y, w, h, null);
2328        } else {
2329            AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
2330            transform.translate(x,y);
2331            transform.scale(-1, 1);
2332            transform.translate(-w,0);
2333            paintBackground(context, g, 0, 0, w, h, transform);
2334        }
2335    }
2336
2337    /**
2338     * Paints the border of a text field.
2339     *
2340     * @param context SynthContext identifying the <code>JComponent</code> and
2341     * <code>Region</code> to paint to
2342     * @param g <code>Graphics</code> to paint to
2343     * @param x X coordinate of the area to paint to
2344     * @param y Y coordinate of the area to paint to
2345     * @param w Width of the area to paint to
2346     * @param h Height of the area to paint to
2347     */

2348    public void paintTextFieldBorder(SynthContext JavaDoc context,
2349                                      Graphics g, int x, int y,
2350                                      int w, int h) {
2351        if (context.getComponent().getComponentOrientation().isLeftToRight()){
2352            paintBorder(context, g, x, y, w, h, null);
2353        } else {
2354            AffineTransform JavaDoc transform = new AffineTransform JavaDoc();
2355            transform.translate(x,y);
2356            transform.scale(-1, 1);
2357            transform.translate(-w,0);
2358            paintBorder(context, g, 0, 0, w, h, transform);
2359        }
2360    }
2361
2362    /**
2363     * Paints the background of a toggle button.
2364     *
2365     * @param context SynthContext identifying the <code>JComponent</code> and
2366     * <code>Region</code> to paint to
2367     * @param g <code>Graphics</code> to paint to
2368     * @param x X coordinate of the area to paint to
2369     * @param y Y coordinate of the area to paint to
2370     * @param w Width of the area to paint to
2371     * @param h Height of the area to paint to
2372     */

2373    public void paintToggleButtonBackground(SynthContext JavaDoc context,
2374                                     Graphics g, int x, int y,
2375                                     int w, int h) {
2376        paintBackground(context, g, x, y, w, h, null);
2377    }
2378
2379    /**
2380     * Paints the border of a toggle button.
2381     *
2382     * @param context SynthContext identifying the <code>JComponent</code> and
2383     * <code>Region</code> to paint to
2384     * @param g <code>Graphics</code> to paint to
2385     * @param x X coordinate of the area to paint to
2386     * @param y Y coordinate of the area to paint to
2387     * @param w Width of the area to paint to
2388     * @param h Height of the area to paint to
2389     */

2390    public void paintToggleButtonBorder(SynthContext JavaDoc context,
2391                                 Graphics g, int x, int y,
2392                                 int w, int h) {
2393        paintBorder(context, g, x, y, w, h, null);
2394    }
2395
2396    /**
2397     * Paints the background of a tool bar.
2398     *
2399     * @param context SynthContext identifying the <code>JComponent</code> and
2400     * <code>Region</code> to paint to
2401     * @param g <code>Graphics</code> to paint to
2402     * @param x X coordinate of the area to paint to
2403     * @param y Y coordinate of the area to paint to
2404     * @param w Width of the area to paint to
2405     * @param h Height of the area to paint to
2406     */

2407    public void paintToolBarBackground(SynthContext JavaDoc context,
2408                                     Graphics g, int x, int y,
2409                                     int w, int h) {
2410        paintBackground(context, g, x, y, w, h, null);
2411    }
2412
2413    /**
2414     * Paints the background of a tool bar. This implementation invokes the
2415     * method of the same name without the orientation.
2416     *
2417     * @param context SynthContext identifying the <code>JComponent</code> and
2418     * <code>Region</code> to paint to
2419     * @param g <code>Graphics</code> to paint to
2420     * @param x X coordinate of the area to paint to
2421     * @param y Y coordinate of the area to paint to
2422     * @param w Width of the area to paint to
2423     * @param h Height of the area to paint to
2424     * @param orientation One of <code>JToolBar.HORIZONTAL</code> or
2425     * <code>JToolBar.VERTICAL</code>
2426     * @since 1.6
2427     */

2428    public void paintToolBarBackground(SynthContext JavaDoc context,
2429                                     Graphics g, int x, int y,
2430                                     int w, int h, int orientation) {
2431        paintBackground(context, g, x, y, w, h, orientation);
2432    }
2433
2434    /**
2435     * Paints the border of a tool bar.
2436     *
2437     * @param context SynthContext identifying the <code>JComponent</code> and
2438     * <code>Region</code> to paint to
2439     * @param g <code>Graphics</code> to paint to
2440     * @param x X coordinate of the area to paint to
2441     * @param y Y coordinate of the area to paint to
2442     * @param w Width of the area to paint to
2443     * @param h Height of the area to paint to
2444     */

2445    public void paintToolBarBorder(SynthContext JavaDoc context,
2446                                 Graphics g, int x, int y,
2447                                 int w, int h) {
2448        paintBorder(context, g, x, y, w, h, null);
2449    }
2450
2451    /**
2452     * Paints the border of a tool bar. This implementation invokes the
2453     * method of the same name without the orientation.
2454     *
2455     * @param context SynthContext identifying the <code>JComponent</code> and
2456     * <code>Region</code> to paint to
2457     * @param g <code>Graphics</code> to paint to
2458     * @param x X coordinate of the area to paint to
2459     * @param y Y coordinate of the area to paint to
2460     * @param w Width of the area to paint to
2461     * @param h Height of the area to paint to
2462     * @param orientation One of <code>JToolBar.HORIZONTAL</code> or
2463     * <code>JToolBar.VERTICAL</code>
2464     * @since 1.6
2465     */

2466    public void paintToolBarBorder(SynthContext JavaDoc context,
2467                                 Graphics g, int x, int y,
2468                                 int w, int h, int orientation) {
2469        paintBorder(context, g, x, y, w, h, orientation);
2470    }
2471
2472    /**
2473     * Paints the background of the tool bar's content area.
2474     *
2475     * @param context SynthContext identifying the <code>JComponent</code> and
2476     * <code>Region</code> to paint to
2477     * @param g <code>Graphics</code> to paint to
2478     * @param x X coordinate of the area to paint to
2479     * @param y Y coordinate of the area to paint to
2480     * @param w Width of the area to paint to
2481     * @param h Height of the area to paint to
2482     */

2483    public void paintToolBarContentBackground(SynthContext JavaDoc context,
2484                                     Graphics g, int x, int y,
2485                                     int w, int h) {
2486        paintBackground(context, g, x, y, w, h, null);
2487    }
2488
2489    /**
2490     * Paints the background of the tool bar's content area. This implementation
2491     * invokes the method of the same name without the orientation.
2492     *
2493     * @param context SynthContext identifying the <code>JComponent</code> and
2494     * <code>Region</code> to paint to
2495     * @param g <code>Graphics</code> to paint to
2496     * @param x X coordinate of the area to paint to
2497     * @param y Y coordinate of the area to paint to
2498     * @param w Width of the area to paint to
2499     * @param h Height of the area to paint to
2500     * @param orientation One of <code>JToolBar.HORIZONTAL</code> or
2501     * <code>JToolBar.VERTICAL</code>
2502     * @since 1.6
2503     */

2504    public void paintToolBarContentBackground(SynthContext JavaDoc context,
2505                                     Graphics g, int x, int y,
2506                                     int w, int h, int orientation) {
2507        paintBackground(context, g, x, y, w, h, orientation);
2508    }
2509
2510    /**
2511     * Paints the border of the content area of a tool bar.
2512     *
2513     * @param context SynthContext identifying the <code>JComponent</code> and
2514     * <code>Region</code> to paint to
2515     * @param g <code>Graphics</code> to paint to
2516     * @param x X coordinate of the area to paint to
2517     * @param y Y coordinate of the area to paint to
2518     * @param w Width of the area to paint to
2519     * @param h Height of the area to paint to
2520     */

2521    public void paintToolBarContentBorder(SynthContext JavaDoc context,
2522                                 Graphics g, int x, int y,
2523                                 int w, int h) {
2524        paintBorder(context, g, x, y, w, h, null);
2525    }
2526
2527    /**
2528     * Paints the border of the content area of a tool bar. This implementation
2529     * invokes the method of the same name without the orientation.
2530     *
2531     * @param context SynthContext identifying the <code>JComponent</code> and
2532     * <code>Region</code> to paint to
2533     * @param g <code>Graphics</code> to paint to
2534     * @param x X coordinate of the area to paint to
2535     * @param y Y coordinate of the area to paint to
2536     * @param w Width of the area to paint to
2537     * @param h Height of the area to paint to
2538     * @param orientation One of <code>JToolBar.HORIZONTAL</code> or
2539     * <code>JToolBar.VERTICAL</code>
2540     * @since 1.6
2541     */

2542    public void paintToolBarContentBorder(SynthContext JavaDoc context,
2543                                 Graphics g, int x, int y,
2544                                 int w, int h, int orientation) {
2545        paintBorder(context, g, x, y, w, h, orientation);
2546    }
2547
2548    /**
2549     * Paints the background of the window containing the tool bar when it
2550     * has been detached from its primary frame.
2551     *
2552     * @param context SynthContext identifying the <code>JComponent</code> and
2553     * <code>Region</code> to paint to
2554     * @param g <code>Graphics</code> to paint to
2555     * @param x X coordinate of the area to paint to
2556     * @param y Y coordinate of the area to paint to
2557     * @param w Width of the area to paint to
2558     * @param h Height of the area to paint to
2559     */

2560    public void paintToolBarDragWindowBackground(SynthContext JavaDoc context,
2561                                     Graphics g, int x, int y,
2562                                     int w, int h) {
2563        paintBackground(context, g, x, y, w, h, null);
2564    }
2565
2566    /**
2567     * Paints the background of the window containing the tool bar when it
2568     * has been detached from its primary frame. This implementation invokes the
2569     * method of the same name without the orientation.
2570     *
2571     * @param context SynthContext identifying the <code>JComponent</code> and
2572     * <code>Region</code> to paint to
2573     * @param g <code>Graphics</code> to paint to
2574     * @param x X coordinate of the area to paint to
2575     * @param y Y coordinate of the area to paint to
2576     * @param w Width of the area to paint to
2577     * @param h Height of the area to paint to
2578     * @param orientation One of <code>JToolBar.HORIZONTAL</code> or
2579     * <code>JToolBar.VERTICAL</code>
2580     * @since 1.6
2581     */

2582    public void paintToolBarDragWindowBackground(SynthContext JavaDoc context,
2583                                     Graphics g, int x, int y,
2584                                     int w, int h, int orientation) {
2585        paintBackground(context, g, x, y, w, h, orientation);
2586    }
2587
2588    /**
2589     * Paints the border of the window containing the tool bar when it
2590     * has been detached from it's primary frame.
2591     *
2592     * @param context SynthContext identifying the <code>JComponent</code> and
2593     * <code>Region</code> to paint to
2594     * @param g <code>Graphics</code> to paint to
2595     * @param x X coordinate of the area to paint to
2596     * @param y Y coordinate of the area to paint to
2597     * @param w Width of the area to paint to
2598     * @param h Height of the area to paint to
2599     */

2600    public void paintToolBarDragWindowBorder(SynthContext JavaDoc context,
2601                                 Graphics g, int x, int y,
2602                                 int w, int h) {
2603        paintBorder(context, g, x, y, w, h, null);
2604    }
2605
2606    /**
2607     * Paints the border of the window containing the tool bar when it
2608     * has been detached from it's primary frame. This implementation invokes the
2609     * method of the same name without the orientation.
2610     *
2611     * @param context SynthContext identifying the <code>JComponent</code> and
2612     * <code>Region</code> to paint to
2613     * @param g <code>Graphics</code> to paint to
2614     * @param x X coordinate of the area to paint to
2615     * @param y Y coordinate of the area to paint to
2616     * @param w Width of the area to paint to
2617     * @param h Height of the area to paint to
2618     * @param orientation One of <code>JToolBar.HORIZONTAL</code> or
2619     * <code>JToolBar.VERTICAL</code>
2620     * @since 1.6
2621     */

2622    public void paintToolBarDragWindowBorder(SynthContext JavaDoc context,
2623                                 Graphics g, int x, int y,
2624                                 int w, int h, int orientation) {
2625        paintBorder(context, g, x, y, w, h, orientation);
2626    }
2627
2628    /**
2629     * Paints the background of a tool tip.
2630     *
2631     * @param context SynthContext identifying the <code>JComponent</code> and
2632     * <code>Region</code> to paint to
2633     * @param g <code>Graphics</code> to paint to
2634     * @param x X coordinate of the area to paint to
2635     * @param y Y coordinate of the area to paint to
2636     * @param w Width of the area to paint to
2637     * @param h Height of the area to paint to
2638     */

2639    public void paintToolTipBackground(SynthContext JavaDoc context,
2640                                     Graphics g, int x, int y,
2641                                     int w, int h) {
2642        paintBackground(context, g, x, y, w, h, null);
2643    }
2644
2645    /**
2646     * Paints the border of a tool tip.
2647     *
2648     * @param context SynthContext identifying the <code>JComponent</code> and
2649     * <code>Region</code> to paint to
2650     * @param g <code>Graphics</code> to paint to
2651     * @param x X coordinate of the area to paint to
2652     * @param y Y coordinate of the area to paint to
2653     * @param w Width of the area to paint to
2654     * @param h Height of the area to paint to
2655     */

2656    public void paintToolTipBorder(SynthContext JavaDoc context,
2657                                 Graphics g, int x, int y,
2658                                 int w, int h) {
2659        paintBorder(context, g, x, y, w, h, null);
2660    }
2661
2662    /**
2663     * Paints the background of a tree.
2664     *
2665     * @param context SynthContext identifying the <code>JComponent</code> and
2666     * <code>Region</code> to paint to
2667     * @param g <code>Graphics</code> to paint to
2668     * @param x X coordinate of the area to paint to
2669     * @param y Y coordinate of the area to paint to
2670     * @param w Width of the area to paint to
2671     * @param h Height of the area to paint to
2672     */

2673    public void paintTreeBackground(SynthContext JavaDoc context,
2674                                     Graphics g, int x, int y,
2675                                     int w, int h) {
2676        paintBackground(context, g, x, y, w, h, null);
2677    }
2678
2679    /**
2680     * Paints the border of a tree.
2681     *
2682     * @param context SynthContext identifying the <code>JComponent</code> and
2683     * <code>Region</code> to paint to
2684     * @param g <code>Graphics</code> to paint to
2685     * @param x X coordinate of the area to paint to
2686     * @param y Y coordinate of the area to paint to
2687     * @param w Width of the area to paint to
2688     * @param h Height of the area to paint to
2689     */

2690    public void paintTreeBorder(SynthContext JavaDoc context,
2691                                 Graphics g, int x, int y,
2692                                 int w, int h) {
2693        paintBorder(context, g, x, y, w, h, null);
2694    }
2695
2696    /**
2697     * Paints the background of the row containing a cell in a tree.
2698     *
2699     * @param context SynthContext identifying the <code>JComponent</code> and
2700     * <code>Region</code> to paint to
2701     * @param g <code>Graphics</code> to paint to
2702     * @param x X coordinate of the area to paint to
2703     * @param y Y coordinate of the area to paint to
2704     * @param w Width of the area to paint to
2705     * @param h Height of the area to paint to
2706     */

2707    public void paintTreeCellBackground(SynthContext JavaDoc context,
2708                                     Graphics g, int x, int y,
2709                                     int w, int h) {
2710        paintBackground(context, g, x, y, w, h, null);
2711    }
2712
2713    /**
2714     * Paints the border of the row containing a cell in a tree.
2715     *
2716     * @param context SynthContext identifying the <code>JComponent</code> and
2717     * <code>Region</code> to paint to
2718     * @param g <code>Graphics</code> to paint to
2719     * @param x X coordinate of the area to paint to
2720     * @param y Y coordinate of the area to paint to
2721     * @param w Width of the area to paint to
2722     * @param h Height of the area to paint to
2723     */

2724    public void paintTreeCellBorder(SynthContext JavaDoc context,
2725                                 Graphics g, int x, int y,
2726                                 int w, int h) {
2727        paintBorder(context, g, x, y, w, h, null);
2728    }
2729
2730    /**
2731     * Paints the focus indicator for a cell in a tree when it has focus.
2732     *
2733     * @param context SynthContext identifying the <code>JComponent</code> and
2734     * <code>Region</code> to paint to
2735     * @param g <code>Graphics</code> to paint to
2736     * @param x X coordinate of the area to paint to
2737     * @param y Y coordinate of the area to paint to
2738     * @param w Width of the area to paint to
2739     * @param h Height of the area to paint to
2740     */

2741    public void paintTreeCellFocus(SynthContext JavaDoc context,
2742                                   Graphics g, int x, int y,
2743                                   int w, int h) {
2744        //TODO
2745
}
2746
2747    /**
2748     * Paints the background of the viewport.
2749     *
2750     * @param context SynthContext identifying the <code>JComponent</code> and
2751     * <code>Region</code> to paint to
2752     * @param g <code>Graphics</code> to paint to
2753     * @param x X coordinate of the area to paint to
2754     * @param y Y coordinate of the area to paint to
2755     * @param w Width of the area to paint to
2756     * @param h Height of the area to paint to
2757     */

2758    public void paintViewportBackground(SynthContext JavaDoc context,
2759                                     Graphics g, int x, int y,
2760                                     int w, int h) {
2761        paintBackground(context, g, x, y, w, h, null);
2762    }
2763
2764    /**
2765     * Paints the border of a viewport.
2766     *
2767     * @param context SynthContext identifying the <code>JComponent</code> and
2768     * <code>Region</code> to paint to
2769     * @param g <code>Graphics</code> to paint to
2770     * @param x X coordinate of the area to paint to
2771     * @param y Y coordinate of the area to paint to
2772     * @param w Width of the area to paint to
2773     * @param h Height of the area to paint to
2774     */

2775    public void paintViewportBorder(SynthContext JavaDoc context,
2776                                 Graphics g, int x, int y,
2777                                 int w, int h) {
2778        paintBorder(context, g, x, y, w, h, null);
2779    }
2780}
2781
Popular Tags