|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.style.FontDefinition
public class 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
Deprecated. a constant to draw a font in bold style. |
static boolean |
ITALIC
Deprecated. a constant to draw a font in italic style. |
static boolean |
PLAIN
Deprecated. a constant to draw a font in plain style. |
static boolean |
STRIKETHROUGH
Deprecated. a constant to draw a font with strikethrough style. |
static boolean |
UNDERLINE
Deprecated. a constant to draw a font with underline style. |
Constructor Summary | |
---|---|
FontDefinition(Font font)
Deprecated. Creates a font definition base on the given AWT font. |
|
FontDefinition(String fontName,
int fontSize)
Deprecated. Creates a font definition using the given name and size and with no additional style enabled. |
|
FontDefinition(String fontName,
int fontSize,
boolean bold,
boolean italic,
boolean underline,
boolean strikeThrough)
Deprecated. Creates a font definition using the given name and size and with the given styles defined. |
|
FontDefinition(String fontName,
int fontSize,
boolean bold,
boolean italic,
boolean underline,
boolean strikeThrough,
String encoding,
boolean embedded)
Deprecated. Creates a font definition using the given name and size and with the given styles defined. |
Method Summary | |
---|---|
Object |
clone()
Deprecated. Creates and returns a copy of this object. |
boolean |
equals(Object o)
Deprecated. Indicates whether some other object is "equal to" this one. |
Font |
getFont()
Deprecated. returns the AWT-Font defined by this FontDefinition. |
String |
getFontEncoding(String defaultEncoding)
Deprecated. Returns this fonts string encoding. |
String |
getFontName()
Deprecated. Returns the font name of this font definition. |
int |
getFontSize()
Deprecated. Returns the size of the defined font. |
int |
hashCode()
Deprecated. Returns a hash code value for the object. |
boolean |
isBold()
Deprecated. Returns the bold style of this font definition. |
boolean |
isCourier()
Deprecated. Returns true if the logical font name is equivalent to 'Courier', and false otherwise. |
boolean |
isEmbeddedFont()
Deprecated. Returns whether the font should be embedded in the target document. |
boolean |
isItalic()
Deprecated. Returns the italic style of this font definition. |
boolean |
isSansSerif()
Deprecated. Returns true if the logical font name is equivalent to 'SansSerif', and false otherwise. |
boolean |
isSerif()
Deprecated. Returns true if the logical font name is equivalent to 'Serif', and false otherwise. |
boolean |
isStrikeThrough()
Deprecated. Returns the strikethrough style of this font definition. |
boolean |
isUnderline()
Deprecated. Returns the underline style of this font definition. |
String |
toString()
Deprecated. Returns a string representation of this font definition. |
Methods inherited from class java.lang.Object |
---|
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(String fontName, int fontSize, boolean bold, boolean italic, boolean underline, boolean strikeThrough, 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(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 otherwisepublic FontDefinition(String fontName, int fontSize)
fontName
- the font name used in this font definition.fontSize
- the font size for the defined font.public FontDefinition(Font font)
font
- the awt font that should be used as definition source.Method Detail |
---|
public String getFontName()
public int getFontSize()
public boolean isEmbeddedFont()
public boolean isBold()
public boolean isItalic()
public boolean isUnderline()
public boolean isStrikeThrough()
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
- if a error occured during cloning .Cloneable
public Font getFont()
public String getFontEncoding(String defaultEncoding)
defaultEncoding
- the font encoding to be used if this font definition does not define an own encoding.
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
o
- the reference object with which to compare.
true
if this object is the same as the obj argument; false
otherwise.hashCode()
,
Hashtable
public int hashCode()
java.util.Hashtable
.
hashCode
in class Object
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 |