![]() |
||
Home Products Purchase Downloads Demos Forums Blogs Ticket Wiki API Corporate |
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.cells.Font
public final class Font
Represents a font used in a spreadsheet.
Field Summary | |
---|---|
static int |
ESCAPEMENT_NONE
Represents no escapement. |
static int |
ESCAPEMENT_SUBSCRIPT
Represents subscript escapement. |
static int |
ESCAPEMENT_SUPERSCRIPT
Represents superscript escapement. |
static int |
FAMILY_DECORATIVE
Represents the decorative font faminly. |
static int |
FAMILY_MODERN
Represents the modern font family. |
static int |
FAMILY_NONE
Represents no font family is specified. |
static int |
FAMILY_ROMAN
Represents the roman font family. |
static int |
FAMILY_SCRIPT
Represents the script font family. |
static int |
FAMILY_SWISS
Represents the swiss font family. |
static int |
UNDERLINE_DOUBLE
Represents double underline. |
static int |
UNDERLINE_DOUBLE_ACCOUNTING
Represents double accounting underline. |
static int |
UNDERLINE_NONE
Represents no underline. |
static int |
UNDERLINE_SINGLE
Represents single underline. |
static int |
UNDERLINE_SINGLE_ACCOUNTING
Represents single accounting underline. |
Constructor Summary | |
---|---|
Font()
Initializes a new instance of the Font class. |
|
Font(Font font)
Initializes a new instance of the Font class that copies the specified font. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Creates and returns a copy of this object. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
Color |
getColor()
Gets the font color. |
int |
getEscapement()
Gets the escapement type. |
int |
getFamily()
Gets the font family. |
java.lang.String |
getName()
Gets the font name. |
int |
getSize()
Gets the font size in points. |
int |
getUnderline()
Gets the underline type. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isBold()
Checks if the font is bold. |
boolean |
isItalic()
Checks if the font is italic. |
boolean |
isStruckOut()
Checks if the strikeout horizontal line is used. |
void |
setBold(boolean bold)
Sets the font whether to be bold or not. |
void |
setColor(Color color)
Sets the font color. |
void |
setEscapement(int escapement)
Sets the escapement type. |
protected void |
setFamily(int family)
|
void |
setItalic(boolean italic)
Sets whether the font to be italic or not. |
void |
setName(java.lang.String name)
Sets the font name. |
void |
setSize(int size)
Sets the font size. |
void |
setStrikeOut(boolean strikeOut)
Sets the strikeout horizontal line to be used or not. |
void |
setUnderline(int underline)
Sets the underline type. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ESCAPEMENT_NONE
public static final int ESCAPEMENT_SUPERSCRIPT
public static final int ESCAPEMENT_SUBSCRIPT
public static final int UNDERLINE_NONE
public static final int UNDERLINE_SINGLE
public static final int UNDERLINE_DOUBLE
public static final int UNDERLINE_SINGLE_ACCOUNTING
public static final int UNDERLINE_DOUBLE_ACCOUNTING
public static final int FAMILY_NONE
public static final int FAMILY_ROMAN
public static final int FAMILY_SWISS
public static final int FAMILY_MODERN
public static final int FAMILY_SCRIPT
public static final int FAMILY_DECORATIVE
Constructor Detail |
---|
public Font()
public Font(Font font)
font
- the font reference to copy from.
java.lang.IllegalArgumentException
- if the font parameter is null.Method Detail |
---|
public java.lang.Object clone()
clone
in class java.lang.Object
Object.clone().
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.clone().
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode().
public boolean isBold()
public boolean isItalic()
public final boolean isStruckOut()
public final Color getColor()
public final int getEscapement()
Font.ESCAPEMENT_NONE |
Font.ESCAPEMENT_SUPERSCRIPT |
Font.ESCAPEMENT_SUBSCRIPT |
public final int getFamily()
Font.FAMILY_NONE |
Font.FAMILY_ROMAN |
Font.FAMILY_SWISS |
Font.FAMILY_MODERN |
Font.FAMILY_SCRIPT |
Font.FAMILY_DECORATIVE |
public final java.lang.String getName()
public final int getSize()
public final int getUnderline()
Font.UNDERLINE_NONE |
Font.UNDERLINE_SINGLE |
Font.UNDERLINE_DOUBLE |
Font.UNDERLINE_SINGLE_ACCOUNTING |
Font.UNDERLINE_DOUBLE_ACCOUNTING |
public final void setBold(boolean bold)
bold
- true for bold.public void setColor(Color color)
color
- the font color.public void setEscapement(int escapement)
escapement
- the escapement type. It could be one of the following values:
Font.ESCAPEMENT_NONE |
Font.ESCAPEMENT_SUPERSCRIPT |
Font.ESCAPEMENT_SUBSCRIPT |
public void setItalic(boolean italic)
italic
- true for italic.public void setName(java.lang.String name)
name
- name of the font.
java.lang.IllegalArgumentException
- if the name is null or empty.public void setSize(int size)
size
- font size(1-409).
java.lang.IllegalArgumentException
- if the font size is invalid.public void setStrikeOut(boolean strikeOut)
strikeOut
- true to use the strikeout horizontal line.public void setUnderline(int underline)
underline
- the underline type. It could be one of the following values:
Font.UNDERLINE_NONE |
Font.UNDERLINE_SINGLE |
Font.UNDERLINE_DOUBLE |
Font.UNDERLINE_SINGLE_ACCOUNTING |
Font.UNDERLINE_DOUBLE_ACCOUNTING |
protected void setFamily(int family)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |