|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.chartinfo.AbstractShapeCollection
public abstract class AbstractShapeCollection
Title: IJChart
Description: a chart library for the Java(tm) platform.
The abstract class for all chart shape collection class.Copyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
protected int |
shapeIdSequence
The sequence of shapes,first is 0. |
Constructor Summary | |
---|---|
AbstractShapeCollection()
The constructor. |
Method Summary | |
---|---|
void |
addChangeListener(IChartShapeChangeListener listener)
Registers an object for notification of changes to the IChartShape . |
protected void |
addHotspotArea(java.util.List result,
IChartShape shape,
IAreaFragment fragment,
ChartShapeDrawType drawType)
Calculate the area of hotspot shape. |
protected void |
addHotspotArea(java.util.List result,
java.util.List shapes,
IAreaFragment fragment,
ChartShapeDrawType drawType)
Calculate the area of hotspot shape. |
void |
chartShapeChanged(ChartShapeChangeEvent event)
Receives notification of an IChartShape change event. |
protected void |
clearSelectedShape(IChartShape shape)
Clear the selected shape. |
protected void |
clearSelectedShape(java.util.List shapes)
Clear all the selected shapes. |
protected void |
clearShapesListener(java.util.List shapes)
Remove all the shapes of the listener. |
protected void |
clip(java.awt.Graphics2D g2)
Set clip area. |
java.lang.Object |
clone()
Returns a clone of the axis. |
protected void |
draw(java.awt.Graphics2D g2,
java.util.List shapes)
Drawing all ChartShape in this collection. |
boolean |
equals(java.lang.Object obj)
Tests this axis for equality with another object. |
protected IChartShape |
findShape(java.util.List shapes,
java.awt.geom.Point2D point,
ChartShapeDrawType drawType)
Find a shape which contains the specified point. |
protected void |
fireChartShapeChanged(IChartShape shape)
Notifies all registered listeners that the chart shape has changed. |
java.awt.geom.Rectangle2D |
getDrawArea()
Returns the draw area for all shapes. |
java.util.List |
getHotspotAreas(java.util.List drawTypes,
IAreaFragment fragment)
Returns the hotspot areas. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
hasListener(IChartShapeChangeListener listener)
Returns true if the specified object is registered with the IChartShape as a listener. |
boolean |
isDrawAreaContains(java.awt.geom.Point2D point)
Whether or not the draw area contains a point. |
protected void |
notifyListeners(ChartShapeChangeEvent event)
Notifies all registered listeners that the chart shape has changed. |
void |
removeAllChangeListener()
Deregisters all object for notification of changes to the IChartShape . |
void |
removeChangeListener(IChartShapeChangeListener listener)
Deregisters an object for notification of changes to the IChartShape . |
protected void |
removeShapesListener(java.util.List shapes,
IChartShapeChangeListener listener)
Remove all the shapes of the listener. |
void |
resetShapeIdSequence()
Reset the sequence of shape to 0. |
protected void |
restoreClip(java.awt.Graphics2D g2)
Restore clip area. |
void |
setDrawArea(java.awt.geom.Rectangle2D drawArea)
For a series of graphics and their common belonging to a particular region, by recording the region, in dealing with the incident when the mouse to provide faster, no need to determine whether all the graphics are selected by the mouse, optional through this area To narrow the scope of the search. |
java.lang.String |
toString()
Returns a string representation of the object. |
void |
translate(double x,
double y)
Translates the origin of the all shapes(not include axisLine3DShape) in this chart to the point (x, y) in the current coordinate system. |
protected void |
translate(double x,
double y,
java.util.List shapes)
Translates the origin of the all shapes(not include axisLine3DShape) in this chart to the point (x, y) in the current coordinate system. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ijchart.xychart.chartinfo.IShapeCollection |
---|
clearSelectedShapes, clearShapesListener, draw, findChartShape |
Field Detail |
---|
protected int shapeIdSequence
Constructor Detail |
---|
public AbstractShapeCollection()
Method Detail |
---|
public void setDrawArea(java.awt.geom.Rectangle2D drawArea)
setDrawArea
in interface IShapeCollection
drawArea
- Rectangle2D
The draw area for all shapes (null not permitted).public java.awt.geom.Rectangle2D getDrawArea()
getDrawArea
in interface IShapeCollection
public void resetShapeIdSequence()
resetShapeIdSequence
in interface IShapeCollection
public boolean isDrawAreaContains(java.awt.geom.Point2D point)
isDrawAreaContains
in interface IShapeCollection
point
- Point2D
The point (null not permitted).
public void addChangeListener(IChartShapeChangeListener listener)
IChartShape
.
listener
-
the object to register.public void removeChangeListener(IChartShapeChangeListener listener)
IChartShape
.
listener
-
the object to deregister.public void removeAllChangeListener()
IChartShape
.
public boolean hasListener(IChartShapeChangeListener listener)
IChartShape
as a listener. Most applications won't need to call this
method, it exists mainly for use by unit testing code.
listener
-
the listener.
protected void notifyListeners(ChartShapeChangeEvent event)
event
-
contains information about the event that triggered the notification.protected void fireChartShapeChanged(IChartShape shape)
shape
- IChartShape
The chart shape object.public void chartShapeChanged(ChartShapeChangeEvent event)
IChartShape
change event.
chartShapeChanged
in interface IChartShapeChangeListener
event
- ChartShapeChangeEvent
Information about the event.public void translate(double x, double y)
translate
in interface IShapeCollection
x
- double
The x coordinate.y
- double
The y coordinate.public java.util.List getHotspotAreas(java.util.List drawTypes, IAreaFragment fragment)
getHotspotAreas
in interface IShapeCollection
drawTypes
- List
The types of hotspot shape (null not permitted).fragment
- IAreaFragment
The IAreaFragment object (maybe null).
protected void clip(java.awt.Graphics2D g2)
g2
- Graphics2D
The graphics device (null not permitted).protected void restoreClip(java.awt.Graphics2D g2)
g2
- Graphics2D
The graphics device (null not permitted).protected IChartShape findShape(java.util.List shapes, java.awt.geom.Point2D point, ChartShapeDrawType drawType)
shapes
- List
The collection of shapes (null permitted).point
- Point2D
A point (null not permitted).drawType
- ChartShapeDrawType
The shape draw shape (null permitted).
protected void draw(java.awt.Graphics2D g2, java.util.List shapes)
g2
- Graphics2D
The graphics device (null not permitted).shapes
- List
The collection of shapes (null permitted).protected void translate(double x, double y, java.util.List shapes)
x
- double
The x coordinate.y
- double
The y coordinate.shapes
- List
The collection of shapes (null permitted).protected void clearShapesListener(java.util.List shapes)
shapes
- List
The collection of shapes (null permitted).protected void clearSelectedShape(IChartShape shape)
shape
- IChartShape
The IChartShape object (null permitted).protected void clearSelectedShape(java.util.List shapes)
shapes
- List
The collection of shapes (null permitted).protected void removeShapesListener(java.util.List shapes, IChartShapeChangeListener listener)
shapes
- List
The collection of shapes (null permitted).listener
- IChartShapeChangeListener
The listener object (null permitted).protected void addHotspotArea(java.util.List result, IChartShape shape, IAreaFragment fragment, ChartShapeDrawType drawType)
result
-
The result (null not permitted).shape
- List
The chart shape (null permitted).fragment
- IAreaFragment
The IAreaFragment
object (maybe null).drawType
- ChartShapeDrawType
The shape draw type (null permitted).protected void addHotspotArea(java.util.List result, java.util.List shapes, IAreaFragment fragment, ChartShapeDrawType drawType)
result
-
The result (null not permitted).shapes
- List
The collection of shapes (null permitted).fragment
- IAreaFragment
The IAreaFragment
object (maybe null).drawType
- ChartShapeDrawType
The shape draw type (null permitted).public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if some component of the axis does
not support cloning.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
-
The object (null permitted).
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 |