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


001:        /*
002:         * Copyright (C) 2004 NNL Technology AB
003:         * Visit www.infonode.net for information about InfoNode(R) 
004:         * products and how to contact NNL Technology AB.
005:         *
006:         * This program is free software; you can redistribute it and/or
007:         * modify it under the terms of the GNU General Public License
008:         * as published by the Free Software Foundation; either version 2
009:         * of the License, or (at your option) any later version.
010:         *
011:         * This program is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014:         * GNU General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU General Public License
017:         * along with this program; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place - Suite 330, Boston, 
019:         * MA 02111-1307, USA.
020:         */
021:
022:        // $Id: TabbedUIDefaults.java,v 1.15 2005/08/29 12:18:41 johan Exp $
023:        package net.infonode.tabbedpanel;
024:
025:        import net.infonode.gui.UIManagerUtil;
026:        import net.infonode.util.ColorUtil;
027:
028:        import javax.swing.*;
029:        import java.awt.*;
030:
031:        /**
032:         * Methods for retrieving UI defaults for the current "Look and Feel" from the
033:         * UIManager. The values are adapted to be used with classes in the TabbedPanel package.
034:         *
035:         * @author $Author: johan $
036:         * @version $Revision: 1.15 $
037:         */
038:        public class TabbedUIDefaults {
039:            private static final int BUTTON_ICON_SIZE = 11;
040:
041:            private TabbedUIDefaults() {
042:            }
043:
044:            /**
045:             * Gets the content area background color
046:             *
047:             * @return a copy of the color
048:             */
049:            public static Color getContentAreaBackground() {
050:                return UIManagerUtil.getColor("Panel.background", "control",
051:                        Color.LIGHT_GRAY);
052:            }
053:
054:            /**
055:             * Gets the tab normal state foreground color
056:             *
057:             * @return a copy of the color
058:             */
059:            public static Color getNormalStateForeground() {
060:                return UIManagerUtil.getColor("TabbedPane.foreground",
061:                        "controlText", Color.BLACK);
062:            }
063:
064:            /**
065:             * Gets the tab normal state background color
066:             *
067:             * @return a copy of the color
068:             */
069:            public static Color getNormalStateBackground() {
070:                return UIManagerUtil.getColor("TabbedPane.background",
071:                        "control", Color.LIGHT_GRAY);
072:            }
073:
074:            /**
075:             * Gets the tab highlighted state foreground color
076:             *
077:             * @return a copy of the color
078:             */
079:            public static Color getHighlightedStateForeground() {
080:                return getNormalStateForeground();
081:            }
082:
083:            /**
084:             * Gets the tab highlighted state backgound color
085:             *
086:             * @return a copy of the color
087:             */
088:            public static Color getHighlightedStateBackground() {
089:                return UIManagerUtil.getColor("Panel.background", "control",
090:                        Color.LIGHT_GRAY);
091:            }
092:
093:            /**
094:             * Gets the tab disabled state foreground color
095:             *
096:             * @return a copy of the color
097:             */
098:            public static Color getDisabledForeground() {
099:                return UIManagerUtil.getColor("inactiveCaptionText",
100:                        "controlText", Color.WHITE);
101:            }
102:
103:            /**
104:             * Gets the tab disabled state background color
105:             *
106:             * @return a copy of the color
107:             */
108:            public static Color getDisabledBackground() {
109:                return ColorUtil.mult(getNormalStateBackground(), 0.9);
110:            }
111:
112:            /**
113:             * Gets the (border) dark shadow color
114:             *
115:             * @return a copy of the color
116:             */
117:            public static Color getDarkShadow() {
118:                return UIManagerUtil.getColor("TabbedPane.darkShadow",
119:                        "controlDkShadow", Color.BLACK);
120:            }
121:
122:            /**
123:             * Gets the (border) highlight color
124:             *
125:             * @return a copy of the color
126:             */
127:            public static Color getHighlight() {
128:                return UIManagerUtil.getColor("TabbedPane.highlight",
129:                        "controlHighlight", Color.WHITE);
130:            }
131:
132:            /**
133:             * Gets the font
134:             *
135:             * @return a copy of the font
136:             */
137:            public static Font getFont() {
138:                return UIManagerUtil.getFont("TabbedPane.font");
139:            }
140:
141:            /**
142:             * Gets the icon text gap
143:             *
144:             * @return the icon text gap
145:             */
146:            public static int getIconTextGap() {
147:                return UIManager.getInt("TabbedPane.textIconGap");
148:            }
149:
150:            /**
151:             * Gets the tab insets
152:             *
153:             * @return a copy of the insets
154:             */
155:            public static Insets getTabInsets() {
156:                return UIManagerUtil.getInsets("TabbedPane.tabInsets",
157:                        new Insets(2, 2, 0, 2));
158:            }
159:
160:            /**
161:             * Gets the insets for the content area
162:             *
163:             * @return a copy of the insets
164:             */
165:            public static Insets getContentAreaInsets() {
166:                return UIManagerUtil.getInsets(
167:                        "TabbedPane.contentBorderInsets",
168:                        new Insets(2, 2, 2, 2));
169:            }
170:
171:            /**
172:             * Gets the default icon size for buttons
173:             *
174:             * @return icon size in pixels
175:             */
176:            public static int getButtonIconSize() {
177:                return BUTTON_ICON_SIZE;
178:            }
179:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.