001 /*
002 * Copyright 2002-2005 Sun Microsystems, Inc. All Rights Reserved.
003 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004 *
005 * This code is free software; you can redistribute it and/or modify it
006 * under the terms of the GNU General Public License version 2 only, as
007 * published by the Free Software Foundation. Sun designates this
008 * particular file as subject to the "Classpath" exception as provided
009 * by Sun in the LICENSE file that accompanied this code.
010 *
011 * This code is distributed in the hope that it will be useful, but WITHOUT
012 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014 * version 2 for more details (a copy is included in the LICENSE file that
015 * accompanied this code).
016 *
017 * You should have received a copy of the GNU General Public License version
018 * 2 along with this work; if not, write to the Free Software Foundation,
019 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020 *
021 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022 * CA 95054 USA or visit www.sun.com if you need additional information or
023 * have any questions.
024 */
025 package javax.swing.plaf.synth;
026
027 import java.awt.*;
028 import java.lang.ref.WeakReference;
029 import java.net.*;
030 import javax.swing.*;
031 import sun.awt.AppContext;
032 import sun.swing.plaf.synth.Paint9Painter;
033
034 /**
035 * ImagePainter fills in the specified region using an Image. The Image
036 * is split into 9 segments: north, north east, east, south east, south,
037 * south west, west, north west and the center. The corners are defined
038 * by way of an insets, and the remaining regions are either tiled or
039 * scaled to fit.
040 *
041 * @version 1.18, 05/05/07
042 * @author Scott Violet
043 */
044 class ImagePainter extends SynthPainter {
045 private static final StringBuffer CACHE_KEY = new StringBuffer(
046 "SynthCacheKey");
047
048 private Image image;
049 private Insets sInsets;
050 private Insets dInsets;
051 private URL path;
052 private boolean tiles;
053 private boolean paintCenter;
054 private Paint9Painter imageCache;
055 private boolean center;
056
057 private static Paint9Painter getPaint9Painter() {
058 // A SynthPainter is created per <imagePainter>. We want the
059 // cache to be shared by all, and we don't use a static because we
060 // don't want it to persist between look and feels. For that reason
061 // we use a AppContext specific Paint9Painter. It's backed via
062 // a WeakRef so that it can go away if the look and feel changes.
063 synchronized (CACHE_KEY) {
064 WeakReference<Paint9Painter> cacheRef = (WeakReference<Paint9Painter>) AppContext
065 .getAppContext().get(CACHE_KEY);
066 Paint9Painter painter;
067 if (cacheRef == null || (painter = cacheRef.get()) == null) {
068 painter = new Paint9Painter(30);
069 cacheRef = new WeakReference(painter);
070 AppContext.getAppContext().put(CACHE_KEY, cacheRef);
071 }
072 return painter;
073 }
074 }
075
076 ImagePainter(boolean tiles, boolean paintCenter,
077 Insets sourceInsets, Insets destinationInsets, URL path,
078 boolean center) {
079 if (sourceInsets != null) {
080 this .sInsets = (Insets) sourceInsets.clone();
081 }
082 if (destinationInsets == null) {
083 dInsets = sInsets;
084 } else {
085 this .dInsets = (Insets) destinationInsets.clone();
086 }
087 this .tiles = tiles;
088 this .paintCenter = paintCenter;
089 this .imageCache = getPaint9Painter();
090 this .path = path;
091 this .center = center;
092 }
093
094 public boolean getTiles() {
095 return tiles;
096 }
097
098 public boolean getPaintsCenter() {
099 return paintCenter;
100 }
101
102 public boolean getCenter() {
103 return center;
104 }
105
106 public Insets getInsets(Insets insets) {
107 if (insets == null) {
108 return (Insets) this .dInsets.clone();
109 }
110 insets.left = this .dInsets.left;
111 insets.right = this .dInsets.right;
112 insets.top = this .dInsets.top;
113 insets.bottom = this .dInsets.bottom;
114 return insets;
115 }
116
117 public Image getImage() {
118 if (image == null) {
119 image = new ImageIcon(path, null).getImage();
120 }
121 return image;
122 }
123
124 private void paint(SynthContext context, Graphics g, int x, int y,
125 int w, int h) {
126 Image image = getImage();
127 if (Paint9Painter.validImage(image)) {
128 Paint9Painter.PaintType type;
129 if (getCenter()) {
130 type = Paint9Painter.PaintType.CENTER;
131 } else if (!getTiles()) {
132 type = Paint9Painter.PaintType.PAINT9_STRETCH;
133 } else {
134 type = Paint9Painter.PaintType.PAINT9_TILE;
135 }
136 int mask = Paint9Painter.PAINT_ALL;
137 if (!getCenter() && !getPaintsCenter()) {
138 mask |= Paint9Painter.PAINT_CENTER;
139 }
140 imageCache.paint(context.getComponent(), g, x, y, w, h,
141 image, sInsets, dInsets, type, mask);
142 }
143 }
144
145 // SynthPainter
146 public void paintArrowButtonBackground(SynthContext context,
147 Graphics g, int x, int y, int w, int h) {
148 paint(context, g, x, y, w, h);
149 }
150
151 public void paintArrowButtonBorder(SynthContext context,
152 Graphics g, int x, int y, int w, int h) {
153 paint(context, g, x, y, w, h);
154 }
155
156 public void paintArrowButtonForeground(SynthContext context,
157 Graphics g, int x, int y, int w, int h, int direction) {
158 paint(context, g, x, y, w, h);
159 }
160
161 // BUTTON
162 public void paintButtonBackground(SynthContext context, Graphics g,
163 int x, int y, int w, int h) {
164 paint(context, g, x, y, w, h);
165 }
166
167 public void paintButtonBorder(SynthContext context, Graphics g,
168 int x, int y, int w, int h) {
169 paint(context, g, x, y, w, h);
170 }
171
172 // CHECK_BOX_MENU_ITEM
173 public void paintCheckBoxMenuItemBackground(SynthContext context,
174 Graphics g, int x, int y, int w, int h) {
175 paint(context, g, x, y, w, h);
176 }
177
178 public void paintCheckBoxMenuItemBorder(SynthContext context,
179 Graphics g, int x, int y, int w, int h) {
180 paint(context, g, x, y, w, h);
181 }
182
183 // CHECK_BOX
184 public void paintCheckBoxBackground(SynthContext context,
185 Graphics g, int x, int y, int w, int h) {
186 paint(context, g, x, y, w, h);
187 }
188
189 public void paintCheckBoxBorder(SynthContext context, Graphics g,
190 int x, int y, int w, int h) {
191 paint(context, g, x, y, w, h);
192 }
193
194 // COLOR_CHOOSER
195 public void paintColorChooserBackground(SynthContext context,
196 Graphics g, int x, int y, int w, int h) {
197 paint(context, g, x, y, w, h);
198 }
199
200 public void paintColorChooserBorder(SynthContext context,
201 Graphics g, int x, int y, int w, int h) {
202 paint(context, g, x, y, w, h);
203 }
204
205 // COMBO_BOX
206 public void paintComboBoxBackground(SynthContext context,
207 Graphics g, int x, int y, int w, int h) {
208 paint(context, g, x, y, w, h);
209 }
210
211 public void paintComboBoxBorder(SynthContext context, Graphics g,
212 int x, int y, int w, int h) {
213 paint(context, g, x, y, w, h);
214 }
215
216 // DESKTOP_ICON
217 public void paintDesktopIconBackground(SynthContext context,
218 Graphics g, int x, int y, int w, int h) {
219 paint(context, g, x, y, w, h);
220 }
221
222 public void paintDesktopIconBorder(SynthContext context,
223 Graphics g, int x, int y, int w, int h) {
224 paint(context, g, x, y, w, h);
225 }
226
227 // DESKTOP_PANE
228 public void paintDesktopPaneBackground(SynthContext context,
229 Graphics g, int x, int y, int w, int h) {
230 paint(context, g, x, y, w, h);
231 }
232
233 public void paintDesktopPaneBorder(SynthContext context,
234 Graphics g, int x, int y, int w, int h) {
235 paint(context, g, x, y, w, h);
236 }
237
238 // EDITOR_PANE
239 public void paintEditorPaneBackground(SynthContext context,
240 Graphics g, int x, int y, int w, int h) {
241 paint(context, g, x, y, w, h);
242 }
243
244 public void paintEditorPaneBorder(SynthContext context, Graphics g,
245 int x, int y, int w, int h) {
246 paint(context, g, x, y, w, h);
247 }
248
249 // FILE_CHOOSER
250 public void paintFileChooserBackground(SynthContext context,
251 Graphics g, int x, int y, int w, int h) {
252 paint(context, g, x, y, w, h);
253 }
254
255 public void paintFileChooserBorder(SynthContext context,
256 Graphics g, int x, int y, int w, int h) {
257 paint(context, g, x, y, w, h);
258 }
259
260 // FORMATTED_TEXT_FIELD
261 public void paintFormattedTextFieldBackground(SynthContext context,
262 Graphics g, int x, int y, int w, int h) {
263 paint(context, g, x, y, w, h);
264 }
265
266 public void paintFormattedTextFieldBorder(SynthContext context,
267 Graphics g, int x, int y, int w, int h) {
268 paint(context, g, x, y, w, h);
269 }
270
271 // INTERNAL_FRAME_TITLE_PANE
272 public void paintInternalFrameTitlePaneBackground(
273 SynthContext context, Graphics g, int x, int y, int w, int h) {
274 paint(context, g, x, y, w, h);
275 }
276
277 public void paintInternalFrameTitlePaneBorder(SynthContext context,
278 Graphics g, int x, int y, int w, int h) {
279 paint(context, g, x, y, w, h);
280 }
281
282 // INTERNAL_FRAME
283 public void paintInternalFrameBackground(SynthContext context,
284 Graphics g, int x, int y, int w, int h) {
285 paint(context, g, x, y, w, h);
286 }
287
288 public void paintInternalFrameBorder(SynthContext context,
289 Graphics g, int x, int y, int w, int h) {
290 paint(context, g, x, y, w, h);
291 }
292
293 // LABEL
294 public void paintLabelBackground(SynthContext context, Graphics g,
295 int x, int y, int w, int h) {
296 paint(context, g, x, y, w, h);
297 }
298
299 public void paintLabelBorder(SynthContext context, Graphics g,
300 int x, int y, int w, int h) {
301 paint(context, g, x, y, w, h);
302 }
303
304 // LIST
305 public void paintListBackground(SynthContext context, Graphics g,
306 int x, int y, int w, int h) {
307 paint(context, g, x, y, w, h);
308 }
309
310 public void paintListBorder(SynthContext context, Graphics g,
311 int x, int y, int w, int h) {
312 paint(context, g, x, y, w, h);
313 }
314
315 // MENU_BAR
316 public void paintMenuBarBackground(SynthContext context,
317 Graphics g, int x, int y, int w, int h) {
318 paint(context, g, x, y, w, h);
319 }
320
321 public void paintMenuBarBorder(SynthContext context, Graphics g,
322 int x, int y, int w, int h) {
323 paint(context, g, x, y, w, h);
324 }
325
326 // MENU_ITEM
327 public void paintMenuItemBackground(SynthContext context,
328 Graphics g, int x, int y, int w, int h) {
329 paint(context, g, x, y, w, h);
330 }
331
332 public void paintMenuItemBorder(SynthContext context, Graphics g,
333 int x, int y, int w, int h) {
334 paint(context, g, x, y, w, h);
335 }
336
337 // MENU
338 public void paintMenuBackground(SynthContext context, Graphics g,
339 int x, int y, int w, int h) {
340 paint(context, g, x, y, w, h);
341 }
342
343 public void paintMenuBorder(SynthContext context, Graphics g,
344 int x, int y, int w, int h) {
345 paint(context, g, x, y, w, h);
346 }
347
348 // OPTION_PANE
349 public void paintOptionPaneBackground(SynthContext context,
350 Graphics g, int x, int y, int w, int h) {
351 paint(context, g, x, y, w, h);
352 }
353
354 public void paintOptionPaneBorder(SynthContext context, Graphics g,
355 int x, int y, int w, int h) {
356 paint(context, g, x, y, w, h);
357 }
358
359 // PANEL
360 public void paintPanelBackground(SynthContext context, Graphics g,
361 int x, int y, int w, int h) {
362 paint(context, g, x, y, w, h);
363 }
364
365 public void paintPanelBorder(SynthContext context, Graphics g,
366 int x, int y, int w, int h) {
367 paint(context, g, x, y, w, h);
368 }
369
370 // PANEL
371 public void paintPasswordFieldBackground(SynthContext context,
372 Graphics g, int x, int y, int w, int h) {
373 paint(context, g, x, y, w, h);
374 }
375
376 public void paintPasswordFieldBorder(SynthContext context,
377 Graphics g, int x, int y, int w, int h) {
378 paint(context, g, x, y, w, h);
379 }
380
381 // POPUP_MENU
382 public void paintPopupMenuBackground(SynthContext context,
383 Graphics g, int x, int y, int w, int h) {
384 paint(context, g, x, y, w, h);
385 }
386
387 public void paintPopupMenuBorder(SynthContext context, Graphics g,
388 int x, int y, int w, int h) {
389 paint(context, g, x, y, w, h);
390 }
391
392 // PROGRESS_BAR
393 public void paintProgressBarBackground(SynthContext context,
394 Graphics g, int x, int y, int w, int h) {
395 paint(context, g, x, y, w, h);
396 }
397
398 public void paintProgressBarBackground(SynthContext context,
399 Graphics g, int x, int y, int w, int h, int orientation) {
400 paint(context, g, x, y, w, h);
401 }
402
403 public void paintProgressBarBorder(SynthContext context,
404 Graphics g, int x, int y, int w, int h) {
405 paint(context, g, x, y, w, h);
406 }
407
408 public void paintProgressBarBorder(SynthContext context,
409 Graphics g, int x, int y, int w, int h, int orientation) {
410 paint(context, g, x, y, w, h);
411 }
412
413 public void paintProgressBarForeground(SynthContext context,
414 Graphics g, int x, int y, int w, int h, int orientation) {
415 paint(context, g, x, y, w, h);
416 }
417
418 // RADIO_BUTTON_MENU_ITEM
419 public void paintRadioButtonMenuItemBackground(
420 SynthContext context, Graphics g, int x, int y, int w, int h) {
421 paint(context, g, x, y, w, h);
422 }
423
424 public void paintRadioButtonMenuItemBorder(SynthContext context,
425 Graphics g, int x, int y, int w, int h) {
426 paint(context, g, x, y, w, h);
427 }
428
429 // RADIO_BUTTON
430 public void paintRadioButtonBackground(SynthContext context,
431 Graphics g, int x, int y, int w, int h) {
432 paint(context, g, x, y, w, h);
433 }
434
435 public void paintRadioButtonBorder(SynthContext context,
436 Graphics g, int x, int y, int w, int h) {
437 paint(context, g, x, y, w, h);
438 }
439
440 // ROOT_PANE
441 public void paintRootPaneBackground(SynthContext context,
442 Graphics g, int x, int y, int w, int h) {
443 paint(context, g, x, y, w, h);
444 }
445
446 public void paintRootPaneBorder(SynthContext context, Graphics g,
447 int x, int y, int w, int h) {
448 paint(context, g, x, y, w, h);
449 }
450
451 // SCROLL_BAR
452 public void paintScrollBarBackground(SynthContext context,
453 Graphics g, int x, int y, int w, int h) {
454 paint(context, g, x, y, w, h);
455 }
456
457 public void paintScrollBarBackground(SynthContext context,
458 Graphics g, int x, int y, int w, int h, int orientation) {
459 paint(context, g, x, y, w, h);
460 }
461
462 public void paintScrollBarBorder(SynthContext context, Graphics g,
463 int x, int y, int w, int h) {
464 paint(context, g, x, y, w, h);
465 }
466
467 public void paintScrollBarBorder(SynthContext context, Graphics g,
468 int x, int y, int w, int h, int orientation) {
469 paint(context, g, x, y, w, h);
470 }
471
472 // SCROLL_BAR_THUMB
473 public void paintScrollBarThumbBackground(SynthContext context,
474 Graphics g, int x, int y, int w, int h, int orientation) {
475 paint(context, g, x, y, w, h);
476 }
477
478 public void paintScrollBarThumbBorder(SynthContext context,
479 Graphics g, int x, int y, int w, int h, int orientation) {
480 paint(context, g, x, y, w, h);
481 }
482
483 // SCROLL_BAR_TRACK
484 public void paintScrollBarTrackBackground(SynthContext context,
485 Graphics g, int x, int y, int w, int h) {
486 paint(context, g, x, y, w, h);
487 }
488
489 public void paintScrollBarTrackBackground(SynthContext context,
490 Graphics g, int x, int y, int w, int h, int orientation) {
491 paint(context, g, x, y, w, h);
492 }
493
494 public void paintScrollBarTrackBorder(SynthContext context,
495 Graphics g, int x, int y, int w, int h) {
496 paint(context, g, x, y, w, h);
497 }
498
499 public void paintScrollBarTrackBorder(SynthContext context,
500 Graphics g, int x, int y, int w, int h, int orientation) {
501 paint(context, g, x, y, w, h);
502 }
503
504 // SCROLL_PANE
505 public void paintScrollPaneBackground(SynthContext context,
506 Graphics g, int x, int y, int w, int h) {
507 paint(context, g, x, y, w, h);
508 }
509
510 public void paintScrollPaneBorder(SynthContext context, Graphics g,
511 int x, int y, int w, int h) {
512 paint(context, g, x, y, w, h);
513 }
514
515 // SEPARATOR
516 public void paintSeparatorBackground(SynthContext context,
517 Graphics g, int x, int y, int w, int h) {
518 paint(context, g, x, y, w, h);
519 }
520
521 public void paintSeparatorBackground(SynthContext context,
522 Graphics g, int x, int y, int w, int h, int orientation) {
523 paint(context, g, x, y, w, h);
524 }
525
526 public void paintSeparatorBorder(SynthContext context, Graphics g,
527 int x, int y, int w, int h) {
528 paint(context, g, x, y, w, h);
529 }
530
531 public void paintSeparatorBorder(SynthContext context, Graphics g,
532 int x, int y, int w, int h, int orientation) {
533 paint(context, g, x, y, w, h);
534 }
535
536 public void paintSeparatorForeground(SynthContext context,
537 Graphics g, int x, int y, int w, int h, int orientation) {
538 paint(context, g, x, y, w, h);
539 }
540
541 // SLIDER
542 public void paintSliderBackground(SynthContext context, Graphics g,
543 int x, int y, int w, int h) {
544 paint(context, g, x, y, w, h);
545 }
546
547 public void paintSliderBackground(SynthContext context, Graphics g,
548 int x, int y, int w, int h, int orientation) {
549 paint(context, g, x, y, w, h);
550 }
551
552 public void paintSliderBorder(SynthContext context, Graphics g,
553 int x, int y, int w, int h) {
554 paint(context, g, x, y, w, h);
555 }
556
557 public void paintSliderBorder(SynthContext context, Graphics g,
558 int x, int y, int w, int h, int orientation) {
559 paint(context, g, x, y, w, h);
560 }
561
562 // SLIDER_THUMB
563 public void paintSliderThumbBackground(SynthContext context,
564 Graphics g, int x, int y, int w, int h, int orientation) {
565 paint(context, g, x, y, w, h);
566 }
567
568 public void paintSliderThumbBorder(SynthContext context,
569 Graphics g, int x, int y, int w, int h, int orientation) {
570 paint(context, g, x, y, w, h);
571 }
572
573 // SLIDER_TRACK
574 public void paintSliderTrackBackground(SynthContext context,
575 Graphics g, int x, int y, int w, int h) {
576 paint(context, g, x, y, w, h);
577 }
578
579 public void paintSliderTrackBackground(SynthContext context,
580 Graphics g, int x, int y, int w, int h, int orientation) {
581 paint(context, g, x, y, w, h);
582 }
583
584 public void paintSliderTrackBorder(SynthContext context,
585 Graphics g, int x, int y, int w, int h) {
586 paint(context, g, x, y, w, h);
587 }
588
589 public void paintSliderTrackBorder(SynthContext context,
590 Graphics g, int x, int y, int w, int h, int orientation) {
591 paint(context, g, x, y, w, h);
592 }
593
594 // SPINNER
595 public void paintSpinnerBackground(SynthContext context,
596 Graphics g, int x, int y, int w, int h) {
597 paint(context, g, x, y, w, h);
598 }
599
600 public void paintSpinnerBorder(SynthContext context, Graphics g,
601 int x, int y, int w, int h) {
602 paint(context, g, x, y, w, h);
603 }
604
605 // SPLIT_PANE_DIVIDER
606 public void paintSplitPaneDividerBackground(SynthContext context,
607 Graphics g, int x, int y, int w, int h) {
608 paint(context, g, x, y, w, h);
609 }
610
611 public void paintSplitPaneDividerBackground(SynthContext context,
612 Graphics g, int x, int y, int w, int h, int orientation) {
613 paint(context, g, x, y, w, h);
614 }
615
616 public void paintSplitPaneDividerForeground(SynthContext context,
617 Graphics g, int x, int y, int w, int h, int orientation) {
618 paint(context, g, x, y, w, h);
619 }
620
621 public void paintSplitPaneDragDivider(SynthContext context,
622 Graphics g, int x, int y, int w, int h, int orientation) {
623 paint(context, g, x, y, w, h);
624 }
625
626 // SPLIT_PANE
627 public void paintSplitPaneBackground(SynthContext context,
628 Graphics g, int x, int y, int w, int h) {
629 paint(context, g, x, y, w, h);
630 }
631
632 public void paintSplitPaneBorder(SynthContext context, Graphics g,
633 int x, int y, int w, int h) {
634 paint(context, g, x, y, w, h);
635 }
636
637 // TABBED_PANE
638 public void paintTabbedPaneBackground(SynthContext context,
639 Graphics g, int x, int y, int w, int h) {
640 paint(context, g, x, y, w, h);
641 }
642
643 public void paintTabbedPaneBorder(SynthContext context, Graphics g,
644 int x, int y, int w, int h) {
645 paint(context, g, x, y, w, h);
646 }
647
648 // TABBED_PANE_TAB_AREA
649 public void paintTabbedPaneTabAreaBackground(SynthContext context,
650 Graphics g, int x, int y, int w, int h) {
651 paint(context, g, x, y, w, h);
652 }
653
654 public void paintTabbedPaneTabAreaBackground(SynthContext context,
655 Graphics g, int x, int y, int w, int h, int orientation) {
656 paint(context, g, x, y, w, h);
657 }
658
659 public void paintTabbedPaneTabAreaBorder(SynthContext context,
660 Graphics g, int x, int y, int w, int h) {
661 paint(context, g, x, y, w, h);
662 }
663
664 public void paintTabbedPaneTabAreaBorder(SynthContext context,
665 Graphics g, int x, int y, int w, int h, int orientation) {
666 paint(context, g, x, y, w, h);
667 }
668
669 // TABBED_PANE_TAB
670 public void paintTabbedPaneTabBackground(SynthContext context,
671 Graphics g, int x, int y, int w, int h, int tabIndex) {
672 paint(context, g, x, y, w, h);
673 }
674
675 public void paintTabbedPaneTabBackground(SynthContext context,
676 Graphics g, int x, int y, int w, int h, int tabIndex,
677 int orientation) {
678 paint(context, g, x, y, w, h);
679 }
680
681 public void paintTabbedPaneTabBorder(SynthContext context,
682 Graphics g, int x, int y, int w, int h, int tabIndex) {
683 paint(context, g, x, y, w, h);
684 }
685
686 public void paintTabbedPaneTabBorder(SynthContext context,
687 Graphics g, int x, int y, int w, int h, int tabIndex,
688 int orientation) {
689 paint(context, g, x, y, w, h);
690 }
691
692 // TABBED_PANE_CONTENT
693 public void paintTabbedPaneContentBackground(SynthContext context,
694 Graphics g, int x, int y, int w, int h) {
695 paint(context, g, x, y, w, h);
696 }
697
698 public void paintTabbedPaneContentBorder(SynthContext context,
699 Graphics g, int x, int y, int w, int h) {
700 paint(context, g, x, y, w, h);
701 }
702
703 // TABLE_HEADER
704 public void paintTableHeaderBackground(SynthContext context,
705 Graphics g, int x, int y, int w, int h) {
706 paint(context, g, x, y, w, h);
707 }
708
709 public void paintTableHeaderBorder(SynthContext context,
710 Graphics g, int x, int y, int w, int h) {
711 paint(context, g, x, y, w, h);
712 }
713
714 // TABLE
715 public void paintTableBackground(SynthContext context, Graphics g,
716 int x, int y, int w, int h) {
717 paint(context, g, x, y, w, h);
718 }
719
720 public void paintTableBorder(SynthContext context, Graphics g,
721 int x, int y, int w, int h) {
722 paint(context, g, x, y, w, h);
723 }
724
725 // TEXT_AREA
726 public void paintTextAreaBackground(SynthContext context,
727 Graphics g, int x, int y, int w, int h) {
728 paint(context, g, x, y, w, h);
729 }
730
731 public void paintTextAreaBorder(SynthContext context, Graphics g,
732 int x, int y, int w, int h) {
733 paint(context, g, x, y, w, h);
734 }
735
736 // TEXT_PANE
737 public void paintTextPaneBackground(SynthContext context,
738 Graphics g, int x, int y, int w, int h) {
739 paint(context, g, x, y, w, h);
740 }
741
742 public void paintTextPaneBorder(SynthContext context, Graphics g,
743 int x, int y, int w, int h) {
744 paint(context, g, x, y, w, h);
745 }
746
747 // TEXT_FIELD
748 public void paintTextFieldBackground(SynthContext context,
749 Graphics g, int x, int y, int w, int h) {
750 paint(context, g, x, y, w, h);
751 }
752
753 public void paintTextFieldBorder(SynthContext context, Graphics g,
754 int x, int y, int w, int h) {
755 paint(context, g, x, y, w, h);
756 }
757
758 // TOGGLE_BUTTON
759 public void paintToggleButtonBackground(SynthContext context,
760 Graphics g, int x, int y, int w, int h) {
761 paint(context, g, x, y, w, h);
762 }
763
764 public void paintToggleButtonBorder(SynthContext context,
765 Graphics g, int x, int y, int w, int h) {
766 paint(context, g, x, y, w, h);
767 }
768
769 // TOOL_BAR
770 public void paintToolBarBackground(SynthContext context,
771 Graphics g, int x, int y, int w, int h) {
772 paint(context, g, x, y, w, h);
773 }
774
775 public void paintToolBarBackground(SynthContext context,
776 Graphics g, int x, int y, int w, int h, int orientation) {
777 paint(context, g, x, y, w, h);
778 }
779
780 public void paintToolBarBorder(SynthContext context, Graphics g,
781 int x, int y, int w, int h) {
782 paint(context, g, x, y, w, h);
783 }
784
785 public void paintToolBarBorder(SynthContext context, Graphics g,
786 int x, int y, int w, int h, int orientation) {
787 paint(context, g, x, y, w, h);
788 }
789
790 // TOOL_BAR_CONTENT
791 public void paintToolBarContentBackground(SynthContext context,
792 Graphics g, int x, int y, int w, int h) {
793 paint(context, g, x, y, w, h);
794 }
795
796 public void paintToolBarContentBackground(SynthContext context,
797 Graphics g, int x, int y, int w, int h, int orientation) {
798 paint(context, g, x, y, w, h);
799 }
800
801 public void paintToolBarContentBorder(SynthContext context,
802 Graphics g, int x, int y, int w, int h) {
803 paint(context, g, x, y, w, h);
804 }
805
806 public void paintToolBarContentBorder(SynthContext context,
807 Graphics g, int x, int y, int w, int h, int orientation) {
808 paint(context, g, x, y, w, h);
809 }
810
811 // TOOL_DRAG_WINDOW
812 public void paintToolBarDragWindowBackground(SynthContext context,
813 Graphics g, int x, int y, int w, int h) {
814 paint(context, g, x, y, w, h);
815 }
816
817 public void paintToolBarDragWindowBackground(SynthContext context,
818 Graphics g, int x, int y, int w, int h, int orientation) {
819 paint(context, g, x, y, w, h);
820 }
821
822 public void paintToolBarDragWindowBorder(SynthContext context,
823 Graphics g, int x, int y, int w, int h) {
824 paint(context, g, x, y, w, h);
825 }
826
827 public void paintToolBarDragWindowBorder(SynthContext context,
828 Graphics g, int x, int y, int w, int h, int orientation) {
829 paint(context, g, x, y, w, h);
830 }
831
832 // TOOL_TIP
833 public void paintToolTipBackground(SynthContext context,
834 Graphics g, int x, int y, int w, int h) {
835 paint(context, g, x, y, w, h);
836 }
837
838 public void paintToolTipBorder(SynthContext context, Graphics g,
839 int x, int y, int w, int h) {
840 paint(context, g, x, y, w, h);
841 }
842
843 // TREE
844 public void paintTreeBackground(SynthContext context, Graphics g,
845 int x, int y, int w, int h) {
846 paint(context, g, x, y, w, h);
847 }
848
849 public void paintTreeBorder(SynthContext context, Graphics g,
850 int x, int y, int w, int h) {
851 paint(context, g, x, y, w, h);
852 }
853
854 // TREE_CELL
855 public void paintTreeCellBackground(SynthContext context,
856 Graphics g, int x, int y, int w, int h) {
857 paint(context, g, x, y, w, h);
858 }
859
860 public void paintTreeCellBorder(SynthContext context, Graphics g,
861 int x, int y, int w, int h) {
862 paint(context, g, x, y, w, h);
863 }
864
865 public void paintTreeCellFocus(SynthContext context, Graphics g,
866 int x, int y, int w, int h) {
867 paint(context, g, x, y, w, h);
868 }
869
870 // VIEWPORT
871 public void paintViewportBackground(SynthContext context,
872 Graphics g, int x, int y, int w, int h) {
873 paint(context, g, x, y, w, h);
874 }
875
876 public void paintViewportBorder(SynthContext context, Graphics g,
877 int x, int y, int w, int h) {
878 paint(context, g, x, y, w, h);
879 }
880 }
|