|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.odftoolkit.simple.style.Font
public class Font
This class represents the font style settings, including font family name, font style, size, front color.
Constructor Summary | |
---|---|
Font(String fontFamilyName,
StyleTypeDefinitions.FontStyle simpleFontStyle,
double fontSize)
Create a font with specific family name, font style, and size. |
|
Font(String fontFamilyName,
StyleTypeDefinitions.FontStyle simpleFontStyle,
double fontSize,
Color color)
Create a font with specific family name, style, size, and front color. |
|
Font(String fontFamilyName,
StyleTypeDefinitions.FontStyle simpleFontStyle,
double fontSize,
Color color,
Locale language)
Create a font with specific family name, style, size, and color for a specific character. |
|
Font(String fontFamilyName,
StyleTypeDefinitions.FontStyle simpleFontStyle,
double fontSize,
Color color,
StyleTypeDefinitions.TextLinePosition textLinePosition)
Create a font with specific family name, style, size, front color and line position |
|
Font(String fontFamilyName,
StyleTypeDefinitions.FontStyle simpleFontStyle,
double fontSize,
Color color,
StyleTypeDefinitions.TextLinePosition textLinePosition,
Locale language)
Create a font with specific family name, style, size, color, and line position for a specific character. |
|
Font(String fontFamilyName,
StyleTypeDefinitions.FontStyle simpleFontStyle,
double fontSize,
Locale language)
Create a font with specific family name, style, size for a specific character. |
|
Font(String fontFamilyName,
StyleTypeDefinitions.FontStyle simpleFontStyle,
double fontSize,
StyleTypeDefinitions.TextLinePosition textLinePosition)
Create a font with specific family name, font style, size and line position. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
Color |
getColor()
Return the font color |
String |
getFamilyName()
Return the font family |
protected String |
getFontName()
Return the font name |
StyleTypeDefinitions.FontStyle |
getFontStyle()
Get the font style |
double |
getSize()
Return the font size in measurement point(PT). |
StyleTypeDefinitions.TextLinePosition |
getTextLinePosition()
Get the font text line position |
void |
setColor(Color color)
Set the font color |
void |
setFamilyName(String familyName)
Set the font family. |
protected void |
setFontName(String fontName)
Set the font name |
void |
setFontStyle(StyleTypeDefinitions.FontStyle simpleFontStyle)
Set the font style |
void |
setSize(double size)
Set the font size. |
void |
setTextLinePosition(StyleTypeDefinitions.TextLinePosition textLinePosition)
Set the font text line position |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Font(String fontFamilyName, StyleTypeDefinitions.FontStyle simpleFontStyle, double fontSize)
fontFamilyName
- - the family namesimpleFontStyle
- - the font stylefontSize
- - the sizepublic Font(String fontFamilyName, StyleTypeDefinitions.FontStyle simpleFontStyle, double fontSize, StyleTypeDefinitions.TextLinePosition textLinePosition)
fontFamilyName
- - the family namesimpleFontStyle
- - the font stylefontSize
- - the sizetextLinePosition
- - the line positionpublic Font(String fontFamilyName, StyleTypeDefinitions.FontStyle simpleFontStyle, double fontSize, Color color)
fontFamilyName
- - the family namesimpleFontStyle
- - the font stylefontSize
- - the sizecolor
- - the front colorpublic Font(String fontFamilyName, StyleTypeDefinitions.FontStyle simpleFontStyle, double fontSize, Color color, StyleTypeDefinitions.TextLinePosition textLinePosition)
fontFamilyName
- - the family namesimpleFontStyle
- - the font stylefontSize
- - the sizecolor
- - the front colortextLinePosition
- - the line positionpublic Font(String fontFamilyName, StyleTypeDefinitions.FontStyle simpleFontStyle, double fontSize, Locale language)
fontFamilyName
- - the family namesimpleFontStyle
- - the font stylefontSize
- - the font sizelanguage
- - the character informationpublic Font(String fontFamilyName, StyleTypeDefinitions.FontStyle simpleFontStyle, double fontSize, Color color, Locale language)
fontFamilyName
- - the family namesimpleFontStyle
- - the font stylefontSize
- - the sizecolor
- - the front colorlanguage
- - the character informationpublic Font(String fontFamilyName, StyleTypeDefinitions.FontStyle simpleFontStyle, double fontSize, Color color, StyleTypeDefinitions.TextLinePosition textLinePosition, Locale language)
fontFamilyName
- - the family namesimpleFontStyle
- - the font stylefontSize
- - the sizecolor
- - the front colortextLinePosition
- - the line positionlanguage
- - the character informationMethod Detail |
---|
public String getFamilyName()
public void setFamilyName(String familyName)
Font family name is what you get from the font list in ODF editors.
familyName
- - the font family nameprotected String getFontName()
Note the font name might be different from font family name. A font family may have different font name definitions.
protected void setFontName(String fontName)
Note the font name might be different from font family name. A font family may have different font name definitions.
fontName
- - the font namepublic StyleTypeDefinitions.FontStyle getFontStyle()
public void setFontStyle(StyleTypeDefinitions.FontStyle simpleFontStyle)
simpleFontStyle
- - the font stylepublic StyleTypeDefinitions.TextLinePosition getTextLinePosition()
public void setTextLinePosition(StyleTypeDefinitions.TextLinePosition textLinePosition)
textLinePosition
- - the font text line positionpublic double getSize()
public void setSize(double size)
size
- - the font sizepublic Color getColor()
public void setColor(Color color)
color
- - the font colorpublic String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |