com.ijchart.xychart.chartinfo
Interface IShapeCollection

All Known Implementing Classes:
AbstractShapeCollection, AnnotationShapeCollection, AxisShapeCollection, ChartShapeCollection, LegendShapeCollection, PlotShapeCollection, RenderShapeCollection, TitleShapeCollection

public interface IShapeCollection

Title: IJChart

Description: a chart library for the Java(tm) platform.

All elements in chart is a IChartShape , type is:title,legend,X-axis,Y-axis(possible multiple),main. Each type need to define a separate class to store IChartShape elements.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.

Method Summary
 void clearSelectedShapes()
           Sets all shapes to unselected.
 void clearShapesListener()
           Remove all the shapes of the listener.
 void draw(java.awt.Graphics2D g2)
           Drawing all ChartShape in this collection.
 IChartShape findChartShape(java.awt.geom.Point2D point, ChartShapeDrawType drawType)
           Returns the IChartShape whose area contains the specified point.
 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.
 boolean isDrawAreaContains(java.awt.geom.Point2D point)
           Whether or not the draw area contains a point.
 void resetShapeIdSequence()
           Reset the sequence of shape to 0.
 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.
 void translate(double x, double y)
           Translates the origin of the all shape in this chart to the point (x, y) in the current coordinate system.
 

Method Detail

setDrawArea

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.

Parameters:
drawArea - Rectangle2D The draw area for all shapes (null permitted).

getDrawArea

java.awt.geom.Rectangle2D getDrawArea()
Returns the draw area for all shapes.

Returns:
Rectangle2D The draw area for all shapes.

isDrawAreaContains

boolean isDrawAreaContains(java.awt.geom.Point2D point)
Whether or not the draw area contains a point.

Parameters:
point - Point2D The point (null not permitted).
Returns:
boolean Returns true if the draw area contains point,otherwise return false.

findChartShape

IChartShape findChartShape(java.awt.geom.Point2D point,
                           ChartShapeDrawType drawType)
Returns the IChartShape whose area contains the specified point.

Parameters:
point - Point2D The point (null not permitted).
drawType - ChartShapeDrawType The shape draw shape (null permitted).
Returns:
IChartShape The chart shape (maybe null).

draw

void draw(java.awt.Graphics2D g2)
Drawing all ChartShape in this collection.

Parameters:
g2 - Graphics2D The graphics device (null not permitted).

translate

void translate(double x,
               double y)
Translates the origin of the all shape in this chart to the point (x, y) in the current coordinate system.

Parameters:
x - double The x coordinate.
y - double The y coordinate.

clearShapesListener

void clearShapesListener()
Remove all the shapes of the listener.


resetShapeIdSequence

void resetShapeIdSequence()
Reset the sequence of shape to 0.


clearSelectedShapes

void clearSelectedShapes()
Sets all shapes to unselected.


getHotspotAreas

java.util.List getHotspotAreas(java.util.List drawTypes,
                               IAreaFragment fragment)
Returns the hotspot areas.

Parameters:
drawTypes - List The types of hotspot shape (null not permitted).
fragment - IAreaFragment The IAreaFragment object (maybe null).
Returns:
List The hotspot areas (never null).