Source Code Cross Referenced for PaintersManager.java in  » Apache-Harmony-Java-SE » javax-package » javax » swing » plaf » synth » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » javax package » javax.swing.plaf.synth 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


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.Graphics;
0021:        import java.util.LinkedList;
0022:        import java.util.List;
0023:
0024:        /**
0025:         * PaintersManager is a SynthPainter used to combine all the painters described
0026:         * in XML file. This class is similar to ColorInfo and FontInfo (inner classes
0027:         * in XMLSynthStyle) but placed separately because contains a lot of methods and
0028:         * the functionality is differs from just "info" functionality
0029:         */
0030:        @SuppressWarnings("nls")
0031:        class PaintersManager extends SynthPainter {
0032:
0033:            public static final int NO_DIRECTION = -1;
0034:
0035:            /**
0036:             * PainterInfo for the search.
0037:             */
0038:            private static class SynthPainterInfo {
0039:
0040:                private final String method;
0041:
0042:                private final int direction;
0043:
0044:                private final int state;
0045:
0046:                private final SynthPainter painter;
0047:
0048:                SynthPainterInfo(String method, int direction, int state,
0049:                        SynthPainter painter) {
0050:                    this .method = method;
0051:                    this .direction = direction;
0052:                    this .state = state;
0053:                    this .painter = painter;
0054:                }
0055:
0056:                String getMethod() {
0057:                    return method;
0058:                }
0059:
0060:                int getDirection() {
0061:                    return direction;
0062:                }
0063:
0064:                int getState() {
0065:                    return state;
0066:                }
0067:
0068:                SynthPainter getPainter() {
0069:                    return painter;
0070:                }
0071:
0072:                boolean betterThan(SynthPainterInfo candidate, int refState,
0073:                        String refMethod, int refDirection) {
0074:
0075:                    if (this .method.equalsIgnoreCase(refMethod)
0076:                            || this .method.equals("default")) {
0077:
0078:                        if (stateBetterThan(candidate.getState(), refState)) {
0079:                            if ((this .direction == refDirection)
0080:                                    || (this .direction == -1)) {
0081:                                return true;
0082:                            }
0083:
0084:                        }
0085:
0086:                    }
0087:
0088:                    return false;
0089:                }
0090:
0091:                boolean stateBetterThan(int candidateState, int refState) {
0092:                    if (((~refState) & (this .state)) == 0) {
0093:                        if (((~refState) & (candidateState)) == 0) {
0094:                            return refState >= candidateState;
0095:                        }
0096:                        return true;
0097:                    }
0098:                    return false;
0099:                }
0100:            }
0101:
0102:            private final List<SynthPainterInfo> painters = new LinkedList<SynthPainterInfo>();
0103:
0104:            private final SynthPainterInfo firstCandidate = new SynthPainterInfo(
0105:                    "default", -1, 0, new ColorPainter()); //$NON-NLS-1$
0106:
0107:            public SynthPainter findPainter(int state, String method,
0108:                    int direction) {
0109:                SynthPainterInfo bestCandidate = firstCandidate;
0110:                for (SynthPainterInfo candidate : painters) {
0111:                    if (candidate.betterThan(bestCandidate, state, method,
0112:                            direction)) {
0113:                        bestCandidate = candidate;
0114:                    }
0115:                }
0116:                return bestCandidate.getPainter();
0117:            }
0118:
0119:            public void setPainter(SynthPainter painter, int state,
0120:                    String method, int direction) {
0121:                painters.add(new SynthPainterInfo(method, direction, state,
0122:                        painter));
0123:            }
0124:
0125:            @Override
0126:            public void paintArrowButtonBorder(SynthContext context,
0127:                    Graphics g, int x, int y, int w, int h) {
0128:
0129:                findPainter(context.getComponentState(), "ArrowButtonBorder",
0130:                        -1).paintArrowButtonBorder(context, g, x, y, w, h);
0131:            }
0132:
0133:            @Override
0134:            public void paintArrowButtonForeground(SynthContext context,
0135:                    Graphics g, int x, int y, int w, int h, int direction) {
0136:
0137:                findPainter(context.getComponentState(),
0138:                        "ArrowButtonForeground", direction)
0139:                        .paintArrowButtonForeground(context, g, x, y, w, h,
0140:                                direction);
0141:
0142:            }
0143:
0144:            @Override
0145:            public void paintButtonBackground(SynthContext context, Graphics g,
0146:                    int x, int y, int w, int h) {
0147:
0148:                findPainter(context.getComponentState(), "ButtonBackground", -1)
0149:                        .paintButtonBackground(context, g, x, y, w, h);
0150:            }
0151:
0152:            @Override
0153:            public void paintButtonBorder(SynthContext context, Graphics g,
0154:                    int x, int y, int w, int h) {
0155:
0156:                findPainter(context.getComponentState(), "ButtonBorder", -1)
0157:                        .paintButtonBorder(context, g, x, y, w, h);
0158:            }
0159:
0160:            @Override
0161:            public void paintCheckBoxBackground(SynthContext context,
0162:                    Graphics g, int x, int y, int w, int h) {
0163:
0164:                findPainter(context.getComponentState(), "CheckBoxBackground",
0165:                        -1).paintCheckBoxBackground(context, g, x, y, w, h);
0166:            }
0167:
0168:            @Override
0169:            public void paintCheckBoxBorder(SynthContext context, Graphics g,
0170:                    int x, int y, int w, int h) {
0171:
0172:                findPainter(context.getComponentState(), "CheckBoxBorder", -1)
0173:                        .paintCheckBoxBorder(context, g, x, y, w, h);
0174:            }
0175:
0176:            @Override
0177:            public void paintCheckBoxMenuItemBackground(SynthContext context,
0178:                    Graphics g, int x, int y, int w, int h) {
0179:
0180:                findPainter(context.getComponentState(),
0181:                        "CheckBoxMenuItemBackground", -1)
0182:                        .paintCheckBoxMenuItemBackground(context, g, x, y, w, h);
0183:            }
0184:
0185:            @Override
0186:            public void paintCheckBoxMenuItemBorder(SynthContext context,
0187:                    Graphics g, int x, int y, int w, int h) {
0188:
0189:                findPainter(context.getComponentState(),
0190:                        "CheckBoxMenuItemBorder", -1)
0191:                        .paintCheckBoxMenuItemBorder(context, g, x, y, w, h);
0192:            }
0193:
0194:            @Override
0195:            public void paintColorChooserBackground(SynthContext context,
0196:                    Graphics g, int x, int y, int w, int h) {
0197:
0198:                findPainter(context.getComponentState(),
0199:                        "ColorChooserBackground", -1)
0200:                        .paintColorChooserBackground(context, g, x, y, w, h);
0201:            }
0202:
0203:            @Override
0204:            public void paintColorChooserBorder(SynthContext context,
0205:                    Graphics g, int x, int y, int w, int h) {
0206:
0207:                findPainter(context.getComponentState(), "ColorChooserBorder",
0208:                        -1).paintColorChooserBorder(context, g, x, y, w, h);
0209:            }
0210:
0211:            @Override
0212:            public void paintComboBoxBackground(SynthContext context,
0213:                    Graphics g, int x, int y, int w, int h) {
0214:
0215:                findPainter(context.getComponentState(), "ComboBoxBackground",
0216:                        -1).paintComboBoxBackground(context, g, x, y, w, h);
0217:            }
0218:
0219:            @Override
0220:            public void paintComboBoxBorder(SynthContext context, Graphics g,
0221:                    int x, int y, int w, int h) {
0222:
0223:                findPainter(context.getComponentState(), "ComboBoxBorder", -1)
0224:                        .paintComboBoxBorder(context, g, x, y, w, h);
0225:            }
0226:
0227:            @Override
0228:            public void paintDesktopIconBackground(SynthContext context,
0229:                    Graphics g, int x, int y, int w, int h) {
0230:
0231:                findPainter(context.getComponentState(),
0232:                        "DesktopIconBackground", -1)
0233:                        .paintDesktopIconBackground(context, g, x, y, w, h);
0234:            }
0235:
0236:            @Override
0237:            public void paintDesktopIconBorder(SynthContext context,
0238:                    Graphics g, int x, int y, int w, int h) {
0239:
0240:                findPainter(context.getComponentState(), "DesktopIconBorder",
0241:                        -1).paintDesktopIconBorder(context, g, x, y, w, h);
0242:            }
0243:
0244:            @Override
0245:            public void paintDesktopPaneBackground(SynthContext context,
0246:                    Graphics g, int x, int y, int w, int h) {
0247:
0248:                findPainter(context.getComponentState(),
0249:                        "DesktopPaneBackground", -1)
0250:                        .paintDesktopPaneBackground(context, g, x, y, w, h);
0251:            }
0252:
0253:            @Override
0254:            public void paintDesktopPaneBorder(SynthContext context,
0255:                    Graphics g, int x, int y, int w, int h) {
0256:
0257:                findPainter(context.getComponentState(), "DesktopPaneBorder",
0258:                        -1).paintDesktopPaneBorder(context, g, x, y, w, h);
0259:            }
0260:
0261:            @Override
0262:            public void paintEditorPaneBackground(SynthContext context,
0263:                    Graphics g, int x, int y, int w, int h) {
0264:
0265:                findPainter(context.getComponentState(),
0266:                        "EditorPaneBackground", -1).paintEditorPaneBackground(
0267:                        context, g, x, y, w, h);
0268:            }
0269:
0270:            @Override
0271:            public void paintEditorPaneBorder(SynthContext context, Graphics g,
0272:                    int x, int y, int w, int h) {
0273:
0274:                findPainter(context.getComponentState(), "EditorPaneBorder", -1)
0275:                        .paintEditorPaneBorder(context, g, x, y, w, h);
0276:            }
0277:
0278:            @Override
0279:            public void paintFileChooserBackground(SynthContext context,
0280:                    Graphics g, int x, int y, int w, int h) {
0281:
0282:                findPainter(context.getComponentState(),
0283:                        "FileChooserBackground", -1)
0284:                        .paintFileChooserBackground(context, g, x, y, w, h);
0285:            }
0286:
0287:            @Override
0288:            public void paintFileChooserBorder(SynthContext context,
0289:                    Graphics g, int x, int y, int w, int h) {
0290:
0291:                findPainter(context.getComponentState(), "FileChooserBorder",
0292:                        -1).paintFileChooserBorder(context, g, x, y, w, h);
0293:            }
0294:
0295:            @Override
0296:            public void paintFormattedTextFieldBackground(SynthContext context,
0297:                    Graphics g, int x, int y, int w, int h) {
0298:
0299:                findPainter(context.getComponentState(),
0300:                        "FormattedTextFieldBackground", -1)
0301:                        .paintFormattedTextFieldBackground(context, g, x, y, w,
0302:                                h);
0303:            }
0304:
0305:            @Override
0306:            public void paintFormattedTextFieldBorder(SynthContext context,
0307:                    Graphics g, int x, int y, int w, int h) {
0308:
0309:                findPainter(context.getComponentState(),
0310:                        "FormattedTextFieldBorder", -1)
0311:                        .paintFormattedTextFieldBorder(context, g, x, y, w, h);
0312:            }
0313:
0314:            @Override
0315:            public void paintInternalFrameBackground(SynthContext context,
0316:                    Graphics g, int x, int y, int w, int h) {
0317:
0318:                findPainter(context.getComponentState(),
0319:                        "InternalFrameBackground", -1)
0320:                        .paintInternalFrameBackground(context, g, x, y, w, h);
0321:            }
0322:
0323:            @Override
0324:            public void paintInternalFrameBorder(SynthContext context,
0325:                    Graphics g, int x, int y, int w, int h) {
0326:
0327:                findPainter(context.getComponentState(), "InternalFrameBorder",
0328:                        -1).paintInternalFrameBorder(context, g, x, y, w, h);
0329:            }
0330:
0331:            @Override
0332:            public void paintInternalFrameTitlePaneBackground(
0333:                    SynthContext context, Graphics g, int x, int y, int w, int h) {
0334:
0335:                findPainter(context.getComponentState(),
0336:                        "InternalFrameTitlePaneBackground", -1)
0337:                        .paintInternalFrameTitlePaneBackground(context, g, x,
0338:                                y, w, h);
0339:            }
0340:
0341:            @Override
0342:            public void paintInternalFrameTitlePaneBorder(SynthContext context,
0343:                    Graphics g, int x, int y, int w, int h) {
0344:
0345:                findPainter(context.getComponentState(),
0346:                        "InternalFrameTitlePaneBorder", -1)
0347:                        .paintInternalFrameTitlePaneBorder(context, g, x, y, w,
0348:                                h);
0349:            }
0350:
0351:            @Override
0352:            public void paintLabelBackground(SynthContext context, Graphics g,
0353:                    int x, int y, int w, int h) {
0354:
0355:                findPainter(context.getComponentState(), "LabelBackground", -1)
0356:                        .paintLabelBackground(context, g, x, y, w, h);
0357:            }
0358:
0359:            @Override
0360:            public void paintLabelBorder(SynthContext context, Graphics g,
0361:                    int x, int y, int w, int h) {
0362:
0363:                findPainter(context.getComponentState(), "LabelBorder", -1)
0364:                        .paintLabelBorder(context, g, x, y, w, h);
0365:            }
0366:
0367:            @Override
0368:            public void paintListBackground(SynthContext context, Graphics g,
0369:                    int x, int y, int w, int h) {
0370:
0371:                findPainter(context.getComponentState(), "ListBackground", -1)
0372:                        .paintListBackground(context, g, x, y, w, h);
0373:            }
0374:
0375:            @Override
0376:            public void paintListBorder(SynthContext context, Graphics g,
0377:                    int x, int y, int w, int h) {
0378:
0379:                findPainter(context.getComponentState(), "ListBorder", -1)
0380:                        .paintListBorder(context, g, x, y, w, h);
0381:            }
0382:
0383:            @Override
0384:            public void paintMenuBackground(SynthContext context, Graphics g,
0385:                    int x, int y, int w, int h) {
0386:
0387:                findPainter(context.getComponentState(), "MenuBackground", -1)
0388:                        .paintMenuBackground(context, g, x, y, w, h);
0389:            }
0390:
0391:            @Override
0392:            public void paintMenuBarBackground(SynthContext context,
0393:                    Graphics g, int x, int y, int w, int h) {
0394:
0395:                findPainter(context.getComponentState(), "MenuBarBackground",
0396:                        -1).paintMenuBarBackground(context, g, x, y, w, h);
0397:            }
0398:
0399:            @Override
0400:            public void paintMenuBarBorder(SynthContext context, Graphics g,
0401:                    int x, int y, int w, int h) {
0402:
0403:                findPainter(context.getComponentState(), "MenuBarBorder", -1)
0404:                        .paintMenuBarBorder(context, g, x, y, w, h);
0405:            }
0406:
0407:            @Override
0408:            public void paintMenuBorder(SynthContext context, Graphics g,
0409:                    int x, int y, int w, int h) {
0410:
0411:                findPainter(context.getComponentState(), "MenuBorder", -1)
0412:                        .paintMenuBorder(context, g, x, y, w, h);
0413:            }
0414:
0415:            @Override
0416:            public void paintMenuItemBackground(SynthContext context,
0417:                    Graphics g, int x, int y, int w, int h) {
0418:
0419:                findPainter(context.getComponentState(), "MenuItemBackground",
0420:                        -1).paintMenuItemBackground(context, g, x, y, w, h);
0421:            }
0422:
0423:            @Override
0424:            public void paintMenuItemBorder(SynthContext context, Graphics g,
0425:                    int x, int y, int w, int h) {
0426:
0427:                findPainter(context.getComponentState(), "MenuItemBorder", -1)
0428:                        .paintMenuItemBorder(context, g, x, y, w, h);
0429:            }
0430:
0431:            @Override
0432:            public void paintOptionPaneBackground(SynthContext context,
0433:                    Graphics g, int x, int y, int w, int h) {
0434:
0435:                findPainter(context.getComponentState(),
0436:                        "OptionPaneBackground", -1).paintOptionPaneBackground(
0437:                        context, g, x, y, w, h);
0438:            }
0439:
0440:            @Override
0441:            public void paintOptionPaneBorder(SynthContext context, Graphics g,
0442:                    int x, int y, int w, int h) {
0443:
0444:                findPainter(context.getComponentState(), "OptionPaneBorder", -1)
0445:                        .paintOptionPaneBorder(context, g, x, y, w, h);
0446:            }
0447:
0448:            @Override
0449:            public void paintPanelBackground(SynthContext context, Graphics g,
0450:                    int x, int y, int w, int h) {
0451:
0452:                findPainter(context.getComponentState(), "PanelBackground", -1)
0453:                        .paintPanelBackground(context, g, x, y, w, h);
0454:            }
0455:
0456:            @Override
0457:            public void paintPanelBorder(SynthContext context, Graphics g,
0458:                    int x, int y, int w, int h) {
0459:
0460:                findPainter(context.getComponentState(), "PanelBorder", -1)
0461:                        .paintPanelBorder(context, g, x, y, w, h);
0462:            }
0463:
0464:            @Override
0465:            public void paintPasswordFieldBackground(SynthContext context,
0466:                    Graphics g, int x, int y, int w, int h) {
0467:
0468:                findPainter(context.getComponentState(),
0469:                        "PasswordFieldBackground", -1)
0470:                        .paintPasswordFieldBackground(context, g, x, y, w, h);
0471:            }
0472:
0473:            @Override
0474:            public void paintPasswordFieldBorder(SynthContext context,
0475:                    Graphics g, int x, int y, int w, int h) {
0476:
0477:                findPainter(context.getComponentState(), "PasswordFieldBorder",
0478:                        -1).paintPasswordFieldBorder(context, g, x, y, w, h);
0479:            }
0480:
0481:            @Override
0482:            public void paintPopupMenuBackground(SynthContext context,
0483:                    Graphics g, int x, int y, int w, int h) {
0484:
0485:                findPainter(context.getComponentState(), "PopupMenuBackground",
0486:                        -1).paintPopupMenuBackground(context, g, x, y, w, h);
0487:            }
0488:
0489:            @Override
0490:            public void paintPopupMenuBorder(SynthContext context, Graphics g,
0491:                    int x, int y, int w, int h) {
0492:
0493:                findPainter(context.getComponentState(), "PopupMenuBorder", -1)
0494:                        .paintPopupMenuBorder(context, g, x, y, w, h);
0495:            }
0496:
0497:            @Override
0498:            public void paintProgressBarBackground(SynthContext context,
0499:                    Graphics g, int x, int y, int w, int h) {
0500:
0501:                findPainter(context.getComponentState(),
0502:                        "ProgressBarBackground", -1)
0503:                        .paintProgressBarBackground(context, g, x, y, w, h);
0504:            }
0505:
0506:            @Override
0507:            public void paintProgressBarBorder(SynthContext context,
0508:                    Graphics g, int x, int y, int w, int h) {
0509:
0510:                findPainter(context.getComponentState(), "ProgressBarBorder",
0511:                        -1).paintProgressBarBorder(context, g, x, y, w, h);
0512:            }
0513:
0514:            @Override
0515:            public void paintProgressBarForeground(SynthContext context,
0516:                    Graphics g, int x, int y, int w, int h, int orientation) {
0517:
0518:                findPainter(context.getComponentState(),
0519:                        "ProgressBarForegroundPainter", orientation)
0520:                        .paintProgressBarForeground(context, g, x, y, w, h,
0521:                                orientation);
0522:
0523:            }
0524:
0525:            @Override
0526:            public void paintRadioButtonBackground(SynthContext context,
0527:                    Graphics g, int x, int y, int w, int h) {
0528:
0529:                findPainter(context.getComponentState(),
0530:                        "RadioButtonBackground", -1)
0531:                        .paintRadioButtonBackground(context, g, x, y, w, h);
0532:            }
0533:
0534:            @Override
0535:            public void paintRadioButtonBorder(SynthContext context,
0536:                    Graphics g, int x, int y, int w, int h) {
0537:
0538:                findPainter(context.getComponentState(), "RadioButtonBorder",
0539:                        -1).paintRadioButtonBorder(context, g, x, y, w, h);
0540:            }
0541:
0542:            @Override
0543:            public void paintRadioButtonMenuItemBackground(
0544:                    SynthContext context, Graphics g, int x, int y, int w, int h) {
0545:
0546:                findPainter(context.getComponentState(),
0547:                        "RadioButtonMenuItemBackground", -1)
0548:                        .paintRadioButtonMenuItemBackground(context, g, x, y,
0549:                                w, h);
0550:            }
0551:
0552:            @Override
0553:            public void paintRadioButtonMenuItemBorder(SynthContext context,
0554:                    Graphics g, int x, int y, int w, int h) {
0555:
0556:                findPainter(context.getComponentState(),
0557:                        "RadioButtonMenuItemBorder", -1)
0558:                        .paintRadioButtonMenuItemBorder(context, g, x, y, w, h);
0559:            }
0560:
0561:            @Override
0562:            public void paintRootPaneBackground(SynthContext context,
0563:                    Graphics g, int x, int y, int w, int h) {
0564:
0565:                findPainter(context.getComponentState(), "RootPaneBackground",
0566:                        -1).paintRootPaneBackground(context, g, x, y, w, h);
0567:            }
0568:
0569:            @Override
0570:            public void paintRootPaneBorder(SynthContext context, Graphics g,
0571:                    int x, int y, int w, int h) {
0572:
0573:                findPainter(context.getComponentState(), "RootPaneBorder", -1)
0574:                        .paintRootPaneBorder(context, g, x, y, w, h);
0575:            }
0576:
0577:            @Override
0578:            public void paintScrollBarBackground(SynthContext context,
0579:                    Graphics g, int x, int y, int w, int h) {
0580:
0581:                findPainter(context.getComponentState(), "ScrollBarBackground",
0582:                        -1).paintScrollBarBackground(context, g, x, y, w, h);
0583:            }
0584:
0585:            @Override
0586:            public void paintScrollBarBorder(SynthContext context, Graphics g,
0587:                    int x, int y, int w, int h) {
0588:
0589:                findPainter(context.getComponentState(), "ScrollBarBorder", -1)
0590:                        .paintScrollBarBorder(context, g, x, y, w, h);
0591:            }
0592:
0593:            @Override
0594:            public void paintScrollBarThumbBackground(SynthContext context,
0595:                    Graphics g, int x, int y, int w, int h, int orientation) {
0596:
0597:                findPainter(context.getComponentState(),
0598:                        "ScrollBarThumbBackgroundPainter", orientation)
0599:                        .paintScrollBarThumbBackground(context, g, x, y, w, h,
0600:                                orientation);
0601:
0602:            }
0603:
0604:            @Override
0605:            public void paintScrollBarThumbBorder(SynthContext context,
0606:                    Graphics g, int x, int y, int w, int h, int orientation) {
0607:
0608:                findPainter(context.getComponentState(),
0609:                        "ScrollBarThumbBorderPainter", orientation)
0610:                        .paintScrollBarThumbBorder(context, g, x, y, w, h,
0611:                                orientation);
0612:
0613:            }
0614:
0615:            @Override
0616:            public void paintScrollBarTrackBackground(SynthContext context,
0617:                    Graphics g, int x, int y, int w, int h) {
0618:
0619:                findPainter(context.getComponentState(),
0620:                        "ScrollBarTrackBackground", -1)
0621:                        .paintScrollBarTrackBackground(context, g, x, y, w, h);
0622:            }
0623:
0624:            @Override
0625:            public void paintScrollBarTrackBorder(SynthContext context,
0626:                    Graphics g, int x, int y, int w, int h) {
0627:
0628:                findPainter(context.getComponentState(),
0629:                        "ScrollBarTrackBorder", -1).paintScrollBarTrackBorder(
0630:                        context, g, x, y, w, h);
0631:            }
0632:
0633:            @Override
0634:            public void paintScrollPaneBackground(SynthContext context,
0635:                    Graphics g, int x, int y, int w, int h) {
0636:
0637:                findPainter(context.getComponentState(),
0638:                        "ScrollPaneBackground", -1).paintScrollPaneBackground(
0639:                        context, g, x, y, w, h);
0640:            }
0641:
0642:            @Override
0643:            public void paintScrollPaneBorder(SynthContext context, Graphics g,
0644:                    int x, int y, int w, int h) {
0645:
0646:                findPainter(context.getComponentState(), "ScrollPaneBorder", -1)
0647:                        .paintScrollPaneBorder(context, g, x, y, w, h);
0648:            }
0649:
0650:            @Override
0651:            public void paintSeparatorBackground(SynthContext context,
0652:                    Graphics g, int x, int y, int w, int h) {
0653:
0654:                findPainter(context.getComponentState(), "SeparatorBackground",
0655:                        -1).paintSeparatorBackground(context, g, x, y, w, h);
0656:            }
0657:
0658:            @Override
0659:            public void paintSeparatorBorder(SynthContext context, Graphics g,
0660:                    int x, int y, int w, int h) {
0661:
0662:                findPainter(context.getComponentState(), "SeparatorBorder", -1)
0663:                        .paintSeparatorBorder(context, g, x, y, w, h);
0664:            }
0665:
0666:            @Override
0667:            public void paintSeparatorForeground(SynthContext context,
0668:                    Graphics g, int x, int y, int w, int h, int orientation) {
0669:                findPainter(context.getComponentState(),
0670:                        "SeparatorForegroundPainter", orientation)
0671:                        .paintSeparatorForeground(context, g, x, y, w, h,
0672:                                orientation);
0673:
0674:            }
0675:
0676:            @Override
0677:            public void paintSliderBackground(SynthContext context, Graphics g,
0678:                    int x, int y, int w, int h) {
0679:
0680:                findPainter(context.getComponentState(), "SliderBackground", -1)
0681:                        .paintSliderBackground(context, g, x, y, w, h);
0682:            }
0683:
0684:            @Override
0685:            public void paintSliderBorder(SynthContext context, Graphics g,
0686:                    int x, int y, int w, int h) {
0687:
0688:                findPainter(context.getComponentState(), "SliderBorder", -1)
0689:                        .paintSliderBorder(context, g, x, y, w, h);
0690:            }
0691:
0692:            @Override
0693:            public void paintSliderThumbBackground(SynthContext context,
0694:                    Graphics g, int x, int y, int w, int h, int orientation) {
0695:
0696:                findPainter(context.getComponentState(),
0697:                        "SliderThumbBackgroundPainter", orientation)
0698:                        .paintSliderThumbBackground(context, g, x, y, w, h,
0699:                                orientation);
0700:
0701:            }
0702:
0703:            @Override
0704:            public void paintSliderThumbBorder(SynthContext context,
0705:                    Graphics g, int x, int y, int w, int h, int orientation) {
0706:
0707:                findPainter(context.getComponentState(),
0708:                        "SliderThumbBorderPainter", orientation)
0709:                        .paintSliderThumbBorder(context, g, x, y, w, h,
0710:                                orientation);
0711:
0712:            }
0713:
0714:            @Override
0715:            public void paintSliderTrackBackground(SynthContext context,
0716:                    Graphics g, int x, int y, int w, int h) {
0717:
0718:                findPainter(context.getComponentState(),
0719:                        "SliderTrackBackground", -1)
0720:                        .paintSliderTrackBackground(context, g, x, y, w, h);
0721:            }
0722:
0723:            @Override
0724:            public void paintSliderTrackBorder(SynthContext context,
0725:                    Graphics g, int x, int y, int w, int h) {
0726:
0727:                findPainter(context.getComponentState(), "SliderTrackBorder",
0728:                        -1).paintSliderTrackBorder(context, g, x, y, w, h);
0729:            }
0730:
0731:            @Override
0732:            public void paintSpinnerBackground(SynthContext context,
0733:                    Graphics g, int x, int y, int w, int h) {
0734:
0735:                findPainter(context.getComponentState(), "SpinnerBackground",
0736:                        -1).paintSpinnerBackground(context, g, x, y, w, h);
0737:            }
0738:
0739:            @Override
0740:            public void paintSpinnerBorder(SynthContext context, Graphics g,
0741:                    int x, int y, int w, int h) {
0742:
0743:                findPainter(context.getComponentState(), "SpinnerBorder", -1)
0744:                        .paintSpinnerBorder(context, g, x, y, w, h);
0745:            }
0746:
0747:            @Override
0748:            public void paintSplitPaneBackground(SynthContext context,
0749:                    Graphics g, int x, int y, int w, int h) {
0750:
0751:                findPainter(context.getComponentState(), "SplitPaneBackground",
0752:                        -1).paintSplitPaneBackground(context, g, x, y, w, h);
0753:            }
0754:
0755:            @Override
0756:            public void paintSplitPaneBorder(SynthContext context, Graphics g,
0757:                    int x, int y, int w, int h) {
0758:
0759:                findPainter(context.getComponentState(), "SplitPaneBorder", -1)
0760:                        .paintSplitPaneBorder(context, g, x, y, w, h);
0761:            }
0762:
0763:            @Override
0764:            public void paintSplitPaneDividerBackground(SynthContext context,
0765:                    Graphics g, int x, int y, int w, int h) {
0766:
0767:                findPainter(context.getComponentState(),
0768:                        "SplitPaneDividerBackground", -1)
0769:                        .paintSplitPaneDividerBackground(context, g, x, y, w, h);
0770:            }
0771:
0772:            @Override
0773:            public void paintSplitPaneDividerForeground(SynthContext context,
0774:                    Graphics g, int x, int y, int w, int h, int orientation) {
0775:
0776:                findPainter(context.getComponentState(),
0777:                        "SplitPaneDividerForegroundPainter", orientation)
0778:                        .paintSplitPaneDividerForeground(context, g, x, y, w,
0779:                                h, orientation);
0780:
0781:            }
0782:
0783:            @Override
0784:            public void paintSplitPaneDragDivider(SynthContext context,
0785:                    Graphics g, int x, int y, int w, int h, int orientation) {
0786:
0787:                findPainter(context.getComponentState(),
0788:                        "SplitPaneDragDividerPainter", orientation)
0789:                        .paintSplitPaneDragDivider(context, g, x, y, w, h,
0790:                                orientation);
0791:
0792:            }
0793:
0794:            @Override
0795:            public void paintTabbedPaneBackground(SynthContext context,
0796:                    Graphics g, int x, int y, int w, int h) {
0797:
0798:                findPainter(context.getComponentState(),
0799:                        "TabbedPaneBackground", -1).paintTabbedPaneBackground(
0800:                        context, g, x, y, w, h);
0801:            }
0802:
0803:            @Override
0804:            public void paintTabbedPaneBorder(SynthContext context, Graphics g,
0805:                    int x, int y, int w, int h) {
0806:
0807:                findPainter(context.getComponentState(), "TabbedPaneBorder", -1)
0808:                        .paintTabbedPaneBorder(context, g, x, y, w, h);
0809:            }
0810:
0811:            @Override
0812:            public void paintTabbedPaneContentBackground(SynthContext context,
0813:                    Graphics g, int x, int y, int w, int h) {
0814:
0815:                findPainter(context.getComponentState(),
0816:                        "TabbedPaneContentBackground", -1)
0817:                        .paintTabbedPaneContentBackground(context, g, x, y, w,
0818:                                h);
0819:            }
0820:
0821:            @Override
0822:            public void paintTabbedPaneContentBorder(SynthContext context,
0823:                    Graphics g, int x, int y, int w, int h) {
0824:
0825:                findPainter(context.getComponentState(),
0826:                        "TabbedPaneContentBorder", -1)
0827:                        .paintTabbedPaneContentBorder(context, g, x, y, w, h);
0828:            }
0829:
0830:            @Override
0831:            public void paintTabbedPaneTabAreaBackground(SynthContext context,
0832:                    Graphics g, int x, int y, int w, int h) {
0833:
0834:                findPainter(context.getComponentState(),
0835:                        "TabbedPaneTabBackground", -1)
0836:                        .paintTabbedPaneTabAreaBackground(context, g, x, y, w,
0837:                                h);
0838:            }
0839:
0840:            @Override
0841:            public void paintTabbedPaneTabAreaBorder(SynthContext context,
0842:                    Graphics g, int x, int y, int w, int h) {
0843:
0844:                findPainter(context.getComponentState(),
0845:                        "TabbedPaneTabAreaBorder", -1)
0846:                        .paintTabbedPaneTabAreaBorder(context, g, x, y, w, h);
0847:            }
0848:
0849:            @Override
0850:            public void paintTabbedPaneTabBackground(SynthContext context,
0851:                    Graphics g, int x, int y, int w, int h, int tabIndex) {
0852:
0853:                findPainter(context.getComponentState(),
0854:                        "TabbedPaneTabBackground", -1)
0855:                        .paintTabbedPaneTabBackground(context, g, x, y, w, h,
0856:                                tabIndex);
0857:            }
0858:
0859:            @Override
0860:            public void paintTabbedPaneTabBorder(SynthContext context,
0861:                    Graphics g, int x, int y, int w, int h, int tabIndex) {
0862:
0863:                findPainter(context.getComponentState(), "TabbedPaneTabBorder",
0864:                        -1).paintTabbedPaneTabBorder(context, g, x, y, w, h,
0865:                        tabIndex);
0866:            }
0867:
0868:            @Override
0869:            public void paintTableBackground(SynthContext context, Graphics g,
0870:                    int x, int y, int w, int h) {
0871:
0872:                findPainter(context.getComponentState(), "TableBackground", -1)
0873:                        .paintTableBackground(context, g, x, y, w, h);
0874:            }
0875:
0876:            @Override
0877:            public void paintTableBorder(SynthContext context, Graphics g,
0878:                    int x, int y, int w, int h) {
0879:
0880:                findPainter(context.getComponentState(), "TableBorder", -1)
0881:                        .paintTableBorder(context, g, x, y, w, h);
0882:            }
0883:
0884:            @Override
0885:            public void paintTableHeaderBackground(SynthContext context,
0886:                    Graphics g, int x, int y, int w, int h) {
0887:
0888:                findPainter(context.getComponentState(),
0889:                        "TableHeaderBackground", -1)
0890:                        .paintTableHeaderBackground(context, g, x, y, w, h);
0891:            }
0892:
0893:            @Override
0894:            public void paintTableHeaderBorder(SynthContext context,
0895:                    Graphics g, int x, int y, int w, int h) {
0896:
0897:                findPainter(context.getComponentState(), "TableHeaderBorder",
0898:                        -1).paintTableHeaderBorder(context, g, x, y, w, h);
0899:            }
0900:
0901:            @Override
0902:            public void paintTextAreaBackground(SynthContext context,
0903:                    Graphics g, int x, int y, int w, int h) {
0904:
0905:                findPainter(context.getComponentState(), "TextAreaBackground",
0906:                        -1).paintTextAreaBackground(context, g, x, y, w, h);
0907:            }
0908:
0909:            @Override
0910:            public void paintTextAreaBorder(SynthContext context, Graphics g,
0911:                    int x, int y, int w, int h) {
0912:
0913:                findPainter(context.getComponentState(), "TextAreaBorder", -1)
0914:                        .paintTextAreaBorder(context, g, x, y, w, h);
0915:            }
0916:
0917:            @Override
0918:            public void paintTextFieldBackground(SynthContext context,
0919:                    Graphics g, int x, int y, int w, int h) {
0920:
0921:                findPainter(context.getComponentState(), "TextFieldBackground",
0922:                        -1).paintTextFieldBackground(context, g, x, y, w, h);
0923:            }
0924:
0925:            @Override
0926:            public void paintTextFieldBorder(SynthContext context, Graphics g,
0927:                    int x, int y, int w, int h) {
0928:
0929:                findPainter(context.getComponentState(), "TextFieldBorder", -1)
0930:                        .paintTextFieldBorder(context, g, x, y, w, h);
0931:            }
0932:
0933:            @Override
0934:            public void paintTextPaneBackground(SynthContext context,
0935:                    Graphics g, int x, int y, int w, int h) {
0936:
0937:                findPainter(context.getComponentState(), "TextPaneBackground",
0938:                        -1).paintTextPaneBackground(context, g, x, y, w, h);
0939:            }
0940:
0941:            @Override
0942:            public void paintTextPaneBorder(SynthContext context, Graphics g,
0943:                    int x, int y, int w, int h) {
0944:
0945:                findPainter(context.getComponentState(), "TextPaneBorder", -1)
0946:                        .paintTextPaneBorder(context, g, x, y, w, h);
0947:            }
0948:
0949:            @Override
0950:            public void paintToggleButtonBackground(SynthContext context,
0951:                    Graphics g, int x, int y, int w, int h) {
0952:
0953:                findPainter(context.getComponentState(),
0954:                        "ToggleButtonBackground", -1)
0955:                        .paintToggleButtonBackground(context, g, x, y, w, h);
0956:            }
0957:
0958:            @Override
0959:            public void paintToggleButtonBorder(SynthContext context,
0960:                    Graphics g, int x, int y, int w, int h) {
0961:
0962:                findPainter(context.getComponentState(), "ToggleButtonBorder",
0963:                        -1).paintToggleButtonBorder(context, g, x, y, w, h);
0964:            }
0965:
0966:            @Override
0967:            public void paintToolBarBackground(SynthContext context,
0968:                    Graphics g, int x, int y, int w, int h) {
0969:
0970:                findPainter(context.getComponentState(), "ToolBarBackground",
0971:                        -1).paintToolBarBackground(context, g, x, y, w, h);
0972:            }
0973:
0974:            @Override
0975:            public void paintToolBarBorder(SynthContext context, Graphics g,
0976:                    int x, int y, int w, int h) {
0977:
0978:                findPainter(context.getComponentState(), "ToolBarBorder", -1)
0979:                        .paintToolBarBorder(context, g, x, y, w, h);
0980:            }
0981:
0982:            @Override
0983:            public void paintToolBarContentBackground(SynthContext context,
0984:                    Graphics g, int x, int y, int w, int h) {
0985:
0986:                findPainter(context.getComponentState(),
0987:                        "ToolBarContentBackground", -1)
0988:                        .paintToolBarContentBackground(context, g, x, y, w, h);
0989:            }
0990:
0991:            @Override
0992:            public void paintToolBarContentBorder(SynthContext context,
0993:                    Graphics g, int x, int y, int w, int h) {
0994:
0995:                findPainter(context.getComponentState(),
0996:                        "ToolBarContentBorder", -1).paintToolBarContentBorder(
0997:                        context, g, x, y, w, h);
0998:            }
0999:
1000:            @Override
1001:            public void paintToolBarDragWindowBackground(SynthContext context,
1002:                    Graphics g, int x, int y, int w, int h) {
1003:
1004:                findPainter(context.getComponentState(),
1005:                        "ToolBarDragWindowBackground", -1)
1006:                        .paintToolBarDragWindowBackground(context, g, x, y, w,
1007:                                h);
1008:            }
1009:
1010:            @Override
1011:            public void paintToolBarDragWindowBorder(SynthContext context,
1012:                    Graphics g, int x, int y, int w, int h) {
1013:
1014:                findPainter(context.getComponentState(),
1015:                        "ToolBarDragWindowBorder", -1)
1016:                        .paintToolBarDragWindowBorder(context, g, x, y, w, h);
1017:            }
1018:
1019:            @Override
1020:            public void paintToolTipBackground(SynthContext context,
1021:                    Graphics g, int x, int y, int w, int h) {
1022:
1023:                findPainter(context.getComponentState(), "ToolTipBackground",
1024:                        -1).paintToolTipBackground(context, g, x, y, w, h);
1025:            }
1026:
1027:            @Override
1028:            public void paintToolTipBorder(SynthContext context, Graphics g,
1029:                    int x, int y, int w, int h) {
1030:
1031:                findPainter(context.getComponentState(), "ToolTipBorder", -1)
1032:                        .paintToolTipBorder(context, g, x, y, w, h);
1033:            }
1034:
1035:            @Override
1036:            public void paintTreeBackground(SynthContext context, Graphics g,
1037:                    int x, int y, int w, int h) {
1038:
1039:                findPainter(context.getComponentState(), "TreeBackground", -1)
1040:                        .paintTreeBackground(context, g, x, y, w, h);
1041:            }
1042:
1043:            @Override
1044:            public void paintTreeBorder(SynthContext context, Graphics g,
1045:                    int x, int y, int w, int h) {
1046:
1047:                findPainter(context.getComponentState(), "TreeBorder", -1)
1048:                        .paintTreeBorder(context, g, x, y, w, h);
1049:            }
1050:
1051:            @Override
1052:            public void paintTreeCellBackground(SynthContext context,
1053:                    Graphics g, int x, int y, int w, int h) {
1054:
1055:                findPainter(context.getComponentState(), "TreeCellBackground",
1056:                        -1).paintTreeCellBackground(context, g, x, y, w, h);
1057:            }
1058:
1059:            @Override
1060:            public void paintTreeCellBorder(SynthContext context, Graphics g,
1061:                    int x, int y, int w, int h) {
1062:
1063:                findPainter(context.getComponentState(), "TreeCellBorder", -1)
1064:                        .paintTreeCellBorder(context, g, x, y, w, h);
1065:            }
1066:
1067:            @Override
1068:            public void paintTreeCellFocus(SynthContext context, Graphics g,
1069:                    int x, int y, int w, int h) {
1070:
1071:                findPainter(context.getComponentState(), "TreeCellFocus", -1)
1072:                        .paintTreeCellFocus(context, g, x, y, w, h);
1073:            }
1074:
1075:            @Override
1076:            public void paintViewportBackground(SynthContext context,
1077:                    Graphics g, int x, int y, int w, int h) {
1078:
1079:                findPainter(context.getComponentState(), "ViewportBackground",
1080:                        -1).paintViewportBackground(context, g, x, y, w, h);
1081:            }
1082:
1083:            @Override
1084:            public void paintViewportBorder(SynthContext context, Graphics g,
1085:                    int x, int y, int w, int h) {
1086:
1087:                findPainter(context.getComponentState(), "ViewportBorder", -1)
1088:                        .paintViewportBorder(context, g, x, y, w, h);
1089:            }
1090:
1091:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.