Java Doc for Font.java in  » PDF » pdf-itext » com » lowagie » text » 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 » PDF » pdf itext » com.lowagie.text 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.lowagie.text.Font

All known Subclasses:   com.lowagie.text.rtf.style.RtfFont,  com.lowagie.text.rtf.RtfFont,
Font
public class Font implements Comparable(Code)
Contains all the specifications of a font: fontfamily, size, style and color.

Example:

 Paragraph p = new Paragraph("This is a paragraph", new
 Font(Font.HELVETICA, 18, Font.BOLDITALIC, new Color(0, 0, 255)) );
 


Field Summary
final public static  intBOLD
     this is a possible style.
final public static  intBOLDITALIC
     this is a possible style.
final public static  intCOURIER
     a possible value of a font family.
final public static  intDEFAULTSIZE
     the value of the default size.
final public static  intHELVETICA
     a possible value of a font family.
final public static  intITALIC
     this is a possible style.
final public static  intNORMAL
     this is a possible style.
final public static  intSTRIKETHRU
     this is a possible style.
final public static  intSYMBOL
     a possible value of a font family.
final public static  intTIMES_ROMAN
     a possible value of a font family.
final public static  intUNDEFINED
     the value of an undefined attribute.
final public static  intUNDERLINE
     this is a possible style.
final public static  intZAPFDINGBATS
     a possible value of a font family.

Constructor Summary
public  Font(Font other)
    
public  Font(int family, float size, int style, Color color)
     Constructs a Font.
public  Font(BaseFont bf, float size, int style, Color color)
     Constructs a Font.
public  Font(BaseFont bf, float size, int style)
     Constructs a Font.
public  Font(BaseFont bf, float size)
     Constructs a Font.
public  Font(BaseFont bf)
     Constructs a Font.
public  Font(int family, float size, int style)
     Constructs a Font.
public  Font(int family, float size)
     Constructs a Font.
public  Font(int family)
     Constructs a Font.
public  Font()
     Constructs a Font.

Method Summary
public  Colorcolor()
     Gets the color of this font.
public  intcompareTo(Object object)
    
public  Fontdifference(Font font)
     Replaces the attributes that are equal to null with the attributes of a given font.
public  intfamily()
     Gets the family of this font.
public  BaseFontgetBaseFont()
     Gets the BaseFont inside this object.
public  BaseFontgetCalculatedBaseFont(boolean specialEncoding)
     Gets the BaseFont this class represents.
public  floatgetCalculatedLeading(float linespacing)
     Gets the leading that can be used with this font.
public  floatgetCalculatedSize()
     Gets the size that can be used with the calculated BaseFont .
public  intgetCalculatedStyle()
     Gets the style that can be used with the calculated BaseFont .
public  ColorgetColor()
     Gets the color of this font.
public  intgetFamily()
     Gets the family of this font.
public static  intgetFamilyIndex(String family)
     Translates a String -value of a certain family into the index that is used for this family in this class.
public  StringgetFamilyname()
     Gets the familyname as a String.
public  floatgetSize()
     Gets the size of this font.
public  intgetStyle()
     Gets the style of this font.
public static  intgetStyleValue(String style)
     Translates a String -value of a certain style into the index value is used for this style in this class.
public  booleanisBold()
     checks if this font is Bold.
public  booleanisItalic()
     checks if this font is Bold.
public  booleanisStandardFont()
     Checks if the properties of this font are undefined or null.
public  booleanisStrikethru()
     checks if the style of this font is STRIKETHRU.
public  booleanisUnderlined()
     checks if this font is underlined.
public  floatleading(float linespacing)
     Gets the leading that can be used with this font.
public  voidsetColor(Color color)
     Sets the color.
public  voidsetColor(int red, int green, int blue)
     Sets the color.
public  voidsetFamily(String family)
     Sets the family using a String ("Courier", "Helvetica", "Times New Roman", "Symbol" or "ZapfDingbats").
public  voidsetSize(float size)
     Sets the size.
public  voidsetStyle(int style)
     Sets the style.
public  voidsetStyle(String style)
     Sets the style using a String containing one of more of the following values: normal, bold, italic, underline, strike.
public  floatsize()
     Gets the size of this font.
public  intstyle()
     Gets the style of this font.

Field Detail
BOLD
final public static int BOLD(Code)
this is a possible style.



BOLDITALIC
final public static int BOLDITALIC(Code)
this is a possible style.



COURIER
final public static int COURIER(Code)
a possible value of a font family.



DEFAULTSIZE
final public static int DEFAULTSIZE(Code)
the value of the default size.



HELVETICA
final public static int HELVETICA(Code)
a possible value of a font family.



ITALIC
final public static int ITALIC(Code)
this is a possible style.



NORMAL
final public static int NORMAL(Code)
this is a possible style.



STRIKETHRU
final public static int STRIKETHRU(Code)
this is a possible style.



SYMBOL
final public static int SYMBOL(Code)
a possible value of a font family.



TIMES_ROMAN
final public static int TIMES_ROMAN(Code)
a possible value of a font family.



UNDEFINED
final public static int UNDEFINED(Code)
the value of an undefined attribute.



UNDERLINE
final public static int UNDERLINE(Code)
this is a possible style.



ZAPFDINGBATS
final public static int ZAPFDINGBATS(Code)
a possible value of a font family.




Constructor Detail
Font
public Font(Font other)(Code)
Copy constructor of a Font
Parameters:
  other - the font that has to be copied



Font
public Font(int family, float size, int style, Color color)(Code)
Constructs a Font.
Parameters:
  family - the family to which this font belongs
Parameters:
  size - the size of this font
Parameters:
  style - the style of this font
Parameters:
  color - the Color of this font.



Font
public Font(BaseFont bf, float size, int style, Color color)(Code)
Constructs a Font.
Parameters:
  bf - the external font
Parameters:
  size - the size of this font
Parameters:
  style - the style of this font
Parameters:
  color - the Color of this font.



Font
public Font(BaseFont bf, float size, int style)(Code)
Constructs a Font.
Parameters:
  bf - the external font
Parameters:
  size - the size of this font
Parameters:
  style - the style of this font



Font
public Font(BaseFont bf, float size)(Code)
Constructs a Font.
Parameters:
  bf - the external font
Parameters:
  size - the size of this font



Font
public Font(BaseFont bf)(Code)
Constructs a Font.
Parameters:
  bf - the external font



Font
public Font(int family, float size, int style)(Code)
Constructs a Font.
Parameters:
  family - the family to which this font belongs
Parameters:
  size - the size of this font
Parameters:
  style - the style of this font



Font
public Font(int family, float size)(Code)
Constructs a Font.
Parameters:
  family - the family to which this font belongs
Parameters:
  size - the size of this font



Font
public Font(int family)(Code)
Constructs a Font.
Parameters:
  family - the family to which this font belongs



Font
public Font()(Code)
Constructs a Font.




Method Detail
color
public Color color()(Code)
Gets the color of this font. a colorFont.getColor()



compareTo
public int compareTo(Object object)(Code)
Compares this Font with another
Parameters:
  object - the other Font a value



difference
public Font difference(Font font)(Code)
Replaces the attributes that are equal to null with the attributes of a given font.
Parameters:
  font - the font of a bigger element class a Font



family
public int family()(Code)
Gets the family of this font. the value of the familyFont.getFamily()



getBaseFont
public BaseFont getBaseFont()(Code)
Gets the BaseFont inside this object. the BaseFont



getCalculatedBaseFont
public BaseFont getCalculatedBaseFont(boolean specialEncoding)(Code)
Gets the BaseFont this class represents. For the built-in fonts a BaseFont is calculated.
Parameters:
  specialEncoding - true to use the special encoding for Symbol andZapfDingbats, false to always use Cp1252 the BaseFont this class represents



getCalculatedLeading
public float getCalculatedLeading(float linespacing)(Code)
Gets the leading that can be used with this font.
Parameters:
  linespacing - a certain linespacing the height of a line



getCalculatedSize
public float getCalculatedSize()(Code)
Gets the size that can be used with the calculated BaseFont . the size that can be used with the calculated BaseFont



getCalculatedStyle
public int getCalculatedStyle()(Code)
Gets the style that can be used with the calculated BaseFont . the style that can be used with the calculated BaseFont



getColor
public Color getColor()(Code)
Gets the color of this font. a color



getFamily
public int getFamily()(Code)
Gets the family of this font. the value of the family



getFamilyIndex
public static int getFamilyIndex(String family)(Code)
Translates a String -value of a certain family into the index that is used for this family in this class.
Parameters:
  family - A String representing a certain font-family the corresponding index



getFamilyname
public String getFamilyname()(Code)
Gets the familyname as a String. the familyname



getSize
public float getSize()(Code)
Gets the size of this font. a size



getStyle
public int getStyle()(Code)
Gets the style of this font. a size



getStyleValue
public static int getStyleValue(String style)(Code)
Translates a String -value of a certain style into the index value is used for this style in this class.
Parameters:
  style - A String the corresponding value



isBold
public boolean isBold()(Code)
checks if this font is Bold. a boolean



isItalic
public boolean isItalic()(Code)
checks if this font is Bold. a boolean



isStandardFont
public boolean isStandardFont()(Code)
Checks if the properties of this font are undefined or null.

If so, the standard should be used. a boolean




isStrikethru
public boolean isStrikethru()(Code)
checks if the style of this font is STRIKETHRU. a boolean



isUnderlined
public boolean isUnderlined()(Code)
checks if this font is underlined. a boolean



leading
public float leading(float linespacing)(Code)
Gets the leading that can be used with this font.
Parameters:
  linespacing - a certain linespacing the height of a lineFont.getCalculatedLeading(float)



setColor
public void setColor(Color color)(Code)
Sets the color.
Parameters:
  color - the new color of the font



setColor
public void setColor(int red, int green, int blue)(Code)
Sets the color.
Parameters:
  red - the red-value of the new color
Parameters:
  green - the green-value of the new color
Parameters:
  blue - the blue-value of the new color



setFamily
public void setFamily(String family)(Code)
Sets the family using a String ("Courier", "Helvetica", "Times New Roman", "Symbol" or "ZapfDingbats").
Parameters:
  family - A String representing a certain font-family.



setSize
public void setSize(float size)(Code)
Sets the size.
Parameters:
  size - The new size of the font.



setStyle
public void setStyle(int style)(Code)
Sets the style.
Parameters:
  style - the style.



setStyle
public void setStyle(String style)(Code)
Sets the style using a String containing one of more of the following values: normal, bold, italic, underline, strike.
Parameters:
  style - A String representing a certain style.



size
public float size()(Code)
Gets the size of this font. a sizeFont.getSize()



style
public int style()(Code)
Gets the style of this font. a sizeFont.getStyle()



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(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.