Source Code Cross Referenced for InfoNodeLookAndFeelTheme.java in  » Swing-Library » InfoNode-Tabbed-Panel » net » infonode » gui » laf » 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 » Swing Library » InfoNode Tabbed Panel » net.infonode.gui.laf 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         * Copyright (C) 2004 NNL Technology AB
0003:         * Visit www.infonode.net for information about InfoNode(R) 
0004:         * products and how to contact NNL Technology AB.
0005:         *
0006:         * This program is free software; you can redistribute it and/or
0007:         * modify it under the terms of the GNU General Public License
0008:         * as published by the Free Software Foundation; either version 2
0009:         * of the License, or (at your option) any later version.
0010:         *
0011:         * This program is distributed in the hope that it will be useful,
0012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014:         * GNU General Public License for more details.
0015:         *
0016:         * You should have received a copy of the GNU General Public License
0017:         * along with this program; if not, write to the Free Software
0018:         * Foundation, Inc., 59 Temple Place - Suite 330, Boston, 
0019:         * MA 02111-1307, USA.
0020:         */
0021:
0022:        // $Id: InfoNodeLookAndFeelTheme.java,v 1.16 2005/12/04 13:46:03 jesper Exp $
0023:        package net.infonode.gui.laf;
0024:
0025:        import net.infonode.gui.Colors;
0026:        import net.infonode.gui.border.EdgeBorder;
0027:        import net.infonode.gui.border.EtchedLineBorder;
0028:        import net.infonode.gui.border.HighlightBorder;
0029:        import net.infonode.gui.border.PopupMenuBorder;
0030:        import net.infonode.gui.icon.EmptyIcon;
0031:        import net.infonode.gui.icon.button.*;
0032:        import net.infonode.gui.laf.value.BorderValue;
0033:        import net.infonode.gui.laf.value.ColorValue;
0034:        import net.infonode.gui.laf.value.FontValue;
0035:        import net.infonode.util.ArrayUtil;
0036:        import net.infonode.util.ColorUtil;
0037:
0038:        import javax.swing.border.CompoundBorder;
0039:        import javax.swing.border.EmptyBorder;
0040:        import javax.swing.border.LineBorder;
0041:        import javax.swing.plaf.*;
0042:        import java.awt.*;
0043:
0044:        /**
0045:         * A theme for InfoNode look and feel. The theme infers some default colors from others, so modifying a color might
0046:         * affect other, unmodified colors.
0047:         *
0048:         * @author $Author: jesper $
0049:         * @version $Revision: 1.16 $
0050:         */
0051:        public class InfoNodeLookAndFeelTheme {
0052:            private static final float PRIMARY_HUE = Colors.ROYAL_BLUE_HUE;
0053:            private static final float PRIMARY_SATURATION = 0.6f;
0054:            private static final float PRIMARY_BRIGHTNESS = 0.67f;
0055:
0056:            public static final Color DEFAULT_CONTROL_COLOR = Color
0057:                    .getHSBColor(Colors.SAND_HUE, 0.058f, 0.89f);
0058:            public static final Color DEFAULT_PRIMARY_CONTROL_COLOR = Color
0059:                    .getHSBColor(PRIMARY_HUE, PRIMARY_SATURATION, 1f);
0060:            public static final Color DEFAULT_BACKGROUND_COLOR = new Color(250,
0061:                    250, 247);
0062:            public static final Color DEFAULT_TEXT_COLOR = Color.BLACK;
0063:            public static final Color DEFAULT_SELECTED_BACKGROUND_COLOR = Color
0064:                    .getHSBColor(PRIMARY_HUE, PRIMARY_SATURATION + 0.1f,
0065:                            PRIMARY_BRIGHTNESS);
0066:            public static final Color DEFAULT_SELECTED_TEXT_COLOR = Color.WHITE;
0067:            public static final Color DEFAULT_TOOLTIP_BACKGROUND_COLOR = new Color(
0068:                    255, 255, 180);
0069:            public static final Color DEFAULT_TOOLTIP_FOREGROUND_COLOR = Color.BLACK;
0070:            public static final Color DEFAULT_DESKTOP_COLOR = Color
0071:                    .getHSBColor(PRIMARY_HUE - 0.02f, PRIMARY_SATURATION,
0072:                            PRIMARY_BRIGHTNESS);
0073:
0074:            public static final int DEFAULT_FONT_SIZE = 11;
0075:
0076:            private static final String[] FONT_NAMES = {/*"Tahoma", */"Dialog" };
0077:
0078:            private FontUIResource font = new FontUIResource("Dialog", 0, 11);
0079:            private FontUIResource boldFont;
0080:
0081:            private ColorValue controlColor = new ColorValue();
0082:            private ColorValue primaryControlColor = new ColorValue();
0083:            private ColorValue backgroundColor = new ColorValue();
0084:            private ColorValue textColor = new ColorValue();
0085:            private ColorValue selectedTextBackgroundColor = new ColorValue();
0086:
0087:            private ColorValue focusColor = new ColorValue();
0088:            private ColorValue selectedTextColor = new ColorValue();
0089:            private ColorValue tooltipBackgroundColor = new ColorValue(
0090:                    DEFAULT_TOOLTIP_BACKGROUND_COLOR);
0091:            private ColorValue tooltipForegroundColor = new ColorValue(
0092:                    DEFAULT_TOOLTIP_FOREGROUND_COLOR);
0093:            private ColorValue desktopColor = new ColorValue(
0094:                    DEFAULT_DESKTOP_COLOR);
0095:
0096:            private ColorValue treeIconBackgroundColor = new ColorValue();
0097:
0098:            private ColorValue selectedMenuBackgroundColor = new ColorValue();
0099:            private ColorValue selectedMenuForegroundColor = new ColorValue();
0100:
0101:            private ColorValue inactiveTextColor = new ColorValue();
0102:
0103:            private ColorUIResource controlHighlightColor;
0104:            private ColorUIResource controlLightShadowColor;
0105:            private ColorUIResource controlShadowColor;
0106:            private ColorUIResource controlDarkShadowColor;
0107:
0108:            private ColorUIResource primaryControlHighlightColor;
0109:            private ColorUIResource primaryControlShadowColor;
0110:            private ColorUIResource primaryControlDarkShadowColor;
0111:
0112:            private ColorValue scrollBarBackgroundColor = new ColorValue();
0113:            private ColorUIResource scrollBarBackgroundShadowColor;
0114:
0115:            private ColorValue activeInternalFrameTitleBackgroundColor = new ColorValue();
0116:            private ColorValue activeInternalFrameTitleGradientColor = new ColorValue();
0117:            private ColorValue activeInternalFrameTitleForegroundColor = new ColorValue();
0118:            private ColorValue inactiveInternalFrameTitleBackgroundColor = new ColorValue();
0119:            private ColorValue inactiveInternalFrameTitleGradientColor = new ColorValue();
0120:            private ColorValue inactiveInternalFrameTitleForegroundColor = new ColorValue();
0121:            private IconUIResource internalFrameIcon = new IconUIResource(
0122:                    new BorderIcon(new WindowIcon(Color.BLACK, 12), 2));
0123:            private IconUIResource internalFrameIconifyIcon = new IconUIResource(
0124:                    new MinimizeIcon());
0125:            private IconUIResource internalFrameMinimizeIcon = new IconUIResource(
0126:                    new RestoreIcon());
0127:            private IconUIResource internalFrameMaximizeIcon = new IconUIResource(
0128:                    new MaximizeIcon());
0129:            private IconUIResource internalFrameCloseIcon = new IconUIResource(
0130:                    new CloseIcon());
0131:            private BorderUIResource internalFrameBorder = new BorderUIResource(
0132:                    new LineBorder(Color.BLACK, 2));
0133:
0134:            private FontValue internalFrameTitleFont = new FontValue();
0135:            private FontValue optionPaneButtonFont = new FontValue();
0136:
0137:            private IconUIResource treeOpenIcon = new IconUIResource(
0138:                    EmptyIcon.INSTANCE);
0139:            private IconUIResource treeClosedIcon = new IconUIResource(
0140:                    EmptyIcon.INSTANCE);
0141:            private IconUIResource treeLeafIcon = new IconUIResource(
0142:                    EmptyIcon.INSTANCE);
0143:
0144:            private BorderValue menuBarBorder = new BorderValue();
0145:            private BorderValue popupMenuBorder = new BorderValue();
0146:
0147:            private BorderValue tableHeaderCellBorder = new BorderValue();
0148:
0149:            private BorderValue textFieldBorder = new BorderValue();
0150:
0151:            private BorderValue listItemBorder = new BorderValue(
0152:                    new EmptyBorder(1, 4, 1, 4));
0153:            private BorderValue listFocusedItemBorder = new BorderValue();
0154:
0155:            private int splitPaneDividerSize = 7;
0156:            private int scrollBarWidth = 17;
0157:            private InsetsUIResource buttonMargin = new InsetsUIResource(1, 6,
0158:                    1, 6);
0159:
0160:            private double shadingFactor = 1.6;
0161:
0162:            private String name;
0163:
0164:            /**
0165:             * Creates a default InfoNode look and feel theme.
0166:             */
0167:            public InfoNodeLookAndFeelTheme() {
0168:                this ("Default Theme", DEFAULT_CONTROL_COLOR,
0169:                        DEFAULT_PRIMARY_CONTROL_COLOR,
0170:                        DEFAULT_BACKGROUND_COLOR, DEFAULT_TEXT_COLOR,
0171:                        DEFAULT_SELECTED_BACKGROUND_COLOR,
0172:                        DEFAULT_SELECTED_TEXT_COLOR);
0173:            }
0174:
0175:            /**
0176:             * Creates a theme with custom colors.
0177:             *
0178:             * @param name                the name of this theme
0179:             * @param controlColor        the background color for buttons, labels etc.
0180:             * @param primaryControlColor the color of scrollbar "knobs", text and menu selection background
0181:             * @param backgroundColor     the background color for viewports, tree's, tables etc.
0182:             * @param textColor           the text color
0183:             */
0184:            public InfoNodeLookAndFeelTheme(String name, Color controlColor,
0185:                    Color primaryControlColor, Color backgroundColor,
0186:                    Color textColor) {
0187:                this (name, controlColor, primaryControlColor, backgroundColor,
0188:                        textColor, primaryControlColor, ColorUtil
0189:                                .getOpposite(primaryControlColor));
0190:            }
0191:
0192:            /**
0193:             * Creates a theme with custom colors.
0194:             *
0195:             * @param name                    the name of this theme
0196:             * @param controlColor            the background color for buttons, labels etc.
0197:             * @param primaryControlColor     the color of scrollbar "knobs"
0198:             * @param backgroundColor         the background color for viewports, tree's, tables etc.
0199:             * @param textColor               the text color
0200:             * @param selectedBackgroundColor the background color for selected text, selected menu items
0201:             * @param selectedTextColor       the text color for selected text, selected menu items
0202:             */
0203:            public InfoNodeLookAndFeelTheme(String name, Color controlColor,
0204:                    Color primaryControlColor, Color backgroundColor,
0205:                    Color textColor, Color selectedBackgroundColor,
0206:                    Color selectedTextColor) {
0207:                this (name, controlColor, primaryControlColor, backgroundColor,
0208:                        textColor, selectedBackgroundColor, selectedTextColor,
0209:                        1.3);
0210:            }
0211:
0212:            /**
0213:             * Creates a theme with custom colors.
0214:             *
0215:             * @param name                    the name of this theme
0216:             * @param controlColor            the background color for buttons, labels etc.
0217:             * @param primaryControlColor     the color of scrollbar "knobs"
0218:             * @param backgroundColor         the background color for viewports, tree's, tables etc.
0219:             * @param textColor               the text color
0220:             * @param selectedBackgroundColor the background color for selected text, selected menu items
0221:             * @param selectedTextColor       the text color for selected text, selected menu items
0222:             * @param shadingFactor           the shading factor is used when calculating brighter and darker control colors. A
0223:             *                                higher factor gives brighter and darker colors.
0224:             */
0225:            public InfoNodeLookAndFeelTheme(String name, Color controlColor,
0226:                    Color primaryControlColor, Color backgroundColor,
0227:                    Color textColor, Color selectedBackgroundColor,
0228:                    Color selectedTextColor, double shadingFactor) {
0229:                this .name = name;
0230:                String[] fontNames = GraphicsEnvironment
0231:                        .getLocalGraphicsEnvironment()
0232:                        .getAvailableFontFamilyNames();
0233:
0234:                for (int i = 0; i < FONT_NAMES.length; i++) {
0235:                    if (ArrayUtil.containsEqual(fontNames, FONT_NAMES[i])) {
0236:                        font = new FontUIResource(new Font(FONT_NAMES[i],
0237:                                Font.PLAIN, DEFAULT_FONT_SIZE));
0238:                        break;
0239:                    }
0240:                }
0241:
0242:                updateFonts();
0243:
0244:                this .controlColor.setColor(controlColor);
0245:                this .primaryControlColor.setColor(primaryControlColor);
0246:                this .backgroundColor.setColor(backgroundColor);
0247:                this .selectedTextBackgroundColor
0248:                        .setColor(selectedBackgroundColor);
0249:                this .selectedTextColor.setColor(selectedTextColor);
0250:                this .textColor.setColor(textColor);
0251:                this .shadingFactor = shadingFactor;
0252:                updateColors();
0253:            }
0254:
0255:            private void updateFonts() {
0256:                boldFont = new FontUIResource(font.deriveFont(Font.BOLD));
0257:                internalFrameTitleFont.setDefaultFont(boldFont);
0258:                optionPaneButtonFont.setDefaultFont(boldFont);
0259:            }
0260:
0261:            private void updateColors() {
0262:                focusColor.setDefaultColor(ColorUtil.blend(controlColor
0263:                        .getColor(), textColor.getColor(), 0.5f));
0264:
0265:                inactiveTextColor.setDefaultColor(focusColor);
0266:
0267:                double invShadeAmount = 1.0 / (1 + shadingFactor * 1.2);
0268:                double invShadeAmount2 = 1.0 / (1 + shadingFactor / 2);
0269:                double invShadeAmount3 = 1.0 / (1 + shadingFactor / 7);
0270:
0271:                controlHighlightColor = new ColorUIResource(ColorUtil.mult(
0272:                        controlColor.getColor(), 1 + shadingFactor));
0273:                controlLightShadowColor = new ColorUIResource(ColorUtil.mult(
0274:                        controlColor.getColor(), invShadeAmount3));
0275:                controlShadowColor = new ColorUIResource(ColorUtil.mult(
0276:                        controlColor.getColor(), invShadeAmount2));
0277:                controlDarkShadowColor = new ColorUIResource(ColorUtil.mult(
0278:                        controlColor.getColor(), invShadeAmount));
0279:
0280:                primaryControlHighlightColor = controlHighlightColor;
0281:                primaryControlShadowColor = new ColorUIResource(ColorUtil.mult(
0282:                        primaryControlColor.getColor(), invShadeAmount2));
0283:                primaryControlDarkShadowColor = new ColorUIResource(ColorUtil
0284:                        .mult(primaryControlColor.getColor(), invShadeAmount));
0285:
0286:                scrollBarBackgroundColor
0287:                        .setDefaultColor(controlLightShadowColor);
0288:                scrollBarBackgroundShadowColor = new ColorUIResource(ColorUtil
0289:                        .mult(scrollBarBackgroundColor.getColor(),
0290:                                invShadeAmount));
0291:
0292:                selectedMenuBackgroundColor
0293:                        .setDefaultColor(selectedTextBackgroundColor);
0294:                selectedMenuForegroundColor.setDefaultColor(selectedTextColor);
0295:
0296:                treeIconBackgroundColor.setDefaultColor(ColorUtil.blend(
0297:                        backgroundColor.getColor(), primaryControlColor
0298:                                .getColor(), 0.15f));
0299:
0300:                activeInternalFrameTitleBackgroundColor
0301:                        .setDefaultColor(ColorUtil.blend(primaryControlColor
0302:                                .getColor(), ColorUtil
0303:                                .getOpposite(getTextColor()), 0.5f));
0304:                activeInternalFrameTitleForegroundColor
0305:                        .setDefaultColor(getTextColor());
0306:                activeInternalFrameTitleGradientColor.setDefaultColor(ColorUtil
0307:                        .mult(activeInternalFrameTitleBackgroundColor
0308:                                .getColor(), 1.2));
0309:                inactiveInternalFrameTitleBackgroundColor
0310:                        .setDefaultColor(controlLightShadowColor);
0311:                inactiveInternalFrameTitleForegroundColor
0312:                        .setDefaultColor(getTextColor());
0313:                inactiveInternalFrameTitleGradientColor
0314:                        .setDefaultColor(ColorUtil.mult(
0315:                                inactiveInternalFrameTitleBackgroundColor
0316:                                        .getColor(), 1.2));
0317:
0318:                menuBarBorder
0319:                        .setDefaultBorder(new BorderUIResource(
0320:                                new EtchedLineBorder(false, false, true, false,
0321:                                        controlHighlightColor,
0322:                                        controlDarkShadowColor)));
0323:                popupMenuBorder.setDefaultBorder(new BorderUIResource(
0324:                        new PopupMenuBorder(controlHighlightColor,
0325:                                controlDarkShadowColor)));
0326:                textFieldBorder.setDefaultBorder(new BorderUIResource(
0327:                        new CompoundBorder(new LineBorder(
0328:                                controlDarkShadowColor), new EmptyBorder(1, 2,
0329:                                1, 2))));
0330:
0331:                tableHeaderCellBorder.setDefaultBorder(new BorderUIResource(
0332:                        new CompoundBorder(new CompoundBorder(new EdgeBorder(
0333:                                controlDarkShadowColor, false, true, false,
0334:                                true), new HighlightBorder(false,
0335:                                controlHighlightColor)), new EmptyBorder(1, 4,
0336:                                1, 4))));
0337:
0338:                listFocusedItemBorder.setDefaultBorder(new CompoundBorder(
0339:                        new LineBorder(focusColor.getColor()), new EmptyBorder(
0340:                                0, 3, 0, 3)));
0341:            }
0342:
0343:            /**
0344:             * Returns the theme name.
0345:             *
0346:             * @return the theme name
0347:             */
0348:            public String getName() {
0349:                return name;
0350:            }
0351:
0352:            /**
0353:             * Returns the shading factor. The shading factor is used when calculating brighter and darker control colors. A
0354:             * higher factor gives brighter and darker colors.
0355:             *
0356:             * @return the shading factor
0357:             */
0358:            public double getShadingFactor() {
0359:                return shadingFactor;
0360:            }
0361:
0362:            /**
0363:             * Sets the shading factor. The shading factor is used when calculating brighter and darker control colors. A higher
0364:             * factor gives brighter and darker colors.
0365:             *
0366:             * @param shadingFactor the shading factor
0367:             */
0368:            public void setShadingFactor(double shadingFactor) {
0369:                this .shadingFactor = shadingFactor;
0370:                updateColors();
0371:            }
0372:
0373:            /**
0374:             * Returns the base font. This font is used as default font for all text.
0375:             *
0376:             * @return returns the base font
0377:             */
0378:            public FontUIResource getFont() {
0379:                return font;
0380:            }
0381:
0382:            /**
0383:             * Sets the base font. This font is used as default font for all text.
0384:             *
0385:             * @param font the base font
0386:             */
0387:            public void setFont(FontUIResource font) {
0388:                this .font = font;
0389:                updateFonts();
0390:            }
0391:
0392:            /**
0393:             * Gets the background color used for {@link javax.swing.JComponent}.
0394:             *
0395:             * @return the background color used for {@link javax.swing.JComponent}
0396:             */
0397:            public ColorUIResource getControlColor() {
0398:                return controlColor.getColor();
0399:            }
0400:
0401:            /**
0402:             * Gets the color of scrollbar "knobs" etc.
0403:             *
0404:             * @return the color of scrollbar "knobs" etc,
0405:             */
0406:            public ColorUIResource getPrimaryControlColor() {
0407:                return primaryControlColor.getColor();
0408:            }
0409:
0410:            /**
0411:             * Gets the background color for {@link javax.swing.JViewport}, {@link javax.swing.JTree}, {@link javax.swing.JTable}
0412:             * etc.
0413:             *
0414:             * @return the background color for {@link javax.swing.JViewport}, {@link javax.swing.JTree}, {@link
0415:             *         javax.swing.JTable} etc.
0416:             */
0417:            public ColorUIResource getBackgroundColor() {
0418:                return backgroundColor.getColor();
0419:            }
0420:
0421:            /**
0422:             * Gets the text color.
0423:             *
0424:             * @return the text color
0425:             */
0426:            public ColorUIResource getTextColor() {
0427:                return textColor.getColor();
0428:            }
0429:
0430:            /**
0431:             * Gets the selected text background color.
0432:             *
0433:             * @return the selected text background color
0434:             */
0435:            public ColorUIResource getSelectedTextBackgroundColor() {
0436:                return selectedTextBackgroundColor.getColor();
0437:            }
0438:
0439:            /**
0440:             * Gets the control focus marker color.
0441:             *
0442:             * @return the control focus marker color
0443:             */
0444:            public ColorUIResource getFocusColor() {
0445:                return focusColor.getColor();
0446:            }
0447:
0448:            /**
0449:             * Gets the selected text color.
0450:             *
0451:             * @return the selected text color
0452:             */
0453:            public ColorUIResource getSelectedTextColor() {
0454:                return selectedTextColor.getColor();
0455:            }
0456:
0457:            /**
0458:             * Gets the background color for {@link javax.swing.JToolTip}.
0459:             *
0460:             * @return the background color for {@link javax.swing.JToolTip}
0461:             */
0462:            public ColorUIResource getTooltipBackgroundColor() {
0463:                return tooltipBackgroundColor.getColor();
0464:            }
0465:
0466:            /**
0467:             * Gets the desktop color used in {@link javax.swing.JDesktopPane} etc.
0468:             *
0469:             * @return the desktop color used in {@link javax.swing.JDesktopPane} etc.
0470:             */
0471:            public ColorUIResource getDesktopColor() {
0472:                return desktopColor.getColor();
0473:            }
0474:
0475:            /**
0476:             * Gets the background color used for collapse and expand icons in a {@link javax.swing.JTree}.
0477:             *
0478:             * @return the background color used for collapse and expand icons in a {@link javax.swing.JTree}
0479:             */
0480:            public ColorUIResource getTreeIconBackgroundColor() {
0481:                return treeIconBackgroundColor.getColor();
0482:            }
0483:
0484:            /**
0485:             * Gets the background color used for selected {@link javax.swing.JMenuItem}'s.
0486:             *
0487:             * @return the background color used for selected {@link javax.swing.JMenuItem}'s
0488:             */
0489:            public ColorUIResource getSelectedMenuBackgroundColor() {
0490:                return selectedMenuBackgroundColor.getColor();
0491:            }
0492:
0493:            /**
0494:             * Gets the foreground color used for selected {@link javax.swing.JMenuItem}'s.
0495:             *
0496:             * @return the foreground color used for selected {@link javax.swing.JMenuItem}'s
0497:             */
0498:            public ColorUIResource getSelectedMenuForegroundColor() {
0499:                return selectedMenuForegroundColor.getColor();
0500:            }
0501:
0502:            /**
0503:             * Gets the color used for inactive text.
0504:             *
0505:             * @return the color used for inactive text
0506:             */
0507:            public ColorUIResource getInactiveTextColor() {
0508:                return inactiveTextColor.getColor();
0509:            }
0510:
0511:            /**
0512:             * Gets the control highlight color. By default this is a color a little brighter than the control color.
0513:             *
0514:             * @return the control highlight color
0515:             */
0516:            public ColorUIResource getControlHighlightColor() {
0517:                return controlHighlightColor;
0518:            }
0519:
0520:            /**
0521:             * Gets the control light shadow color. By default this is a color a little darker than the control color.
0522:             *
0523:             * @return the control light shadow color
0524:             */
0525:            public ColorUIResource getControlLightShadowColor() {
0526:                return controlLightShadowColor;
0527:            }
0528:
0529:            /**
0530:             * Gets the control shadow color. By default this is a color a little darker than the control light shadow color.
0531:             *
0532:             * @return the control shadow color
0533:             */
0534:            public ColorUIResource getControlShadowColor() {
0535:                return controlShadowColor;
0536:            }
0537:
0538:            /**
0539:             * Gets the control dark shadow color. By default this is a color a little darker than the control shadow color.
0540:             *
0541:             * @return the control dark shadow color
0542:             */
0543:            public ColorUIResource getControlDarkShadowColor() {
0544:                return controlDarkShadowColor;
0545:            }
0546:
0547:            /**
0548:             * Gets the primary control highlight color. By default this color is the same as the control highlight color..
0549:             *
0550:             * @return the primary control highlight color
0551:             */
0552:            public ColorUIResource getPrimaryControlHighlightColor() {
0553:                return primaryControlHighlightColor;
0554:            }
0555:
0556:            /**
0557:             * Gets the primary control shadow color. By default this is a color a little darker than the primary control color.
0558:             *
0559:             * @return the primary control shadow color
0560:             */
0561:            public ColorUIResource getPrimaryControlShadowColor() {
0562:                return primaryControlShadowColor;
0563:            }
0564:
0565:            /**
0566:             * Gets the primary control dark shadow color. By default this is a color a little darker than the primary control
0567:             * shadow color.
0568:             *
0569:             * @return the primary control dark shadow color
0570:             */
0571:            public ColorUIResource getPrimaryControlDarkShadowColor() {
0572:                return primaryControlDarkShadowColor;
0573:            }
0574:
0575:            /**
0576:             * Gets the background color for {@link javax.swing.JScrollBar}'s.
0577:             *
0578:             * @return the background color for {@link javax.swing.JScrollBar}'s
0579:             */
0580:            public ColorUIResource getScrollBarBackgroundColor() {
0581:                return scrollBarBackgroundColor.getColor();
0582:            }
0583:
0584:            /**
0585:             * Gets the background shadow color for {@link javax.swing.JScrollBar}'s. By default this is a color a little darker
0586:             * than the scroll bar background color.
0587:             *
0588:             * @return the background color for {@link javax.swing.JScrollBar}'s.
0589:             */
0590:            public ColorUIResource getScrollBarBackgroundShadowColor() {
0591:                return scrollBarBackgroundShadowColor;
0592:            }
0593:
0594:            /**
0595:             * Gets the background color for active {@link javax.swing.JInternalFrame}'s.
0596:             *
0597:             * @return the background color for active {@link javax.swing.JInternalFrame}'s
0598:             */
0599:            public ColorUIResource getActiveInternalFrameTitleBackgroundColor() {
0600:                return activeInternalFrameTitleBackgroundColor.getColor();
0601:            }
0602:
0603:            /**
0604:             * Gets the foreground color for active {@link javax.swing.JInternalFrame}'s.
0605:             *
0606:             * @return the foreground color for active {@link javax.swing.JInternalFrame}'s
0607:             */
0608:            public ColorUIResource getActiveInternalFrameTitleForegroundColor() {
0609:                return activeInternalFrameTitleForegroundColor.getColor();
0610:            }
0611:
0612:            /**
0613:             * Gets the gradient color for active {@link javax.swing.JInternalFrame}'s.
0614:             *
0615:             * @return the gradient color for active {@link javax.swing.JInternalFrame}'s
0616:             */
0617:            public ColorUIResource getActiveInternalFrameTitleGradientColor() {
0618:                return activeInternalFrameTitleGradientColor.getColor();
0619:            }
0620:
0621:            /**
0622:             * Gets the background color for inactive {@link javax.swing.JInternalFrame}'s.
0623:             *
0624:             * @return the background color for inactive {@link javax.swing.JInternalFrame}'s
0625:             */
0626:            public ColorUIResource getInactiveInternalFrameTitleBackgroundColor() {
0627:                return inactiveInternalFrameTitleBackgroundColor.getColor();
0628:            }
0629:
0630:            /**
0631:             * Gets the foreground color for inactive {@link javax.swing.JInternalFrame}'s.
0632:             *
0633:             * @return the foreground color for inactive {@link javax.swing.JInternalFrame}'s
0634:             */
0635:            public ColorUIResource getInactiveInternalFrameTitleForegroundColor() {
0636:                return inactiveInternalFrameTitleForegroundColor.getColor();
0637:            }
0638:
0639:            /**
0640:             * Gets the gradient color for inactive {@link javax.swing.JInternalFrame}'s.
0641:             *
0642:             * @return the gradient color for inactive {@link javax.swing.JInternalFrame}'s
0643:             */
0644:            public ColorUIResource getInactiveInternalFrameTitleGradientColor() {
0645:                return inactiveInternalFrameTitleGradientColor.getColor();
0646:            }
0647:
0648:            /**
0649:             * Gets the border around cells in {@link javax.swing.table.JTableHeader}'s.
0650:             *
0651:             * @return the border around cells in {@link javax.swing.table.JTableHeader}'s
0652:             */
0653:            public BorderUIResource getTableHeaderCellBorder() {
0654:                return tableHeaderCellBorder.getBorder();
0655:            }
0656:
0657:            /**
0658:             * Gets the icon to the left in the title bar of {@link javax.swing.JInternalFrame}'s.
0659:             *
0660:             * @return the icon to the left in the title bar of {@link javax.swing.JInternalFrame}'s
0661:             */
0662:            public IconUIResource getInternalFrameIcon() {
0663:                return internalFrameIcon;
0664:            }
0665:
0666:            /**
0667:             * Sets the icon to the left in the title bar of {@link javax.swing.JInternalFrame}'s.
0668:             *
0669:             * @param internalFrameIcon the icon
0670:             */
0671:            public void setInternalFrameIcon(IconUIResource internalFrameIcon) {
0672:                this .internalFrameIcon = internalFrameIcon;
0673:            }
0674:
0675:            /**
0676:             * Gets the icon used in the minimize button in the title bar of {@link javax.swing.JInternalFrame}'s.
0677:             *
0678:             * @return the icon used in the minimize button in the title bar of {@link javax.swing.JInternalFrame}'s
0679:             */
0680:            public IconUIResource getInternalFrameMinimizeIcon() {
0681:                return internalFrameMinimizeIcon;
0682:            }
0683:
0684:            /**
0685:             * Sets the icon used in the minimize button in the title bar of {@link javax.swing.JInternalFrame}'s.
0686:             *
0687:             * @param internalFrameMinimizeIcon the icon
0688:             */
0689:            public void setInternalFrameMinimizeIcon(
0690:                    IconUIResource internalFrameMinimizeIcon) {
0691:                this .internalFrameMinimizeIcon = internalFrameMinimizeIcon;
0692:            }
0693:
0694:            /**
0695:             * Gets the icon used in the maximize button in the title bar of {@link javax.swing.JInternalFrame}'s.
0696:             *
0697:             * @return the icon used in the minimize button in the title bar of {@link javax.swing.JInternalFrame}'s
0698:             */
0699:            public IconUIResource getInternalFrameMaximizeIcon() {
0700:                return internalFrameMaximizeIcon;
0701:            }
0702:
0703:            /**
0704:             * Sets the icon used in the maximize button in the title bar of {@link javax.swing.JInternalFrame}'s.
0705:             *
0706:             * @param internalFrameMaximizeIcon the icon
0707:             */
0708:            public void setInternalFrameMaximizeIcon(
0709:                    IconUIResource internalFrameMaximizeIcon) {
0710:                this .internalFrameMaximizeIcon = internalFrameMaximizeIcon;
0711:            }
0712:
0713:            /**
0714:             * Gets the icon used in the close button in the title bar of {@link javax.swing.JInternalFrame}'s.
0715:             *
0716:             * @return the icon used in the close button in the title bar of {@link javax.swing.JInternalFrame}'s
0717:             */
0718:            public IconUIResource getInternalFrameCloseIcon() {
0719:                return internalFrameCloseIcon;
0720:            }
0721:
0722:            /**
0723:             * Sets the icon used in the close button in the title bar of {@link javax.swing.JInternalFrame}'s.
0724:             *
0725:             * @param internalFrameCloseIcon the icon
0726:             */
0727:            public void setInternalFrameCloseIcon(
0728:                    IconUIResource internalFrameCloseIcon) {
0729:                this .internalFrameCloseIcon = internalFrameCloseIcon;
0730:            }
0731:
0732:            /**
0733:             * Gets the border used around {@link javax.swing.JInternalFrame}'s.
0734:             *
0735:             * @return the border used around {@link javax.swing.JInternalFrame}'s
0736:             */
0737:            public BorderUIResource getInternalFrameBorder() {
0738:                return internalFrameBorder;
0739:            }
0740:
0741:            /**
0742:             * Sets the border used around {@link javax.swing.JInternalFrame}'s.
0743:             *
0744:             * @param internalFrameBorder the border used around {@link javax.swing.JInternalFrame}'s
0745:             */
0746:            public void setInternalFrameBorder(
0747:                    BorderUIResource internalFrameBorder) {
0748:                this .internalFrameBorder = internalFrameBorder;
0749:            }
0750:
0751:            /**
0752:             * Gets the font used in the title of {@link javax.swing.JInternalFrame}'s. Defaults to the text font with bold
0753:             * style.
0754:             *
0755:             * @return the font used in the title of {@link javax.swing.JInternalFrame}'s
0756:             */
0757:            public FontUIResource getInternalFrameTitleFont() {
0758:                return internalFrameTitleFont.getFont();
0759:            }
0760:
0761:            /**
0762:             * Sets the font used in the title of {@link javax.swing.JInternalFrame}'s. Defaults to the text font with bold
0763:             * style.
0764:             *
0765:             * @param internalFrameTitleFont the font
0766:             */
0767:            public void setInternalFrameTitleFont(
0768:                    FontUIResource internalFrameTitleFont) {
0769:                this .internalFrameTitleFont.setFont(internalFrameTitleFont);
0770:            }
0771:
0772:            /**
0773:             * Sets the background color for {@link javax.swing.JComponent}'s.
0774:             *
0775:             * @param color the control color
0776:             */
0777:            public void setControlColor(Color color) {
0778:                this .controlColor.setColor(color);
0779:                updateColors();
0780:            }
0781:
0782:            /**
0783:             * Sets the primary control background color used in scroll bar knobs etc.
0784:             *
0785:             * @param c the primary control background color
0786:             */
0787:            public void setPrimaryControlColor(Color c) {
0788:                primaryControlColor.setColor(c);
0789:                updateColors();
0790:            }
0791:
0792:            /**
0793:             * Sets the background color used in {@link javax.swing.JViewport}, {@link javax.swing.JTree}, {@link
0794:             * javax.swing.JTable} etc.
0795:             *
0796:             * @param c the background color used in {@link javax.swing.JViewport}, {@link javax.swing.JTree}, {@link
0797:             *          javax.swing.JTable} etc.
0798:             */
0799:            public void setBackgroundColor(Color c) {
0800:                backgroundColor.setColor(c);
0801:                updateColors();
0802:            }
0803:
0804:            /**
0805:             * Sets the text color.
0806:             *
0807:             * @param c the text color
0808:             */
0809:            public void setTextColor(Color c) {
0810:                textColor.setColor(c);
0811:                updateColors();
0812:            }
0813:
0814:            /**
0815:             * Gets the font used in {@link javax.swing.JOptionPane} buttons. Defaults to the text font with bold style.
0816:             *
0817:             * @return the font used in {@link javax.swing.JOptionPane} buttons
0818:             */
0819:            public FontUIResource getOptionPaneButtonFont() {
0820:                return optionPaneButtonFont.getFont();
0821:            }
0822:
0823:            /**
0824:             * Sets the font used in {@link javax.swing.JOptionPane} buttons. Defaults to the text font with bold style.
0825:             *
0826:             * @param optionPaneButtonFont the font used in {@link javax.swing.JOptionPane} buttons
0827:             */
0828:            public void setOptionPaneButtonFont(
0829:                    FontUIResource optionPaneButtonFont) {
0830:                this .optionPaneButtonFont.setFont(optionPaneButtonFont);
0831:            }
0832:
0833:            /**
0834:             * Gets the size of the {@link javax.swing.JSplitPane} divider.
0835:             *
0836:             * @return the size of the {@link javax.swing.JSplitPane} divider
0837:             */
0838:            public int getSplitPaneDividerSize() {
0839:                return splitPaneDividerSize;
0840:            }
0841:
0842:            /**
0843:             * Sets the size of the {@link javax.swing.JSplitPane} divider.
0844:             *
0845:             * @param splitPaneDividerSize the size of the {@link javax.swing.JSplitPane} divider
0846:             */
0847:            public void setSplitPaneDividerSize(int splitPaneDividerSize) {
0848:                this .splitPaneDividerSize = splitPaneDividerSize;
0849:            }
0850:
0851:            /**
0852:             * Gets the border used around {@link javax.swing.JTextField} (including spinners etc.).
0853:             *
0854:             * @return the border used around {@link javax.swing.JTextField}
0855:             */
0856:            public BorderUIResource getTextFieldBorder() {
0857:                return textFieldBorder.getBorder();
0858:            }
0859:
0860:            /**
0861:             * Sets the border used around {@link javax.swing.JTextField} (including spinners etc.).
0862:             *
0863:             * @param textFieldBorder the border used around {@link javax.swing.JTextField}
0864:             */
0865:            public void setTextFieldBorder(BorderUIResource textFieldBorder) {
0866:                this .textFieldBorder.setBorder(textFieldBorder);
0867:            }
0868:
0869:            /**
0870:             * Gets the icon used with open nodes in a {@link javax.swing.JTree}.
0871:             *
0872:             * @return the icon used with open nodes in a {@link javax.swing.JTree}
0873:             */
0874:            public IconUIResource getTreeOpenIcon() {
0875:                return treeOpenIcon;
0876:            }
0877:
0878:            /**
0879:             * Sets the icon used with open nodes in a {@link javax.swing.JTree}.
0880:             *
0881:             * @param treeOpenIcon the icon used with open nodes in a {@link javax.swing.JTree}
0882:             */
0883:            public void setTreeOpenIcon(IconUIResource treeOpenIcon) {
0884:                this .treeOpenIcon = treeOpenIcon;
0885:            }
0886:
0887:            /**
0888:             * Gets the icon used with closed nodes in a {@link javax.swing.JTree}.
0889:             *
0890:             * @return the icon used with closed nodes in a {@link javax.swing.JTree}
0891:             */
0892:            public IconUIResource getTreeClosedIcon() {
0893:                return treeClosedIcon;
0894:            }
0895:
0896:            /**
0897:             * Sets the icon used with closed nodes in a {@link javax.swing.JTree}.
0898:             *
0899:             * @param treeClosedIcon the icon used with closed nodes in a {@link javax.swing.JTree}
0900:             */
0901:            public void setTreeClosedIcon(IconUIResource treeClosedIcon) {
0902:                this .treeClosedIcon = treeClosedIcon;
0903:            }
0904:
0905:            /**
0906:             * Gets the icon used with leaf nodes in a {@link javax.swing.JTree}.
0907:             *
0908:             * @return the icon used with leaf nodes in a {@link javax.swing.JTree}
0909:             */
0910:            public IconUIResource getTreeLeafIcon() {
0911:                return treeLeafIcon;
0912:            }
0913:
0914:            /**
0915:             * Sets the icon used with leaf nodes in a {@link javax.swing.JTree}.
0916:             *
0917:             * @param treeLeafIcon the icon used with leaf nodes in a {@link javax.swing.JTree}
0918:             */
0919:            public void setTreeLeafIcon(IconUIResource treeLeafIcon) {
0920:                this .treeLeafIcon = treeLeafIcon;
0921:            }
0922:
0923:            /**
0924:             * Gets the border used around {@link javax.swing.JMenuBar}'s.
0925:             *
0926:             * @return the border used around {@link javax.swing.JMenuBar}'s
0927:             */
0928:            public BorderUIResource getMenuBarBorder() {
0929:                return menuBarBorder.getBorder();
0930:            }
0931:
0932:            /**
0933:             * Sets the border used around {@link javax.swing.JMenuBar}'s.
0934:             *
0935:             * @param menuBarBorder the border used around {@link javax.swing.JMenuBar}'s
0936:             */
0937:            public void setMenuBarBorder(BorderUIResource menuBarBorder) {
0938:                this .menuBarBorder.setBorder(menuBarBorder);
0939:            }
0940:
0941:            /**
0942:             * Sets the selected text background color.
0943:             *
0944:             * @param selectedTextBackgroundColor the selected text background color
0945:             */
0946:            public void setSelectedTextBackgroundColor(
0947:                    Color selectedTextBackgroundColor) {
0948:                this .selectedTextBackgroundColor
0949:                        .setColor(selectedTextBackgroundColor);
0950:                updateColors();
0951:            }
0952:
0953:            /**
0954:             * Sets the focus marker color.
0955:             *
0956:             * @param focusColor the focus marker color
0957:             */
0958:            public void setFocusColor(Color focusColor) {
0959:                this .focusColor.setColor(focusColor);
0960:            }
0961:
0962:            /**
0963:             * Sets the selected text color.
0964:             *
0965:             * @param selectedTextColor the selected text color
0966:             */
0967:            public void setSelectedTextColor(Color selectedTextColor) {
0968:                this .selectedTextColor.setColor(selectedTextColor);
0969:            }
0970:
0971:            /**
0972:             * Sets the tooltip background color.
0973:             *
0974:             * @param tooltipBackgroundColor the tooltip background color
0975:             */
0976:            public void setTooltipBackgroundColor(Color tooltipBackgroundColor) {
0977:                this .tooltipBackgroundColor.setColor(tooltipBackgroundColor);
0978:            }
0979:
0980:            /**
0981:             * Sets the background color for a {@link javax.swing.JDesktopPane}.
0982:             *
0983:             * @param desktopColor the background color for a {@link javax.swing.JDesktopPane}
0984:             */
0985:            public void setDesktopColor(Color desktopColor) {
0986:                this .desktopColor.setColor(desktopColor);
0987:                updateColors();
0988:            }
0989:
0990:            /**
0991:             * Sets the background color for the expand/collapse icons in a {@link javax.swing.JTree}.
0992:             *
0993:             * @param treeIconBackgroundColor the background color for the expand/collapse icons in a {@link javax.swing.JTree}
0994:             */
0995:            public void setTreeIconBackgroundColor(Color treeIconBackgroundColor) {
0996:                this .treeIconBackgroundColor.setColor(treeIconBackgroundColor);
0997:            }
0998:
0999:            /**
1000:             * Sets the background color for a selected menu item.
1001:             *
1002:             * @param selectedMenuBackgroundColor the background color for a selected menu item
1003:             */
1004:            public void setSelectedMenuBackgroundColor(
1005:                    Color selectedMenuBackgroundColor) {
1006:                this .selectedMenuBackgroundColor
1007:                        .setColor(selectedMenuBackgroundColor);
1008:                updateColors();
1009:            }
1010:
1011:            /**
1012:             * Sets the foreground color for a selected menu item.
1013:             *
1014:             * @param selectedMenuForegroundColor the foreground color for a selected menu item
1015:             */
1016:            public void setSelectedMenuForegroundColor(
1017:                    Color selectedMenuForegroundColor) {
1018:                this .selectedMenuForegroundColor
1019:                        .setColor(selectedMenuForegroundColor);
1020:            }
1021:
1022:            /**
1023:             * Sets the inactive text color.
1024:             *
1025:             * @param inactiveTextColor the inactive text color
1026:             */
1027:            public void setInactiveTextColor(Color inactiveTextColor) {
1028:                this .inactiveTextColor.setColor(inactiveTextColor);
1029:            }
1030:
1031:            /**
1032:             * Sets the {@link javax.swing.JScrollBar} background color.
1033:             *
1034:             * @param scrollBarBackgroundColor the {@link javax.swing.JScrollBar} background color
1035:             */
1036:            public void setScrollBarBackgroundColor(
1037:                    Color scrollBarBackgroundColor) {
1038:                this .scrollBarBackgroundColor
1039:                        .setColor(scrollBarBackgroundColor);
1040:                updateColors();
1041:            }
1042:
1043:            /**
1044:             * Sets the background color for the title of an active {@link javax.swing.JInternalFrame}.
1045:             *
1046:             * @param activeInternalFrameTitleBackgroundColor
1047:             *         the background color for the title of an active {@link javax.swing.JInternalFrame}
1048:             */
1049:            public void setActiveInternalFrameTitleBackgroundColor(
1050:                    Color activeInternalFrameTitleBackgroundColor) {
1051:                this .activeInternalFrameTitleBackgroundColor
1052:                        .setColor(activeInternalFrameTitleBackgroundColor);
1053:                updateColors();
1054:            }
1055:
1056:            /**
1057:             * Sets the foreground color for the title of an active {@link javax.swing.JInternalFrame}.
1058:             *
1059:             * @param activeInternalFrameTitleForegroundColor
1060:             *         the background color for the title of an active {@link javax.swing.JInternalFrame}
1061:             */
1062:            public void setActiveInternalFrameTitleForegroundColor(
1063:                    Color activeInternalFrameTitleForegroundColor) {
1064:                this .activeInternalFrameTitleForegroundColor
1065:                        .setColor(activeInternalFrameTitleForegroundColor);
1066:                updateColors();
1067:            }
1068:
1069:            /**
1070:             * Sets the gradient color for the title of an active {@link javax.swing.JInternalFrame}.
1071:             *
1072:             * @param activeInternalFrameTitleGradientColor
1073:             *         the gradient color for the title of an active {@link javax.swing.JInternalFrame}
1074:             */
1075:            public void setActiveInternalFrameTitleGradientColor(
1076:                    Color activeInternalFrameTitleGradientColor) {
1077:                this .activeInternalFrameTitleGradientColor
1078:                        .setColor(activeInternalFrameTitleGradientColor);
1079:                updateColors();
1080:            }
1081:
1082:            /**
1083:             * Sets the background color for the title of an inactive {@link javax.swing.JInternalFrame}.
1084:             *
1085:             * @param inactiveInternalFrameTitleBackgroundColor
1086:             *         the background color for the title of an inactive {@link javax.swing.JInternalFrame}
1087:             */
1088:            public void setInactiveInternalFrameTitleBackgroundColor(
1089:                    Color inactiveInternalFrameTitleBackgroundColor) {
1090:                this .inactiveInternalFrameTitleBackgroundColor
1091:                        .setColor(inactiveInternalFrameTitleBackgroundColor);
1092:                updateColors();
1093:            }
1094:
1095:            /**
1096:             * Sets the foreground color for the title of an inactive {@link javax.swing.JInternalFrame}.
1097:             *
1098:             * @param inactiveInternalFrameTitleForegroundColor
1099:             *         the background color for the title of an active {@link javax.swing.JInternalFrame}
1100:             */
1101:            public void setInactiveInternalFrameTitleForegroundColor(
1102:                    Color inactiveInternalFrameTitleForegroundColor) {
1103:                this .inactiveInternalFrameTitleForegroundColor
1104:                        .setColor(inactiveInternalFrameTitleForegroundColor);
1105:                updateColors();
1106:            }
1107:
1108:            /**
1109:             * Sets the gradient color for the title of an inactive {@link javax.swing.JInternalFrame}.
1110:             *
1111:             * @param inactiveInternalFrameTitleGradientColor
1112:             *         the gradient color for the title of an inactive {@link javax.swing.JInternalFrame}
1113:             */
1114:            public void setInactiveInternalFrameTitleGradientColor(
1115:                    Color inactiveInternalFrameTitleGradientColor) {
1116:                this .inactiveInternalFrameTitleGradientColor
1117:                        .setColor(inactiveInternalFrameTitleGradientColor);
1118:                updateColors();
1119:            }
1120:
1121:            /**
1122:             * Sets the title font of an {@link javax.swing.JInternalFrame}.
1123:             *
1124:             * @param frameTitleFont the title font of an {@link javax.swing.JInternalFrame}
1125:             */
1126:            public void setInternalFrameTitleFont(Font frameTitleFont) {
1127:                this .internalFrameTitleFont.setFont(frameTitleFont);
1128:            }
1129:
1130:            /**
1131:             * Sets the button font for a {@link javax.swing.JOptionPane}. Default to the text font with bold style.
1132:             *
1133:             * @param optionPaneButtonFont the button font for a {@link javax.swing.JOptionPane}
1134:             */
1135:            public void setOptionPaneButtonFont(Font optionPaneButtonFont) {
1136:                this .optionPaneButtonFont.setFont(optionPaneButtonFont);
1137:            }
1138:
1139:            /**
1140:             * Sets the border for the cells of a {@link javax.swing.table.JTableHeader}.
1141:             *
1142:             * @param tableHeaderCellBorder the border for the cells of a {@link javax.swing.table.JTableHeader}
1143:             */
1144:            public void setTableHeaderCellBorder(
1145:                    BorderUIResource tableHeaderCellBorder) {
1146:                this .tableHeaderCellBorder.setBorder(tableHeaderCellBorder);
1147:            }
1148:
1149:            /**
1150:             * Gets the width of a {@link javax.swing.JScrollBar}.
1151:             *
1152:             * @return the width of a {@link javax.swing.JScrollBar}
1153:             */
1154:            public int getScrollBarWidth() {
1155:                return scrollBarWidth;
1156:            }
1157:
1158:            /**
1159:             * Sets the width of a {@link javax.swing.JScrollBar}.
1160:             *
1161:             * @param scrollBarWidth the width of a {@link javax.swing.JScrollBar}
1162:             */
1163:            public void setScrollBarWidth(int scrollBarWidth) {
1164:                this .scrollBarWidth = scrollBarWidth;
1165:            }
1166:
1167:            /**
1168:             * Gets the margin of a {@link javax.swing.JButton}.
1169:             *
1170:             * @return the margin of a {@link javax.swing.JButton}
1171:             */
1172:            public InsetsUIResource getButtonMargin() {
1173:                return buttonMargin;
1174:            }
1175:
1176:            /**
1177:             * Sets the margin of a {@link javax.swing.JButton}.
1178:             *
1179:             * @param buttonMargin the margin of a {@link javax.swing.JButton}
1180:             */
1181:            public void setButtonMargin(InsetsUIResource buttonMargin) {
1182:                this .buttonMargin = buttonMargin;
1183:            }
1184:
1185:            /**
1186:             * Gets the border of a {@link javax.swing.JPopupMenu}.
1187:             *
1188:             * @return the border of a {@link javax.swing.JPopupMenu}
1189:             */
1190:            public BorderUIResource getPopupMenuBorder() {
1191:                return popupMenuBorder.getBorder();
1192:            }
1193:
1194:            /**
1195:             * Sets the border of a {@link javax.swing.JPopupMenu}.
1196:             *
1197:             * @param popupMenuBorder the border of a {@link javax.swing.JPopupMenu}
1198:             */
1199:            public void setPopupMenuBorder(BorderUIResource popupMenuBorder) {
1200:                this .popupMenuBorder.setBorder(popupMenuBorder);
1201:            }
1202:
1203:            /**
1204:             * Gets the icon used in the iconify button in the title of a {@link javax.swing.JInternalFrame}.
1205:             *
1206:             * @return the icon used in the iconify button in the title of a {@link javax.swing.JInternalFrame}
1207:             */
1208:            public IconUIResource getInternalFrameIconifyIcon() {
1209:                return internalFrameIconifyIcon;
1210:            }
1211:
1212:            /**
1213:             * Sets the icon used in the iconify button in the title of a {@link javax.swing.JInternalFrame}.
1214:             *
1215:             * @param internalFrameIconifyIcon the icon used in the iconify button in the title of a {@link
1216:             *                                 javax.swing.JInternalFrame}
1217:             */
1218:            public void setInternalFrameIconifyIcon(
1219:                    IconUIResource internalFrameIconifyIcon) {
1220:                this .internalFrameIconifyIcon = internalFrameIconifyIcon;
1221:            }
1222:
1223:            /**
1224:             * Gets the background color used in {@link javax.swing.JToolTip}.
1225:             *
1226:             * @return the background color used in {@link javax.swing.JToolTip}
1227:             */
1228:            public ColorUIResource getTooltipForegroundColor() {
1229:                return tooltipForegroundColor.getColor();
1230:            }
1231:
1232:            /**
1233:             * Sets the foreground color used in {@link javax.swing.JToolTip}.
1234:             *
1235:             * @param tooltipForegroundColor the foreground color used in {@link javax.swing.JToolTip}
1236:             */
1237:            public void setTooltipForegroundColor(
1238:                    ColorUIResource tooltipForegroundColor) {
1239:                this .tooltipForegroundColor.setColor(tooltipForegroundColor);
1240:                updateColors();
1241:            }
1242:
1243:            /**
1244:             * Gets the border used around list items in {@link javax.swing.JList}'s and {@link javax.swing.JComboBox}'s.
1245:             *
1246:             * @return the border used around list items in {@link javax.swing.JList}'s and {@link javax.swing.JComboBox}'s
1247:             */
1248:            public BorderUIResource getListItemBorder() {
1249:                return listItemBorder.getBorder();
1250:            }
1251:
1252:            /**
1253:             * Sets the border used around list items in {@link javax.swing.JList}'s and {@link javax.swing.JComboBox}'s.
1254:             *
1255:             * @param listItemBorder the border used around list items in {@link javax.swing.JList}'s and {@link javax.swing.JComboBox}'s
1256:             */
1257:            public void setListItemBorder(BorderUIResource listItemBorder) {
1258:                this .listItemBorder.setBorder(listItemBorder);
1259:            }
1260:
1261:            /**
1262:             * Gets the border used around the focused list item in {@link javax.swing.JList}'s and {@link javax.swing.JComboBox}'s.
1263:             *
1264:             * @return the border used around the focused list item in {@link javax.swing.JList}'s and {@link javax.swing.JComboBox}'s
1265:             */
1266:            public BorderUIResource getListFocusedItemBorder() {
1267:                return listFocusedItemBorder.getBorder();
1268:            }
1269:
1270:            /**
1271:             * Sets the border used around the focused list item in {@link javax.swing.JList}'s and {@link javax.swing.JComboBox}'s.
1272:             *
1273:             * @param listFocusedItemBorder the border used around the focused list item in {@link javax.swing.JList}'s and {@link javax.swing.JComboBox}'s
1274:             */
1275:            public void setListFocusedItemBorder(
1276:                    BorderUIResource listFocusedItemBorder) {
1277:                this.listFocusedItemBorder.setBorder(listFocusedItemBorder);
1278:            }
1279:
1280:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.