|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.annotation.AbstractAnnotation
com.ijchart.xychart.annotation.XYShapeAnnotation
public class XYShapeAnnotation
Title: IJChart
A shape annotation that can be placed on aXYPlot
.
Description: a chart library for the Java(tm) platform.
Copyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static java.awt.Paint |
DEFAULT_BORDER_PAINT
The default paint used to draw the shape's border. |
static java.awt.Stroke |
DEFAULT_BORDER_STROKE
The default stroke used to draw the shape's border. |
Constructor Summary | |
---|---|
XYShapeAnnotation(java.awt.Shape shape)
Create a new annotation to be displayed at the given location. |
|
XYShapeAnnotation(java.awt.Shape shape,
java.awt.Paint borderPaint,
java.awt.Stroke borderStroke)
Create a new annotation to be displayed at the given location. |
|
XYShapeAnnotation(java.awt.Shape shape,
java.awt.Paint borderPaint,
java.awt.Stroke borderStroke,
java.awt.Paint fillPaint)
Create a new annotation to be displayed at the given location. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Creates and returns a copy of this object. |
void |
drawAnnotation(AbstractValueAxis xAxis,
RectangleEdge xAxisEdge,
AbstractValueAxis yAxis,
RectangleEdge yAxisEdge,
java.awt.geom.Rectangle2D dataArea,
ChartOrientation orientation,
AnnotationShapeCollection annotationShapes)
Draws the annotation. |
boolean |
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object. |
java.awt.Paint |
getBorderPaint()
Returns the paint used to draw the shape's border. |
java.awt.Stroke |
getBorderStroke()
Returns the stroke used to draw the shape's border. |
java.awt.Paint |
getFillPaint()
Returns the paint used to fill the shape. |
java.awt.Shape |
getShape()
Returns the shape. |
int |
hashCode()
Returns a hash code value for the object. |
void |
setBorderPaint(java.awt.Paint paint)
Sets the paint used to draw the shape's border and sends a AnnotationChangeEvent to all registered listeners. |
void |
setBorderStroke(java.awt.Stroke stroke)
Sets the stroke used to draw the shape's border and sends a AnnotationChangeEvent to all registered listeners. |
void |
setFillPaint(java.awt.Paint paint)
The paint used to fill the shape and sends a AnnotationChangeEvent to all registered listeners. |
void |
setShape(java.awt.Shape shape)
Sets the shape and sends a AnnotationChangeEvent to all registered listeners. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class com.ijchart.xychart.annotation.AbstractAnnotation |
---|
addChangeListener, annotationChanged, fireAnnotationChanged, getTooltipText, hasListener, notifyListeners, removeAllChangeListener, removeChangeListener, setTooltipText |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.awt.Paint DEFAULT_BORDER_PAINT
public static final java.awt.Stroke DEFAULT_BORDER_STROKE
Constructor Detail |
---|
public XYShapeAnnotation(java.awt.Shape shape)
shape
- Shape
The shape (null not permitted).public XYShapeAnnotation(java.awt.Shape shape, java.awt.Paint borderPaint, java.awt.Stroke borderStroke)
shape
- Shape
The shape (null not permitted).borderPaint
- Paint
The paint used to draw the shape's border (null permitted).borderStroke
- Stroke
The stroke used to draw the shape's border (null permitted).public XYShapeAnnotation(java.awt.Shape shape, java.awt.Paint borderPaint, java.awt.Stroke borderStroke, java.awt.Paint fillPaint)
shape
- Shape
The shape (null not permitted).borderPaint
- Paint
The paint used to draw the shape's border (null permitted).borderStroke
- Stroke
The stroke used to draw the shape's border (null permitted).fillPaint
- Paint
The paint used to fill the shape (null permitted).Method Detail |
---|
public java.awt.Shape getShape()
public void setShape(java.awt.Shape shape)
AnnotationChangeEvent
to all registered listeners.
shape
- Shape
The shape (null not permitted).public java.awt.Paint getBorderPaint()
public void setBorderPaint(java.awt.Paint paint)
AnnotationChangeEvent
to all registered listeners.
paint
- Paint
The border paint (null permitted).public java.awt.Stroke getBorderStroke()
public void setBorderStroke(java.awt.Stroke stroke)
AnnotationChangeEvent
to all registered listeners.
stroke
- Stroke
The border stroke (null permitted).public java.awt.Paint getFillPaint()
public void setFillPaint(java.awt.Paint paint)
AnnotationChangeEvent
to all registered listeners.
paint
- Paint
The fill paint (null permitted).public void drawAnnotation(AbstractValueAxis xAxis, RectangleEdge xAxisEdge, AbstractValueAxis yAxis, RectangleEdge yAxisEdge, java.awt.geom.Rectangle2D dataArea, ChartOrientation orientation, AnnotationShapeCollection annotationShapes)
drawAnnotation
in interface IXYAnnotation
xAxis
- AbstractValueAxis
The x-axis (null not permitted).xAxisEdge
- RectangleEdge
The x-axis edge (null not permitted).yAxis
- AbstractValueAxis
The y-axis (null not permitted).yAxisEdge
- RectangleEdge
The y-axis edge (null not permitted).dataArea
- Rectangle2D
The chart data area (null not permitted).orientation
- ChartOrientation
The chart orientation (null not permitted).annotationShapes
- AnnotationShapeCollection
Collects information about the annotation (null not permitted).public boolean equals(java.lang.Object obj)
equals
in class AbstractAnnotation
obj
- the object (null permitted).
public int hashCode()
hashCode
in class AbstractAnnotation
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class AbstractAnnotation
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 |