Source Code Cross Referenced for FontSizeHints.java in  » Database-Client » executequery » org » underworldlabs » swing » plaf » smoothgradient » 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 » Database Client » executequery » org.underworldlabs.swing.plaf.smoothgradient 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * FontSizeHints.java
003:         *
004:         * Copyright (C) 2002, 2003, 2004, 2005, 2006 Takis Diakoumis
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 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, MA  02111-1307, USA.
019:         *
020:         */
021:
022:        package org.underworldlabs.swing.plaf.smoothgradient;
023:
024:        /* ----------------------------------------------------------
025:         * CVS NOTE: Changes to the CVS repository prior to the 
026:         *           release of version 3.0.0beta1 has meant a 
027:         *           resetting of CVS revision numbers.
028:         * ----------------------------------------------------------
029:         */
030:
031:        /**
032:         * Describes font size hints used by the JGoodies Windows look&feel; future
033:         * implementations of the Plastic l&f will use the same hints. In 1.3
034:         * environments the sizes are used as absolute font sizes, in 1.4 environments
035:         * size deltas are used between SYSTEM and the specified sizes.<p>
036:         * 
037:         * NOTE: This is work in progress and will probably change in the
038:         * next release, to better reflect the font choice in the J2SE 1.4.1.
039:         * Currently, the size delta is used only for the Tahoma font!<p>
040:         * 
041:         * In 1.3 environments, the font guess is Tahoma on modern Windows,
042:         * "dialog" otherwise. In 1.4 environments, the system fonts will be used.
043:         *
044:         * @author Karsten Lentzsch
045:         * @author   Takis Diakoumis
046:         * @version  $Revision: 1.4 $
047:         * @date     $Date: 2006/05/14 06:56:07 $
048:         *
049:         * @see	Options#setGlobalFontSizeHints
050:         * @see	FontUtils
051:         */
052:        public final class FontSizeHints {
053:
054:            public static final FontSizeHints LARGE = new FontSizeHints(12, 12,
055:                    14, 14);
056:            public static final FontSizeHints SYSTEM = new FontSizeHints(11,
057:                    11, 14, 14);
058:            public static final FontSizeHints MIXED2 = new FontSizeHints(11,
059:                    11, 14, 13);
060:            public static final FontSizeHints MIXED = new FontSizeHints(11, 11,
061:                    14, 12);
062:            public static final FontSizeHints SMALL = new FontSizeHints(11, 11,
063:                    12, 12);
064:            public static final FontSizeHints FIXED = new FontSizeHints(12, 12,
065:                    12, 12);
066:
067:            public static final FontSizeHints DEFAULT = SYSTEM;
068:
069:            private final int loResMenuFontSize;
070:            private final int loResControlFontSize;
071:            private final int hiResMenuFontSize;
072:            private final int hiResControlFontSize;
073:
074:            /**
075:             * Constructs <code>FontSizeHints</code> for the specified menu and
076:             * control fonts, both for low and high resolution environments.
077:             */
078:            public FontSizeHints(int loResMenuFontSize,
079:                    int loResControlFontSize, int hiResMenuFontSize,
080:                    int hiResControlFontSize) {
081:                this .loResMenuFontSize = loResMenuFontSize;
082:                this .loResControlFontSize = loResControlFontSize;
083:                this .hiResMenuFontSize = hiResMenuFontSize;
084:                this .hiResControlFontSize = hiResControlFontSize;
085:            }
086:
087:            /**
088:             * Answers the low resolution menu font size.
089:             */
090:            public int loResMenuFontSize() {
091:                return loResMenuFontSize;
092:            }
093:
094:            /**
095:             * Answers the low resolution control font size.
096:             */
097:            public int loResControlFontSize() {
098:                return loResControlFontSize;
099:            }
100:
101:            /**
102:             * Answers the high resolution menu font size.
103:             */
104:            public int hiResMenuFontSize() {
105:                return hiResMenuFontSize;
106:            }
107:
108:            /**
109:             * Answers the high resolution control font size.
110:             */
111:            public int hiResControlFontSize() {
112:                return hiResControlFontSize;
113:            }
114:
115:            /**
116:             * Answers the menu font size.
117:             */
118:            public int menuFontSize() {
119:                return hiResMenuFontSize();
120:            }
121:
122:            /**
123:             * Answers the control font size.
124:             */
125:            public int controlFontSize() {
126:                return hiResControlFontSize();
127:            }
128:
129:            /**
130:             * Answers the delta between system menu font size and our menu font size hint.
131:             */
132:            public float menuFontSizeDelta() {
133:                return menuFontSize() - SYSTEM.menuFontSize();
134:            }
135:
136:            /**
137:             * Answers the delta between system control font size and our control font size hint.
138:             */
139:            public float controlFontSizeDelta() {
140:                return controlFontSize() - SYSTEM.controlFontSize();
141:            }
142:
143:            /**
144:             * Answers the <code>FontSizeHints</code> for the specified name.
145:             */
146:            public static FontSizeHints valueOf(String name) {
147:                if (name.equalsIgnoreCase("LARGE"))
148:                    return LARGE;
149:                else if (name.equalsIgnoreCase("SYSTEM"))
150:                    return SYSTEM;
151:                else if (name.equalsIgnoreCase("MIXED"))
152:                    return MIXED;
153:                else if (name.equalsIgnoreCase("SMALL"))
154:                    return SMALL;
155:                else if (name.equalsIgnoreCase("FIXED"))
156:                    return FIXED;
157:                else
158:                    throw new IllegalArgumentException(
159:                            "Unknown font size hints name: " + name);
160:            }
161:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.