|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.shape.AbstractChartShape
com.ijchart.xychart.shape.AbstractTextChartShape
com.ijchart.xychart.shape.AbstractRectangleTextChartShape
com.ijchart.xychart.shape.DualBreakLineChartShape
public class DualBreakLineChartShape
Title: IJChart
Description: a chart library for the Java(tm) platform.
Draw a lineIChartShape
.
Copyright: Copyright (c) 2013
Company:
Field Summary |
---|
Fields inherited from class com.ijchart.xychart.shape.AbstractRectangleTextChartShape |
---|
DEFAULT_DRAW_AUTO_WRAP, DEFAULT_FORCE_INSIDE_TEXT_NO_WRAP, DEFAULT_FORCE_SHOW_ALL, DEFAULT_TEXT_MAX_SHOW_LINE |
Fields inherited from class com.ijchart.xychart.shape.AbstractTextChartShape |
---|
DEFAULT_TEXT_DIRECTION, DEFAULT_TEXT_HORIZONTAL_ALIGNMENT, DEFAULT_TEXT_POSITION, DEFAULT_TEXT_VERTICAL_ALIGNMENT |
Fields inherited from class com.ijchart.xychart.shape.AbstractChartShape |
---|
DEFAULT_DRAW_TYPE, DEFAULT_SHAPE_ID, DEFAULT_VISIBLE, transformedShape |
Constructor Summary | |
---|---|
DualBreakLineChartShape(java.awt.geom.Rectangle2D drawArea,
java.lang.String text,
java.awt.Font font,
double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
Draw a break line from point (x1,y1) to point (x2,y2) to point (x3,y3). |
|
DualBreakLineChartShape(java.awt.geom.Rectangle2D drawArea,
java.lang.String text,
java.awt.Font font,
java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2,
java.awt.geom.Point2D p3)
Draw a break line from point (p1) to point (p2). |
Method Summary | |
---|---|
protected void |
calculateTransformedShape()
Calculate the transformed shape. |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
void |
draw(java.awt.Graphics2D g2)
Draw the ChartShape on a Java 2d graphics device(such as the screen or the printer). |
protected void |
drawSelect(java.awt.Graphics2D g2)
Draw the selected ChartShape on a Java 2d graphics device(such as the screen or the printer). |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
protected java.awt.Shape |
getHotspotShape()
Returns the hotspot shape. |
java.awt.geom.Point2D |
getLockPoint()
Returns the lock coordinates of this shape. |
java.awt.geom.Point2D |
getPoint1()
Returns the first point coordinate. |
java.awt.geom.Point2D |
getPoint2()
Returns the second point coordinate. |
java.awt.geom.Point2D |
getPoint3()
Returns the third point coordinate. |
ShapeType |
getShapeType()
The type for describe this shape. |
java.awt.geom.Point2D |
getTopLeftPoint()
Returns the top left corner coordinates of this shape (not consider rotation). |
double |
getX1()
Returns the first point's x coordinate. |
double |
getX2()
Returns the second point's x coordinate. |
double |
getX3()
Returns the third point's x coordinate. |
double |
getY1()
Returns the first point's y coordinate. |
double |
getY2()
Returns the second point's y coordinate. |
double |
getY3()
Returns the third point's y coordinate. |
int |
hashCode()
Returns a hash code value for the object. |
void |
setPoint1(double x,
double y)
Sets the first point coordinate,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setPoint1(java.awt.geom.Point2D p)
Sets the first point coordinate,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setPoint2(double x,
double y)
Sets the second point coordinate,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setPoint2(java.awt.geom.Point2D p)
Sets the second point coordinate,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setPoint3(double x,
double y)
Sets the third point coordinate,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setPoint3(java.awt.geom.Point2D p)
Sets the third point coordinate,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setX1(double x1)
Sets the first point's x coordinate,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setX2(double x2)
Sets the second point's x coordinate,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setX3(double x3)
Sets the third point's x coordinate,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setY1(double y1)
Sets the first point's y coordinate,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setY2(double y2)
Sets the second point's y coordinate,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setY3(double y3)
Sets the third point's y coordinate,and sends a ChartShapeChangeEvent to all registered listeners. |
java.lang.String |
toString()
Returns a string representation of the object. |
void |
translate(double tx,
double ty)
Concatenates the current Graphics2D Transform with a translation transform.and sends a ChartShapeChangeEvent to all registered listeners. |
Methods inherited from class com.ijchart.xychart.shape.AbstractRectangleTextChartShape |
---|
drawText, drawTextWithTrimMarginRect, getDrawArea, getTextMaxShowLine, getTooltipShapeTranslatePoint, isAutoWrap, isForceInsideTextNoWrap, isForceShowAll, setAutoWrap, setDrawArea, setForceInsideTextNoWrap, setForceShowAllText, setTextMaxShowLine, splitString |
Methods inherited from class com.ijchart.xychart.shape.AbstractTextChartShape |
---|
getText, getTextDirection, getTextFont, getTextHorizontalAlign, getTextPaint, getTextPosition, getTextVerticalAlign, isDrawText, setDrawText, setText, setTextDirection, setTextFont, setTextHorizontalAlign, setTextPaint, setTextPosition, setTextVerticalAlign |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DualBreakLineChartShape(java.awt.geom.Rectangle2D drawArea, java.lang.String text, java.awt.Font font, double x1, double y1, double x2, double y2, double x3, double y3)
drawArea
- Rectangle2D
The draw area (null not permitted).text
- String
The text (null permitted).font
-
The font (null permitted).x1
- double
The first point's x coordinate.y1
- double
The first point's y coordinate.x2
- double
The second point's x coordinate.y2
- double
The second point's y coordinate.x3
- double
The third point's x coordinate.y3
- double
The third point's y coordinate.public DualBreakLineChartShape(java.awt.geom.Rectangle2D drawArea, java.lang.String text, java.awt.Font font, java.awt.geom.Point2D p1, java.awt.geom.Point2D p2, java.awt.geom.Point2D p3)
drawArea
- Rectangle2D
The draw area (null not permitted).text
- String
The text (null permitted).font
-
The font (null permitted).p1
- Point2D
The first point (null not permitted).p2
- Point2D
The second point (null not permitted).p3
- Point2D
The third point (null not permitted).Method Detail |
---|
public void draw(java.awt.Graphics2D g2)
draw
in interface IChartShape
g2
- Graphics2D
The graphics device (such as the screen or the printer) (null not permitted).protected void drawSelect(java.awt.Graphics2D g2)
drawSelect
in class AbstractChartShape
g2
- Graphics2D
the graphics device (such as the screen or the printer) (null not permitted).public void translate(double tx, double ty)
ChartShapeChangeEvent
to all registered listeners.
Subsequent rendering is translated by the specified
distance relative to the previous position.
This is equivalent to calling transform(T), where T is an
AffineTransform represented by the following matrix:
[ 1 0 tx ] [ 0 1 ty ] [ 0 0 1 ].
translate
in interface IChartShape
translate
in class AbstractRectangleTextChartShape
tx
- double
The distance to translate along the x-axis.ty
- double
The distance to translate along the y-axis.public java.awt.geom.Point2D getTopLeftPoint()
getTopLeftPoint
in interface IChartShape
getTopLeftPoint
in class AbstractRectangleTextChartShape
public java.awt.geom.Point2D getLockPoint()
getLockPoint
in interface IChartShape
getLockPoint
in class AbstractRectangleTextChartShape
protected void calculateTransformedShape()
calculateTransformedShape
in class AbstractChartShape
public void setX1(double x1)
ChartShapeChangeEvent
to all registered listeners.
x1
- doublepublic double getX1()
public void setY1(double y1)
ChartShapeChangeEvent
to all registered listeners.
y1
- doublepublic double getY1()
public void setX2(double x2)
ChartShapeChangeEvent
to all registered listeners.
x2
- doublepublic double getX2()
public void setY2(double y2)
ChartShapeChangeEvent
to all registered listeners.
y2
- doublepublic double getY2()
public void setX3(double x3)
ChartShapeChangeEvent
to all registered listeners.
x3
- doublepublic double getX3()
public void setY3(double y3)
ChartShapeChangeEvent
to all registered listeners.
y3
- doublepublic double getY3()
public void setPoint1(double x, double y)
ChartShapeChangeEvent
to all registered listeners.
x
- double
The first point's x coordinate.y
- double
The first point's y coordinate.public void setPoint2(double x, double y)
ChartShapeChangeEvent
to all registered listeners.
x
- double
The second point's x coordinate.y
- double
The second point's y coordinate.public void setPoint3(double x, double y)
ChartShapeChangeEvent
to all registered listeners.
x
- double
The third point's x coordinate.y
- double
The third point's y coordinate.public void setPoint1(java.awt.geom.Point2D p)
ChartShapeChangeEvent
to all registered listeners.
p
- Point2D
The first point coordinate (null not permitted).public java.awt.geom.Point2D getPoint1()
public void setPoint2(java.awt.geom.Point2D p)
ChartShapeChangeEvent
to all registered listeners.
p
- Point2D
The second point coordinate (null not permitted).public java.awt.geom.Point2D getPoint2()
public void setPoint3(java.awt.geom.Point2D p)
ChartShapeChangeEvent
to all registered listeners.
p
- Point2D
The third point coordinate (null not permitted).public java.awt.geom.Point2D getPoint3()
protected java.awt.Shape getHotspotShape()
getHotspotShape
in class AbstractChartShape
public ShapeType getShapeType()
getShapeType
in interface IChartShape
ShapeType
.public boolean equals(java.lang.Object obj)
equals
in class AbstractRectangleTextChartShape
obj
-
the reference object with which to compare.
public int hashCode()
hashCode
in class AbstractRectangleTextChartShape
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class AbstractRectangleTextChartShape
java.lang.CloneNotSupportedException
- if the object's class does not
support the Cloneable interface. Subclasses
that override the clone method can also
throw this exception to indicate that an instance cannot
be cloned.public java.lang.String toString()
toString
in class AbstractRectangleTextChartShape
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |