|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.jfimagine.jfgraph.shape.base.AbstractObject
|
+--com.jfimagine.jfgraph.shape.decorate.FontFormat
Font format class. All fonts or curves or circlles should use this class for their fonts format.
| Field Summary | |
static java.lang.String |
FONTNAME_DEFAULT
A default font name |
static int |
FONTSIZE_DEFAULT
A default font size |
static java.lang.String |
XML_FONTCOLOR
A XML string tag represents a font's color |
static java.lang.String |
XML_FONTFORMAT
A XML string tag represents a font format. |
static java.lang.String |
XML_FONTNAME
A XML string tag represents a font's name |
static java.lang.String |
XML_FONTSIZE
A XML string tag represents the font size |
static java.lang.String |
XML_FONTSTYLE
A XML string tag represents the font style |
| Fields inherited from class com.jfimagine.jfgraph.shape.base.AbstractObject |
m_lastError, XML_OBJECTID, XML_OBJECTTYPE |
| Constructor Summary | |
FontFormat()
Constructor for FontFormat |
|
| Method Summary | |
protected void |
appendChildToDOM(Element element,
JFVersion version)
Append necessary xml child for current element, this method will be called internally by toDOM. |
void |
clearFormat()
clear format, then set to default values |
java.lang.Object |
clone()
Creates a new object of the same class and with the same contents as this object. |
protected AbstractObject |
cloneMe()
Creates a new AbstractObject of the same class and with the same contents as this object. |
boolean |
equals(java.lang.Object obj)
Determines whether or not two objects are equal. |
protected void |
extractChildFromDOM(Element element,
JFVersion version)
Extract needed xml child from current element, this method will be called internally by fromDOM. |
static FontFormat |
getDefaultFontFormat()
get global default font format |
java.awt.Font |
getFont()
Get current font object. |
java.awt.Color |
getFontColor()
Get current font color. |
java.lang.String |
getFontName()
Get current font name. |
int |
getFontSize()
Get current font size. |
int |
getFontStyle()
Get current font style. |
java.awt.Font |
getZoomedFont()
Get a zoomed font of current font. |
int |
hashCode()
Returns the hashcode for this Object. |
void |
initFont()
Initialize the font object. |
boolean |
isBold()
Indicates whether or not this Font object's style is BOLD. |
boolean |
isBoldItalic()
Indicates whether or not this Font object's style is both BOLD and ITALIC. |
boolean |
isItalic()
Indicates whether or not this Font object's style is ITALIC. |
boolean |
isPlain()
Indicates whether or not this Font object's style is PLAIN. |
void |
loadFromStream(JFReader stream,
boolean skipHead,
JFVersion version)
Load object data from a binary stream |
void |
saveToStream(JFWriter stream,
JFVersion version)
Save this object to a binary stream |
static void |
setDefaultFontFormat(FontFormat fontFormat)
set global default font format |
void |
setFont(java.awt.Font fontObj)
Set current font object. |
void |
setFontColor(java.awt.Color fontColor)
Set current font color. |
void |
setFontName(java.lang.String fontName)
Set current font name. |
void |
setFontSize(int fontSize)
Set current font size. |
void |
setFontStyle(int fontStyle)
Set current font style. |
void |
setValue(FontFormat fontFormat)
Set current font object. |
java.lang.String |
toString()
Convert this object to String |
| Methods inherited from class com.jfimagine.jfgraph.shape.base.AbstractObject |
fromDOM, getLastError, getMaxObjectId, getObjectId, getObjectType, getXMLTag, getZoomScale, isShowDesign, setLastError, setObjectId, setObjectType, setShowDesign, setValue, setXMLTag, setZoomScale, toDOM |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String XML_FONTFORMAT
public static final java.lang.String XML_FONTSTYLE
public static final java.lang.String XML_FONTSIZE
public static final java.lang.String XML_FONTNAME
public static final java.lang.String XML_FONTCOLOR
public static final java.lang.String FONTNAME_DEFAULT
public static final int FONTSIZE_DEFAULT
| Constructor Detail |
public FontFormat()
| Method Detail |
public static void setDefaultFontFormat(FontFormat fontFormat)
fontFormat - A new font formatpublic static FontFormat getDefaultFontFormat()
public void clearFormat()
public int getFontStyle()
public void setFontStyle(int fontStyle)
fontStyle - A new font style.public int getFontSize()
public void setFontSize(int fontSize)
fontSize - A new font size.public java.lang.String getFontName()
public void setFontName(java.lang.String fontName)
fontName - A new font name.public java.awt.Color getFontColor()
public void setFontColor(java.awt.Color fontColor)
fontColor - A new font color.public java.awt.Font getFont()
public java.awt.Font getZoomedFont()
public boolean isPlain()
public boolean isBold()
public boolean isItalic()
public boolean isBoldItalic()
public void setFont(java.awt.Font fontObj)
fontObj - A new font object.public void setValue(FontFormat fontFormat)
fontFormat - a new font format object.public void initFont()
public java.lang.String toString()
toString in class AbstractObject
protected AbstractObject cloneMe()
throws java.lang.CloneNotSupportedException
cloneMe in class AbstractObjectjava.lang.CloneNotSupportedException
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class AbstractObjectjava.lang.CloneNotSupportedExceptionpublic int hashCode()
hashCode in class AbstractObjectpublic boolean equals(java.lang.Object obj)
equals in class AbstractObjectobj - an object to be compared with this object
protected void appendChildToDOM(Element element,
JFVersion version)
appendChildToDOM in class AbstractObjectelement - A XML element to append child xml nodesversion - A file version notification so this object can obey the rules to save data.
protected void extractChildFromDOM(Element element,
JFVersion version)
extractChildFromDOM in class AbstractObjectelement - An element used to extract needed xml childversion - A file version notification so this object can obey the rules to fetch data.
public void saveToStream(JFWriter stream,
JFVersion version)
throws java.io.IOException
saveToStream in class AbstractObjectstream - An binary output streamversion - A file version notification so this object can obey the rules to save data.
java.io.IOException
public void loadFromStream(JFReader stream,
boolean skipHead,
JFVersion version)
throws java.io.IOException
loadFromStream in class AbstractObjectstream - An binary input streamskipHead - Skip head 'TYPE' check, an shape object should always
has its own shape-type stored, if this shape-type has already been readed,
this loadFromStream should/could not read the type anymore.version - A file version notification so this object can obey the rules to fetch data.
java.io.IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||