|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jfree.report.style.FontDefinition
The FontDefinition encapsulates all Font-Style information. The java.awt.Font class does not support extended Styles like Strikethrough or Underline or font metadata like the base encoding.
| Field Summary | |
static boolean |
BOLD
a constant to draw a font in bold style. |
static boolean |
ITALIC
a constant to draw a font in italic style. |
static boolean |
PLAIN
a constant to draw a font in plain style. |
static boolean |
STRIKETHROUGH
a constant to draw a font with strikethrough style. |
static boolean |
UNDERLINE
a constant to draw a font with underline style. |
| Constructor Summary | |
FontDefinition(java.awt.Font font)
Creates a font definition base on the given AWT font. |
|
FontDefinition(java.lang.String fontName,
int fontSize)
Creates a font definition using the given name and size and with no additional style enabled. |
|
FontDefinition(java.lang.String fontName,
int fontSize,
boolean bold,
boolean italic,
boolean underline,
boolean strikeThrough)
Creates a font definition using the given name and size and with the given styles defined. |
|
FontDefinition(java.lang.String fontName,
int fontSize,
boolean bold,
boolean italic,
boolean underline,
boolean strikeThrough,
java.lang.String encoding,
boolean embedded)
Creates a font definition using the given name and size and with the given styles defined. |
|
| Method Summary | |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one. |
java.awt.Font |
getFont()
returns the AWT-Font defined by this FontDefinition. |
java.lang.String |
getFontEncoding(java.lang.String defaultEncoding)
Returns this fonts string encoding. |
java.lang.String |
getFontName()
Returns the font name of this font definition. |
int |
getFontSize()
Returns the size of the defined font. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isBold()
Returns the bold style of this font definition. |
boolean |
isCourier()
Returns true if the logical font name is equivalent to 'Courier', and false otherwise. |
boolean |
isEmbeddedFont()
Returns whether the font should be embedded in the target document. |
boolean |
isItalic()
Returns the italic style of this font definition. |
boolean |
isSansSerif()
Returns true if the logical font name is equivalent to 'SansSerif', and false otherwise. |
boolean |
isSerif()
Returns true if the logical font name is equivalent to 'Serif', and false otherwise. |
boolean |
isStrikeThrough()
Returns the strikethrough style of this font definition. |
boolean |
isUnderline()
Returns the underline style of this font definition. |
java.lang.String |
toString()
Returns a string representation of this font definition. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final boolean BOLD
public static final boolean ITALIC
public static final boolean UNDERLINE
public static final boolean STRIKETHROUGH
public static final boolean PLAIN
| Constructor Detail |
public FontDefinition(java.lang.String fontName,
int fontSize,
boolean bold,
boolean italic,
boolean underline,
boolean strikeThrough,
java.lang.String encoding,
boolean embedded)
fontName - the font name used in this font definition.fontSize - the font size for the defined font.bold - true, if the font should be bold, false otherwiseitalic - true, if the font should be italic, false otherwiseunderline - true, if the font should be drawn with underline style, false otherwisestrikeThrough - true, if the font should be drawn with strikethrough style,
false otherwiseencoding - the default text encoding that should be used with this font.embedded - whether this font should be embedded in the target document.
public FontDefinition(java.lang.String fontName,
int fontSize,
boolean bold,
boolean italic,
boolean underline,
boolean strikeThrough)
fontName - the font name used in this font definition.fontSize - the font size for the defined font.bold - true, if the font should be bold, false otherwiseitalic - true, if the font should be italic, false otherwiseunderline - true, if the font should be drawn with underline style, false otherwisestrikeThrough - true, if the font should be drawn with strikethrough style,
false otherwise
public FontDefinition(java.lang.String fontName,
int fontSize)
fontName - the font name used in this font definition.fontSize - the font size for the defined font.public FontDefinition(java.awt.Font font)
font - the awt font that should be used as definition source.| Method Detail |
public java.lang.String getFontName()
public int getFontSize()
public boolean isEmbeddedFont()
public boolean isBold()
public boolean isItalic()
public boolean isUnderline()
public boolean isStrikeThrough()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException - if a error occured during cloning .Cloneablepublic java.awt.Font getFont()
public java.lang.String getFontEncoding(java.lang.String defaultEncoding)
defaultEncoding - the font encoding to be used if this font definition
does not define an own encoding.
public java.lang.String toString()
public boolean equals(java.lang.Object o)
o - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwise.hashCode(),
Hashtablepublic int hashCode()
java.util.Hashtable.
Object.equals(java.lang.Object)public boolean isSansSerif()
public boolean isCourier()
public boolean isSerif()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||