|
|||||||||
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.ErrorCrossChartShape
public class ErrorCrossChartShape
Title: IJChart
Description: a chart library for the Java(tm) platform.
Draw an error crossIChartShape
.
Copyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static double |
DEFAULT_CAP_LENGTH
The default length of the cap at the end of the error bars. |
static boolean |
DEFAULT_DRAW_X_ERROR
A default flag that controls whether or not the x-error bars are drawn. |
static boolean |
DEFAULT_DRAW_Y_ERROR
A default flag that controls whether or not the y-error bars are drawn. |
Fields inherited from class com.ijchart.xychart.shape.AbstractChartShape |
---|
DEFAULT_DRAW_TYPE, DEFAULT_SHAPE_ID, DEFAULT_VISIBLE, transformedShape |
Constructor Summary | |
---|---|
ErrorCrossChartShape(double startX,
double endX,
double centerX,
double centerY,
double startY,
double endY,
java.awt.Shape centerShape)
Constructor. |
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. |
double |
getCapLength()
Returns the length of the cap at the end of the error bars. |
java.awt.Shape |
getCenterShape()
Returns the shape of center point. |
double |
getCenterX()
Returns the coordinate of center x. |
double |
getCenterY()
Returns the coordinate of center y. |
double |
getEndX()
Returns the coordinate of end x. |
double |
getEndY()
Returns the coordinate of end y. |
protected java.awt.Shape |
getHotspotShape()
Returns the hotspot shape. |
java.awt.geom.Point2D |
getLockPoint()
Returns the lock coordinates of this shape. |
ShapeType |
getShapeType()
The type for describe this shape. |
double |
getStartX()
Returns the coordinate of start x. |
double |
getStartY()
Returns the coordinate of start y. |
java.awt.geom.Point2D |
getTopLeftPoint()
Returns the top left corner coordinates of this shape (not consider rotation). |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isDrawXError()
Returns whether or not the x-error bars are drawn. |
boolean |
isDrawYError()
Returns whether or not the y-error bars are drawn,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setCapLength(double length)
Sets the length of the cap at the end of the error bars,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setCenterShape(java.awt.Shape shape)
Sets the shape of center point,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setCenterX(double centerX)
Sets the coordinate of center x,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setCenterY(double centerY)
Sets the coordinate of center y,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setDrawXError(boolean flag)
Sets whether or not the x-error bars are drawn,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setDrawYError(boolean flag)
Sets whether or not the y-error bars are drawn. |
void |
setEndX(double endX)
Sets the coordinate of end x,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setEndY(double endY)
Sets the coordinate of end y,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setStartX(double startX)
Sets the coordinate of start x,and sends a ChartShapeChangeEvent to all registered listeners. |
void |
setStartY(double startY)
Sets the coordinate of start y,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 java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean DEFAULT_DRAW_X_ERROR
public static final boolean DEFAULT_DRAW_Y_ERROR
public static final double DEFAULT_CAP_LENGTH
Constructor Detail |
---|
public ErrorCrossChartShape(double startX, double endX, double centerX, double centerY, double startY, double endY, java.awt.Shape centerShape)
startX
- double
The coordinate of start x.endX
- double
The coordinate of end x.centerX
- double
The coordinate of center x.centerY
- double
The coordinate of center y.startY
- double
The coordinate of start y.endY
- double
The coordinate of end y.centerShape
- Shape
The shape of center point (null permitted).Method Detail |
---|
public double getStartX()
public void setStartX(double startX)
ChartShapeChangeEvent
to all registered listeners.
startX
- double
The start x coordinate.public double getEndX()
public void setEndX(double endX)
ChartShapeChangeEvent
to all registered listeners.
endX
- double
The end x coordinate.public double getCenterX()
public void setCenterX(double centerX)
ChartShapeChangeEvent
to all registered listeners.
centerX
- double
The center x coordinate.public double getCenterY()
public void setCenterY(double centerY)
ChartShapeChangeEvent
to all registered listeners.
centerY
- double
The center y coordinate.public double getStartY()
public void setStartY(double startY)
ChartShapeChangeEvent
to all registered listeners.
startY
- double
The start y coordinate.public double getEndY()
public void setEndY(double endY)
ChartShapeChangeEvent
to all registered listeners.
endY
- double
The end y coordinate.public java.awt.Shape getCenterShape()
public void setCenterShape(java.awt.Shape shape)
ChartShapeChangeEvent
to all registered listeners.
shape
- Shape
A shape (null permitted).public double getCapLength()
public void setCapLength(double length)
ChartShapeChangeEvent
to all registered listeners.
length
- double
The length,must be >=0.public boolean isDrawXError()
public void setDrawXError(boolean flag)
ChartShapeChangeEvent
to all registered listeners.
flag
- boolean
A boolean.public boolean isDrawYError()
ChartShapeChangeEvent
to all registered listeners.
public void setDrawYError(boolean flag)
flag
- boolean
A boolean.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
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
public java.awt.geom.Point2D getLockPoint()
getLockPoint
in interface IChartShape
getLockPoint
in class AbstractChartShape
protected void calculateTransformedShape()
calculateTransformedShape
in class AbstractChartShape
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 AbstractChartShape
obj
-
the reference object with which to compare.
public int hashCode()
hashCode
in class AbstractChartShape
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class AbstractChartShape
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 java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |