1 /* 2 * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 package javax.swing.plaf.nimbus; 26 27 import java.awt.*; 28 import java.awt.geom.AffineTransform; 29 import java.awt.geom.NoninvertibleTransformException; 30 import java.awt.image.BufferedImage; 31 import java.util.*; 32 import javax.swing.*; 33 import javax.swing.plaf.synth.SynthContext; 34 import javax.swing.plaf.synth.SynthPainter; 35 import javax.swing.plaf.synth.SynthConstants; 36 37 import javax.swing.Painter; 38 39 40 class SynthPainterImpl extends SynthPainter { 41 private NimbusStyle style; 42 43 SynthPainterImpl(NimbusStyle style) { 44 this.style = style; 45 } 46 47 /** 48 * Paint the provided painter using the provided transform at the specified 49 * position and size. Handles if g is a non 2D Graphics by painting via a 50 * BufferedImage. 51 */ 52 private void paint(Painter p, SynthContext ctx, Graphics g, int x, int y, 53 int w, int h, AffineTransform transform) { 54 if (p != null) { 55 if (g instanceof Graphics2D){ 56 Graphics2D gfx = (Graphics2D)g; 57 if (transform!=null){ 58 gfx.transform(transform); 59 } 60 gfx.translate(x, y); 61 p.paint(gfx, ctx.getComponent(), w, h); 62 gfx.translate(-x, -y); 63 if (transform!=null){ 64 try { 65 gfx.transform(transform.createInverse()); 66 } catch (NoninvertibleTransformException e) { 67 // this should never happen as we are in control of all 68 // calls into this method and only ever pass in simple 69 // transforms of rotate, flip and translates 70 e.printStackTrace(); 71 } 72 } 73 } else { 74 // use image if we are printing to a Java 1.1 PrintGraphics as 75 // it is not a instance of Graphics2D 76 BufferedImage img = new BufferedImage(w,h, 77 BufferedImage.TYPE_INT_ARGB); 78 Graphics2D gfx = img.createGraphics(); 79 if (transform!=null){ 80 gfx.transform(transform); 81 } 82 p.paint(gfx, ctx.getComponent(), w, h); 83 gfx.dispose(); 84 g.drawImage(img,x,y,null); 85 img = null; 86 } 87 } 88 } 89 90 private void paintBackground(SynthContext ctx, Graphics g, int x, int y, 91 int w, int h, AffineTransform transform) { 92 // if the background color of the component is 100% transparent 93 // then we should not paint any background graphics. This is a solution 94 // for there being no way of turning off Nimbus background painting as 95 // basic components are all non-opaque by default. 96 Component c = ctx.getComponent(); 97 Color bg = (c != null) ? c.getBackground() : null; 98 if (bg == null || bg.getAlpha() > 0){ 99 Painter backgroundPainter = style.getBackgroundPainter(ctx); 100 if (backgroundPainter != null) { 101 paint(backgroundPainter, ctx, g, x, y, w, h,transform); 102 } 103 } 104 } 105 106 private void paintForeground(SynthContext ctx, Graphics g, int x, int y, 107 int w, int h, AffineTransform transform) { 108 Painter foregroundPainter = style.getForegroundPainter(ctx); 109 if (foregroundPainter != null) { 110 paint(foregroundPainter, ctx, g, x, y, w, h,transform); 111 } 112 } 113 114 private void paintBorder(SynthContext ctx, Graphics g, int x, int y, int w, 115 int h, AffineTransform transform) { 116 Painter borderPainter = style.getBorderPainter(ctx); 117 if (borderPainter != null) { 118 paint(borderPainter, ctx, g, x, y, w, h,transform); 119 } 120 } 121 122 private void paintBackground(SynthContext ctx, Graphics g, int x, int y, int w, int h, int orientation) { 123 Component c = ctx.getComponent(); 124 boolean ltr = c.getComponentOrientation().isLeftToRight(); 125 // Don't RTL flip JSpliders as they handle it internaly 126 if (ctx.getComponent() instanceof JSlider) ltr = true; 127 128 if (orientation == SwingConstants.VERTICAL && ltr) { 129 AffineTransform transform = new AffineTransform(); 130 transform.scale(-1, 1); 131 transform.rotate(Math.toRadians(90)); 132 paintBackground(ctx, g, y, x, h, w, transform); 133 } else if (orientation == SwingConstants.VERTICAL) { 134 AffineTransform transform = new AffineTransform(); 135 transform.rotate(Math.toRadians(90)); 136 transform.translate(0,-(x+w)); 137 paintBackground(ctx, g, y, x, h, w, transform); 138 } else if (orientation == SwingConstants.HORIZONTAL && ltr) { 139 paintBackground(ctx, g, x, y, w, h, null); 140 } else { 141 //horizontal and right-to-left orientation 142 AffineTransform transform = new AffineTransform(); 143 transform.translate(x,y); 144 transform.scale(-1, 1); 145 transform.translate(-w,0); 146 paintBackground(ctx, g, 0, 0, w, h, transform); 147 } 148 } 149 150 private void paintBorder(SynthContext ctx, Graphics g, int x, int y, int w, int h, int orientation) { 151 Component c = ctx.getComponent(); 152 boolean ltr = c.getComponentOrientation().isLeftToRight(); 153 if (orientation == SwingConstants.VERTICAL && ltr) { 154 AffineTransform transform = new AffineTransform(); 155 transform.scale(-1, 1); 156 transform.rotate(Math.toRadians(90)); 157 paintBorder(ctx, g, y, x, h, w, transform); 158 } else if (orientation == SwingConstants.VERTICAL) { 159 AffineTransform transform = new AffineTransform(); 160 transform.rotate(Math.toRadians(90)); 161 transform.translate(0, -(x + w)); 162 paintBorder(ctx, g, y, 0, h, w, transform); 163 } else if (orientation == SwingConstants.HORIZONTAL && ltr) { 164 paintBorder(ctx, g, x, y, w, h, null); 165 } else { 166 //horizontal and right-to-left orientation 167 paintBorder(ctx, g, x, y, w, h, null); 168 } 169 } 170 171 private void paintForeground(SynthContext ctx, Graphics g, int x, int y, int w, int h, int orientation) { 172 Component c = ctx.getComponent(); 173 boolean ltr = c.getComponentOrientation().isLeftToRight(); 174 if (orientation == SwingConstants.VERTICAL && ltr) { 175 AffineTransform transform = new AffineTransform(); 176 transform.scale(-1, 1); 177 transform.rotate(Math.toRadians(90)); 178 paintForeground(ctx, g, y, x, h, w, transform); 179 } else if (orientation == SwingConstants.VERTICAL) { 180 AffineTransform transform = new AffineTransform(); 181 transform.rotate(Math.toRadians(90)); 182 transform.translate(0, -(x + w)); 183 paintForeground(ctx, g, y, 0, h, w, transform); 184 } else if (orientation == SwingConstants.HORIZONTAL && ltr) { 185 paintForeground(ctx, g, x, y, w, h, null); 186 } else { 187 //horizontal and right-to-left orientation 188 paintForeground(ctx, g, x, y, w, h, null); 189 } 190 } 191 192 /** 193 * Paints the background of an arrow button. Arrow buttons are created by 194 * some components, such as <code>JScrollBar</code>. 195 * 196 * @param context SynthContext identifying the <code>JComponent</code> and 197 * <code>Region</code> to paint to 198 * @param g <code>Graphics</code> to paint to 199 * @param x X coordinate of the area to paint to 200 * @param y Y coordinate of the area to paint to 201 * @param w Width of the area to paint to 202 * @param h Height of the area to paint to 203 */ 204 public void paintArrowButtonBackground(SynthContext context, 205 Graphics g, int x, int y, 206 int w, int h) { 207 if (context.getComponent().getComponentOrientation().isLeftToRight()){ 208 paintBackground(context, g, x, y, w, h, null); 209 } else { 210 AffineTransform transform = new AffineTransform(); 211 transform.translate(x,y); 212 transform.scale(-1, 1); 213 transform.translate(-w,0); 214 paintBackground(context, g, 0, 0, w, h, transform); 215 } 216 } 217 218 /** 219 * Paints the border of an arrow button. Arrow buttons are created by 220 * some components, such as <code>JScrollBar</code>. 221 * 222 * @param context SynthContext identifying the <code>JComponent</code> and 223 * <code>Region</code> to paint to 224 * @param g <code>Graphics</code> to paint to 225 * @param x X coordinate of the area to paint to 226 * @param y Y coordinate of the area to paint to 227 * @param w Width of the area to paint to 228 * @param h Height of the area to paint to 229 */ 230 public void paintArrowButtonBorder(SynthContext context, 231 Graphics g, int x, int y, 232 int w, int h) { 233 paintBorder(context, g, x, y, w, h, null); 234 } 235 236 /** 237 * Paints the foreground of an arrow button. This method is responsible 238 * for drawing a graphical representation of a direction, typically 239 * an arrow. Arrow buttons are created by 240 * some components, such as <code>JScrollBar</code> 241 * 242 * @param context SynthContext identifying the <code>JComponent</code> and 243 * <code>Region</code> to paint to 244 * @param g <code>Graphics</code> to paint to 245 * @param x X coordinate of the area to paint to 246 * @param y Y coordinate of the area to paint to 247 * @param w Width of the area to paint to 248 * @param h Height of the area to paint to 249 * @param direction One of SwingConstants.NORTH, SwingConstants.SOUTH 250 * SwingConstants.EAST or SwingConstants.WEST 251 */ 252 public void paintArrowButtonForeground(SynthContext context, 253 Graphics g, int x, int y, 254 int w, int h, 255 int direction) { 256 //assume that the painter is arranged with the arrow pointing... LEFT? 257 String compName = context.getComponent().getName(); 258 boolean ltr = context.getComponent(). 259 getComponentOrientation().isLeftToRight(); 260 // The hard coding for spinners here needs to be replaced by a more 261 // general method for disabling rotation 262 if ("Spinner.nextButton".equals(compName) || 263 "Spinner.previousButton".equals(compName)) { 264 if (ltr){ 265 paintForeground(context, g, x, y, w, h, null); 266 } else { 267 AffineTransform transform = new AffineTransform(); 268 transform.translate(w, 0); 269 transform.scale(-1, 1); 270 paintForeground(context, g, x, y, w, h, transform); 271 } 272 } else if (direction == SwingConstants.WEST) { 273 paintForeground(context, g, x, y, w, h, null); 274 } else if (direction == SwingConstants.NORTH) { 275 if (ltr){ 276 AffineTransform transform = new AffineTransform(); 277 transform.scale(-1, 1); 278 transform.rotate(Math.toRadians(90)); 279 paintForeground(context, g, y, 0, h, w, transform); 280 } else { 281 AffineTransform transform = new AffineTransform(); 282 transform.rotate(Math.toRadians(90)); 283 transform.translate(0, -(x + w)); 284 paintForeground(context, g, y, 0, h, w, transform); 285 } 286 } else if (direction == SwingConstants.EAST) { 287 AffineTransform transform = new AffineTransform(); 288 transform.translate(w, 0); 289 transform.scale(-1, 1); 290 paintForeground(context, g, x, y, w, h, transform); 291 } else if (direction == SwingConstants.SOUTH) { 292 if (ltr){ 293 AffineTransform transform = new AffineTransform(); 294 transform.rotate(Math.toRadians(-90)); 295 transform.translate(-h, 0); 296 paintForeground(context, g, y, x, h, w, transform); 297 } else { 298 AffineTransform transform = new AffineTransform(); 299 transform.scale(-1, 1); 300 transform.rotate(Math.toRadians(-90)); 301 transform.translate(-(h+y), -(w+x)); 302 paintForeground(context, g, y, x, h, w, transform); 303 } 304 } 305 } 306 307 /** 308 * Paints the background of a button. 309 * 310 * @param context SynthContext identifying the <code>JComponent</code> and 311 * <code>Region</code> to paint to 312 * @param g <code>Graphics</code> to paint to 313 * @param x X coordinate of the area to paint to 314 * @param y Y coordinate of the area to paint to 315 * @param w Width of the area to paint to 316 * @param h Height of the area to paint to 317 */ 318 public void paintButtonBackground(SynthContext context, 319 Graphics g, int x, int y, 320 int w, int h) { 321 paintBackground(context, g, x, y, w, h, null); 322 } 323 324 /** 325 * Paints the border of a button. 326 * 327 * @param context SynthContext identifying the <code>JComponent</code> and 328 * <code>Region</code> to paint to 329 * @param g <code>Graphics</code> to paint to 330 * @param x X coordinate of the area to paint to 331 * @param y Y coordinate of the area to paint to 332 * @param w Width of the area to paint to 333 * @param h Height of the area to paint to 334 */ 335 public void paintButtonBorder(SynthContext context, 336 Graphics g, int x, int y, 337 int w, int h) { 338 paintBorder(context, g, x, y, w, h, null); 339 } 340 341 /** 342 * Paints the background of a check box menu item. 343 * 344 * @param context SynthContext identifying the <code>JComponent</code> and 345 * <code>Region</code> to paint to 346 * @param g <code>Graphics</code> to paint to 347 * @param x X coordinate of the area to paint to 348 * @param y Y coordinate of the area to paint to 349 * @param w Width of the area to paint to 350 * @param h Height of the area to paint to 351 */ 352 public void paintCheckBoxMenuItemBackground(SynthContext context, 353 Graphics g, int x, int y, 354 int w, int h) { 355 paintBackground(context, g, x, y, w, h, null); 356 } 357 358 /** 359 * Paints the border of a check box menu item. 360 * 361 * @param context SynthContext identifying the <code>JComponent</code> and 362 * <code>Region</code> to paint to 363 * @param g <code>Graphics</code> to paint to 364 * @param x X coordinate of the area to paint to 365 * @param y Y coordinate of the area to paint to 366 * @param w Width of the area to paint to 367 * @param h Height of the area to paint to 368 */ 369 public void paintCheckBoxMenuItemBorder(SynthContext context, 370 Graphics g, int x, int y, 371 int w, int h) { 372 paintBorder(context, g, x, y, w, h, null); 373 } 374 375 /** 376 * Paints the background of a check box. 377 * 378 * @param context SynthContext identifying the <code>JComponent</code> and 379 * <code>Region</code> to paint to 380 * @param g <code>Graphics</code> to paint to 381 * @param x X coordinate of the area to paint to 382 * @param y Y coordinate of the area to paint to 383 * @param w Width of the area to paint to 384 * @param h Height of the area to paint to 385 */ 386 public void paintCheckBoxBackground(SynthContext context, 387 Graphics g, int x, int y, 388 int w, int h) { 389 paintBackground(context, g, x, y, w, h, null); 390 } 391 392 /** 393 * Paints the border of a check box. 394 * 395 * @param context SynthContext identifying the <code>JComponent</code> and 396 * <code>Region</code> to paint to 397 * @param g <code>Graphics</code> to paint to 398 * @param x X coordinate of the area to paint to 399 * @param y Y coordinate of the area to paint to 400 * @param w Width of the area to paint to 401 * @param h Height of the area to paint to 402 */ 403 public void paintCheckBoxBorder(SynthContext context, 404 Graphics g, int x, int y, 405 int w, int h) { 406 paintBorder(context, g, x, y, w, h, null); 407 } 408 409 /** 410 * Paints the background of a color chooser. 411 * 412 * @param context SynthContext identifying the <code>JComponent</code> and 413 * <code>Region</code> to paint to 414 * @param g <code>Graphics</code> to paint to 415 * @param x X coordinate of the area to paint to 416 * @param y Y coordinate of the area to paint to 417 * @param w Width of the area to paint to 418 * @param h Height of the area to paint to 419 */ 420 public void paintColorChooserBackground(SynthContext context, 421 Graphics g, int x, int y, 422 int w, int h) { 423 paintBackground(context, g, x, y, w, h, null); 424 } 425 426 /** 427 * Paints the border of a color chooser. 428 * 429 * @param context SynthContext identifying the <code>JComponent</code> and 430 * <code>Region</code> to paint to 431 * @param g <code>Graphics</code> to paint to 432 * @param x X coordinate of the area to paint to 433 * @param y Y coordinate of the area to paint to 434 * @param w Width of the area to paint to 435 * @param h Height of the area to paint to 436 */ 437 public void paintColorChooserBorder(SynthContext context, 438 Graphics g, int x, int y, 439 int w, int h) { 440 paintBorder(context, g, x, y, w, h, null); 441 } 442 443 /** 444 * Paints the background of a combo box. 445 * 446 * @param context SynthContext identifying the <code>JComponent</code> and 447 * <code>Region</code> to paint to 448 * @param g <code>Graphics</code> to paint to 449 * @param x X coordinate of the area to paint to 450 * @param y Y coordinate of the area to paint to 451 * @param w Width of the area to paint to 452 * @param h Height of the area to paint to 453 */ 454 public void paintComboBoxBackground(SynthContext context, 455 Graphics g, int x, int y, 456 int w, int h) { 457 if (context.getComponent().getComponentOrientation().isLeftToRight()){ 458 paintBackground(context, g, x, y, w, h, null); 459 } else { 460 AffineTransform transform = new AffineTransform(); 461 transform.translate(x,y); 462 transform.scale(-1, 1); 463 transform.translate(-w,0); 464 paintBackground(context, g, 0, 0, w, h, transform); 465 } 466 } 467 468 /** 469 * Paints the border of a combo box. 470 * 471 * @param context SynthContext identifying the <code>JComponent</code> and 472 * <code>Region</code> to paint to 473 * @param g <code>Graphics</code> to paint to 474 * @param x X coordinate of the area to paint to 475 * @param y Y coordinate of the area to paint to 476 * @param w Width of the area to paint to 477 * @param h Height of the area to paint to 478 */ 479 public void paintComboBoxBorder(SynthContext context, 480 Graphics g, int x, int y, 481 int w, int h) { 482 paintBorder(context, g, x, y, w, h, null); 483 } 484 485 /** 486 * Paints the background of a desktop icon. 487 * 488 * @param context SynthContext identifying the <code>JComponent</code> and 489 * <code>Region</code> to paint to 490 * @param g <code>Graphics</code> to paint to 491 * @param x X coordinate of the area to paint to 492 * @param y Y coordinate of the area to paint to 493 * @param w Width of the area to paint to 494 * @param h Height of the area to paint to 495 */ 496 public void paintDesktopIconBackground(SynthContext context, 497 Graphics g, int x, int y, 498 int w, int h) { 499 paintBackground(context, g, x, y, w, h, null); 500 } 501 502 /** 503 * Paints the border of a desktop icon. 504 * 505 * @param context SynthContext identifying the <code>JComponent</code> and 506 * <code>Region</code> to paint to 507 * @param g <code>Graphics</code> to paint to 508 * @param x X coordinate of the area to paint to 509 * @param y Y coordinate of the area to paint to 510 * @param w Width of the area to paint to 511 * @param h Height of the area to paint to 512 */ 513 public void paintDesktopIconBorder(SynthContext context, 514 Graphics g, int x, int y, 515 int w, int h) { 516 paintBorder(context, g, x, y, w, h, null); 517 } 518 519 /** 520 * Paints the background of a desktop pane. 521 * 522 * @param context SynthContext identifying the <code>JComponent</code> and 523 * <code>Region</code> to paint to 524 * @param g <code>Graphics</code> to paint to 525 * @param x X coordinate of the area to paint to 526 * @param y Y coordinate of the area to paint to 527 * @param w Width of the area to paint to 528 * @param h Height of the area to paint to 529 */ 530 public void paintDesktopPaneBackground(SynthContext context, 531 Graphics g, int x, int y, 532 int w, int h) { 533 paintBackground(context, g, x, y, w, h, null); 534 } 535 536 /** 537 * Paints the background of a desktop pane. 538 * 539 * @param context SynthContext identifying the <code>JComponent</code> and 540 * <code>Region</code> to paint to 541 * @param g <code>Graphics</code> to paint to 542 * @param x X coordinate of the area to paint to 543 * @param y Y coordinate of the area to paint to 544 * @param w Width of the area to paint to 545 * @param h Height of the area to paint to 546 */ 547 public void paintDesktopPaneBorder(SynthContext context, 548 Graphics g, int x, int y, 549 int w, int h) { 550 paintBorder(context, g, x, y, w, h, null); 551 } 552 553 /** 554 * Paints the background of an editor pane. 555 * 556 * @param context SynthContext identifying the <code>JComponent</code> and 557 * <code>Region</code> to paint to 558 * @param g <code>Graphics</code> to paint to 559 * @param x X coordinate of the area to paint to 560 * @param y Y coordinate of the area to paint to 561 * @param w Width of the area to paint to 562 * @param h Height of the area to paint to 563 */ 564 public void paintEditorPaneBackground(SynthContext context, 565 Graphics g, int x, int y, 566 int w, int h) { 567 paintBackground(context, g, x, y, w, h, null); 568 } 569 570 /** 571 * Paints the border of an editor pane. 572 * 573 * @param context SynthContext identifying the <code>JComponent</code> and 574 * <code>Region</code> to paint to 575 * @param g <code>Graphics</code> to paint to 576 * @param x X coordinate of the area to paint to 577 * @param y Y coordinate of the area to paint to 578 * @param w Width of the area to paint to 579 * @param h Height of the area to paint to 580 */ 581 public void paintEditorPaneBorder(SynthContext context, 582 Graphics g, int x, int y, 583 int w, int h) { 584 paintBorder(context, g, x, y, w, h, null); 585 } 586 587 /** 588 * Paints the background of a file chooser. 589 * 590 * @param context SynthContext identifying the <code>JComponent</code> and 591 * <code>Region</code> to paint to 592 * @param g <code>Graphics</code> to paint to 593 * @param x X coordinate of the area to paint to 594 * @param y Y coordinate of the area to paint to 595 * @param w Width of the area to paint to 596 * @param h Height of the area to paint to 597 */ 598 public void paintFileChooserBackground(SynthContext context, 599 Graphics g, int x, int y, 600 int w, int h) { 601 paintBackground(context, g, x, y, w, h, null); 602 } 603 604 /** 605 * Paints the border of a file chooser. 606 * 607 * @param context SynthContext identifying the <code>JComponent</code> and 608 * <code>Region</code> to paint to 609 * @param g <code>Graphics</code> to paint to 610 * @param x X coordinate of the area to paint to 611 * @param y Y coordinate of the area to paint to 612 * @param w Width of the area to paint to 613 * @param h Height of the area to paint to 614 */ 615 public void paintFileChooserBorder(SynthContext context, 616 Graphics g, int x, int y, 617 int w, int h) { 618 paintBorder(context, g, x, y, w, h, null); 619 } 620 621 /** 622 * Paints the background of a formatted text field. 623 * 624 * @param context SynthContext identifying the <code>JComponent</code> and 625 * <code>Region</code> to paint to 626 * @param g <code>Graphics</code> to paint to 627 * @param x X coordinate of the area to paint to 628 * @param y Y coordinate of the area to paint to 629 * @param w Width of the area to paint to 630 * @param h Height of the area to paint to 631 */ 632 public void paintFormattedTextFieldBackground(SynthContext context, 633 Graphics g, int x, int y, 634 int w, int h) { 635 if (context.getComponent().getComponentOrientation().isLeftToRight()){ 636 paintBackground(context, g, x, y, w, h, null); 637 } else { 638 AffineTransform transform = new AffineTransform(); 639 transform.translate(x,y); 640 transform.scale(-1, 1); 641 transform.translate(-w,0); 642 paintBackground(context, g, 0, 0, w, h, transform); 643 } 644 } 645 646 /** 647 * Paints the border of a formatted text field. 648 * 649 * @param context SynthContext identifying the <code>JComponent</code> and 650 * <code>Region</code> to paint to 651 * @param g <code>Graphics</code> to paint to 652 * @param x X coordinate of the area to paint to 653 * @param y Y coordinate of the area to paint to 654 * @param w Width of the area to paint to 655 * @param h Height of the area to paint to 656 */ 657 public void paintFormattedTextFieldBorder(SynthContext context, 658 Graphics g, int x, int y, 659 int w, int h) { 660 if (context.getComponent().getComponentOrientation().isLeftToRight()){ 661 paintBorder(context, g, x, y, w, h, null); 662 } else { 663 AffineTransform transform = new AffineTransform(); 664 transform.translate(x,y); 665 transform.scale(-1, 1); 666 transform.translate(-w,0); 667 paintBorder(context, g, 0, 0, w, h, transform); 668 } 669 } 670 671 /** 672 * Paints the background of an internal frame title pane. 673 * 674 * @param context SynthContext identifying the <code>JComponent</code> and 675 * <code>Region</code> to paint to 676 * @param g <code>Graphics</code> to paint to 677 * @param x X coordinate of the area to paint to 678 * @param y Y coordinate of the area to paint to 679 * @param w Width of the area to paint to 680 * @param h Height of the area to paint to 681 */ 682 public void paintInternalFrameTitlePaneBackground(SynthContext context, 683 Graphics g, int x, int y, 684 int w, int h) { 685 paintBackground(context, g, x, y, w, h, null); 686 } 687 688 /** 689 * Paints the border of an internal frame title pane. 690 * 691 * @param context SynthContext identifying the <code>JComponent</code> and 692 * <code>Region</code> to paint to 693 * @param g <code>Graphics</code> to paint to 694 * @param x X coordinate of the area to paint to 695 * @param y Y coordinate of the area to paint to 696 * @param w Width of the area to paint to 697 * @param h Height of the area to paint to 698 */ 699 public void paintInternalFrameTitlePaneBorder(SynthContext context, 700 Graphics g, int x, int y, 701 int w, int h) { 702 paintBorder(context, g, x, y, w, h, null); 703 } 704 705 /** 706 * Paints the background of an internal frame. 707 * 708 * @param context SynthContext identifying the <code>JComponent</code> and 709 * <code>Region</code> to paint to 710 * @param g <code>Graphics</code> to paint to 711 * @param x X coordinate of the area to paint to 712 * @param y Y coordinate of the area to paint to 713 * @param w Width of the area to paint to 714 * @param h Height of the area to paint to 715 */ 716 public void paintInternalFrameBackground(SynthContext context, 717 Graphics g, int x, int y, 718 int w, int h) { 719 paintBackground(context, g, x, y, w, h, null); 720 } 721 722 /** 723 * Paints the border of an internal frame. 724 * 725 * @param context SynthContext identifying the <code>JComponent</code> and 726 * <code>Region</code> to paint to 727 * @param g <code>Graphics</code> to paint to 728 * @param x X coordinate of the area to paint to 729 * @param y Y coordinate of the area to paint to 730 * @param w Width of the area to paint to 731 * @param h Height of the area to paint to 732 */ 733 public void paintInternalFrameBorder(SynthContext context, 734 Graphics g, int x, int y, 735 int w, int h) { 736 paintBorder(context, g, x, y, w, h, null); 737 } 738 739 /** 740 * Paints the background of a label. 741 * 742 * @param context SynthContext identifying the <code>JComponent</code> and 743 * <code>Region</code> to paint to 744 * @param g <code>Graphics</code> to paint to 745 * @param x X coordinate of the area to paint to 746 * @param y Y coordinate of the area to paint to 747 * @param w Width of the area to paint to 748 * @param h Height of the area to paint to 749 */ 750 public void paintLabelBackground(SynthContext context, 751 Graphics g, int x, int y, 752 int w, int h) { 753 paintBackground(context, g, x, y, w, h, null); 754 } 755 756 /** 757 * Paints the border of a label. 758 * 759 * @param context SynthContext identifying the <code>JComponent</code> and 760 * <code>Region</code> to paint to 761 * @param g <code>Graphics</code> to paint to 762 * @param x X coordinate of the area to paint to 763 * @param y Y coordinate of the area to paint to 764 * @param w Width of the area to paint to 765 * @param h Height of the area to paint to 766 */ 767 public void paintLabelBorder(SynthContext context, 768 Graphics g, int x, int y, 769 int w, int h) { 770 paintBorder(context, g, x, y, w, h, null); 771 } 772 773 /** 774 * Paints the background of a list. 775 * 776 * @param context SynthContext identifying the <code>JComponent</code> and 777 * <code>Region</code> to paint to 778 * @param g <code>Graphics</code> to paint to 779 * @param x X coordinate of the area to paint to 780 * @param y Y coordinate of the area to paint to 781 * @param w Width of the area to paint to 782 * @param h Height of the area to paint to 783 */ 784 public void paintListBackground(SynthContext context, 785 Graphics g, int x, int y, 786 int w, int h) { 787 paintBackground(context, g, x, y, w, h, null); 788 } 789 790 /** 791 * Paints the border of a list. 792 * 793 * @param context SynthContext identifying the <code>JComponent</code> and 794 * <code>Region</code> to paint to 795 * @param g <code>Graphics</code> to paint to 796 * @param x X coordinate of the area to paint to 797 * @param y Y coordinate of the area to paint to 798 * @param w Width of the area to paint to 799 * @param h Height of the area to paint to 800 */ 801 public void paintListBorder(SynthContext context, 802 Graphics g, int x, int y, 803 int w, int h) { 804 paintBorder(context, g, x, y, w, h, null); 805 } 806 807 /** 808 * Paints the background of a menu bar. 809 * 810 * @param context SynthContext identifying the <code>JComponent</code> and 811 * <code>Region</code> to paint to 812 * @param g <code>Graphics</code> to paint to 813 * @param x X coordinate of the area to paint to 814 * @param y Y coordinate of the area to paint to 815 * @param w Width of the area to paint to 816 * @param h Height of the area to paint to 817 */ 818 public void paintMenuBarBackground(SynthContext context, 819 Graphics g, int x, int y, 820 int w, int h) { 821 paintBackground(context, g, x, y, w, h, null); 822 } 823 824 /** 825 * Paints the border of a menu bar. 826 * 827 * @param context SynthContext identifying the <code>JComponent</code> and 828 * <code>Region</code> to paint to 829 * @param g <code>Graphics</code> to paint to 830 * @param x X coordinate of the area to paint to 831 * @param y Y coordinate of the area to paint to 832 * @param w Width of the area to paint to 833 * @param h Height of the area to paint to 834 */ 835 public void paintMenuBarBorder(SynthContext context, 836 Graphics g, int x, int y, 837 int w, int h) { 838 paintBorder(context, g, x, y, w, h, null); 839 } 840 841 /** 842 * Paints the background of a menu item. 843 * 844 * @param context SynthContext identifying the <code>JComponent</code> and 845 * <code>Region</code> to paint to 846 * @param g <code>Graphics</code> to paint to 847 * @param x X coordinate of the area to paint to 848 * @param y Y coordinate of the area to paint to 849 * @param w Width of the area to paint to 850 * @param h Height of the area to paint to 851 */ 852 public void paintMenuItemBackground(SynthContext context, 853 Graphics g, int x, int y, 854 int w, int h) { 855 paintBackground(context, g, x, y, w, h, null); 856 } 857 858 /** 859 * Paints the border of a menu item. 860 * 861 * @param context SynthContext identifying the <code>JComponent</code> and 862 * <code>Region</code> to paint to 863 * @param g <code>Graphics</code> to paint to 864 * @param x X coordinate of the area to paint to 865 * @param y Y coordinate of the area to paint to 866 * @param w Width of the area to paint to 867 * @param h Height of the area to paint to 868 */ 869 public void paintMenuItemBorder(SynthContext context, 870 Graphics g, int x, int y, 871 int w, int h) { 872 paintBorder(context, g, x, y, w, h, null); 873 } 874 875 /** 876 * Paints the background of a menu. 877 * 878 * @param context SynthContext identifying the <code>JComponent</code> and 879 * <code>Region</code> to paint to 880 * @param g <code>Graphics</code> to paint to 881 * @param x X coordinate of the area to paint to 882 * @param y Y coordinate of the area to paint to 883 * @param w Width of the area to paint to 884 * @param h Height of the area to paint to 885 */ 886 public void paintMenuBackground(SynthContext context, 887 Graphics g, int x, int y, 888 int w, int h) { 889 paintBackground(context, g, x, y, w, h, null); 890 } 891 892 /** 893 * Paints the border of a menu. 894 * 895 * @param context SynthContext identifying the <code>JComponent</code> and 896 * <code>Region</code> to paint to 897 * @param g <code>Graphics</code> to paint to 898 * @param x X coordinate of the area to paint to 899 * @param y Y coordinate of the area to paint to 900 * @param w Width of the area to paint to 901 * @param h Height of the area to paint to 902 */ 903 public void paintMenuBorder(SynthContext context, 904 Graphics g, int x, int y, 905 int w, int h) { 906 paintBorder(context, g, x, y, w, h, null); 907 } 908 909 /** 910 * Paints the background of an option pane. 911 * 912 * @param context SynthContext identifying the <code>JComponent</code> and 913 * <code>Region</code> to paint to 914 * @param g <code>Graphics</code> to paint to 915 * @param x X coordinate of the area to paint to 916 * @param y Y coordinate of the area to paint to 917 * @param w Width of the area to paint to 918 * @param h Height of the area to paint to 919 */ 920 public void paintOptionPaneBackground(SynthContext context, 921 Graphics g, int x, int y, 922 int w, int h) { 923 paintBackground(context, g, x, y, w, h, null); 924 } 925 926 /** 927 * Paints the border of an option pane. 928 * 929 * @param context SynthContext identifying the <code>JComponent</code> and 930 * <code>Region</code> to paint to 931 * @param g <code>Graphics</code> to paint to 932 * @param x X coordinate of the area to paint to 933 * @param y Y coordinate of the area to paint to 934 * @param w Width of the area to paint to 935 * @param h Height of the area to paint to 936 */ 937 public void paintOptionPaneBorder(SynthContext context, 938 Graphics g, int x, int y, 939 int w, int h) { 940 paintBorder(context, g, x, y, w, h, null); 941 } 942 943 /** 944 * Paints the background of a panel. 945 * 946 * @param context SynthContext identifying the <code>JComponent</code> and 947 * <code>Region</code> to paint to 948 * @param g <code>Graphics</code> to paint to 949 * @param x X coordinate of the area to paint to 950 * @param y Y coordinate of the area to paint to 951 * @param w Width of the area to paint to 952 * @param h Height of the area to paint to 953 */ 954 public void paintPanelBackground(SynthContext context, 955 Graphics g, int x, int y, 956 int w, int h) { 957 paintBackground(context, g, x, y, w, h, null); 958 } 959 960 /** 961 * Paints the border of a panel. 962 * 963 * @param context SynthContext identifying the <code>JComponent</code> and 964 * <code>Region</code> to paint to 965 * @param g <code>Graphics</code> to paint to 966 * @param x X coordinate of the area to paint to 967 * @param y Y coordinate of the area to paint to 968 * @param w Width of the area to paint to 969 * @param h Height of the area to paint to 970 */ 971 public void paintPanelBorder(SynthContext context, 972 Graphics g, int x, int y, 973 int w, int h) { 974 paintBorder(context, g, x, y, w, h, null); 975 } 976 977 /** 978 * Paints the background of a password field. 979 * 980 * @param context SynthContext identifying the <code>JComponent</code> and 981 * <code>Region</code> to paint to 982 * @param g <code>Graphics</code> to paint to 983 * @param x X coordinate of the area to paint to 984 * @param y Y coordinate of the area to paint to 985 * @param w Width of the area to paint to 986 * @param h Height of the area to paint to 987 */ 988 public void paintPasswordFieldBackground(SynthContext context, 989 Graphics g, int x, int y, 990 int w, int h) { 991 paintBackground(context, g, x, y, w, h, null); 992 } 993 994 /** 995 * Paints the border of a password field. 996 * 997 * @param context SynthContext identifying the <code>JComponent</code> and 998 * <code>Region</code> to paint to 999 * @param g <code>Graphics</code> to paint to 1000 * @param x X coordinate of the area to paint to 1001 * @param y Y coordinate of the area to paint to 1002 * @param w Width of the area to paint to 1003 * @param h Height of the area to paint to 1004 */ 1005 public void paintPasswordFieldBorder(SynthContext context, 1006 Graphics g, int x, int y, 1007 int w, int h) { 1008 paintBorder(context, g, x, y, w, h, null); 1009 } 1010 1011 /** 1012 * Paints the background of a popup menu. 1013 * 1014 * @param context SynthContext identifying the <code>JComponent</code> and 1015 * <code>Region</code> to paint to 1016 * @param g <code>Graphics</code> to paint to 1017 * @param x X coordinate of the area to paint to 1018 * @param y Y coordinate of the area to paint to 1019 * @param w Width of the area to paint to 1020 * @param h Height of the area to paint to 1021 */ 1022 public void paintPopupMenuBackground(SynthContext context, 1023 Graphics g, int x, int y, 1024 int w, int h) { 1025 paintBackground(context, g, x, y, w, h, null); 1026 } 1027 1028 /** 1029 * Paints the border of a popup menu. 1030 * 1031 * @param context SynthContext identifying the <code>JComponent</code> and 1032 * <code>Region</code> to paint to 1033 * @param g <code>Graphics</code> to paint to 1034 * @param x X coordinate of the area to paint to 1035 * @param y Y coordinate of the area to paint to 1036 * @param w Width of the area to paint to 1037 * @param h Height of the area to paint to 1038 */ 1039 public void paintPopupMenuBorder(SynthContext context, 1040 Graphics g, int x, int y, 1041 int w, int h) { 1042 paintBorder(context, g, x, y, w, h, null); 1043 } 1044 1045 /** 1046 * Paints the background of a progress bar. 1047 * 1048 * @param context SynthContext identifying the <code>JComponent</code> and 1049 * <code>Region</code> to paint to 1050 * @param g <code>Graphics</code> to paint to 1051 * @param x X coordinate of the area to paint to 1052 * @param y Y coordinate of the area to paint to 1053 * @param w Width of the area to paint to 1054 * @param h Height of the area to paint to 1055 */ 1056 public void paintProgressBarBackground(SynthContext context, 1057 Graphics g, int x, int y, 1058 int w, int h) { 1059 paintBackground(context, g, x, y, w, h, null); 1060 } 1061 1062 /** 1063 * Paints the background of a progress bar. This implementation invokes the 1064 * method of the same name without the orientation. 1065 * 1066 * @param context SynthContext identifying the <code>JComponent</code> and 1067 * <code>Region</code> to paint to 1068 * @param g <code>Graphics</code> to paint to 1069 * @param x X coordinate of the area to paint to 1070 * @param y Y coordinate of the area to paint to 1071 * @param w Width of the area to paint to 1072 * @param h Height of the area to paint to 1073 * @param orientation one of <code>JProgressBar.HORIZONTAL</code> or 1074 * <code>JProgressBar.VERTICAL</code> 1075 * @since 1.6 1076 */ 1077 public void paintProgressBarBackground(SynthContext context, 1078 Graphics g, int x, int y, 1079 int w, int h, int orientation) { 1080 paintBackground(context, g, x, y, w, h, orientation); 1081 } 1082 1083 /** 1084 * Paints the border of a progress bar. 1085 * 1086 * @param context SynthContext identifying the <code>JComponent</code> and 1087 * <code>Region</code> to paint to 1088 * @param g <code>Graphics</code> to paint to 1089 * @param x X coordinate of the area to paint to 1090 * @param y Y coordinate of the area to paint to 1091 * @param w Width of the area to paint to 1092 * @param h Height of the area to paint to 1093 */ 1094 public void paintProgressBarBorder(SynthContext context, 1095 Graphics g, int x, int y, 1096 int w, int h) { 1097 paintBorder(context, g, x, y, w, h, null); 1098 } 1099 1100 /** 1101 * Paints the border of a progress bar. This implementation invokes the 1102 * method of the same name without the orientation. 1103 * 1104 * @param context SynthContext identifying the <code>JComponent</code> and 1105 * <code>Region</code> to paint to 1106 * @param g <code>Graphics</code> to paint to 1107 * @param x X coordinate of the area to paint to 1108 * @param y Y coordinate of the area to paint to 1109 * @param w Width of the area to paint to 1110 * @param h Height of the area to paint to 1111 * @param orientation one of <code>JProgressBar.HORIZONTAL</code> or 1112 * <code>JProgressBar.VERTICAL</code> 1113 * @since 1.6 1114 */ 1115 public void paintProgressBarBorder(SynthContext context, 1116 Graphics g, int x, int y, 1117 int w, int h, int orientation) { 1118 paintBorder(context, g, x, y, w, h, orientation); 1119 } 1120 1121 /** 1122 * Paints the foreground of a progress bar. is responsible for 1123 * providing an indication of the progress of the progress bar. 1124 * 1125 * @param context SynthContext identifying the <code>JComponent</code> and 1126 * <code>Region</code> to paint to 1127 * @param g <code>Graphics</code> to paint to 1128 * @param x X coordinate of the area to paint to 1129 * @param y Y coordinate of the area to paint to 1130 * @param w Width of the area to paint to 1131 * @param h Height of the area to paint to 1132 * @param orientation one of <code>JProgressBar.HORIZONTAL</code> or 1133 * <code>JProgressBar.VERTICAL</code> 1134 */ 1135 public void paintProgressBarForeground(SynthContext context, 1136 Graphics g, int x, int y, 1137 int w, int h, int orientation) { 1138 paintForeground(context, g, x, y, w, h, orientation); 1139 } 1140 1141 /** 1142 * Paints the background of a radio button menu item. 1143 * 1144 * @param context SynthContext identifying the <code>JComponent</code> and 1145 * <code>Region</code> to paint to 1146 * @param g <code>Graphics</code> to paint to 1147 * @param x X coordinate of the area to paint to 1148 * @param y Y coordinate of the area to paint to 1149 * @param w Width of the area to paint to 1150 * @param h Height of the area to paint to 1151 */ 1152 public void paintRadioButtonMenuItemBackground(SynthContext context, 1153 Graphics g, int x, int y, 1154 int w, int h) { 1155 paintBackground(context, g, x, y, w, h, null); 1156 } 1157 1158 /** 1159 * Paints the border of a radio button menu item. 1160 * 1161 * @param context SynthContext identifying the <code>JComponent</code> and 1162 * <code>Region</code> to paint to 1163 * @param g <code>Graphics</code> to paint to 1164 * @param x X coordinate of the area to paint to 1165 * @param y Y coordinate of the area to paint to 1166 * @param w Width of the area to paint to 1167 * @param h Height of the area to paint to 1168 */ 1169 public void paintRadioButtonMenuItemBorder(SynthContext context, 1170 Graphics g, int x, int y, 1171 int w, int h) { 1172 paintBorder(context, g, x, y, w, h, null); 1173 } 1174 1175 /** 1176 * Paints the background of a radio button. 1177 * 1178 * @param context SynthContext identifying the <code>JComponent</code> and 1179 * <code>Region</code> to paint to 1180 * @param g <code>Graphics</code> to paint to 1181 * @param x X coordinate of the area to paint to 1182 * @param y Y coordinate of the area to paint to 1183 * @param w Width of the area to paint to 1184 * @param h Height of the area to paint to 1185 */ 1186 public void paintRadioButtonBackground(SynthContext context, 1187 Graphics g, int x, int y, 1188 int w, int h) { 1189 paintBackground(context, g, x, y, w, h, null); 1190 } 1191 1192 /** 1193 * Paints the border of a radio button. 1194 * 1195 * @param context SynthContext identifying the <code>JComponent</code> and 1196 * <code>Region</code> to paint to 1197 * @param g <code>Graphics</code> to paint to 1198 * @param x X coordinate of the area to paint to 1199 * @param y Y coordinate of the area to paint to 1200 * @param w Width of the area to paint to 1201 * @param h Height of the area to paint to 1202 */ 1203 public void paintRadioButtonBorder(SynthContext context, 1204 Graphics g, int x, int y, 1205 int w, int h) { 1206 paintBorder(context, g, x, y, w, h, null); 1207 } 1208 1209 /** 1210 * Paints the background of a root pane. 1211 * 1212 * @param context SynthContext identifying the <code>JComponent</code> and 1213 * <code>Region</code> to paint to 1214 * @param g <code>Graphics</code> to paint to 1215 * @param x X coordinate of the area to paint to 1216 * @param y Y coordinate of the area to paint to 1217 * @param w Width of the area to paint to 1218 * @param h Height of the area to paint to 1219 */ 1220 public void paintRootPaneBackground(SynthContext context, 1221 Graphics g, int x, int y, 1222 int w, int h) { 1223 paintBackground(context, g, x, y, w, h, null); 1224 } 1225 1226 /** 1227 * Paints the border of a root pane. 1228 * 1229 * @param context SynthContext identifying the <code>JComponent</code> and 1230 * <code>Region</code> to paint to 1231 * @param g <code>Graphics</code> to paint to 1232 * @param x X coordinate of the area to paint to 1233 * @param y Y coordinate of the area to paint to 1234 * @param w Width of the area to paint to 1235 * @param h Height of the area to paint to 1236 */ 1237 public void paintRootPaneBorder(SynthContext context, 1238 Graphics g, int x, int y, 1239 int w, int h) { 1240 paintBorder(context, g, x, y, w, h, null); 1241 } 1242 1243 /** 1244 * Paints the background of a scrollbar. 1245 * 1246 * @param context SynthContext identifying the <code>JComponent</code> and 1247 * <code>Region</code> to paint to 1248 * @param g <code>Graphics</code> to paint to 1249 * @param x X coordinate of the area to paint to 1250 * @param y Y coordinate of the area to paint to 1251 * @param w Width of the area to paint to 1252 * @param h Height of the area to paint to 1253 */ 1254 public void paintScrollBarBackground(SynthContext context, 1255 Graphics g, int x, int y, 1256 int w, int h) { 1257 paintBackground(context, g, x, y, w, h, null); 1258 } 1259 1260 /** 1261 * Paints the background of a scrollbar. This implementation invokes the 1262 * method of the same name without the orientation. 1263 * 1264 * @param context SynthContext identifying the <code>JComponent</code> and 1265 * <code>Region</code> to paint to 1266 * @param g <code>Graphics</code> to paint to 1267 * @param x X coordinate of the area to paint to 1268 * @param y Y coordinate of the area to paint to 1269 * @param w Width of the area to paint to 1270 * @param h Height of the area to paint to 1271 * @param orientation Orientation of the JScrollBar, one of 1272 * <code>JScrollBar.HORIZONTAL</code> or 1273 * <code>JScrollBar.VERTICAL</code> 1274 * @since 1.6 1275 */ 1276 public void paintScrollBarBackground(SynthContext context, 1277 Graphics g, int x, int y, 1278 int w, int h, int orientation) { 1279 paintBackground(context, g, x, y, w, h, orientation); 1280 } 1281 1282 /** 1283 * Paints the border of a scrollbar. 1284 * 1285 * @param context SynthContext identifying the <code>JComponent</code> and 1286 * <code>Region</code> to paint to 1287 * @param g <code>Graphics</code> to paint to 1288 * @param x X coordinate of the area to paint to 1289 * @param y Y coordinate of the area to paint to 1290 * @param w Width of the area to paint to 1291 * @param h Height of the area to paint to 1292 */ 1293 public void paintScrollBarBorder(SynthContext context, 1294 Graphics g, int x, int y, 1295 int w, int h) { 1296 paintBorder(context, g, x, y, w, h, null); 1297 } 1298 1299 /** 1300 * Paints the border of a scrollbar. This implementation invokes the 1301 * method of the same name without the orientation. 1302 * 1303 * @param context SynthContext identifying the <code>JComponent</code> and 1304 * <code>Region</code> to paint to 1305 * @param g <code>Graphics</code> to paint to 1306 * @param x X coordinate of the area to paint to 1307 * @param y Y coordinate of the area to paint to 1308 * @param w Width of the area to paint to 1309 * @param h Height of the area to paint to 1310 * @param orientation Orientation of the JScrollBar, one of 1311 * <code>JScrollBar.HORIZONTAL</code> or 1312 * <code>JScrollBar.VERTICAL</code> 1313 * @since 1.6 1314 */ 1315 public void paintScrollBarBorder(SynthContext context, 1316 Graphics g, int x, int y, 1317 int w, int h, int orientation) { 1318 paintBorder(context, g, x, y, w, h, orientation); 1319 } 1320 1321 /** 1322 * Paints the background 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 paintScrollBarThumbBackground(SynthContext context, 1338 Graphics g, int x, int y, 1339 int w, int h, int orientation) { 1340 paintBackground(context, g, x, y, w, h, orientation); 1341 } 1342 1343 /** 1344 * Paints the border of the thumb of a scrollbar. The thumb provides 1345 * a graphical indication as to how much of the Component is visible in a 1346 * <code>JScrollPane</code>. 1347 * 1348 * @param context SynthContext identifying the <code>JComponent</code> and 1349 * <code>Region</code> to paint to 1350 * @param g <code>Graphics</code> to paint to 1351 * @param x X coordinate of the area to paint to 1352 * @param y Y coordinate of the area to paint to 1353 * @param w Width of the area to paint to 1354 * @param h Height of the area to paint to 1355 * @param orientation Orientation of the JScrollBar, one of 1356 * <code>JScrollBar.HORIZONTAL</code> or 1357 * <code>JScrollBar.VERTICAL</code> 1358 */ 1359 public void paintScrollBarThumbBorder(SynthContext context, 1360 Graphics g, int x, int y, 1361 int w, int h, int orientation) { 1362 paintBorder(context, g, x, y, w, h, orientation); 1363 } 1364 1365 /** 1366 * Paints the background of the track of a scrollbar. The track contains 1367 * the thumb. 1368 * 1369 * @param context SynthContext identifying the <code>JComponent</code> and 1370 * <code>Region</code> to paint to 1371 * @param g <code>Graphics</code> to paint to 1372 * @param x X coordinate of the area to paint to 1373 * @param y Y coordinate of the area to paint to 1374 * @param w Width of the area to paint to 1375 * @param h Height of the area to paint to 1376 */ 1377 public void paintScrollBarTrackBackground(SynthContext context, 1378 Graphics g, int x, int y, 1379 int w, int h) { 1380 paintBackground(context, g, x, y, w, h, null); 1381 } 1382 1383 /** 1384 * Paints the background of the track of a scrollbar. The track contains 1385 * the thumb. This implementation invokes the method of the same name without 1386 * the orientation. 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 * @param orientation Orientation of the JScrollBar, one of 1396 * <code>JScrollBar.HORIZONTAL</code> or 1397 * <code>JScrollBar.VERTICAL</code> 1398 * @since 1.6 1399 */ 1400 public void paintScrollBarTrackBackground(SynthContext context, 1401 Graphics g, int x, int y, 1402 int w, int h, int orientation) { 1403 paintBackground(context, g, x, y, w, h, orientation); 1404 } 1405 1406 /** 1407 * Paints the border of the track of a scrollbar. The track contains 1408 * the thumb. 1409 * 1410 * @param context SynthContext identifying the <code>JComponent</code> and 1411 * <code>Region</code> to paint to 1412 * @param g <code>Graphics</code> to paint to 1413 * @param x X coordinate of the area to paint to 1414 * @param y Y coordinate of the area to paint to 1415 * @param w Width of the area to paint to 1416 * @param h Height of the area to paint to 1417 */ 1418 public void paintScrollBarTrackBorder(SynthContext context, 1419 Graphics g, int x, int y, 1420 int w, int h) { 1421 paintBorder(context, g, x, y, w, h, null); 1422 } 1423 1424 /** 1425 * Paints the border of the track of a scrollbar. The track contains 1426 * the thumb. This implementation invokes the method of the same name without 1427 * the orientation. 1428 * 1429 * @param context SynthContext identifying the <code>JComponent</code> and 1430 * <code>Region</code> to paint to 1431 * @param g <code>Graphics</code> to paint to 1432 * @param x X coordinate of the area to paint to 1433 * @param y Y coordinate of the area to paint to 1434 * @param w Width of the area to paint to 1435 * @param h Height of the area to paint to 1436 * @param orientation Orientation of the JScrollBar, one of 1437 * <code>JScrollBar.HORIZONTAL</code> or 1438 * <code>JScrollBar.VERTICAL</code> 1439 * @since 1.6 1440 */ 1441 public void paintScrollBarTrackBorder(SynthContext context, 1442 Graphics g, int x, int y, 1443 int w, int h, int orientation) { 1444 paintBorder(context, g, x, y, w, h, orientation); 1445 } 1446 1447 /** 1448 * Paints the background of a scroll pane. 1449 * 1450 * @param context SynthContext identifying the <code>JComponent</code> and 1451 * <code>Region</code> to paint to 1452 * @param g <code>Graphics</code> to paint to 1453 * @param x X coordinate of the area to paint to 1454 * @param y Y coordinate of the area to paint to 1455 * @param w Width of the area to paint to 1456 * @param h Height of the area to paint to 1457 */ 1458 public void paintScrollPaneBackground(SynthContext context, 1459 Graphics g, int x, int y, 1460 int w, int h) { 1461 paintBackground(context, g, x, y, w, h, null); 1462 } 1463 1464 /** 1465 * Paints the border of a scroll pane. 1466 * 1467 * @param context SynthContext identifying the <code>JComponent</code> and 1468 * <code>Region</code> to paint to 1469 * @param g <code>Graphics</code> to paint to 1470 * @param x X coordinate of the area to paint to 1471 * @param y Y coordinate of the area to paint to 1472 * @param w Width of the area to paint to 1473 * @param h Height of the area to paint to 1474 */ 1475 public void paintScrollPaneBorder(SynthContext context, 1476 Graphics g, int x, int y, 1477 int w, int h) { 1478 paintBorder(context, g, x, y, w, h, null); 1479 } 1480 1481 /** 1482 * Paints the background of a separator. 1483 * 1484 * @param context SynthContext identifying the <code>JComponent</code> and 1485 * <code>Region</code> to paint to 1486 * @param g <code>Graphics</code> to paint to 1487 * @param x X coordinate of the area to paint to 1488 * @param y Y coordinate of the area to paint to 1489 * @param w Width of the area to paint to 1490 * @param h Height of the area to paint to 1491 */ 1492 public void paintSeparatorBackground(SynthContext context, 1493 Graphics g, int x, int y, 1494 int w, int h) { 1495 paintBackground(context, g, x, y, w, h, null); 1496 } 1497 1498 /** 1499 * Paints the background of a separator. This implementation invokes the 1500 * method of the same name without the orientation. 1501 * 1502 * @param context SynthContext identifying the <code>JComponent</code> and 1503 * <code>Region</code> to paint to 1504 * @param g <code>Graphics</code> to paint to 1505 * @param x X coordinate of the area to paint to 1506 * @param y Y coordinate of the area to paint to 1507 * @param w Width of the area to paint to 1508 * @param h Height of the area to paint to 1509 * @param orientation One of <code>JSeparator.HORIZONTAL</code> or 1510 * <code>JSeparator.VERTICAL</code> 1511 * @since 1.6 1512 */ 1513 public void paintSeparatorBackground(SynthContext context, 1514 Graphics g, int x, int y, 1515 int w, int h, int orientation) { 1516 paintBackground(context, g, x, y, w, h, orientation); 1517 } 1518 1519 /** 1520 * Paints the border of a separator. 1521 * 1522 * @param context SynthContext identifying the <code>JComponent</code> and 1523 * <code>Region</code> to paint to 1524 * @param g <code>Graphics</code> to paint to 1525 * @param x X coordinate of the area to paint to 1526 * @param y Y coordinate of the area to paint to 1527 * @param w Width of the area to paint to 1528 * @param h Height of the area to paint to 1529 */ 1530 public void paintSeparatorBorder(SynthContext context, 1531 Graphics g, int x, int y, 1532 int w, int h) { 1533 paintBorder(context, g, x, y, w, h, null); 1534 } 1535 1536 /** 1537 * Paints the border of a separator. This implementation invokes the 1538 * method of the same name without the orientation. 1539 * 1540 * @param context SynthContext identifying the <code>JComponent</code> and 1541 * <code>Region</code> to paint to 1542 * @param g <code>Graphics</code> to paint to 1543 * @param x X coordinate of the area to paint to 1544 * @param y Y coordinate of the area to paint to 1545 * @param w Width of the area to paint to 1546 * @param h Height of the area to paint to 1547 * @param orientation One of <code>JSeparator.HORIZONTAL</code> or 1548 * <code>JSeparator.VERTICAL</code> 1549 * @since 1.6 1550 */ 1551 public void paintSeparatorBorder(SynthContext context, 1552 Graphics g, int x, int y, 1553 int w, int h, int orientation) { 1554 paintBorder(context, g, x, y, w, h, orientation); 1555 } 1556 1557 /** 1558 * Paints the foreground of a separator. 1559 * 1560 * @param context SynthContext identifying the <code>JComponent</code> and 1561 * <code>Region</code> to paint to 1562 * @param g <code>Graphics</code> to paint to 1563 * @param x X coordinate of the area to paint to 1564 * @param y Y coordinate of the area to paint to 1565 * @param w Width of the area to paint to 1566 * @param h Height of the area to paint to 1567 * @param orientation One of <code>JSeparator.HORIZONTAL</code> or 1568 * <code>JSeparator.VERTICAL</code> 1569 */ 1570 public void paintSeparatorForeground(SynthContext context, 1571 Graphics g, int x, int y, 1572 int w, int h, int orientation) { 1573 paintForeground(context, g, x, y, w, h, orientation); 1574 } 1575 1576 /** 1577 * Paints the background of a slider. 1578 * 1579 * @param context SynthContext identifying the <code>JComponent</code> and 1580 * <code>Region</code> to paint to 1581 * @param g <code>Graphics</code> to paint to 1582 * @param x X coordinate of the area to paint to 1583 * @param y Y coordinate of the area to paint to 1584 * @param w Width of the area to paint to 1585 * @param h Height of the area to paint to 1586 */ 1587 public void paintSliderBackground(SynthContext context, 1588 Graphics g, int x, int y, 1589 int w, int h) { 1590 paintBackground(context, g, x, y, w, h, null); 1591 } 1592 1593 /** 1594 * Paints the background of a slider. This implementation invokes the 1595 * method of the same name without the orientation. 1596 * 1597 * @param context SynthContext identifying the <code>JComponent</code> and 1598 * <code>Region</code> to paint to 1599 * @param g <code>Graphics</code> to paint to 1600 * @param x X coordinate of the area to paint to 1601 * @param y Y coordinate of the area to paint to 1602 * @param w Width of the area to paint to 1603 * @param h Height of the area to paint to 1604 * @param orientation One of <code>JSlider.HORIZONTAL</code> or 1605 * <code>JSlider.VERTICAL</code> 1606 * @since 1.6 1607 */ 1608 public void paintSliderBackground(SynthContext context, 1609 Graphics g, int x, int y, 1610 int w, int h, int orientation) { 1611 paintBackground(context, g, x, y, w, h, orientation); 1612 } 1613 1614 /** 1615 * Paints the border of a slider. 1616 * 1617 * @param context SynthContext identifying the <code>JComponent</code> and 1618 * <code>Region</code> to paint to 1619 * @param g <code>Graphics</code> to paint to 1620 * @param x X coordinate of the area to paint to 1621 * @param y Y coordinate of the area to paint to 1622 * @param w Width of the area to paint to 1623 * @param h Height of the area to paint to 1624 */ 1625 public void paintSliderBorder(SynthContext context, 1626 Graphics g, int x, int y, 1627 int w, int h) { 1628 paintBorder(context, g, x, y, w, h, null); 1629 } 1630 1631 /** 1632 * Paints the border of a slider. This implementation invokes the 1633 * method of the same name without the orientation. 1634 * 1635 * @param context SynthContext identifying the <code>JComponent</code> and 1636 * <code>Region</code> to paint to 1637 * @param g <code>Graphics</code> to paint to 1638 * @param x X coordinate of the area to paint to 1639 * @param y Y coordinate of the area to paint to 1640 * @param w Width of the area to paint to 1641 * @param h Height of the area to paint to 1642 * @param orientation One of <code>JSlider.HORIZONTAL</code> or 1643 * <code>JSlider.VERTICAL</code> 1644 * @since 1.6 1645 */ 1646 public void paintSliderBorder(SynthContext context, 1647 Graphics g, int x, int y, 1648 int w, int h, int orientation) { 1649 paintBorder(context, g, x, y, w, h, orientation); 1650 } 1651 1652 /** 1653 * Paints the background of the thumb of a slider. 1654 * 1655 * @param context SynthContext identifying the <code>JComponent</code> and 1656 * <code>Region</code> to paint to 1657 * @param g <code>Graphics</code> to paint to 1658 * @param x X coordinate of the area to paint to 1659 * @param y Y coordinate of the area to paint to 1660 * @param w Width of the area to paint to 1661 * @param h Height of the area to paint to 1662 * @param orientation One of <code>JSlider.HORIZONTAL</code> or 1663 * <code>JSlider.VERTICAL</code> 1664 */ 1665 public void paintSliderThumbBackground(SynthContext context, 1666 Graphics g, int x, int y, 1667 int w, int h, int orientation) { 1668 if (context.getComponent().getClientProperty( 1669 "Slider.paintThumbArrowShape") == Boolean.TRUE){ 1670 if (orientation == JSlider.HORIZONTAL){ 1671 orientation = JSlider.VERTICAL; 1672 } else { 1673 orientation = JSlider.HORIZONTAL; 1674 } 1675 paintBackground(context, g, x, y, w, h, orientation); 1676 } else { 1677 paintBackground(context, g, x, y, w, h, orientation); 1678 } 1679 } 1680 1681 /** 1682 * Paints the border of the thumb of a slider. 1683 * 1684 * @param context SynthContext identifying the <code>JComponent</code> and 1685 * <code>Region</code> to paint to 1686 * @param g <code>Graphics</code> to paint to 1687 * @param x X coordinate of the area to paint to 1688 * @param y Y coordinate of the area to paint to 1689 * @param w Width of the area to paint to 1690 * @param h Height of the area to paint to 1691 * @param orientation One of <code>JSlider.HORIZONTAL</code> or 1692 * <code>JSlider.VERTICAL</code> 1693 */ 1694 public void paintSliderThumbBorder(SynthContext context, 1695 Graphics g, int x, int y, 1696 int w, int h, int orientation) { 1697 paintBorder(context, g, x, y, w, h, orientation); 1698 } 1699 1700 /** 1701 * Paints the background of the track of a slider. 1702 * 1703 * @param context SynthContext identifying the <code>JComponent</code> and 1704 * <code>Region</code> to paint to 1705 * @param g <code>Graphics</code> to paint to 1706 * @param x X coordinate of the area to paint to 1707 * @param y Y coordinate of the area to paint to 1708 * @param w Width of the area to paint to 1709 * @param h Height of the area to paint to 1710 */ 1711 public void paintSliderTrackBackground(SynthContext context, 1712 Graphics g, int x, int y, 1713 int w, int h) { 1714 paintBackground(context, g, x, y, w, h, null); 1715 } 1716 1717 /** 1718 * Paints the background of the track of a slider. This implementation invokes 1719 * the method of the same name without the orientation. 1720 * 1721 * @param context SynthContext identifying the <code>JComponent</code> and 1722 * <code>Region</code> to paint to 1723 * @param g <code>Graphics</code> to paint to 1724 * @param x X coordinate of the area to paint to 1725 * @param y Y coordinate of the area to paint to 1726 * @param w Width of the area to paint to 1727 * @param h Height of the area to paint to 1728 * @param orientation One of <code>JSlider.HORIZONTAL</code> or 1729 * <code>JSlider.VERTICAL</code> 1730 * @since 1.6 1731 */ 1732 public void paintSliderTrackBackground(SynthContext context, 1733 Graphics g, int x, int y, 1734 int w, int h, int orientation) { 1735 paintBackground(context, g, x, y, w, h, orientation); 1736 } 1737 1738 /** 1739 * Paints the border of the track of a slider. 1740 * 1741 * @param context SynthContext identifying the <code>JComponent</code> and 1742 * <code>Region</code> to paint to 1743 * @param g <code>Graphics</code> to paint to 1744 * @param x X coordinate of the area to paint to 1745 * @param y Y coordinate of the area to paint to 1746 * @param w Width of the area to paint to 1747 * @param h Height of the area to paint to 1748 */ 1749 public void paintSliderTrackBorder(SynthContext context, 1750 Graphics g, int x, int y, 1751 int w, int h) { 1752 paintBorder(context, g, x, y, w, h, null); 1753 } 1754 1755 /** 1756 * Paints the border of the track of a slider. This implementation invokes the 1757 * method of the same name without the orientation. 1758 * 1759 * @param context SynthContext identifying the <code>JComponent</code> and 1760 * <code>Region</code> to paint to 1761 * @param g <code>Graphics</code> to paint to 1762 * @param x X coordinate of the area to paint to 1763 * @param y Y coordinate of the area to paint to 1764 * @param w Width of the area to paint to 1765 * @param h Height of the area to paint to 1766 * @param orientation One of <code>JSlider.HORIZONTAL</code> or 1767 * <code>JSlider.VERTICAL</code> 1768 * @since 1.6 1769 */ 1770 public void paintSliderTrackBorder(SynthContext context, 1771 Graphics g, int x, int y, 1772 int w, int h, int orientation) { 1773 paintBorder(context, g, x, y, w, h, orientation); 1774 } 1775 1776 /** 1777 * Paints the background of a spinner. 1778 * 1779 * @param context SynthContext identifying the <code>JComponent</code> and 1780 * <code>Region</code> to paint to 1781 * @param g <code>Graphics</code> to paint to 1782 * @param x X coordinate of the area to paint to 1783 * @param y Y coordinate of the area to paint to 1784 * @param w Width of the area to paint to 1785 * @param h Height of the area to paint to 1786 */ 1787 public void paintSpinnerBackground(SynthContext context, 1788 Graphics g, int x, int y, 1789 int w, int h) { 1790 paintBackground(context, g, x, y, w, h, null); 1791 } 1792 1793 /** 1794 * Paints the border of a spinner. 1795 * 1796 * @param context SynthContext identifying the <code>JComponent</code> and 1797 * <code>Region</code> to paint to 1798 * @param g <code>Graphics</code> to paint to 1799 * @param x X coordinate of the area to paint to 1800 * @param y Y coordinate of the area to paint to 1801 * @param w Width of the area to paint to 1802 * @param h Height of the area to paint to 1803 */ 1804 public void paintSpinnerBorder(SynthContext context, 1805 Graphics g, int x, int y, 1806 int w, int h) { 1807 paintBorder(context, g, x, y, w, h, null); 1808 } 1809 1810 /** 1811 * Paints the background of the divider of a split pane. 1812 * 1813 * @param context SynthContext identifying the <code>JComponent</code> and 1814 * <code>Region</code> to paint to 1815 * @param g <code>Graphics</code> to paint to 1816 * @param x X coordinate of the area to paint to 1817 * @param y Y coordinate of the area to paint to 1818 * @param w Width of the area to paint to 1819 * @param h Height of the area to paint to 1820 */ 1821 public void paintSplitPaneDividerBackground(SynthContext context, 1822 Graphics g, int x, int y, 1823 int w, int h) { 1824 paintBackground(context, g, x, y, w, h, null); 1825 } 1826 1827 /** 1828 * Paints the background of the divider of a split pane. This implementation 1829 * invokes the method of the same name without the orientation. 1830 * 1831 * @param context SynthContext identifying the <code>JComponent</code> and 1832 * <code>Region</code> to paint to 1833 * @param g <code>Graphics</code> to paint to 1834 * @param x X coordinate of the area to paint to 1835 * @param y Y coordinate of the area to paint to 1836 * @param w Width of the area to paint to 1837 * @param h Height of the area to paint to 1838 * @param orientation One of <code>JSplitPane.HORIZONTAL_SPLIT</code> or 1839 * <code>JSplitPane.VERTICAL_SPLIT</code> 1840 * @since 1.6 1841 */ 1842 public void paintSplitPaneDividerBackground(SynthContext context, 1843 Graphics g, int x, int y, 1844 int w, int h, int orientation) { 1845 if (orientation == JSplitPane.HORIZONTAL_SPLIT) { 1846 AffineTransform transform = new AffineTransform(); 1847 transform.scale(-1, 1); 1848 transform.rotate(Math.toRadians(90)); 1849 paintBackground(context, g, y, x, h, w, transform); 1850 } else { 1851 paintBackground(context, g, x, y, w, h, null); 1852 } 1853 } 1854 1855 /** 1856 * Paints the foreground of the divider of a split pane. 1857 * 1858 * @param context SynthContext identifying the <code>JComponent</code> and 1859 * <code>Region</code> to paint to 1860 * @param g <code>Graphics</code> to paint to 1861 * @param x X coordinate of the area to paint to 1862 * @param y Y coordinate of the area to paint to 1863 * @param w Width of the area to paint to 1864 * @param h Height of the area to paint to 1865 * @param orientation One of <code>JSplitPane.HORIZONTAL_SPLIT</code> or 1866 * <code>JSplitPane.VERTICAL_SPLIT</code> 1867 */ 1868 public void paintSplitPaneDividerForeground(SynthContext context, 1869 Graphics g, int x, int y, 1870 int w, int h, int orientation) { 1871 paintForeground(context, g, x, y, w, h, null); 1872 } 1873 1874 /** 1875 * Paints the divider, when the user is dragging the divider, of a 1876 * split pane. 1877 * 1878 * @param context SynthContext identifying the <code>JComponent</code> and 1879 * <code>Region</code> to paint to 1880 * @param g <code>Graphics</code> to paint to 1881 * @param x X coordinate of the area to paint to 1882 * @param y Y coordinate of the area to paint to 1883 * @param w Width of the area to paint to 1884 * @param h Height of the area to paint to 1885 * @param orientation One of <code>JSplitPane.HORIZONTAL_SPLIT</code> or 1886 * <code>JSplitPane.VERTICAL_SPLIT</code> 1887 */ 1888 public void paintSplitPaneDragDivider(SynthContext context, 1889 Graphics g, int x, int y, 1890 int w, int h, int orientation) { 1891 paintBackground(context, g, x, y, w, h, null); 1892 } 1893 1894 /** 1895 * Paints the background of a split pane. 1896 * 1897 * @param context SynthContext identifying the <code>JComponent</code> and 1898 * <code>Region</code> to paint to 1899 * @param g <code>Graphics</code> to paint to 1900 * @param x X coordinate of the area to paint to 1901 * @param y Y coordinate of the area to paint to 1902 * @param w Width of the area to paint to 1903 * @param h Height of the area to paint to 1904 */ 1905 public void paintSplitPaneBackground(SynthContext context, 1906 Graphics g, int x, int y, 1907 int w, int h) { 1908 paintBackground(context, g, x, y, w, h, null); 1909 } 1910 1911 /** 1912 * Paints the border of a split pane. 1913 * 1914 * @param context SynthContext identifying the <code>JComponent</code> and 1915 * <code>Region</code> to paint to 1916 * @param g <code>Graphics</code> to paint to 1917 * @param x X coordinate of the area to paint to 1918 * @param y Y coordinate of the area to paint to 1919 * @param w Width of the area to paint to 1920 * @param h Height of the area to paint to 1921 */ 1922 public void paintSplitPaneBorder(SynthContext context, 1923 Graphics g, int x, int y, 1924 int w, int h) { 1925 paintBorder(context, g, x, y, w, h, null); 1926 } 1927 1928 /** 1929 * Paints the background of a tabbed pane. 1930 * 1931 * @param context SynthContext identifying the <code>JComponent</code> and 1932 * <code>Region</code> to paint to 1933 * @param g <code>Graphics</code> to paint to 1934 * @param x X coordinate of the area to paint to 1935 * @param y Y coordinate of the area to paint to 1936 * @param w Width of the area to paint to 1937 * @param h Height of the area to paint to 1938 */ 1939 public void paintTabbedPaneBackground(SynthContext context, 1940 Graphics g, int x, int y, 1941 int w, int h) { 1942 paintBackground(context, g, x, y, w, h, null); 1943 } 1944 1945 /** 1946 * Paints the border of a tabbed pane. 1947 * 1948 * @param context SynthContext identifying the <code>JComponent</code> and 1949 * <code>Region</code> to paint to 1950 * @param g <code>Graphics</code> to paint to 1951 * @param x X coordinate of the area to paint to 1952 * @param y Y coordinate of the area to paint to 1953 * @param w Width of the area to paint to 1954 * @param h Height of the area to paint to 1955 */ 1956 public void paintTabbedPaneBorder(SynthContext context, 1957 Graphics g, int x, int y, 1958 int w, int h) { 1959 paintBorder(context, g, x, y, w, h, null); 1960 } 1961 1962 /** 1963 * Paints the background of the area behind the tabs of a tabbed pane. 1964 * 1965 * @param context SynthContext identifying the <code>JComponent</code> and 1966 * <code>Region</code> to paint to 1967 * @param g <code>Graphics</code> to paint to 1968 * @param x X coordinate of the area to paint to 1969 * @param y Y coordinate of the area to paint to 1970 * @param w Width of the area to paint to 1971 * @param h Height of the area to paint to 1972 */ 1973 public void paintTabbedPaneTabAreaBackground(SynthContext context, 1974 Graphics g, int x, int y, 1975 int w, int h) { 1976 paintBackground(context, g, x, y, w, h, null); 1977 } 1978 1979 /** 1980 * Paints the background of the area behind the tabs of a tabbed pane. 1981 * This implementation invokes the method of the same name without the 1982 * orientation. 1983 * 1984 * @param context SynthContext identifying the <code>JComponent</code> and 1985 * <code>Region</code> to paint to 1986 * @param g <code>Graphics</code> to paint to 1987 * @param x X coordinate of the area to paint to 1988 * @param y Y coordinate of the area to paint to 1989 * @param w Width of the area to paint to 1990 * @param h Height of the area to paint to 1991 * @param orientation One of <code>JTabbedPane.TOP</code>, 1992 * <code>JTabbedPane.LEFT</code>, 1993 * <code>JTabbedPane.BOTTOM</code>, or 1994 * <code>JTabbedPane.RIGHT</code> 1995 * @since 1.6 1996 */ 1997 public void paintTabbedPaneTabAreaBackground(SynthContext context, 1998 Graphics g, int x, int y, 1999 int w, int h, int orientation) { 2000 if (orientation == JTabbedPane.LEFT) { 2001 AffineTransform transform = new AffineTransform(); 2002 transform.scale(-1, 1); 2003 transform.rotate(Math.toRadians(90)); 2004 paintBackground(context, g, y, x, h, w, transform); 2005 } else if (orientation == JTabbedPane.RIGHT) { 2006 AffineTransform transform = new AffineTransform(); 2007 transform.rotate(Math.toRadians(90)); 2008 transform.translate(0, -(x + w)); 2009 paintBackground(context, g, y, 0, h, w, transform); 2010 } else if (orientation == JTabbedPane.BOTTOM) { 2011 AffineTransform transform = new AffineTransform(); 2012 transform.translate(x,y); 2013 transform.scale(1, -1); 2014 transform.translate(0,-h); 2015 paintBackground(context, g, 0, 0, w, h, transform); 2016 } else { 2017 paintBackground(context, g, x, y, w, h, null); 2018 } 2019 } 2020 2021 /** 2022 * Paints the border of the area behind the tabs of a tabbed pane. 2023 * 2024 * @param context SynthContext identifying the <code>JComponent</code> and 2025 * <code>Region</code> to paint to 2026 * @param g <code>Graphics</code> to paint to 2027 * @param x X coordinate of the area to paint to 2028 * @param y Y coordinate of the area to paint to 2029 * @param w Width of the area to paint to 2030 * @param h Height of the area to paint to 2031 */ 2032 public void paintTabbedPaneTabAreaBorder(SynthContext context, 2033 Graphics g, int x, int y, 2034 int w, int h) { 2035 paintBorder(context, g, x, y, w, h, null); 2036 } 2037 2038 /** 2039 * Paints the border of the area behind the tabs of a tabbed pane. This 2040 * implementation invokes the method of the same name without the orientation. 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 orientation One of <code>JTabbedPane.TOP</code>, 2050 * <code>JTabbedPane.LEFT</code>, 2051 * <code>JTabbedPane.BOTTOM</code>, or 2052 * <code>JTabbedPane.RIGHT</code> 2053 * @since 1.6 2054 */ 2055 public void paintTabbedPaneTabAreaBorder(SynthContext context, 2056 Graphics g, int x, int y, 2057 int w, int h, int orientation) { 2058 paintBorder(context, g, x, y, w, h, null); 2059 } 2060 2061 /** 2062 * Paints the background of a tab of a tabbed pane. 2063 * 2064 * @param context SynthContext identifying the <code>JComponent</code> and 2065 * <code>Region</code> to paint to 2066 * @param g <code>Graphics</code> to paint to 2067 * @param x X coordinate of the area to paint to 2068 * @param y Y coordinate of the area to paint to 2069 * @param w Width of the area to paint to 2070 * @param h Height of the area to paint to 2071 * @param tabIndex Index of tab being painted. 2072 */ 2073 public void paintTabbedPaneTabBackground(SynthContext context, Graphics g, 2074 int x, int y, int w, int h, 2075 int tabIndex) { 2076 paintBackground(context, g, x, y, w, h, null); 2077 } 2078 2079 /** 2080 * Paints the background of a tab of a tabbed pane. This implementation 2081 * invokes the method of the same name without the orientation. 2082 * 2083 * @param context SynthContext identifying the <code>JComponent</code> and 2084 * <code>Region</code> to paint to 2085 * @param g <code>Graphics</code> to paint to 2086 * @param x X coordinate of the area to paint to 2087 * @param y Y coordinate of the area to paint to 2088 * @param w Width of the area to paint to 2089 * @param h Height of the area to paint to 2090 * @param tabIndex Index of tab being painted. 2091 * @param orientation One of <code>JTabbedPane.TOP</code>, 2092 * <code>JTabbedPane.LEFT</code>, 2093 * <code>JTabbedPane.BOTTOM</code>, or 2094 * <code>JTabbedPane.RIGHT</code> 2095 * @since 1.6 2096 */ 2097 public void paintTabbedPaneTabBackground(SynthContext context, Graphics g, 2098 int x, int y, int w, int h, 2099 int tabIndex, int orientation) { 2100 if (orientation == JTabbedPane.LEFT) { 2101 AffineTransform transform = new AffineTransform(); 2102 transform.scale(-1, 1); 2103 transform.rotate(Math.toRadians(90)); 2104 paintBackground(context, g, y, x, h, w, transform); 2105 } else if (orientation == JTabbedPane.RIGHT) { 2106 AffineTransform transform = new AffineTransform(); 2107 transform.rotate(Math.toRadians(90)); 2108 transform.translate(0, -(x + w)); 2109 paintBackground(context, g, y, 0, h, w, transform); 2110 } else if (orientation == JTabbedPane.BOTTOM) { 2111 AffineTransform transform = new AffineTransform(); 2112 transform.translate(x,y); 2113 transform.scale(1, -1); 2114 transform.translate(0,-h); 2115 paintBackground(context, g, 0, 0, w, h, transform); 2116 } else { 2117 paintBackground(context, g, x, y, w, h, null); 2118 } 2119 } 2120 2121 /** 2122 * Paints the border of a tab of a tabbed pane. 2123 * 2124 * @param context SynthContext identifying the <code>JComponent</code> and 2125 * <code>Region</code> to paint to 2126 * @param g <code>Graphics</code> to paint to 2127 * @param x X coordinate of the area to paint to 2128 * @param y Y coordinate of the area to paint to 2129 * @param w Width of the area to paint to 2130 * @param h Height of the area to paint to 2131 * @param tabIndex Index of tab being painted. 2132 */ 2133 public void paintTabbedPaneTabBorder(SynthContext context, Graphics g, 2134 int x, int y, int w, int h, 2135 int tabIndex) { 2136 paintBorder(context, g, x, y, w, h, null); 2137 } 2138 2139 /** 2140 * Paints the border of a tab of a tabbed pane. This implementation invokes 2141 * the method of the same name without the orientation. 2142 * 2143 * @param context SynthContext identifying the <code>JComponent</code> and 2144 * <code>Region</code> to paint to 2145 * @param g <code>Graphics</code> to paint to 2146 * @param x X coordinate of the area to paint to 2147 * @param y Y coordinate of the area to paint to 2148 * @param w Width of the area to paint to 2149 * @param h Height of the area to paint to 2150 * @param tabIndex Index of tab being painted. 2151 * @param orientation One of <code>JTabbedPane.TOP</code>, 2152 * <code>JTabbedPane.LEFT</code>, 2153 * <code>JTabbedPane.BOTTOM</code>, or 2154 * <code>JTabbedPane.RIGHT</code> 2155 * @since 1.6 2156 */ 2157 public void paintTabbedPaneTabBorder(SynthContext context, Graphics g, 2158 int x, int y, int w, int h, 2159 int tabIndex, int orientation) { 2160 paintBorder(context, g, x, y, w, h, null); 2161 } 2162 2163 /** 2164 * Paints the background of the area that contains the content of the 2165 * selected tab of a tabbed pane. 2166 * 2167 * @param context SynthContext identifying the <code>JComponent</code> and 2168 * <code>Region</code> to paint to 2169 * @param g <code>Graphics</code> to paint to 2170 * @param x X coordinate of the area to paint to 2171 * @param y Y coordinate of the area to paint to 2172 * @param w Width of the area to paint to 2173 * @param h Height of the area to paint to 2174 */ 2175 public void paintTabbedPaneContentBackground(SynthContext context, 2176 Graphics g, int x, int y, int w, 2177 int h) { 2178 paintBackground(context, g, x, y, w, h, null); 2179 } 2180 2181 /** 2182 * Paints the border of the area that contains the content of the 2183 * selected tab of a tabbed pane. 2184 * 2185 * @param context SynthContext identifying the <code>JComponent</code> and 2186 * <code>Region</code> to paint to 2187 * @param g <code>Graphics</code> to paint to 2188 * @param x X coordinate of the area to paint to 2189 * @param y Y coordinate of the area to paint to 2190 * @param w Width of the area to paint to 2191 * @param h Height of the area to paint to 2192 */ 2193 public void paintTabbedPaneContentBorder(SynthContext context, Graphics g, 2194 int x, int y, int w, int h) { 2195 paintBorder(context, g, x, y, w, h, null); 2196 } 2197 2198 /** 2199 * Paints the background of the header of a table. 2200 * 2201 * @param context SynthContext identifying the <code>JComponent</code> and 2202 * <code>Region</code> to paint to 2203 * @param g <code>Graphics</code> to paint to 2204 * @param x X coordinate of the area to paint to 2205 * @param y Y coordinate of the area to paint to 2206 * @param w Width of the area to paint to 2207 * @param h Height of the area to paint to 2208 */ 2209 public void paintTableHeaderBackground(SynthContext context, 2210 Graphics g, int x, int y, 2211 int w, int h) { 2212 paintBackground(context, g, x, y, w, h, null); 2213 } 2214 2215 /** 2216 * Paints the border of the header of a table. 2217 * 2218 * @param context SynthContext identifying the <code>JComponent</code> and 2219 * <code>Region</code> to paint to 2220 * @param g <code>Graphics</code> to paint to 2221 * @param x X coordinate of the area to paint to 2222 * @param y Y coordinate of the area to paint to 2223 * @param w Width of the area to paint to 2224 * @param h Height of the area to paint to 2225 */ 2226 public void paintTableHeaderBorder(SynthContext context, 2227 Graphics g, int x, int y, 2228 int w, int h) { 2229 paintBorder(context, g, x, y, w, h, null); 2230 } 2231 2232 /** 2233 * Paints the background of a table. 2234 * 2235 * @param context SynthContext identifying the <code>JComponent</code> and 2236 * <code>Region</code> to paint to 2237 * @param g <code>Graphics</code> to paint to 2238 * @param x X coordinate of the area to paint to 2239 * @param y Y coordinate of the area to paint to 2240 * @param w Width of the area to paint to 2241 * @param h Height of the area to paint to 2242 */ 2243 public void paintTableBackground(SynthContext context, 2244 Graphics g, int x, int y, 2245 int w, int h) { 2246 paintBackground(context, g, x, y, w, h, null); 2247 } 2248 2249 /** 2250 * Paints the border of a table. 2251 * 2252 * @param context SynthContext identifying the <code>JComponent</code> and 2253 * <code>Region</code> to paint to 2254 * @param g <code>Graphics</code> to paint to 2255 * @param x X coordinate of the area to paint to 2256 * @param y Y coordinate of the area to paint to 2257 * @param w Width of the area to paint to 2258 * @param h Height of the area to paint to 2259 */ 2260 public void paintTableBorder(SynthContext context, 2261 Graphics g, int x, int y, 2262 int w, int h) { 2263 paintBorder(context, g, x, y, w, h, null); 2264 } 2265 2266 /** 2267 * Paints the background of a text area. 2268 * 2269 * @param context SynthContext identifying the <code>JComponent</code> and 2270 * <code>Region</code> to paint to 2271 * @param g <code>Graphics</code> to paint to 2272 * @param x X coordinate of the area to paint to 2273 * @param y Y coordinate of the area to paint to 2274 * @param w Width of the area to paint to 2275 * @param h Height of the area to paint to 2276 */ 2277 public void paintTextAreaBackground(SynthContext context, 2278 Graphics g, int x, int y, 2279 int w, int h) { 2280 paintBackground(context, g, x, y, w, h, null); 2281 } 2282 2283 /** 2284 * Paints the border of a text area. 2285 * 2286 * @param context SynthContext identifying the <code>JComponent</code> and 2287 * <code>Region</code> to paint to 2288 * @param g <code>Graphics</code> to paint to 2289 * @param x X coordinate of the area to paint to 2290 * @param y Y coordinate of the area to paint to 2291 * @param w Width of the area to paint to 2292 * @param h Height of the area to paint to 2293 */ 2294 public void paintTextAreaBorder(SynthContext context, 2295 Graphics g, int x, int y, 2296 int w, int h) { 2297 paintBorder(context, g, x, y, w, h, null); 2298 } 2299 2300 /** 2301 * Paints the background of a text pane. 2302 * 2303 * @param context SynthContext identifying the <code>JComponent</code> and 2304 * <code>Region</code> to paint to 2305 * @param g <code>Graphics</code> to paint to 2306 * @param x X coordinate of the area to paint to 2307 * @param y Y coordinate of the area to paint to 2308 * @param w Width of the area to paint to 2309 * @param h Height of the area to paint to 2310 */ 2311 public void paintTextPaneBackground(SynthContext context, 2312 Graphics g, int x, int y, 2313 int w, int h) { 2314 paintBackground(context, g, x, y, w, h, null); 2315 } 2316 2317 /** 2318 * Paints the border of a text pane. 2319 * 2320 * @param context SynthContext identifying the <code>JComponent</code> and 2321 * <code>Region</code> to paint to 2322 * @param g <code>Graphics</code> to paint to 2323 * @param x X coordinate of the area to paint to 2324 * @param y Y coordinate of the area to paint to 2325 * @param w Width of the area to paint to 2326 * @param h Height of the area to paint to 2327 */ 2328 public void paintTextPaneBorder(SynthContext context, 2329 Graphics g, int x, int y, 2330 int w, int h) { 2331 paintBorder(context, g, x, y, w, h, null); 2332 } 2333 2334 /** 2335 * Paints the background of a text field. 2336 * 2337 * @param context SynthContext identifying the <code>JComponent</code> and 2338 * <code>Region</code> to paint to 2339 * @param g <code>Graphics</code> to paint to 2340 * @param x X coordinate of the area to paint to 2341 * @param y Y coordinate of the area to paint to 2342 * @param w Width of the area to paint to 2343 * @param h Height of the area to paint to 2344 */ 2345 public void paintTextFieldBackground(SynthContext context, 2346 Graphics g, int x, int y, 2347 int w, int h) { 2348 if (context.getComponent().getComponentOrientation().isLeftToRight()){ 2349 paintBackground(context, g, x, y, w, h, null); 2350 } else { 2351 AffineTransform transform = new AffineTransform(); 2352 transform.translate(x,y); 2353 transform.scale(-1, 1); 2354 transform.translate(-w,0); 2355 paintBackground(context, g, 0, 0, w, h, transform); 2356 } 2357 } 2358 2359 /** 2360 * Paints the border of a text field. 2361 * 2362 * @param context SynthContext identifying the <code>JComponent</code> and 2363 * <code>Region</code> to paint to 2364 * @param g <code>Graphics</code> to paint to 2365 * @param x X coordinate of the area to paint to 2366 * @param y Y coordinate of the area to paint to 2367 * @param w Width of the area to paint to 2368 * @param h Height of the area to paint to 2369 */ 2370 public void paintTextFieldBorder(SynthContext context, 2371 Graphics g, int x, int y, 2372 int w, int h) { 2373 if (context.getComponent().getComponentOrientation().isLeftToRight()){ 2374 paintBorder(context, g, x, y, w, h, null); 2375 } else { 2376 AffineTransform transform = new AffineTransform(); 2377 transform.translate(x,y); 2378 transform.scale(-1, 1); 2379 transform.translate(-w,0); 2380 paintBorder(context, g, 0, 0, w, h, transform); 2381 } 2382 } 2383 2384 /** 2385 * Paints the background of a toggle button. 2386 * 2387 * @param context SynthContext identifying the <code>JComponent</code> and 2388 * <code>Region</code> to paint to 2389 * @param g <code>Graphics</code> to paint to 2390 * @param x X coordinate of the area to paint to 2391 * @param y Y coordinate of the area to paint to 2392 * @param w Width of the area to paint to 2393 * @param h Height of the area to paint to 2394 */ 2395 public void paintToggleButtonBackground(SynthContext context, 2396 Graphics g, int x, int y, 2397 int w, int h) { 2398 paintBackground(context, g, x, y, w, h, null); 2399 } 2400 2401 /** 2402 * Paints the border of a toggle button. 2403 * 2404 * @param context SynthContext identifying the <code>JComponent</code> and 2405 * <code>Region</code> to paint to 2406 * @param g <code>Graphics</code> to paint to 2407 * @param x X coordinate of the area to paint to 2408 * @param y Y coordinate of the area to paint to 2409 * @param w Width of the area to paint to 2410 * @param h Height of the area to paint to 2411 */ 2412 public void paintToggleButtonBorder(SynthContext context, 2413 Graphics g, int x, int y, 2414 int w, int h) { 2415 paintBorder(context, g, x, y, w, h, null); 2416 } 2417 2418 /** 2419 * Paints the background of a tool bar. 2420 * 2421 * @param context SynthContext identifying the <code>JComponent</code> and 2422 * <code>Region</code> to paint to 2423 * @param g <code>Graphics</code> to paint to 2424 * @param x X coordinate of the area to paint to 2425 * @param y Y coordinate of the area to paint to 2426 * @param w Width of the area to paint to 2427 * @param h Height of the area to paint to 2428 */ 2429 public void paintToolBarBackground(SynthContext context, 2430 Graphics g, int x, int y, 2431 int w, int h) { 2432 paintBackground(context, g, x, y, w, h, null); 2433 } 2434 2435 /** 2436 * Paints the background of a tool bar. This implementation invokes the 2437 * method of the same name without the orientation. 2438 * 2439 * @param context SynthContext identifying the <code>JComponent</code> and 2440 * <code>Region</code> to paint to 2441 * @param g <code>Graphics</code> to paint to 2442 * @param x X coordinate of the area to paint to 2443 * @param y Y coordinate of the area to paint to 2444 * @param w Width of the area to paint to 2445 * @param h Height of the area to paint to 2446 * @param orientation One of <code>JToolBar.HORIZONTAL</code> or 2447 * <code>JToolBar.VERTICAL</code> 2448 * @since 1.6 2449 */ 2450 public void paintToolBarBackground(SynthContext context, 2451 Graphics g, int x, int y, 2452 int w, int h, int orientation) { 2453 paintBackground(context, g, x, y, w, h, orientation); 2454 } 2455 2456 /** 2457 * Paints the border of a tool bar. 2458 * 2459 * @param context SynthContext identifying the <code>JComponent</code> and 2460 * <code>Region</code> to paint to 2461 * @param g <code>Graphics</code> to paint to 2462 * @param x X coordinate of the area to paint to 2463 * @param y Y coordinate of the area to paint to 2464 * @param w Width of the area to paint to 2465 * @param h Height of the area to paint to 2466 */ 2467 public void paintToolBarBorder(SynthContext context, 2468 Graphics g, int x, int y, 2469 int w, int h) { 2470 paintBorder(context, g, x, y, w, h, null); 2471 } 2472 2473 /** 2474 * Paints the border of a tool bar. This implementation invokes the 2475 * method of the same name without the orientation. 2476 * 2477 * @param context SynthContext identifying the <code>JComponent</code> and 2478 * <code>Region</code> to paint to 2479 * @param g <code>Graphics</code> to paint to 2480 * @param x X coordinate of the area to paint to 2481 * @param y Y coordinate of the area to paint to 2482 * @param w Width of the area to paint to 2483 * @param h Height of the area to paint to 2484 * @param orientation One of <code>JToolBar.HORIZONTAL</code> or 2485 * <code>JToolBar.VERTICAL</code> 2486 * @since 1.6 2487 */ 2488 public void paintToolBarBorder(SynthContext context, 2489 Graphics g, int x, int y, 2490 int w, int h, int orientation) { 2491 paintBorder(context, g, x, y, w, h, orientation); 2492 } 2493 2494 /** 2495 * Paints the background of the tool bar's content area. 2496 * 2497 * @param context SynthContext identifying the <code>JComponent</code> and 2498 * <code>Region</code> to paint to 2499 * @param g <code>Graphics</code> to paint to 2500 * @param x X coordinate of the area to paint to 2501 * @param y Y coordinate of the area to paint to 2502 * @param w Width of the area to paint to 2503 * @param h Height of the area to paint to 2504 */ 2505 public void paintToolBarContentBackground(SynthContext context, 2506 Graphics g, int x, int y, 2507 int w, int h) { 2508 paintBackground(context, g, x, y, w, h, null); 2509 } 2510 2511 /** 2512 * Paints the background of the tool bar's content area. This implementation 2513 * invokes the method of the same name without the orientation. 2514 * 2515 * @param context SynthContext identifying the <code>JComponent</code> and 2516 * <code>Region</code> to paint to 2517 * @param g <code>Graphics</code> to paint to 2518 * @param x X coordinate of the area to paint to 2519 * @param y Y coordinate of the area to paint to 2520 * @param w Width of the area to paint to 2521 * @param h Height of the area to paint to 2522 * @param orientation One of <code>JToolBar.HORIZONTAL</code> or 2523 * <code>JToolBar.VERTICAL</code> 2524 * @since 1.6 2525 */ 2526 public void paintToolBarContentBackground(SynthContext context, 2527 Graphics g, int x, int y, 2528 int w, int h, int orientation) { 2529 paintBackground(context, g, x, y, w, h, orientation); 2530 } 2531 2532 /** 2533 * Paints the border of the content area of a tool bar. 2534 * 2535 * @param context SynthContext identifying the <code>JComponent</code> and 2536 * <code>Region</code> to paint to 2537 * @param g <code>Graphics</code> to paint to 2538 * @param x X coordinate of the area to paint to 2539 * @param y Y coordinate of the area to paint to 2540 * @param w Width of the area to paint to 2541 * @param h Height of the area to paint to 2542 */ 2543 public void paintToolBarContentBorder(SynthContext context, 2544 Graphics g, int x, int y, 2545 int w, int h) { 2546 paintBorder(context, g, x, y, w, h, null); 2547 } 2548 2549 /** 2550 * Paints the border of the content area of a tool bar. This implementation 2551 * invokes the method of the same name without the orientation. 2552 * 2553 * @param context SynthContext identifying the <code>JComponent</code> and 2554 * <code>Region</code> to paint to 2555 * @param g <code>Graphics</code> to paint to 2556 * @param x X coordinate of the area to paint to 2557 * @param y Y coordinate of the area to paint to 2558 * @param w Width of the area to paint to 2559 * @param h Height of the area to paint to 2560 * @param orientation One of <code>JToolBar.HORIZONTAL</code> or 2561 * <code>JToolBar.VERTICAL</code> 2562 * @since 1.6 2563 */ 2564 public void paintToolBarContentBorder(SynthContext context, 2565 Graphics g, int x, int y, 2566 int w, int h, int orientation) { 2567 paintBorder(context, g, x, y, w, h, orientation); 2568 } 2569 2570 /** 2571 * Paints the background of the window containing the tool bar when it 2572 * has been detached from its primary frame. 2573 * 2574 * @param context SynthContext identifying the <code>JComponent</code> and 2575 * <code>Region</code> to paint to 2576 * @param g <code>Graphics</code> to paint to 2577 * @param x X coordinate of the area to paint to 2578 * @param y Y coordinate of the area to paint to 2579 * @param w Width of the area to paint to 2580 * @param h Height of the area to paint to 2581 */ 2582 public void paintToolBarDragWindowBackground(SynthContext context, 2583 Graphics g, int x, int y, 2584 int w, int h) { 2585 paintBackground(context, g, x, y, w, h, null); 2586 } 2587 2588 /** 2589 * Paints the background of the window containing the tool bar when it 2590 * has been detached from its primary frame. This implementation invokes the 2591 * method of the same name without the orientation. 2592 * 2593 * @param context SynthContext identifying the <code>JComponent</code> and 2594 * <code>Region</code> to paint to 2595 * @param g <code>Graphics</code> to paint to 2596 * @param x X coordinate of the area to paint to 2597 * @param y Y coordinate of the area to paint to 2598 * @param w Width of the area to paint to 2599 * @param h Height of the area to paint to 2600 * @param orientation One of <code>JToolBar.HORIZONTAL</code> or 2601 * <code>JToolBar.VERTICAL</code> 2602 * @since 1.6 2603 */ 2604 public void paintToolBarDragWindowBackground(SynthContext context, 2605 Graphics g, int x, int y, 2606 int w, int h, int orientation) { 2607 paintBackground(context, g, x, y, w, h, orientation); 2608 } 2609 2610 /** 2611 * Paints the border of the window containing the tool bar when it 2612 * has been detached from it's primary frame. 2613 * 2614 * @param context SynthContext identifying the <code>JComponent</code> and 2615 * <code>Region</code> to paint to 2616 * @param g <code>Graphics</code> to paint to 2617 * @param x X coordinate of the area to paint to 2618 * @param y Y coordinate of the area to paint to 2619 * @param w Width of the area to paint to 2620 * @param h Height of the area to paint to 2621 */ 2622 public void paintToolBarDragWindowBorder(SynthContext context, 2623 Graphics g, int x, int y, 2624 int w, int h) { 2625 paintBorder(context, g, x, y, w, h, null); 2626 } 2627 2628 /** 2629 * Paints the border of the window containing the tool bar when it 2630 * has been detached from it's primary frame. This implementation invokes the 2631 * method of the same name without the orientation. 2632 * 2633 * @param context SynthContext identifying the <code>JComponent</code> and 2634 * <code>Region</code> to paint to 2635 * @param g <code>Graphics</code> to paint to 2636 * @param x X coordinate of the area to paint to 2637 * @param y Y coordinate of the area to paint to 2638 * @param w Width of the area to paint to 2639 * @param h Height of the area to paint to 2640 * @param orientation One of <code>JToolBar.HORIZONTAL</code> or 2641 * <code>JToolBar.VERTICAL</code> 2642 * @since 1.6 2643 */ 2644 public void paintToolBarDragWindowBorder(SynthContext context, 2645 Graphics g, int x, int y, 2646 int w, int h, int orientation) { 2647 paintBorder(context, g, x, y, w, h, orientation); 2648 } 2649 2650 /** 2651 * Paints the background of a tool tip. 2652 * 2653 * @param context SynthContext identifying the <code>JComponent</code> and 2654 * <code>Region</code> to paint to 2655 * @param g <code>Graphics</code> to paint to 2656 * @param x X coordinate of the area to paint to 2657 * @param y Y coordinate of the area to paint to 2658 * @param w Width of the area to paint to 2659 * @param h Height of the area to paint to 2660 */ 2661 public void paintToolTipBackground(SynthContext context, 2662 Graphics g, int x, int y, 2663 int w, int h) { 2664 paintBackground(context, g, x, y, w, h, null); 2665 } 2666 2667 /** 2668 * Paints the border of a tool tip. 2669 * 2670 * @param context SynthContext identifying the <code>JComponent</code> and 2671 * <code>Region</code> to paint to 2672 * @param g <code>Graphics</code> to paint to 2673 * @param x X coordinate of the area to paint to 2674 * @param y Y coordinate of the area to paint to 2675 * @param w Width of the area to paint to 2676 * @param h Height of the area to paint to 2677 */ 2678 public void paintToolTipBorder(SynthContext context, 2679 Graphics g, int x, int y, 2680 int w, int h) { 2681 paintBorder(context, g, x, y, w, h, null); 2682 } 2683 2684 /** 2685 * Paints the background of a tree. 2686 * 2687 * @param context SynthContext identifying the <code>JComponent</code> and 2688 * <code>Region</code> to paint to 2689 * @param g <code>Graphics</code> to paint to 2690 * @param x X coordinate of the area to paint to 2691 * @param y Y coordinate of the area to paint to 2692 * @param w Width of the area to paint to 2693 * @param h Height of the area to paint to 2694 */ 2695 public void paintTreeBackground(SynthContext context, 2696 Graphics g, int x, int y, 2697 int w, int h) { 2698 paintBackground(context, g, x, y, w, h, null); 2699 } 2700 2701 /** 2702 * Paints the border of a tree. 2703 * 2704 * @param context SynthContext identifying the <code>JComponent</code> and 2705 * <code>Region</code> to paint to 2706 * @param g <code>Graphics</code> to paint to 2707 * @param x X coordinate of the area to paint to 2708 * @param y Y coordinate of the area to paint to 2709 * @param w Width of the area to paint to 2710 * @param h Height of the area to paint to 2711 */ 2712 public void paintTreeBorder(SynthContext context, 2713 Graphics g, int x, int y, 2714 int w, int h) { 2715 paintBorder(context, g, x, y, w, h, null); 2716 } 2717 2718 /** 2719 * Paints the background of the row containing a cell in a tree. 2720 * 2721 * @param context SynthContext identifying the <code>JComponent</code> and 2722 * <code>Region</code> to paint to 2723 * @param g <code>Graphics</code> to paint to 2724 * @param x X coordinate of the area to paint to 2725 * @param y Y coordinate of the area to paint to 2726 * @param w Width of the area to paint to 2727 * @param h Height of the area to paint to 2728 */ 2729 public void paintTreeCellBackground(SynthContext context, 2730 Graphics g, int x, int y, 2731 int w, int h) { 2732 paintBackground(context, g, x, y, w, h, null); 2733 } 2734 2735 /** 2736 * Paints the border of the row containing a cell in a tree. 2737 * 2738 * @param context SynthContext identifying the <code>JComponent</code> and 2739 * <code>Region</code> to paint to 2740 * @param g <code>Graphics</code> to paint to 2741 * @param x X coordinate of the area to paint to 2742 * @param y Y coordinate of the area to paint to 2743 * @param w Width of the area to paint to 2744 * @param h Height of the area to paint to 2745 */ 2746 public void paintTreeCellBorder(SynthContext context, 2747 Graphics g, int x, int y, 2748 int w, int h) { 2749 paintBorder(context, g, x, y, w, h, null); 2750 } 2751 2752 /** 2753 * Paints the focus indicator for a cell in a tree when it has focus. 2754 * 2755 * @param context SynthContext identifying the <code>JComponent</code> and 2756 * <code>Region</code> to paint to 2757 * @param g <code>Graphics</code> to paint to 2758 * @param x X coordinate of the area to paint to 2759 * @param y Y coordinate of the area to paint to 2760 * @param w Width of the area to paint to 2761 * @param h Height of the area to paint to 2762 */ 2763 public void paintTreeCellFocus(SynthContext context, 2764 Graphics g, int x, int y, 2765 int w, int h) { 2766 //TODO 2767 } 2768 2769 /** 2770 * Paints the background of the viewport. 2771 * 2772 * @param context SynthContext identifying the <code>JComponent</code> and 2773 * <code>Region</code> to paint to 2774 * @param g <code>Graphics</code> to paint to 2775 * @param x X coordinate of the area to paint to 2776 * @param y Y coordinate of the area to paint to 2777 * @param w Width of the area to paint to 2778 * @param h Height of the area to paint to 2779 */ 2780 public void paintViewportBackground(SynthContext context, 2781 Graphics g, int x, int y, 2782 int w, int h) { 2783 paintBackground(context, g, x, y, w, h, null); 2784 } 2785 2786 /** 2787 * Paints the border of a viewport. 2788 * 2789 * @param context SynthContext identifying the <code>JComponent</code> and 2790 * <code>Region</code> to paint to 2791 * @param g <code>Graphics</code> to paint to 2792 * @param x X coordinate of the area to paint to 2793 * @param y Y coordinate of the area to paint to 2794 * @param w Width of the area to paint to 2795 * @param h Height of the area to paint to 2796 */ 2797 public void paintViewportBorder(SynthContext context, 2798 Graphics g, int x, int y, 2799 int w, int h) { 2800 paintBorder(context, g, x, y, w, h, null); 2801 } 2802 }