1173N/A/*
2362N/A * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
1173N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1173N/A *
1173N/A * This code is free software; you can redistribute it and/or modify it
1173N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
1173N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
1173N/A *
1173N/A * This code is distributed in the hope that it will be useful, but WITHOUT
1173N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1173N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1173N/A * version 2 for more details (a copy is included in the LICENSE file that
1173N/A * accompanied this code).
1173N/A *
1173N/A * You should have received a copy of the GNU General Public License version
1173N/A * 2 along with this work; if not, write to the Free Software Foundation,
1173N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1173N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
1173N/A */
1173N/Apackage javax.swing.plaf.nimbus;
1173N/A
1173N/Aimport java.awt.*;
1173N/Aimport java.awt.geom.AffineTransform;
1173N/Aimport java.awt.geom.NoninvertibleTransformException;
1173N/Aimport java.awt.image.BufferedImage;
1173N/Aimport java.util.*;
1173N/Aimport javax.swing.*;
1173N/Aimport javax.swing.plaf.synth.SynthContext;
1173N/Aimport javax.swing.plaf.synth.SynthPainter;
1173N/Aimport javax.swing.plaf.synth.SynthConstants;
1173N/A
1173N/Aimport javax.swing.Painter;
1173N/A
1173N/A
1173N/Aclass SynthPainterImpl extends SynthPainter {
1173N/A private NimbusStyle style;
1173N/A
1173N/A SynthPainterImpl(NimbusStyle style) {
1173N/A this.style = style;
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paint the provided painter using the provided transform at the specified
1173N/A * position and size. Handles if g is a non 2D Graphics by painting via a
1173N/A * BufferedImage.
1173N/A */
1173N/A private void paint(Painter p, SynthContext ctx, Graphics g, int x, int y,
1173N/A int w, int h, AffineTransform transform) {
1173N/A if (p != null) {
1173N/A if (g instanceof Graphics2D){
1173N/A Graphics2D gfx = (Graphics2D)g;
1173N/A if (transform!=null){
1173N/A gfx.transform(transform);
1173N/A }
1173N/A gfx.translate(x, y);
1173N/A p.paint(gfx, ctx.getComponent(), w, h);
1173N/A gfx.translate(-x, -y);
1173N/A if (transform!=null){
1173N/A try {
1173N/A gfx.transform(transform.createInverse());
1173N/A } catch (NoninvertibleTransformException e) {
1173N/A // this should never happen as we are in control of all
1173N/A // calls into this method and only ever pass in simple
1173N/A // transforms of rotate, flip and translates
1173N/A e.printStackTrace();
1173N/A }
1173N/A }
1173N/A } else {
1173N/A // use image if we are printing to a Java 1.1 PrintGraphics as
1173N/A // it is not a instance of Graphics2D
1173N/A BufferedImage img = new BufferedImage(w,h,
1173N/A BufferedImage.TYPE_INT_ARGB);
1173N/A Graphics2D gfx = img.createGraphics();
1173N/A if (transform!=null){
1173N/A gfx.transform(transform);
1173N/A }
1173N/A p.paint(gfx, ctx.getComponent(), w, h);
1173N/A gfx.dispose();
1173N/A g.drawImage(img,x,y,null);
1173N/A img = null;
1173N/A }
1173N/A }
1173N/A }
1173N/A
1173N/A private void paintBackground(SynthContext ctx, Graphics g, int x, int y,
1173N/A int w, int h, AffineTransform transform) {
1173N/A // if the background color of the component is 100% transparent
1173N/A // then we should not paint any background graphics. This is a solution
1173N/A // for there being no way of turning off Nimbus background painting as
1173N/A // basic components are all non-opaque by default.
1173N/A Component c = ctx.getComponent();
1173N/A Color bg = (c != null) ? c.getBackground() : null;
1173N/A if (bg == null || bg.getAlpha() > 0){
1173N/A Painter backgroundPainter = style.getBackgroundPainter(ctx);
1173N/A if (backgroundPainter != null) {
1173N/A paint(backgroundPainter, ctx, g, x, y, w, h,transform);
1173N/A }
1173N/A }
1173N/A }
1173N/A
1173N/A private void paintForeground(SynthContext ctx, Graphics g, int x, int y,
1173N/A int w, int h, AffineTransform transform) {
1173N/A Painter foregroundPainter = style.getForegroundPainter(ctx);
1173N/A if (foregroundPainter != null) {
1173N/A paint(foregroundPainter, ctx, g, x, y, w, h,transform);
1173N/A }
1173N/A }
1173N/A
1173N/A private void paintBorder(SynthContext ctx, Graphics g, int x, int y, int w,
1173N/A int h, AffineTransform transform) {
1173N/A Painter borderPainter = style.getBorderPainter(ctx);
1173N/A if (borderPainter != null) {
1173N/A paint(borderPainter, ctx, g, x, y, w, h,transform);
1173N/A }
1173N/A }
1173N/A
1173N/A private void paintBackground(SynthContext ctx, Graphics g, int x, int y, int w, int h, int orientation) {
1173N/A Component c = ctx.getComponent();
1173N/A boolean ltr = c.getComponentOrientation().isLeftToRight();
1173N/A // Don't RTL flip JSpliders as they handle it internaly
1173N/A if (ctx.getComponent() instanceof JSlider) ltr = true;
1173N/A
1173N/A if (orientation == SwingConstants.VERTICAL && ltr) {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.scale(-1, 1);
1173N/A transform.rotate(Math.toRadians(90));
1173N/A paintBackground(ctx, g, y, x, h, w, transform);
1173N/A } else if (orientation == SwingConstants.VERTICAL) {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.rotate(Math.toRadians(90));
1173N/A transform.translate(0,-(x+w));
1173N/A paintBackground(ctx, g, y, x, h, w, transform);
1173N/A } else if (orientation == SwingConstants.HORIZONTAL && ltr) {
1173N/A paintBackground(ctx, g, x, y, w, h, null);
1173N/A } else {
1173N/A //horizontal and right-to-left orientation
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.translate(x,y);
1173N/A transform.scale(-1, 1);
1173N/A transform.translate(-w,0);
1173N/A paintBackground(ctx, g, 0, 0, w, h, transform);
1173N/A }
1173N/A }
1173N/A
1173N/A private void paintBorder(SynthContext ctx, Graphics g, int x, int y, int w, int h, int orientation) {
1173N/A Component c = ctx.getComponent();
1173N/A boolean ltr = c.getComponentOrientation().isLeftToRight();
1173N/A if (orientation == SwingConstants.VERTICAL && ltr) {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.scale(-1, 1);
1173N/A transform.rotate(Math.toRadians(90));
1173N/A paintBorder(ctx, g, y, x, h, w, transform);
1173N/A } else if (orientation == SwingConstants.VERTICAL) {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.rotate(Math.toRadians(90));
1173N/A transform.translate(0, -(x + w));
1173N/A paintBorder(ctx, g, y, 0, h, w, transform);
1173N/A } else if (orientation == SwingConstants.HORIZONTAL && ltr) {
1173N/A paintBorder(ctx, g, x, y, w, h, null);
1173N/A } else {
1173N/A //horizontal and right-to-left orientation
1173N/A paintBorder(ctx, g, x, y, w, h, null);
1173N/A }
1173N/A }
1173N/A
1173N/A private void paintForeground(SynthContext ctx, Graphics g, int x, int y, int w, int h, int orientation) {
1173N/A Component c = ctx.getComponent();
1173N/A boolean ltr = c.getComponentOrientation().isLeftToRight();
1173N/A if (orientation == SwingConstants.VERTICAL && ltr) {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.scale(-1, 1);
1173N/A transform.rotate(Math.toRadians(90));
1173N/A paintForeground(ctx, g, y, x, h, w, transform);
1173N/A } else if (orientation == SwingConstants.VERTICAL) {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.rotate(Math.toRadians(90));
1173N/A transform.translate(0, -(x + w));
1173N/A paintForeground(ctx, g, y, 0, h, w, transform);
1173N/A } else if (orientation == SwingConstants.HORIZONTAL && ltr) {
1173N/A paintForeground(ctx, g, x, y, w, h, null);
1173N/A } else {
1173N/A //horizontal and right-to-left orientation
1173N/A paintForeground(ctx, g, x, y, w, h, null);
1173N/A }
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of an arrow button. Arrow buttons are created by
1173N/A * some components, such as <code>JScrollBar</code>.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintArrowButtonBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A if (context.getComponent().getComponentOrientation().isLeftToRight()){
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A } else {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.translate(x,y);
1173N/A transform.scale(-1, 1);
1173N/A transform.translate(-w,0);
1173N/A paintBackground(context, g, 0, 0, w, h, transform);
1173N/A }
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of an arrow button. Arrow buttons are created by
1173N/A * some components, such as <code>JScrollBar</code>.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintArrowButtonBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the foreground of an arrow button. This method is responsible
1173N/A * for drawing a graphical representation of a direction, typically
1173N/A * an arrow. Arrow buttons are created by
1173N/A * some components, such as <code>JScrollBar</code>
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param direction One of SwingConstants.NORTH, SwingConstants.SOUTH
1173N/A * SwingConstants.EAST or SwingConstants.WEST
1173N/A */
1173N/A public void paintArrowButtonForeground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h,
1173N/A int direction) {
1173N/A //assume that the painter is arranged with the arrow pointing... LEFT?
1173N/A String compName = context.getComponent().getName();
1173N/A boolean ltr = context.getComponent().
1173N/A getComponentOrientation().isLeftToRight();
1173N/A // The hard coding for spinners here needs to be replaced by a more
1173N/A // general method for disabling rotation
1173N/A if ("Spinner.nextButton".equals(compName) ||
1173N/A "Spinner.previousButton".equals(compName)) {
1173N/A if (ltr){
1173N/A paintForeground(context, g, x, y, w, h, null);
1173N/A } else {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.translate(w, 0);
1173N/A transform.scale(-1, 1);
1173N/A paintForeground(context, g, x, y, w, h, transform);
1173N/A }
1173N/A } else if (direction == SwingConstants.WEST) {
1173N/A paintForeground(context, g, x, y, w, h, null);
1173N/A } else if (direction == SwingConstants.NORTH) {
1173N/A if (ltr){
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.scale(-1, 1);
1173N/A transform.rotate(Math.toRadians(90));
1173N/A paintForeground(context, g, y, 0, h, w, transform);
1173N/A } else {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.rotate(Math.toRadians(90));
1173N/A transform.translate(0, -(x + w));
1173N/A paintForeground(context, g, y, 0, h, w, transform);
1173N/A }
1173N/A } else if (direction == SwingConstants.EAST) {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.translate(w, 0);
1173N/A transform.scale(-1, 1);
1173N/A paintForeground(context, g, x, y, w, h, transform);
1173N/A } else if (direction == SwingConstants.SOUTH) {
1173N/A if (ltr){
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.rotate(Math.toRadians(-90));
1173N/A transform.translate(-h, 0);
1173N/A paintForeground(context, g, y, x, h, w, transform);
1173N/A } else {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.scale(-1, 1);
1173N/A transform.rotate(Math.toRadians(-90));
1173N/A transform.translate(-(h+y), -(w+x));
1173N/A paintForeground(context, g, y, x, h, w, transform);
1173N/A }
1173N/A }
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a button.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintButtonBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a button.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintButtonBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a check box menu item.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintCheckBoxMenuItemBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a check box menu item.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintCheckBoxMenuItemBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a check box.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintCheckBoxBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a check box.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintCheckBoxBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a color chooser.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintColorChooserBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a color chooser.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintColorChooserBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a combo box.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintComboBoxBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A if (context.getComponent().getComponentOrientation().isLeftToRight()){
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A } else {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.translate(x,y);
1173N/A transform.scale(-1, 1);
1173N/A transform.translate(-w,0);
1173N/A paintBackground(context, g, 0, 0, w, h, transform);
1173N/A }
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a combo box.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintComboBoxBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a desktop icon.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintDesktopIconBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a desktop icon.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintDesktopIconBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a desktop pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintDesktopPaneBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a desktop pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintDesktopPaneBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of an editor pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintEditorPaneBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of an editor pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintEditorPaneBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a file chooser.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintFileChooserBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a file chooser.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintFileChooserBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a formatted text field.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintFormattedTextFieldBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A if (context.getComponent().getComponentOrientation().isLeftToRight()){
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A } else {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.translate(x,y);
1173N/A transform.scale(-1, 1);
1173N/A transform.translate(-w,0);
1173N/A paintBackground(context, g, 0, 0, w, h, transform);
1173N/A }
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a formatted text field.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintFormattedTextFieldBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A if (context.getComponent().getComponentOrientation().isLeftToRight()){
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A } else {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.translate(x,y);
1173N/A transform.scale(-1, 1);
1173N/A transform.translate(-w,0);
1173N/A paintBorder(context, g, 0, 0, w, h, transform);
1173N/A }
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of an internal frame title pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintInternalFrameTitlePaneBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of an internal frame title pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintInternalFrameTitlePaneBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of an internal frame.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintInternalFrameBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of an internal frame.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintInternalFrameBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a label.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintLabelBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a label.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintLabelBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a list.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintListBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a list.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintListBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a menu bar.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintMenuBarBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a menu bar.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintMenuBarBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a menu item.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintMenuItemBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a menu item.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintMenuItemBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a menu.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintMenuBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a menu.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintMenuBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of an option pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintOptionPaneBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of an option pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintOptionPaneBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a panel.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintPanelBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a panel.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintPanelBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a password field.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintPasswordFieldBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a password field.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintPasswordFieldBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a popup menu.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintPopupMenuBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a popup menu.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintPopupMenuBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a progress bar.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintProgressBarBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a progress bar. This implementation invokes the
1173N/A * method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation one of <code>JProgressBar.HORIZONTAL</code> or
1173N/A * <code>JProgressBar.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintProgressBarBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBackground(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a progress bar.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintProgressBarBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a progress bar. This implementation invokes the
1173N/A * method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation one of <code>JProgressBar.HORIZONTAL</code> or
1173N/A * <code>JProgressBar.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintProgressBarBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBorder(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the foreground of a progress bar. is responsible for
1173N/A * providing an indication of the progress of the progress bar.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation one of <code>JProgressBar.HORIZONTAL</code> or
1173N/A * <code>JProgressBar.VERTICAL</code>
1173N/A */
1173N/A public void paintProgressBarForeground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintForeground(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a radio button menu item.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintRadioButtonMenuItemBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a radio button menu item.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintRadioButtonMenuItemBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a radio button.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintRadioButtonBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a radio button.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintRadioButtonBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a root pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintRootPaneBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a root pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintRootPaneBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a scrollbar.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintScrollBarBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a scrollbar. This implementation invokes the
1173N/A * method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation Orientation of the JScrollBar, one of
1173N/A * <code>JScrollBar.HORIZONTAL</code> or
1173N/A * <code>JScrollBar.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintScrollBarBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBackground(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a scrollbar.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintScrollBarBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a scrollbar. This implementation invokes the
1173N/A * method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation Orientation of the JScrollBar, one of
1173N/A * <code>JScrollBar.HORIZONTAL</code> or
1173N/A * <code>JScrollBar.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintScrollBarBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBorder(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the thumb of a scrollbar. The thumb provides
1173N/A * a graphical indication as to how much of the Component is visible in a
1173N/A * <code>JScrollPane</code>.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation Orientation of the JScrollBar, one of
1173N/A * <code>JScrollBar.HORIZONTAL</code> or
1173N/A * <code>JScrollBar.VERTICAL</code>
1173N/A */
1173N/A public void paintScrollBarThumbBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBackground(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of the thumb of a scrollbar. The thumb provides
1173N/A * a graphical indication as to how much of the Component is visible in a
1173N/A * <code>JScrollPane</code>.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation Orientation of the JScrollBar, one of
1173N/A * <code>JScrollBar.HORIZONTAL</code> or
1173N/A * <code>JScrollBar.VERTICAL</code>
1173N/A */
1173N/A public void paintScrollBarThumbBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBorder(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the track of a scrollbar. The track contains
1173N/A * the thumb.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintScrollBarTrackBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the track of a scrollbar. The track contains
1173N/A * the thumb. This implementation invokes the method of the same name without
1173N/A * the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation Orientation of the JScrollBar, one of
1173N/A * <code>JScrollBar.HORIZONTAL</code> or
1173N/A * <code>JScrollBar.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintScrollBarTrackBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBackground(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of the track of a scrollbar. The track contains
1173N/A * the thumb.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintScrollBarTrackBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of the track of a scrollbar. The track contains
1173N/A * the thumb. This implementation invokes the method of the same name without
1173N/A * the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation Orientation of the JScrollBar, one of
1173N/A * <code>JScrollBar.HORIZONTAL</code> or
1173N/A * <code>JScrollBar.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintScrollBarTrackBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBorder(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a scroll pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintScrollPaneBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a scroll pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintScrollPaneBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a separator.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintSeparatorBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a separator. This implementation invokes the
1173N/A * method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JSeparator.HORIZONTAL</code> or
1173N/A * <code>JSeparator.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintSeparatorBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBackground(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a separator.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintSeparatorBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a separator. This implementation invokes the
1173N/A * method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JSeparator.HORIZONTAL</code> or
1173N/A * <code>JSeparator.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintSeparatorBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBorder(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the foreground of a separator.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JSeparator.HORIZONTAL</code> or
1173N/A * <code>JSeparator.VERTICAL</code>
1173N/A */
1173N/A public void paintSeparatorForeground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintForeground(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a slider.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintSliderBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a slider. This implementation invokes the
1173N/A * method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JSlider.HORIZONTAL</code> or
1173N/A * <code>JSlider.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintSliderBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBackground(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a slider.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintSliderBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a slider. This implementation invokes the
1173N/A * method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JSlider.HORIZONTAL</code> or
1173N/A * <code>JSlider.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintSliderBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBorder(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the thumb of a slider.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JSlider.HORIZONTAL</code> or
1173N/A * <code>JSlider.VERTICAL</code>
1173N/A */
1173N/A public void paintSliderThumbBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A if (context.getComponent().getClientProperty(
1173N/A "Slider.paintThumbArrowShape") == Boolean.TRUE){
1173N/A if (orientation == JSlider.HORIZONTAL){
1173N/A orientation = JSlider.VERTICAL;
1173N/A } else {
1173N/A orientation = JSlider.HORIZONTAL;
1173N/A }
1173N/A paintBackground(context, g, x, y, w, h, orientation);
1173N/A } else {
1173N/A paintBackground(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of the thumb of a slider.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JSlider.HORIZONTAL</code> or
1173N/A * <code>JSlider.VERTICAL</code>
1173N/A */
1173N/A public void paintSliderThumbBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBorder(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the track of a slider.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintSliderTrackBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the track of a slider. This implementation invokes
1173N/A * the method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JSlider.HORIZONTAL</code> or
1173N/A * <code>JSlider.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintSliderTrackBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBackground(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of the track of a slider.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintSliderTrackBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of the track of a slider. This implementation invokes the
1173N/A * method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JSlider.HORIZONTAL</code> or
1173N/A * <code>JSlider.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintSliderTrackBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBorder(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a spinner.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintSpinnerBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a spinner.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintSpinnerBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the divider of a split pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintSplitPaneDividerBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the divider of a split pane. This implementation
1173N/A * invokes the method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JSplitPane.HORIZONTAL_SPLIT</code> or
1173N/A * <code>JSplitPane.VERTICAL_SPLIT</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintSplitPaneDividerBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A if (orientation == JSplitPane.HORIZONTAL_SPLIT) {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.scale(-1, 1);
1173N/A transform.rotate(Math.toRadians(90));
1173N/A paintBackground(context, g, y, x, h, w, transform);
1173N/A } else {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the foreground of the divider of a split pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JSplitPane.HORIZONTAL_SPLIT</code> or
1173N/A * <code>JSplitPane.VERTICAL_SPLIT</code>
1173N/A */
1173N/A public void paintSplitPaneDividerForeground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintForeground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the divider, when the user is dragging the divider, of a
1173N/A * split pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JSplitPane.HORIZONTAL_SPLIT</code> or
1173N/A * <code>JSplitPane.VERTICAL_SPLIT</code>
1173N/A */
1173N/A public void paintSplitPaneDragDivider(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a split pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintSplitPaneBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a split pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintSplitPaneBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a tabbed pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTabbedPaneBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a tabbed pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTabbedPaneBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the area behind the tabs of a tabbed pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTabbedPaneTabAreaBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the area behind the tabs of a tabbed pane.
1173N/A * This implementation invokes the method of the same name without the
1173N/A * orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JTabbedPane.TOP</code>,
1173N/A * <code>JTabbedPane.LEFT</code>,
1173N/A * <code>JTabbedPane.BOTTOM</code>, or
1173N/A * <code>JTabbedPane.RIGHT</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintTabbedPaneTabAreaBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A if (orientation == JTabbedPane.LEFT) {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.scale(-1, 1);
1173N/A transform.rotate(Math.toRadians(90));
1173N/A paintBackground(context, g, y, x, h, w, transform);
1173N/A } else if (orientation == JTabbedPane.RIGHT) {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.rotate(Math.toRadians(90));
1173N/A transform.translate(0, -(x + w));
1173N/A paintBackground(context, g, y, 0, h, w, transform);
1173N/A } else if (orientation == JTabbedPane.BOTTOM) {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.translate(x,y);
1173N/A transform.scale(1, -1);
1173N/A transform.translate(0,-h);
1173N/A paintBackground(context, g, 0, 0, w, h, transform);
1173N/A } else {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of the area behind the tabs of a tabbed pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTabbedPaneTabAreaBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of the area behind the tabs of a tabbed pane. This
1173N/A * implementation invokes the method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JTabbedPane.TOP</code>,
1173N/A * <code>JTabbedPane.LEFT</code>,
1173N/A * <code>JTabbedPane.BOTTOM</code>, or
1173N/A * <code>JTabbedPane.RIGHT</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintTabbedPaneTabAreaBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a tab of a tabbed pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param tabIndex Index of tab being painted.
1173N/A */
1173N/A public void paintTabbedPaneTabBackground(SynthContext context, Graphics g,
1173N/A int x, int y, int w, int h,
1173N/A int tabIndex) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a tab of a tabbed pane. This implementation
1173N/A * invokes the method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param tabIndex Index of tab being painted.
1173N/A * @param orientation One of <code>JTabbedPane.TOP</code>,
1173N/A * <code>JTabbedPane.LEFT</code>,
1173N/A * <code>JTabbedPane.BOTTOM</code>, or
1173N/A * <code>JTabbedPane.RIGHT</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintTabbedPaneTabBackground(SynthContext context, Graphics g,
1173N/A int x, int y, int w, int h,
1173N/A int tabIndex, int orientation) {
1173N/A if (orientation == JTabbedPane.LEFT) {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.scale(-1, 1);
1173N/A transform.rotate(Math.toRadians(90));
1173N/A paintBackground(context, g, y, x, h, w, transform);
1173N/A } else if (orientation == JTabbedPane.RIGHT) {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.rotate(Math.toRadians(90));
1173N/A transform.translate(0, -(x + w));
1173N/A paintBackground(context, g, y, 0, h, w, transform);
1173N/A } else if (orientation == JTabbedPane.BOTTOM) {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.translate(x,y);
1173N/A transform.scale(1, -1);
1173N/A transform.translate(0,-h);
1173N/A paintBackground(context, g, 0, 0, w, h, transform);
1173N/A } else {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a tab of a tabbed pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param tabIndex Index of tab being painted.
1173N/A */
1173N/A public void paintTabbedPaneTabBorder(SynthContext context, Graphics g,
1173N/A int x, int y, int w, int h,
1173N/A int tabIndex) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a tab of a tabbed pane. This implementation invokes
1173N/A * the method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param tabIndex Index of tab being painted.
1173N/A * @param orientation One of <code>JTabbedPane.TOP</code>,
1173N/A * <code>JTabbedPane.LEFT</code>,
1173N/A * <code>JTabbedPane.BOTTOM</code>, or
1173N/A * <code>JTabbedPane.RIGHT</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintTabbedPaneTabBorder(SynthContext context, Graphics g,
1173N/A int x, int y, int w, int h,
1173N/A int tabIndex, int orientation) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the area that contains the content of the
1173N/A * selected tab of a tabbed pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTabbedPaneContentBackground(SynthContext context,
1173N/A Graphics g, int x, int y, int w,
1173N/A int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of the area that contains the content of the
1173N/A * selected tab of a tabbed pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTabbedPaneContentBorder(SynthContext context, Graphics g,
1173N/A int x, int y, int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the header of a table.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTableHeaderBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of the header of a table.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTableHeaderBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a table.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTableBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a table.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTableBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a text area.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTextAreaBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a text area.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTextAreaBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a text pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTextPaneBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a text pane.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTextPaneBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a text field.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTextFieldBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A if (context.getComponent().getComponentOrientation().isLeftToRight()){
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A } else {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.translate(x,y);
1173N/A transform.scale(-1, 1);
1173N/A transform.translate(-w,0);
1173N/A paintBackground(context, g, 0, 0, w, h, transform);
1173N/A }
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a text field.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTextFieldBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A if (context.getComponent().getComponentOrientation().isLeftToRight()){
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A } else {
1173N/A AffineTransform transform = new AffineTransform();
1173N/A transform.translate(x,y);
1173N/A transform.scale(-1, 1);
1173N/A transform.translate(-w,0);
1173N/A paintBorder(context, g, 0, 0, w, h, transform);
1173N/A }
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a toggle button.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintToggleButtonBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a toggle button.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintToggleButtonBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a tool bar.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintToolBarBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a tool bar. This implementation invokes the
1173N/A * method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JToolBar.HORIZONTAL</code> or
1173N/A * <code>JToolBar.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintToolBarBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBackground(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a tool bar.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintToolBarBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a tool bar. This implementation invokes the
1173N/A * method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JToolBar.HORIZONTAL</code> or
1173N/A * <code>JToolBar.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintToolBarBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBorder(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the tool bar's content area.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintToolBarContentBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the tool bar's content area. This implementation
1173N/A * invokes the method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JToolBar.HORIZONTAL</code> or
1173N/A * <code>JToolBar.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintToolBarContentBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBackground(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of the content area of a tool bar.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintToolBarContentBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of the content area of a tool bar. This implementation
1173N/A * invokes the method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JToolBar.HORIZONTAL</code> or
1173N/A * <code>JToolBar.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintToolBarContentBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBorder(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the window containing the tool bar when it
1173N/A * has been detached from its primary frame.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintToolBarDragWindowBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the window containing the tool bar when it
1173N/A * has been detached from its primary frame. This implementation invokes the
1173N/A * method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JToolBar.HORIZONTAL</code> or
1173N/A * <code>JToolBar.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintToolBarDragWindowBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBackground(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of the window containing the tool bar when it
1173N/A * has been detached from it's primary frame.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintToolBarDragWindowBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of the window containing the tool bar when it
1173N/A * has been detached from it's primary frame. This implementation invokes the
1173N/A * method of the same name without the orientation.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A * @param orientation One of <code>JToolBar.HORIZONTAL</code> or
1173N/A * <code>JToolBar.VERTICAL</code>
1173N/A * @since 1.6
1173N/A */
1173N/A public void paintToolBarDragWindowBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h, int orientation) {
1173N/A paintBorder(context, g, x, y, w, h, orientation);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a tool tip.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintToolTipBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a tool tip.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintToolTipBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of a tree.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTreeBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a tree.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTreeBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the row containing a cell in a tree.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTreeCellBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of the row containing a cell in a tree.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTreeCellBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the focus indicator for a cell in a tree when it has focus.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintTreeCellFocus(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A //TODO
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the background of the viewport.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintViewportBackground(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBackground(context, g, x, y, w, h, null);
1173N/A }
1173N/A
1173N/A /**
1173N/A * Paints the border of a viewport.
1173N/A *
1173N/A * @param context SynthContext identifying the <code>JComponent</code> and
1173N/A * <code>Region</code> to paint to
1173N/A * @param g <code>Graphics</code> to paint to
1173N/A * @param x X coordinate of the area to paint to
1173N/A * @param y Y coordinate of the area to paint to
1173N/A * @param w Width of the area to paint to
1173N/A * @param h Height of the area to paint to
1173N/A */
1173N/A public void paintViewportBorder(SynthContext context,
1173N/A Graphics g, int x, int y,
1173N/A int w, int h) {
1173N/A paintBorder(context, g, x, y, w, h, null);
1173N/A }
1173N/A}