Java Doc for Font.java in  » 6.0-JDK-Modules » j2me » java » awt » 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 » 6.0 JDK Modules » j2me » java.awt 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.awt.Font

All known Subclasses:   sun.awt.qt.QtFont,
Font
public class Font implements java.io.Serializable(Code)
A class that produces font objects.
version:
   1.6, 08/19/02
author:
   Nicholas Allen
since:
   JDK1.0


Field Summary
final public static  intBOLD
     The bold style constant.
final public static  intITALIC
     The italicized style constant.
final public static  intPLAIN
     The plain style constant.
protected  Stringname
     The logical name of this font.
protected  intsize
     The point size of this font.
protected  intstyle
     The style of the font.

Constructor Summary
public  Font(String name, int style, int size)
     Creates a new font with the specified name, style and point size.

Method Summary
public static  Fontdecode(String str)
     Gets the specified font using the name passed in.
public  booleanequals(Object obj)
     Compares this object to the specifed object. The result is true if and only if the argument is not null and is a Font object with the same name, style, and point size as this font.
Parameters:
  obj - the object to compare this font with.
public  StringgetFamily()
     Gets the platform specific family name of the font.
public static  FontgetFont(String nm)
     Gets a font from the system properties list.
public static  FontgetFont(String nm, Font font)
     Gets the specified font from the system properties list. The first argument is treated as the name of a system property to be obtained as if by the method System.getProperty. The string value of this property is then interpreted as a font.

The property value should be one of the following forms:

  • fontname-style-pointsize
  • fontname-pointsize
  • fontname-style
  • fontname
where style is one of the three strings "BOLD", "BOLDITALIC", or "ITALIC", and point size is a decimal representation of the point size.

The default style is PLAIN.

public  StringgetName()
     Gets the logical name of the font.
public  intgetSize()
     Gets the point size of the font.
public  intgetStyle()
     Gets the style of the font.
 X11FontMetricsgetX11FontMetrics()
    
public  inthashCode()
     Returns a hashcode for this font.
public  booleanisBold()
     Indicates whether the font's style is bold.
public  booleanisItalic()
     Indicates whether the font's style is italic.
public  booleanisPlain()
     Indicates whether the font's style is plain.
public  StringtoString()
     Converts this object to a String representation.

Field Detail
BOLD
final public static int BOLD(Code)
The bold style constant. This style can be combined with the other style constants for mixed styles.
since:
   JDK1.0



ITALIC
final public static int ITALIC(Code)
The italicized style constant. This style can be combined with the other style constants for mixed styles.
since:
   JDK1.0



PLAIN
final public static int PLAIN(Code)
The plain style constant. This style can be combined with the other style constants for mixed styles.
since:
   JDK1.0



name
protected String name(Code)
The logical name of this font.
since:
   JDK1.0



size
protected int size(Code)
The point size of this font.
since:
   JDK1.0



style
protected int style(Code)
The style of the font. This is the sum of the constants PLAIN, BOLD, or ITALIC.




Constructor Detail
Font
public Font(String name, int style, int size)(Code)
Creates a new font with the specified name, style and point size.
Parameters:
  name - the font name
Parameters:
  style - the constant style used
Parameters:
  size - the point size of the font
See Also:   Toolkit.getFontList
since:
   JDK1.0




Method Detail
decode
public static Font decode(String str)(Code)
Gets the specified font using the name passed in.
Parameters:
  str - the name
since:
   JDK1.1



equals
public boolean equals(Object obj)(Code)
Compares this object to the specifed object. The result is true if and only if the argument is not null and is a Font object with the same name, style, and point size as this font.
Parameters:
  obj - the object to compare this font with. true if the objects are equal;false otherwise.
since:
   JDK1.0



getFamily
public String getFamily()(Code)
Gets the platform specific family name of the font. Use the getName method to get the logical name of the font. a string, the platform specific family name.
See Also:   java.awt.Font.getName
since:
   JDK1.0



getFont
public static Font getFont(String nm)(Code)
Gets a font from the system properties list.
Parameters:
  nm - the property name
See Also:   java.awt.Font.getFont(java.lang.Stringjava.awt.Font)
since:
   JDK1.0



getFont
public static Font getFont(String nm, Font font)(Code)
Gets the specified font from the system properties list. The first argument is treated as the name of a system property to be obtained as if by the method System.getProperty. The string value of this property is then interpreted as a font.

The property value should be one of the following forms:

  • fontname-style-pointsize
  • fontname-pointsize
  • fontname-style
  • fontname
where style is one of the three strings "BOLD", "BOLDITALIC", or "ITALIC", and point size is a decimal representation of the point size.

The default style is PLAIN. The default point size is 12.

If the specified property is not found, the font argument is returned instead.
Parameters:
  nm - the property name
Parameters:
  font - a default font to return if property nmis not defined the Font value of the property.
since:
   JDK1.0




getName
public String getName()(Code)
Gets the logical name of the font. a string, the logical name of the font.
See Also:   Font.getFamily
since:
   JDK1.0



getSize
public int getSize()(Code)
Gets the point size of the font. the point size of this font.
since:
   JDK1.0



getStyle
public int getStyle()(Code)
Gets the style of the font. the style of this font.
See Also:   Font.isPlain
See Also:   Font.isBold
See Also:   Font.isItalic
since:
   JDK1.0



getX11FontMetrics
X11FontMetrics getX11FontMetrics()(Code)



hashCode
public int hashCode()(Code)
Returns a hashcode for this font. a hashcode value for this font.
since:
   JDK1.0



isBold
public boolean isBold()(Code)
Indicates whether the font's style is bold. true if the font is bold;false otherwise.
See Also:   java.awt.Font.getStyle
since:
   JDK1.0



isItalic
public boolean isItalic()(Code)
Indicates whether the font's style is italic. true if the font is italic;false otherwise.
See Also:   java.awt.Font.getStyle
since:
   JDK1.0



isPlain
public boolean isPlain()(Code)
Indicates whether the font's style is plain. true if the font is neitherbold nor italic; false otherwise.
See Also:   java.awt.Font.getStyle
since:
   JDK1.0



toString
public String toString()(Code)
Converts this object to a String representation. a string representation of this object
since:
   JDK1.0



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.