0001: /*
0002: * Licensed to the Apache Software Foundation (ASF) under one or more
0003: * contributor license agreements. See the NOTICE file distributed with
0004: * this work for additional information regarding copyright ownership.
0005: * The ASF licenses this file to You under the Apache License, Version 2.0
0006: * (the "License"); you may not use this file except in compliance with
0007: * the License. You may obtain a copy of the License at
0008: *
0009: * http://www.apache.org/licenses/LICENSE-2.0
0010: *
0011: * Unless required by applicable law or agreed to in writing, software
0012: * distributed under the License is distributed on an "AS IS" BASIS,
0013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014: * See the License for the specific language governing permissions and
0015: * limitations under the License.
0016: */
0017:
0018: package javax.swing.plaf.synth;
0019:
0020: import java.awt.Color;
0021: import java.awt.Graphics;
0022: import java.awt.Insets;
0023: import java.awt.geom.AffineTransform;
0024: import java.awt.image.AffineTransformOp;
0025: import java.awt.image.BufferedImage;
0026: import java.io.File;
0027: import java.io.IOException;
0028:
0029: import javax.imageio.ImageIO;
0030: import javax.swing.JComponent;
0031:
0032: import org.apache.harmony.x.swing.internal.nls.Messages;
0033: import org.xml.sax.SAXException;
0034:
0035: class ImagePainter extends SynthPainter {
0036:
0037: /**
0038: * The array of images: parts of cropped source image
0039: */
0040: private BufferedImage[][] imageParts = new BufferedImage[3][3];
0041:
0042: /**
0043: * Below are painter parameters
0044: */
0045: private final Insets destinationInsets;
0046:
0047: private final boolean paintCenter;
0048:
0049: private final boolean stretch;
0050:
0051: /**
0052: * Below are private image parameters. Used in cropImage and paintImage
0053: * methods only
0054: */
0055: private int imageWidth;
0056:
0057: private int imageHeight;
0058:
0059: private int imageInsetsTop;
0060:
0061: private int imageInsetsLeft;
0062:
0063: private int imageInsetsRight;
0064:
0065: private int imageInsetsBottom;
0066:
0067: /**
0068: * XMLImagePainter is single for every image and parameters. i.e. for 2
0069: * images (the same image but different painting parameters) there are 2
0070: * ImagePainters
0071: */
0072: ImagePainter(String path, Insets sourceInsets,
0073: Insets destinationInsets, boolean paintCenter,
0074: boolean stretch, Class<?> base) throws IOException,
0075: SAXException {
0076:
0077: String imagePath = base.getResource(path).getPath();
0078:
0079: if ((imagePath == null) || (sourceInsets == null)) {
0080: throw new SAXException(Messages.getString("swing.err.23")); //$NON-NLS-1$
0081: }
0082:
0083: this .destinationInsets = destinationInsets;
0084: this .stretch = stretch;
0085: this .paintCenter = paintCenter;
0086:
0087: cropImage(ImageIO.read(new File(imagePath)), sourceInsets);
0088: }
0089:
0090: /**
0091: * Cropped image according sourceInsets and place the cuts into imageParts
0092: * array
0093: *
0094: * @param input
0095: * image to crop
0096: * @param cropping
0097: * parameters
0098: */
0099: private void cropImage(BufferedImage input, Insets insets) {
0100:
0101: /* Define image parameters */
0102: imageWidth = input.getWidth();
0103: imageHeight = input.getHeight();
0104: imageInsetsTop = insets.top;
0105: imageInsetsLeft = insets.left;
0106: imageInsetsRight = insets.right;
0107: imageInsetsBottom = insets.bottom;
0108:
0109: if ((imageHeight < (imageInsetsTop + imageInsetsBottom))
0110: || (imageWidth < (imageInsetsLeft + imageInsetsRight))) {
0111: return;
0112: }
0113:
0114: /* Crop image into array of images */
0115: if ((imageInsetsTop > 0)) {
0116:
0117: if (imageInsetsLeft >= 0)
0118:
0119: imageParts[0][1] = input.getSubimage(imageInsetsLeft,
0120: 0, imageWidth - imageInsetsRight
0121: - imageInsetsLeft, imageInsetsTop);
0122:
0123: if (imageInsetsLeft > 0) {
0124:
0125: imageParts[0][0] = input.getSubimage(0, 0,
0126: imageInsetsLeft, imageInsetsTop);
0127: }
0128: if ((imageInsetsRight > 0)
0129: && (imageWidth >= imageInsetsRight)) {
0130:
0131: imageParts[0][2] = input.getSubimage(imageWidth
0132: - imageInsetsRight, 0, imageInsetsRight,
0133: imageInsetsTop);
0134: }
0135: }
0136:
0137: if ((imageInsetsLeft > 0) && (imageInsetsTop >= 0)) {
0138:
0139: imageParts[1][0] = input.getSubimage(0, imageInsetsTop,
0140: imageInsetsLeft, imageHeight - imageInsetsTop
0141: - imageInsetsBottom);
0142:
0143: }
0144:
0145: if (paintCenter && (imageInsetsLeft >= 0)
0146: && (imageInsetsTop >= 0)) {
0147:
0148: imageParts[1][1] = input.getSubimage(imageInsetsLeft,
0149: imageInsetsTop, imageWidth - imageInsetsLeft
0150: - imageInsetsRight, imageHeight
0151: - imageInsetsTop - imageInsetsBottom);
0152: }
0153:
0154: if ((imageInsetsRight > 0) && (imageWidth >= imageInsetsRight)
0155: && (imageInsetsTop >= 0)) {
0156:
0157: imageParts[1][2] = input.getSubimage(imageWidth
0158: - imageInsetsRight, imageInsetsTop,
0159: imageInsetsRight, imageHeight - imageInsetsTop
0160: - imageInsetsBottom);
0161: }
0162: if ((imageInsetsBottom > 0)) {
0163:
0164: if ((imageInsetsLeft >= 0)
0165: && (imageHeight >= imageInsetsBottom)) {
0166:
0167: imageParts[2][1] = input.getSubimage(imageInsetsLeft,
0168: imageHeight - imageInsetsBottom, imageWidth
0169: - imageInsetsRight - imageInsetsLeft,
0170: imageInsetsBottom);
0171: }
0172:
0173: if ((imageInsetsLeft > 0)
0174: && (imageHeight >= imageInsetsBottom)) {
0175:
0176: imageParts[2][0] = input.getSubimage(0, imageHeight
0177: - imageInsetsBottom, imageInsetsLeft,
0178: imageInsetsBottom);
0179: }
0180:
0181: if ((imageInsetsRight > 0)
0182: && (imageWidth > imageInsetsRight)
0183: && (imageHeight > imageInsetsBottom)) {
0184:
0185: imageParts[2][2] = input.getSubimage(imageWidth
0186: - imageInsetsRight, imageHeight
0187: - imageInsetsBottom, imageInsetsRight,
0188: imageInsetsBottom);
0189: }
0190: }
0191: }
0192:
0193: /**
0194: * Paints the image cropped by cropImage method into array of images
0195: * according specified parameters, defined in constructor:<br>
0196: * <br>
0197: * paintCenter - should center of image painted<br>
0198: * stretch - either stretch or tile side parts of image<br>
0199: * destinationInsets - size of side and corner tiles<br>
0200: * <br>
0201: * Note: a,b - affineTransform coefficients: x(draw)=a*x(image)
0202: * y(draw)=b*y(image)
0203: */
0204: @SuppressWarnings("unused")
0205: private void paintImage(SynthContext context, Graphics g, int x,
0206: int y, int w, int h) {
0207:
0208: // affineTransform coefficients
0209: double a;
0210: double b;
0211:
0212: // destinationInsets - size of side and corner tiles. Defined to
0213: // simplify readability
0214: int insetsTop = destinationInsets.top;
0215: int insetsLeft = destinationInsets.left;
0216: int insetsRight = destinationInsets.right;
0217: int insetsBottom = destinationInsets.bottom;
0218:
0219: // Define tiling parameters
0220: int sourceWidth = imageWidth - imageInsetsLeft
0221: - imageInsetsRight;
0222: int destWidth = w - insetsLeft - insetsRight;
0223: int fullHorisontalPaintsNum = (int) Math.ceil(destWidth
0224: / sourceWidth);
0225: int sourceHeight = imageHeight - imageInsetsBottom
0226: - imageInsetsTop;
0227: int destHeight = h - insetsTop - insetsBottom;
0228: int fullVerticalPaintsNum = (int) Math.ceil(destHeight
0229: / sourceHeight);
0230:
0231: // Define synth parameters
0232: // JComponent c = context.getComponent();
0233: // Color color = context.getStyle()
0234: // .getColor(context, ColorType.BACKGROUND);
0235: JComponent c = null;
0236: Color color = Color.RED;
0237:
0238: if ((insetsTop > 0)) {
0239:
0240: if ((insetsLeft > 0) && (imageParts[0][0] != null)) {
0241:
0242: g.drawImage(imageParts[0][0], x, y, insetsLeft,
0243: insetsTop, color, c);
0244:
0245: }
0246:
0247: if ((w > insetsLeft - insetsRight)
0248: && (imageParts[0][1] != null) && (insetsLeft >= 0)) {
0249:
0250: if (stretch) {
0251: g.drawImage(imageParts[0][1], x + insetsLeft, y, w
0252: - insetsLeft - insetsRight, insetsTop, c);
0253:
0254: } else {
0255:
0256: // Stretch the image horizontally
0257: b = (double) (insetsTop)
0258: / (double) (imageInsetsTop);
0259: BufferedImage result = new AffineTransformOp(
0260: new AffineTransform(1, 0, 0, b, 0, 0),
0261: AffineTransformOp.TYPE_BICUBIC).filter(
0262: imageParts[0][1], null);
0263:
0264: // Draw multiple number of images
0265: for (int i = 0; i < fullHorisontalPaintsNum + 1; i++) {
0266: g.drawImage(result, x + insetsLeft + i
0267: * sourceWidth, y, color, c);
0268: }
0269:
0270: }
0271: }
0272:
0273: if ((insetsRight > 0) && (imageParts[0][2] != null)
0274: && (w >= insetsRight)) {
0275:
0276: g.drawImage(imageParts[0][2], x + w - insetsRight, y,
0277: insetsRight, insetsTop, color, c);
0278: }
0279: }
0280:
0281: if ((insetsLeft > 0) && (imageParts[1][0] != null)
0282: && (insetsTop >= 0) && (h > insetsTop + insetsBottom)) {
0283:
0284: if (stretch) {
0285:
0286: g.drawImage(imageParts[1][0], x, y + insetsTop,
0287: insetsLeft, h - insetsTop - insetsBottom,
0288: color, c);
0289: } else {
0290:
0291: // Stretch the image vertically
0292: a = (double) (insetsRight)
0293: / (double) (imageInsetsRight);
0294: BufferedImage result = new AffineTransformOp(
0295: new AffineTransform(a, 0, 0, 1, 0, 0),
0296: AffineTransformOp.TYPE_BICUBIC).filter(
0297: imageParts[1][0], null);
0298:
0299: // draw multiple number of pictures
0300: for (int i = 0; i < fullVerticalPaintsNum + 1; i++) {
0301: g.drawImage(result, x, y + i * sourceHeight
0302: + insetsTop, color, c);
0303: }
0304:
0305: }
0306: }
0307:
0308: if (paintCenter && (imageParts[1][1] != null)
0309: && (w > insetsLeft + insetsRight)
0310: && (h > insetsBottom + insetsTop)) {
0311:
0312: g.drawImage(imageParts[1][1], x + insetsLeft,
0313: y + insetsTop, w - insetsLeft - insetsRight, h
0314: - insetsTop - insetsBottom, color, c);
0315:
0316: }
0317:
0318: if ((insetsRight > 0) && (imageParts[1][2] != null)
0319: && (h > insetsBottom + insetsTop) && (w >= insetsRight)
0320: && (insetsTop >= 0)) {
0321:
0322: if (stretch) {
0323:
0324: g.drawImage(imageParts[1][2], x + w - insetsRight, y
0325: + insetsTop, insetsRight, h - insetsTop
0326: - insetsBottom, color, c);
0327: } else {
0328:
0329: // Stretch the image vertically
0330: a = (double) (insetsRight)
0331: / (double) (imageInsetsRight);
0332: BufferedImage result = new AffineTransformOp(
0333: new AffineTransform(a, 0, 0, 1, 0, 0),
0334: AffineTransformOp.TYPE_BICUBIC).filter(
0335: imageParts[1][2], null);
0336:
0337: // draw multiple number of pictures
0338: for (int i = 0; i < fullVerticalPaintsNum + 1; i++) {
0339: g.drawImage(result, x + w - insetsRight, y + i
0340: * sourceHeight + insetsTop, color, c);
0341: }
0342:
0343: }
0344: }
0345:
0346: if ((insetsBottom > 0)) {
0347:
0348: if ((insetsLeft >= 0) && (h >= insetsBottom)
0349: && (w > insetsRight + insetsLeft)
0350: && (imageParts[2][0] != null)) {
0351:
0352: g.drawImage(imageParts[2][0], x, y + h - insetsBottom,
0353: insetsLeft, insetsBottom, color, c);
0354:
0355: }
0356:
0357: if ((imageParts[2][1] != null) && (imageInsetsBottom > 0)
0358: && (w > insetsRight + insetsLeft)
0359: && (insetsBottom > 0) && (insetsLeft >= 0)
0360: && (h >= insetsBottom)) {
0361:
0362: if (stretch) {
0363:
0364: g.drawImage(imageParts[2][1], x + insetsLeft, y + h
0365: - insetsBottom, w - insetsRight
0366: - insetsLeft, insetsBottom, color, c);
0367: } else {
0368:
0369: // Stretch the image horizontally
0370: b = (double) (insetsBottom)
0371: / (double) (imageInsetsBottom);
0372: BufferedImage result = new AffineTransformOp(
0373: new AffineTransform(1, 0, 0, b, 0, 0),
0374: AffineTransformOp.TYPE_BICUBIC).filter(
0375: imageParts[2][1], null);
0376:
0377: // draw multiple number of pictures
0378: for (int i = 0; i < fullHorisontalPaintsNum + 1; i++) {
0379: g.drawImage(result, x + insetsLeft + i
0380: * sourceWidth, y + h - insetsBottom,
0381: color, c);
0382: }
0383:
0384: }
0385:
0386: }
0387:
0388: if ((insetsRight > 0) && (imageParts[2][2] != null)
0389: && (insetsBottom > 0) && (w >= insetsRight)
0390: && (h >= insetsBottom) && (imageInsetsBottom > 0)) {
0391:
0392: g.drawImage(imageParts[2][2], x + w - insetsRight, y
0393: + h - insetsBottom, insetsRight, insetsBottom,
0394: color, c);
0395:
0396: }
0397: }
0398:
0399: }
0400:
0401: @Override
0402: public void paintArrowButtonBackground(SynthContext context,
0403: Graphics g, int x, int y, int w, int h) {
0404: paintImage(context, g, x, y, w, h);
0405: }
0406:
0407: @Override
0408: public void paintArrowButtonBorder(SynthContext context,
0409: Graphics g, int x, int y, int w, int h) {
0410: paintImage(context, g, x, y, w, h);
0411: }
0412:
0413: @Override
0414: public void paintArrowButtonForeground(SynthContext context,
0415: Graphics g, int x, int y, int w, int h, int direction) {
0416: paintImage(context, g, x, y, w, h);
0417: }
0418:
0419: @Override
0420: public void paintButtonBackground(SynthContext context, Graphics g,
0421: int x, int y, int w, int h) {
0422: paintImage(context, g, x, y, w, h);
0423: }
0424:
0425: @Override
0426: public void paintButtonBorder(SynthContext context, Graphics g,
0427: int x, int y, int w, int h) {
0428: paintImage(context, g, x, y, w, h);
0429: }
0430:
0431: @Override
0432: public void paintCheckBoxBackground(SynthContext context,
0433: Graphics g, int x, int y, int w, int h) {
0434: paintImage(context, g, x, y, w, h);
0435: }
0436:
0437: @Override
0438: public void paintCheckBoxBorder(SynthContext context, Graphics g,
0439: int x, int y, int w, int h) {
0440: paintImage(context, g, x, y, w, h);
0441: }
0442:
0443: @Override
0444: public void paintCheckBoxMenuItemBackground(SynthContext context,
0445: Graphics g, int x, int y, int w, int h) {
0446: paintImage(context, g, x, y, w, h);
0447: }
0448:
0449: @Override
0450: public void paintCheckBoxMenuItemBorder(SynthContext context,
0451: Graphics g, int x, int y, int w, int h) {
0452: paintImage(context, g, x, y, w, h);
0453: }
0454:
0455: @Override
0456: public void paintColorChooserBackground(SynthContext context,
0457: Graphics g, int x, int y, int w, int h) {
0458: paintImage(context, g, x, y, w, h);
0459: }
0460:
0461: @Override
0462: public void paintColorChooserBorder(SynthContext context,
0463: Graphics g, int x, int y, int w, int h) {
0464: paintImage(context, g, x, y, w, h);
0465: }
0466:
0467: @Override
0468: public void paintComboBoxBackground(SynthContext context,
0469: Graphics g, int x, int y, int w, int h) {
0470: paintImage(context, g, x, y, w, h);
0471: }
0472:
0473: @Override
0474: public void paintComboBoxBorder(SynthContext context, Graphics g,
0475: int x, int y, int w, int h) {
0476: paintImage(context, g, x, y, w, h);
0477: }
0478:
0479: @Override
0480: public void paintDesktopIconBackground(SynthContext context,
0481: Graphics g, int x, int y, int w, int h) {
0482: paintImage(context, g, x, y, w, h);
0483: }
0484:
0485: @Override
0486: public void paintDesktopIconBorder(SynthContext context,
0487: Graphics g, int x, int y, int w, int h) {
0488: paintImage(context, g, x, y, w, h);
0489: }
0490:
0491: @Override
0492: public void paintDesktopPaneBackground(SynthContext context,
0493: Graphics g, int x, int y, int w, int h) {
0494: paintImage(context, g, x, y, w, h);
0495: }
0496:
0497: @Override
0498: public void paintDesktopPaneBorder(SynthContext context,
0499: Graphics g, int x, int y, int w, int h) {
0500: paintImage(context, g, x, y, w, h);
0501: }
0502:
0503: @Override
0504: public void paintEditorPaneBackground(SynthContext context,
0505: Graphics g, int x, int y, int w, int h) {
0506: paintImage(context, g, x, y, w, h);
0507: }
0508:
0509: @Override
0510: public void paintEditorPaneBorder(SynthContext context, Graphics g,
0511: int x, int y, int w, int h) {
0512: paintImage(context, g, x, y, w, h);
0513: }
0514:
0515: @Override
0516: public void paintFileChooserBackground(SynthContext context,
0517: Graphics g, int x, int y, int w, int h) {
0518: paintImage(context, g, x, y, w, h);
0519: }
0520:
0521: @Override
0522: public void paintFileChooserBorder(SynthContext context,
0523: Graphics g, int x, int y, int w, int h) {
0524: paintImage(context, g, x, y, w, h);
0525: }
0526:
0527: @Override
0528: public void paintFormattedTextFieldBackground(SynthContext context,
0529: Graphics g, int x, int y, int w, int h) {
0530: paintImage(context, g, x, y, w, h);
0531: }
0532:
0533: @Override
0534: public void paintFormattedTextFieldBorder(SynthContext context,
0535: Graphics g, int x, int y, int w, int h) {
0536: paintImage(context, g, x, y, w, h);
0537: }
0538:
0539: @Override
0540: public void paintInternalFrameBackground(SynthContext context,
0541: Graphics g, int x, int y, int w, int h) {
0542: paintImage(context, g, x, y, w, h);
0543: }
0544:
0545: @Override
0546: public void paintInternalFrameBorder(SynthContext context,
0547: Graphics g, int x, int y, int w, int h) {
0548: paintImage(context, g, x, y, w, h);
0549: }
0550:
0551: @Override
0552: public void paintInternalFrameTitlePaneBackground(
0553: SynthContext context, Graphics g, int x, int y, int w, int h) {
0554: paintImage(context, g, x, y, w, h);
0555: }
0556:
0557: @Override
0558: public void paintInternalFrameTitlePaneBorder(SynthContext context,
0559: Graphics g, int x, int y, int w, int h) {
0560: paintImage(context, g, x, y, w, h);
0561: }
0562:
0563: @Override
0564: public void paintLabelBackground(SynthContext context, Graphics g,
0565: int x, int y, int w, int h) {
0566: g.setColor(Color.RED);
0567: g.fillRect(x, y, x + w, y + h);
0568: }
0569:
0570: @Override
0571: public void paintLabelBorder(SynthContext context, Graphics g,
0572: int x, int y, int w, int h) {
0573: paintImage(context, g, x, y, w, h);
0574: }
0575:
0576: @Override
0577: public void paintListBackground(SynthContext context, Graphics g,
0578: int x, int y, int w, int h) {
0579: paintImage(context, g, x, y, w, h);
0580: }
0581:
0582: @Override
0583: public void paintListBorder(SynthContext context, Graphics g,
0584: int x, int y, int w, int h) {
0585: paintImage(context, g, x, y, w, h);
0586: }
0587:
0588: @Override
0589: public void paintMenuBackground(SynthContext context, Graphics g,
0590: int x, int y, int w, int h) {
0591: paintImage(context, g, x, y, w, h);
0592: }
0593:
0594: @Override
0595: public void paintMenuBarBackground(SynthContext context,
0596: Graphics g, int x, int y, int w, int h) {
0597: paintImage(context, g, x, y, w, h);
0598: }
0599:
0600: @Override
0601: public void paintMenuBarBorder(SynthContext context, Graphics g,
0602: int x, int y, int w, int h) {
0603: paintImage(context, g, x, y, w, h);
0604: }
0605:
0606: @Override
0607: public void paintMenuBorder(SynthContext context, Graphics g,
0608: int x, int y, int w, int h) {
0609: paintImage(context, g, x, y, w, h);
0610: }
0611:
0612: @Override
0613: public void paintMenuItemBackground(SynthContext context,
0614: Graphics g, int x, int y, int w, int h) {
0615: paintImage(context, g, x, y, w, h);
0616: }
0617:
0618: @Override
0619: public void paintMenuItemBorder(SynthContext context, Graphics g,
0620: int x, int y, int w, int h) {
0621: paintImage(context, g, x, y, w, h);
0622: }
0623:
0624: @Override
0625: public void paintOptionPaneBackground(SynthContext context,
0626: Graphics g, int x, int y, int w, int h) {
0627: paintImage(context, g, x, y, w, h);
0628: }
0629:
0630: @Override
0631: public void paintOptionPaneBorder(SynthContext context, Graphics g,
0632: int x, int y, int w, int h) {
0633: paintImage(context, g, x, y, w, h);
0634: }
0635:
0636: @Override
0637: public void paintPanelBackground(SynthContext context, Graphics g,
0638: int x, int y, int w, int h) {
0639: paintImage(context, g, x, y, w, h);
0640: }
0641:
0642: @Override
0643: public void paintPanelBorder(SynthContext context, Graphics g,
0644: int x, int y, int w, int h) {
0645: paintImage(context, g, x, y, w, h);
0646: }
0647:
0648: @Override
0649: public void paintPasswordFieldBackground(SynthContext context,
0650: Graphics g, int x, int y, int w, int h) {
0651: paintImage(context, g, x, y, w, h);
0652: }
0653:
0654: @Override
0655: public void paintPasswordFieldBorder(SynthContext context,
0656: Graphics g, int x, int y, int w, int h) {
0657: paintImage(context, g, x, y, w, h);
0658: }
0659:
0660: @Override
0661: public void paintPopupMenuBackground(SynthContext context,
0662: Graphics g, int x, int y, int w, int h) {
0663: paintImage(context, g, x, y, w, h);
0664: }
0665:
0666: @Override
0667: public void paintPopupMenuBorder(SynthContext context, Graphics g,
0668: int x, int y, int w, int h) {
0669: paintImage(context, g, x, y, w, h);
0670: }
0671:
0672: @Override
0673: public void paintProgressBarBackground(SynthContext context,
0674: Graphics g, int x, int y, int w, int h) {
0675: paintImage(context, g, x, y, w, h);
0676: }
0677:
0678: @Override
0679: public void paintProgressBarBorder(SynthContext context,
0680: Graphics g, int x, int y, int w, int h) {
0681: paintImage(context, g, x, y, w, h);
0682: }
0683:
0684: @Override
0685: public void paintProgressBarForeground(SynthContext context,
0686: Graphics g, int x, int y, int w, int h, int orientation) {
0687: paintImage(context, g, x, y, w, h);
0688: }
0689:
0690: @Override
0691: public void paintRadioButtonBackground(SynthContext context,
0692: Graphics g, int x, int y, int w, int h) {
0693: paintImage(context, g, x, y, w, h);
0694: }
0695:
0696: @Override
0697: public void paintRadioButtonBorder(SynthContext context,
0698: Graphics g, int x, int y, int w, int h) {
0699: paintImage(context, g, x, y, w, h);
0700: }
0701:
0702: @Override
0703: public void paintRadioButtonMenuItemBackground(
0704: SynthContext context, Graphics g, int x, int y, int w, int h) {
0705: paintImage(context, g, x, y, w, h);
0706: }
0707:
0708: @Override
0709: public void paintRadioButtonMenuItemBorder(SynthContext context,
0710: Graphics g, int x, int y, int w, int h) {
0711: paintImage(context, g, x, y, w, h);
0712: }
0713:
0714: @Override
0715: public void paintRootPaneBackground(SynthContext context,
0716: Graphics g, int x, int y, int w, int h) {
0717: paintImage(context, g, x, y, w, h);
0718: }
0719:
0720: @Override
0721: public void paintRootPaneBorder(SynthContext context, Graphics g,
0722: int x, int y, int w, int h) {
0723: paintImage(context, g, x, y, w, h);
0724: }
0725:
0726: @Override
0727: public void paintScrollBarBackground(SynthContext context,
0728: Graphics g, int x, int y, int w, int h) {
0729: paintImage(context, g, x, y, w, h);
0730: }
0731:
0732: @Override
0733: public void paintScrollBarBorder(SynthContext context, Graphics g,
0734: int x, int y, int w, int h) {
0735: paintImage(context, g, x, y, w, h);
0736: }
0737:
0738: @Override
0739: public void paintScrollBarThumbBackground(SynthContext context,
0740: Graphics g, int x, int y, int w, int h, int orientation) {
0741: paintImage(context, g, x, y, w, h);
0742: }
0743:
0744: @Override
0745: public void paintScrollBarThumbBorder(SynthContext context,
0746: Graphics g, int x, int y, int w, int h, int orientation) {
0747: paintImage(context, g, x, y, w, h);
0748: }
0749:
0750: @Override
0751: public void paintScrollBarTrackBackground(SynthContext context,
0752: Graphics g, int x, int y, int w, int h) {
0753: paintImage(context, g, x, y, w, h);
0754: }
0755:
0756: @Override
0757: public void paintScrollBarTrackBorder(SynthContext context,
0758: Graphics g, int x, int y, int w, int h) {
0759: paintImage(context, g, x, y, w, h);
0760: }
0761:
0762: @Override
0763: public void paintScrollPaneBackground(SynthContext context,
0764: Graphics g, int x, int y, int w, int h) {
0765: paintImage(context, g, x, y, w, h);
0766: }
0767:
0768: @Override
0769: public void paintScrollPaneBorder(SynthContext context, Graphics g,
0770: int x, int y, int w, int h) {
0771: paintImage(context, g, x, y, w, h);
0772: }
0773:
0774: @Override
0775: public void paintSeparatorBackground(SynthContext context,
0776: Graphics g, int x, int y, int w, int h) {
0777: paintImage(context, g, x, y, w, h);
0778: }
0779:
0780: @Override
0781: public void paintSeparatorBorder(SynthContext context, Graphics g,
0782: int x, int y, int w, int h) {
0783: paintImage(context, g, x, y, w, h);
0784: }
0785:
0786: @Override
0787: public void paintSeparatorForeground(SynthContext context,
0788: Graphics g, int x, int y, int w, int h, int orientation) {
0789: paintImage(context, g, x, y, w, h);
0790: }
0791:
0792: @Override
0793: public void paintSliderBackground(SynthContext context, Graphics g,
0794: int x, int y, int w, int h) {
0795: paintImage(context, g, x, y, w, h);
0796: }
0797:
0798: @Override
0799: public void paintSliderBorder(SynthContext context, Graphics g,
0800: int x, int y, int w, int h) {
0801: paintImage(context, g, x, y, w, h);
0802: }
0803:
0804: @Override
0805: public void paintSliderThumbBackground(SynthContext context,
0806: Graphics g, int x, int y, int w, int h, int orientation) {
0807: paintImage(context, g, x, y, w, h);
0808: }
0809:
0810: @Override
0811: public void paintSliderThumbBorder(SynthContext context,
0812: Graphics g, int x, int y, int w, int h, int orientation) {
0813: paintImage(context, g, x, y, w, h);
0814: }
0815:
0816: @Override
0817: public void paintSliderTrackBackground(SynthContext context,
0818: Graphics g, int x, int y, int w, int h) {
0819: paintImage(context, g, x, y, w, h);
0820: }
0821:
0822: @Override
0823: public void paintSliderTrackBorder(SynthContext context,
0824: Graphics g, int x, int y, int w, int h) {
0825: paintImage(context, g, x, y, w, h);
0826: }
0827:
0828: @Override
0829: public void paintSpinnerBackground(SynthContext context,
0830: Graphics g, int x, int y, int w, int h) {
0831: paintImage(context, g, x, y, w, h);
0832: }
0833:
0834: @Override
0835: public void paintSpinnerBorder(SynthContext context, Graphics g,
0836: int x, int y, int w, int h) {
0837: paintImage(context, g, x, y, w, h);
0838: }
0839:
0840: @Override
0841: public void paintSplitPaneBackground(SynthContext context,
0842: Graphics g, int x, int y, int w, int h) {
0843: paintImage(context, g, x, y, w, h);
0844: }
0845:
0846: @Override
0847: public void paintSplitPaneBorder(SynthContext context, Graphics g,
0848: int x, int y, int w, int h) {
0849: paintImage(context, g, x, y, w, h);
0850: }
0851:
0852: @Override
0853: public void paintSplitPaneDividerBackground(SynthContext context,
0854: Graphics g, int x, int y, int w, int h) {
0855: paintImage(context, g, x, y, w, h);
0856: }
0857:
0858: @Override
0859: public void paintSplitPaneDividerForeground(SynthContext context,
0860: Graphics g, int x, int y, int w, int h, int orientation) {
0861: paintImage(context, g, x, y, w, h);
0862: }
0863:
0864: @Override
0865: public void paintSplitPaneDragDivider(SynthContext context,
0866: Graphics g, int x, int y, int w, int h, int orientation) {
0867: paintImage(context, g, x, y, w, h);
0868: }
0869:
0870: @Override
0871: public void paintTabbedPaneBackground(SynthContext context,
0872: Graphics g, int x, int y, int w, int h) {
0873: paintImage(context, g, x, y, w, h);
0874: }
0875:
0876: @Override
0877: public void paintTabbedPaneBorder(SynthContext context, Graphics g,
0878: int x, int y, int w, int h) {
0879: paintImage(context, g, x, y, w, h);
0880: }
0881:
0882: @Override
0883: public void paintTabbedPaneContentBackground(SynthContext context,
0884: Graphics g, int x, int y, int w, int h) {
0885: paintImage(context, g, x, y, w, h);
0886: }
0887:
0888: @Override
0889: public void paintTabbedPaneContentBorder(SynthContext context,
0890: Graphics g, int x, int y, int w, int h) {
0891: paintImage(context, g, x, y, w, h);
0892: }
0893:
0894: @Override
0895: public void paintTabbedPaneTabAreaBackground(SynthContext context,
0896: Graphics g, int x, int y, int w, int h) {
0897: paintImage(context, g, x, y, w, h);
0898: }
0899:
0900: @Override
0901: public void paintTabbedPaneTabAreaBorder(SynthContext context,
0902: Graphics g, int x, int y, int w, int h) {
0903: paintImage(context, g, x, y, w, h);
0904: }
0905:
0906: @Override
0907: public void paintTabbedPaneTabBackground(SynthContext context,
0908: Graphics g, int x, int y, int w, int h, int tabIndex) {
0909: paintImage(context, g, x, y, w, h);
0910: }
0911:
0912: @Override
0913: public void paintTabbedPaneTabBorder(SynthContext context,
0914: Graphics g, int x, int y, int w, int h, int tabIndex) {
0915: paintImage(context, g, x, y, w, h);
0916: }
0917:
0918: @Override
0919: public void paintTableBackground(SynthContext context, Graphics g,
0920: int x, int y, int w, int h) {
0921: paintImage(context, g, x, y, w, h);
0922: }
0923:
0924: @Override
0925: public void paintTableBorder(SynthContext context, Graphics g,
0926: int x, int y, int w, int h) {
0927: paintImage(context, g, x, y, w, h);
0928: }
0929:
0930: @Override
0931: public void paintTableHeaderBackground(SynthContext context,
0932: Graphics g, int x, int y, int w, int h) {
0933: paintImage(context, g, x, y, w, h);
0934: }
0935:
0936: @Override
0937: public void paintTableHeaderBorder(SynthContext context,
0938: Graphics g, int x, int y, int w, int h) {
0939: paintImage(context, g, x, y, w, h);
0940: }
0941:
0942: @Override
0943: public void paintTextAreaBackground(SynthContext context,
0944: Graphics g, int x, int y, int w, int h) {
0945: paintImage(context, g, x, y, w, h);
0946: }
0947:
0948: @Override
0949: public void paintTextAreaBorder(SynthContext context, Graphics g,
0950: int x, int y, int w, int h) {
0951: paintImage(context, g, x, y, w, h);
0952: }
0953:
0954: @Override
0955: public void paintTextFieldBackground(SynthContext context,
0956: Graphics g, int x, int y, int w, int h) {
0957: paintImage(context, g, x, y, w, h);
0958: }
0959:
0960: @Override
0961: public void paintTextFieldBorder(SynthContext context, Graphics g,
0962: int x, int y, int w, int h) {
0963: paintImage(context, g, x, y, w, h);
0964: }
0965:
0966: @Override
0967: public void paintTextPaneBackground(SynthContext context,
0968: Graphics g, int x, int y, int w, int h) {
0969: paintImage(context, g, x, y, w, h);
0970: }
0971:
0972: @Override
0973: public void paintTextPaneBorder(SynthContext context, Graphics g,
0974: int x, int y, int w, int h) {
0975: paintImage(context, g, x, y, w, h);
0976: }
0977:
0978: @Override
0979: public void paintToggleButtonBackground(SynthContext context,
0980: Graphics g, int x, int y, int w, int h) {
0981: paintImage(context, g, x, y, w, h);
0982: }
0983:
0984: @Override
0985: public void paintToggleButtonBorder(SynthContext context,
0986: Graphics g, int x, int y, int w, int h) {
0987: paintImage(context, g, x, y, w, h);
0988: }
0989:
0990: @Override
0991: public void paintToolBarBackground(SynthContext context,
0992: Graphics g, int x, int y, int w, int h) {
0993: paintImage(context, g, x, y, w, h);
0994: }
0995:
0996: @Override
0997: public void paintToolBarBorder(SynthContext context, Graphics g,
0998: int x, int y, int w, int h) {
0999: paintImage(context, g, x, y, w, h);
1000: }
1001:
1002: @Override
1003: public void paintToolBarContentBackground(SynthContext context,
1004: Graphics g, int x, int y, int w, int h) {
1005: paintImage(context, g, x, y, w, h);
1006: }
1007:
1008: @Override
1009: public void paintToolBarContentBorder(SynthContext context,
1010: Graphics g, int x, int y, int w, int h) {
1011: paintImage(context, g, x, y, w, h);
1012: }
1013:
1014: @Override
1015: public void paintToolBarDragWindowBackground(SynthContext context,
1016: Graphics g, int x, int y, int w, int h) {
1017: paintImage(context, g, x, y, w, h);
1018: }
1019:
1020: @Override
1021: public void paintToolBarDragWindowBorder(SynthContext context,
1022: Graphics g, int x, int y, int w, int h) {
1023: paintImage(context, g, x, y, w, h);
1024: }
1025:
1026: @Override
1027: public void paintToolTipBackground(SynthContext context,
1028: Graphics g, int x, int y, int w, int h) {
1029: paintImage(context, g, x, y, w, h);
1030: }
1031:
1032: @Override
1033: public void paintToolTipBorder(SynthContext context, Graphics g,
1034: int x, int y, int w, int h) {
1035: paintImage(context, g, x, y, w, h);
1036: }
1037:
1038: @Override
1039: public void paintTreeBackground(SynthContext context, Graphics g,
1040: int x, int y, int w, int h) {
1041: paintImage(context, g, x, y, w, h);
1042: }
1043:
1044: @Override
1045: public void paintTreeBorder(SynthContext context, Graphics g,
1046: int x, int y, int w, int h) {
1047: paintImage(context, g, x, y, w, h);
1048: }
1049:
1050: @Override
1051: public void paintTreeCellBackground(SynthContext context,
1052: Graphics g, int x, int y, int w, int h) {
1053: paintImage(context, g, x, y, w, h);
1054: }
1055:
1056: @Override
1057: public void paintTreeCellBorder(SynthContext context, Graphics g,
1058: int x, int y, int w, int h) {
1059: paintImage(context, g, x, y, w, h);
1060: }
1061:
1062: @Override
1063: public void paintTreeCellFocus(SynthContext context, Graphics g,
1064: int x, int y, int w, int h) {
1065: paintImage(context, g, x, y, w, h);
1066: }
1067:
1068: @Override
1069: public void paintViewportBackground(SynthContext context,
1070: Graphics g, int x, int y, int w, int h) {
1071: paintImage(context, g, x, y, w, h);
1072: }
1073:
1074: @Override
1075: public void paintViewportBorder(SynthContext context, Graphics g,
1076: int x, int y, int w, int h) {
1077: paintImage(context, g, x, y, w, h);
1078: }
1079: }
|