|
|||||||||||
| 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.Arrow
Arrow class. An arrow class is used for any line or curve shapes.
| Field Summary | |
static int |
ARROWSIZE
An minimum arrow size |
static int |
ARROWSIZE_ROTATE
a rotate sign size. |
static int |
ARROWTYPE_CIRCLE
A solid small circle on the end of line. |
static int |
ARROWTYPE_CIRCLE_EMPTY
An empty small circle on the end of line. |
static int |
ARROWTYPE_CIRCLE_EMPTY_VLINE
An arrow type with one small circle and one vertical line on the end of line. |
static int |
ARROWTYPE_CIRCLE_TRIANGLELINES_REVERSED
An arrow type with one small circle and two reversed inclined lines on the end of line. |
static int |
ARROWTYPE_DIAMOND_CIRCLE
An empty diamond and a solid small circle on the end of line. |
static int |
ARROWTYPE_DIAMOND_CIRCLE_EMPTY
An empty diamond and an empty small circle on the end of line. |
static int |
ARROWTYPE_DIAMOND_EMPTY
An empty diamond on the end of line. |
static int |
ARROWTYPE_LINE_INCLINED
An arrow type with one inclined line on the end of a line. |
static int |
ARROWTYPE_LINE_INCLINED_INTERSECT
An arrow type with one inclined line on the end of a line, but intersects it. |
static int |
ARROWTYPE_NONE
An empty arrow type. |
static int |
ARROWTYPE_RECTANGLE
A solid small rectangle on the end of line. |
static int |
ARROWTYPE_RECTANGLE_EMPTY
An empty small rectangle on the end of line. |
static int |
ARROWTYPE_TRIANGLE
A solid triangle arrow type. |
static int |
ARROWTYPE_TRIANGLE_EMPTY
An empty triangle arrow type. |
static int |
ARROWTYPE_TRIANGLE_TRIANGLE
A two solid triangles on the end of line. |
static int |
ARROWTYPE_TRIANGLE_TRIANGLE_EMPTY
An two empty triangles on the end of line. |
static int |
ARROWTYPE_TRIANGLELINES
An arrow type with two inclined lines constructed an arrow. |
static int |
ARROWTYPE_TRIANGLELINES_REVERSED
An arrow type with two reversed inclined lines on the end of line. |
static int |
ARROWTYPE_TRIANGLELINES_TRIANGLELINES
An arrow type with 2 x 2 inclined lines constructed an arrow. |
static int |
ARROWTYPE_VLINE
An arrow type with one vertical line on the end of line. |
static int |
ARROWTYPE_VLINE_CIRCLE
An arrow type with one vertical line and one small solid circle on the end of line. |
static int |
ARROWTYPE_VLINE_CIRCLE_EMPTY
An arrow type with one vertical line and one small empty circle on the end of line. |
static int |
ARROWTYPE_VLINE_TRIANGLELINES
An arrow type with one vertical line and two inclined lines constructed an arrow. |
static int |
ARROWTYPE_VLINE_TRIANGLELINES_REVERSED
An arrow type with one vertical line and two reversed inclined lines on the end of line. |
static int |
ARROWTYPE_VLINE_TRIANGLELINES_TRIANGLELINES
An arrow type with one vertical line and 2 x 2 inclined lines constructed an arrow. |
static int |
ARROWTYPE_VLINE_VLINE
An arrow type with two vertical lines on the end of line. |
static int |
ARROWTYPE_VLINE_VLINE_CIRCLE
An arrow type with two vertical lines and one small solid circle on the end of line. |
static int |
ARROWTYPE_VLINE_VLINE_CIRCLE_EMPTY
An arrow type with two vertical lines and one small empty circle on the end of line. |
static int |
ARROWTYPE_VLINE_VLINE_VLINE
An arrow type with three vertical lines on the end of line. |
static int |
ARROWTYPE_VLINE_VLINE_VLINE_CIRCLE
An arrow type with three vertical lines and one small solid circle on the end of line. |
static int |
ARROWTYPE_VLINE_VLINE_VLINE_CIRCLE_EMPTY
An arrow type with three vertical lines and one small empty circle on the end of line. |
static java.lang.String |
XML_ARROW
A XML string tag represents an arrow format. |
static java.lang.String |
XML_ENDARROW
A XML string tag represents the arrow type of end point of a line/curve. |
static java.lang.String |
XML_STARTARROW
A XML string tag represents the arrow type of begin point of a line/curve. |
| Fields inherited from class com.jfimagine.jfgraph.shape.base.AbstractObject |
m_lastError, XML_OBJECTID, XML_OBJECTTYPE |
| Constructor Summary | |
Arrow()
Constructor of Arrow. |
|
Arrow(Arrow arrow)
Constructor of Arrow. |
|
| Method Summary | |
protected void |
appendChildToDOM(Element element,
JFVersion version)
Append necessary xml child for current element, this method will be called internally by toDOM. |
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. |
static void |
drawArrow(int arrowType,
int lineWidth,
JFPoint startPoint,
JFPoint endPoint,
java.awt.Graphics g,
java.awt.Color c)
arrow type of this arrow |
static void |
drawRotateArrow(double x,
double y,
java.awt.Graphics g)
Draw a rotate arrow sign. |
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 double |
getArrowOccupiedSize(int arrowType,
int lineWidth)
Get an arrow occupied size on one end of line. |
static Arrow |
getDefaultArrow()
get global default arrow |
int |
getEndArrow()
Get end arrow type. |
int |
getStartArrow()
Get start arrow type. |
int |
hashCode()
Returns the hashcode for this Object. |
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 |
setDefaultArrow(Arrow arrow)
set global default arrow |
void |
setEndArrow(int arrow)
Set end arrow type. |
void |
setStartArrow(int arrow)
Set start arrow type. |
void |
setValue(Arrow arrow)
Set the value of this arrow. |
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_ARROW
public static final java.lang.String XML_STARTARROW
public static final java.lang.String XML_ENDARROW
public static final int ARROWTYPE_NONE
public static final int ARROWTYPE_TRIANGLE
public static final int ARROWTYPE_TRIANGLE_EMPTY
public static final int ARROWTYPE_TRIANGLELINES
public static final int ARROWTYPE_LINE_INCLINED
public static final int ARROWTYPE_LINE_INCLINED_INTERSECT
public static final int ARROWTYPE_CIRCLE_EMPTY
public static final int ARROWTYPE_CIRCLE
public static final int ARROWTYPE_RECTANGLE_EMPTY
public static final int ARROWTYPE_RECTANGLE
public static final int ARROWTYPE_DIAMOND_EMPTY
public static final int ARROWTYPE_DIAMOND_CIRCLE_EMPTY
public static final int ARROWTYPE_DIAMOND_CIRCLE
public static final int ARROWTYPE_TRIANGLELINES_REVERSED
public static final int ARROWTYPE_VLINE_TRIANGLELINES_REVERSED
public static final int ARROWTYPE_CIRCLE_TRIANGLELINES_REVERSED
public static final int ARROWTYPE_CIRCLE_EMPTY_VLINE
public static final int ARROWTYPE_VLINE
public static final int ARROWTYPE_VLINE_VLINE
public static final int ARROWTYPE_VLINE_VLINE_VLINE
public static final int ARROWTYPE_VLINE_CIRCLE_EMPTY
public static final int ARROWTYPE_VLINE_VLINE_CIRCLE_EMPTY
public static final int ARROWTYPE_VLINE_VLINE_VLINE_CIRCLE_EMPTY
public static final int ARROWTYPE_VLINE_CIRCLE
public static final int ARROWTYPE_VLINE_VLINE_CIRCLE
public static final int ARROWTYPE_VLINE_VLINE_VLINE_CIRCLE
public static final int ARROWTYPE_TRIANGLE_TRIANGLE
public static final int ARROWTYPE_TRIANGLE_TRIANGLE_EMPTY
public static final int ARROWTYPE_TRIANGLELINES_TRIANGLELINES
public static final int ARROWTYPE_VLINE_TRIANGLELINES
public static final int ARROWTYPE_VLINE_TRIANGLELINES_TRIANGLELINES
public static final int ARROWSIZE
public static final int ARROWSIZE_ROTATE
| Constructor Detail |
public Arrow()
public Arrow(Arrow arrow)
| Method Detail |
public static void setDefaultArrow(Arrow arrow)
public static Arrow getDefaultArrow()
public int getStartArrow()
public void setStartArrow(int arrow)
arrow - start arrow type.public int getEndArrow()
public void setEndArrow(int arrow)
arrow - end arrow type.public void setValue(Arrow arrow)
arrow - A new arrow value.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
public static double getArrowOccupiedSize(int arrowType,
int lineWidth)
arrowType - The type of the arrow to be drawn.lineWidth - The line width, it will effect the shape of arrow.
public static void drawArrow(int arrowType,
int lineWidth,
JFPoint startPoint,
JFPoint endPoint,
java.awt.Graphics g,
java.awt.Color c)
arrowType - The type of the arrow to be drawn.lineWidth - The line width, it will effect the shape of arrow.startPoint - The start point of the line.endPoint - The end point of the line. The arrow will be drawn on this end side.g - The graphics context to draw arrow.
public static void drawRotateArrow(double x,
double y,
java.awt.Graphics g)
g - The graphics context to draw arrow.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||