|
|||||||||||
| 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.LineFormat
Line format class. All lines or curves or circlles should use this class for their lines format.
| Field Summary | |
static int |
LINESTYLE_DASH
A const value represent DASH line style. |
static int |
LINESTYLE_DASHDOT
A const value represent DASH DOT line style. |
static int |
LINESTYLE_DASHDOTDOT
A const value represent DASH DOT DOT line style. |
static int |
LINESTYLE_DOT
A const value represent DOT line style. |
static int |
LINESTYLE_SOLID
A const value represent SOLID line style. |
static java.lang.String |
XML_LINECOLOR
A XML string tag represents a line's color |
static java.lang.String |
XML_LINEFORMAT
A XML string tag represents a line format. |
static java.lang.String |
XML_LINESTYLE
A XML string tag represents the line style |
static java.lang.String |
XML_LINEWIDTH
A XML string tag represents a line's width |
| Fields inherited from class com.jfimagine.jfgraph.shape.base.AbstractObject |
m_lastError, XML_OBJECTID, XML_OBJECTTYPE |
| Constructor Summary | |
LineFormat()
Constructor for LineFormat |
|
| 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. |
void |
draw(java.awt.Graphics g,
java.awt.geom.GeneralPath path)
Draw a path on specified graphics context. |
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 LineFormat |
getDefaultLineFormat()
get global default line format |
static LineFormat |
getInvisibleLineFormat()
get an invisible bounds line format for invisibled shapes. |
java.awt.Color |
getLineColor()
Get current line color. |
int |
getLineStyle()
Get current line style. |
int |
getLineWidth()
Get current line width. |
int |
hashCode()
Returns the hashcode for this Object. |
static void |
initGraphics(java.awt.Graphics g)
Set graphics to a default configuration. |
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 |
setDefaultLineFormat(LineFormat lineFormat)
set global default line format |
void |
setGraphics(java.awt.Graphics g)
Set graphics according to current line format. |
static void |
setGraphics(java.awt.Graphics g,
int lineWidth,
int lineStyle,
java.awt.Color lineColor)
Set graphics according to specified line format. |
void |
setLineColor(java.awt.Color lineColor)
Set current line color. |
void |
setLineStyle(int lineStyle)
Set current line style. |
void |
setLineWidth(int lineWidth)
Set current line width. |
void |
setValue(LineFormat lineFormat)
Set new value for this lineFormat. |
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_LINEFORMAT
public static final java.lang.String XML_LINESTYLE
public static final java.lang.String XML_LINEWIDTH
public static final java.lang.String XML_LINECOLOR
public static final int LINESTYLE_SOLID
public static final int LINESTYLE_DOT
public static final int LINESTYLE_DASH
public static final int LINESTYLE_DASHDOT
public static final int LINESTYLE_DASHDOTDOT
| Constructor Detail |
public LineFormat()
| Method Detail |
public static void setDefaultLineFormat(LineFormat lineFormat)
lineFormat - A new line formatpublic static LineFormat getDefaultLineFormat()
public static LineFormat getInvisibleLineFormat()
public void clearFormat()
public int getLineStyle()
public void setLineStyle(int lineStyle)
lineStyle - A new line style.public int getLineWidth()
public void setLineWidth(int lineWidth)
lineWidth - A new line width.public java.awt.Color getLineColor()
public void setLineColor(java.awt.Color lineColor)
lineColor - A new line color.public void setValue(LineFormat lineFormat)
lineFormat - A new line format.
public void draw(java.awt.Graphics g,
java.awt.geom.GeneralPath path)
g - A specified graphicspath - A general path.public static void initGraphics(java.awt.Graphics g)
public void setGraphics(java.awt.Graphics g)
public static void setGraphics(java.awt.Graphics g,
int lineWidth,
int lineStyle,
java.awt.Color lineColor)
lineWidth - the line width to be drawn.lineStyle - the line stylelineColor - the line colorpublic 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 | ||||||||||