Source Code Cross Referenced for TextAttribute.java in  » Apache-Harmony-Java-SE » java-package » java » awt » font » 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 » java package » java.awt.font 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Licensed to the Apache Software Foundation (ASF) under one or more
003:         *  contributor license agreements.  See the NOTICE file distributed with
004:         *  this work for additional information regarding copyright ownership.
005:         *  The ASF licenses this file to You under the Apache License, Version 2.0
006:         *  (the "License"); you may not use this file except in compliance with
007:         *  the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         *  Unless required by applicable law or agreed to in writing, software
012:         *  distributed under the License is distributed on an "AS IS" BASIS,
013:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         *  See the License for the specific language governing permissions and
015:         *  limitations under the License.
016:         */
017:        /**
018:         * @author Ilya S. Okomin
019:         * @version $Revision$
020:         */package java.awt.font;
021:
022:        import java.io.InvalidObjectException;
023:        import java.text.AttributedCharacterIterator.Attribute;
024:        import java.util.HashMap;
025:        import java.util.Map;
026:
027:        import org.apache.harmony.awt.internal.nls.Messages;
028:
029:        public final class TextAttribute extends Attribute {
030:            private static final long serialVersionUID = 7744112784117861702L;
031:
032:            // set of available text attributes
033:            private static final Map<String, TextAttribute> attrMap = new HashMap<String, TextAttribute>();
034:
035:            protected TextAttribute(String name) {
036:                super (name);
037:                attrMap.put(name, this );
038:            }
039:
040:            @Override
041:            protected Object readResolve() throws InvalidObjectException {
042:                TextAttribute result = attrMap.get(this .getName());
043:                if (result != null) {
044:                    return result;
045:                }
046:                // awt.194=Unknown attribute name
047:                throw new InvalidObjectException(Messages.getString("awt.194")); //$NON-NLS-1$
048:            }
049:
050:            public static final TextAttribute BACKGROUND = new TextAttribute(
051:                    "background"); //$NON-NLS-1$
052:
053:            public static final TextAttribute BIDI_EMBEDDING = new TextAttribute(
054:                    "bidi_embedding"); //$NON-NLS-1$
055:
056:            public static final TextAttribute CHAR_REPLACEMENT = new TextAttribute(
057:                    "char_replacement"); //$NON-NLS-1$
058:
059:            public static final TextAttribute FAMILY = new TextAttribute(
060:                    "family"); //$NON-NLS-1$
061:
062:            public static final TextAttribute FONT = new TextAttribute("font"); //$NON-NLS-1$
063:
064:            public static final TextAttribute FOREGROUND = new TextAttribute(
065:                    "foreground"); //$NON-NLS-1$
066:
067:            public static final TextAttribute INPUT_METHOD_HIGHLIGHT = new TextAttribute(
068:                    "input method highlight"); //$NON-NLS-1$
069:
070:            public static final TextAttribute INPUT_METHOD_UNDERLINE = new TextAttribute(
071:                    "input method underline"); //$NON-NLS-1$
072:
073:            public static final TextAttribute JUSTIFICATION = new TextAttribute(
074:                    "justification"); //$NON-NLS-1$
075:
076:            public static final Float JUSTIFICATION_FULL = new Float(1.0f);
077:
078:            public static final Float JUSTIFICATION_NONE = new Float(0.0f);
079:
080:            public static final TextAttribute NUMERIC_SHAPING = new TextAttribute(
081:                    "numeric_shaping"); //$NON-NLS-1$
082:
083:            public static final TextAttribute POSTURE = new TextAttribute(
084:                    "posture"); //$NON-NLS-1$
085:
086:            public static final Float POSTURE_REGULAR = new Float(0.0f);
087:
088:            public static final Float POSTURE_OBLIQUE = new Float(0.20f);
089:
090:            public static final TextAttribute RUN_DIRECTION = new TextAttribute(
091:                    "run_direction"); //$NON-NLS-1$
092:
093:            public static final Boolean RUN_DIRECTION_LTR = new Boolean(false);
094:
095:            public static final Boolean RUN_DIRECTION_RTL = new Boolean(true);
096:
097:            public static final TextAttribute SIZE = new TextAttribute("size"); //$NON-NLS-1$
098:
099:            public static final TextAttribute STRIKETHROUGH = new TextAttribute(
100:                    "strikethrough"); //$NON-NLS-1$
101:
102:            public static final Boolean STRIKETHROUGH_ON = new Boolean(true);
103:
104:            public static final TextAttribute SUPERSCRIPT = new TextAttribute(
105:                    "superscript"); //$NON-NLS-1$
106:
107:            public static final Integer SUPERSCRIPT_SUB = new Integer(-1);
108:
109:            public static final Integer SUPERSCRIPT_SUPER = new Integer(1);
110:
111:            public static final TextAttribute SWAP_COLORS = new TextAttribute(
112:                    "swap_colors"); //$NON-NLS-1$
113:
114:            public static final Boolean SWAP_COLORS_ON = new Boolean(true);
115:
116:            public static final TextAttribute TRANSFORM = new TextAttribute(
117:                    "transform"); //$NON-NLS-1$
118:
119:            public static final TextAttribute UNDERLINE = new TextAttribute(
120:                    "underline"); //$NON-NLS-1$
121:
122:            public static final Integer UNDERLINE_ON = new Integer(0);
123:
124:            public static final Integer UNDERLINE_LOW_ONE_PIXEL = new Integer(1);
125:
126:            public static final Integer UNDERLINE_LOW_TWO_PIXEL = new Integer(2);
127:
128:            public static final Integer UNDERLINE_LOW_DOTTED = new Integer(3);
129:
130:            public static final Integer UNDERLINE_LOW_GRAY = new Integer(4);
131:
132:            public static final Integer UNDERLINE_LOW_DASHED = new Integer(5);
133:
134:            public static final TextAttribute WEIGHT = new TextAttribute(
135:                    "weight"); //$NON-NLS-1$
136:
137:            public static final Float WEIGHT_EXTRA_LIGHT = new Float(0.5f);
138:
139:            public static final Float WEIGHT_LIGHT = new Float(0.75f);
140:
141:            public static final Float WEIGHT_DEMILIGHT = new Float(0.875f);
142:
143:            public static final Float WEIGHT_REGULAR = new Float(1.0f);
144:
145:            public static final Float WEIGHT_SEMIBOLD = new Float(1.25f);
146:
147:            public static final Float WEIGHT_MEDIUM = new Float(1.5f);
148:
149:            public static final Float WEIGHT_DEMIBOLD = new Float(1.75f);
150:
151:            public static final Float WEIGHT_BOLD = new Float(2.0f);
152:
153:            public static final Float WEIGHT_HEAVY = new Float(2.25f);
154:
155:            public static final Float WEIGHT_EXTRABOLD = new Float(2.5f);
156:
157:            public static final Float WEIGHT_ULTRABOLD = new Float(2.75f);
158:
159:            public static final TextAttribute WIDTH = new TextAttribute("width"); //$NON-NLS-1$
160:
161:            public static final Float WIDTH_CONDENSED = new Float(0.75f);
162:
163:            public static final Float WIDTH_SEMI_CONDENSED = new Float(0.875f);
164:
165:            public static final Float WIDTH_REGULAR = new Float(1.0f);
166:
167:            public static final Float WIDTH_SEMI_EXTENDED = new Float(1.25f);
168:
169:            public static final Float WIDTH_EXTENDED = new Float(1.5f);
170:
171:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.