com.ijchart.xychart.chartinfo
Class AxisShapeCollection

java.lang.Object
  extended by com.ijchart.xychart.chartinfo.AbstractShapeCollection
      extended by com.ijchart.xychart.chartinfo.AxisShapeCollection
All Implemented Interfaces:
IShapeCollection, IChartShapeChangeListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener

public class AxisShapeCollection
extends AbstractShapeCollection
implements java.lang.Cloneable, java.io.Serializable

Title: IJChart

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

Collection to be used to store the shapes in axis.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ijchart.xychart.chartinfo.AbstractShapeCollection
shapeIdSequence
 
Constructor Summary
AxisShapeCollection()
           No argument constructor.
 
Method Summary
 void addAxisLabelShape(IChartShape axisLabelShape)
           Add an axis label shape.
 void addAxisLine3DShape(IChartShape line3DShape)
           Add an axis line 3D area shape.
 void addAxisLineShape(IChartShape axisLineShape)
           Add an axis line shape.
 void addTickLabelShape(IChartShape labelShape)
           Add an axis tick label shape.
 void addTickMarkShape(IChartShape markShape)
           Add an axis tick mark shape.
 void clearAxisLabelShapes()
           Remove all axis label shapes.
 void clearAxisLine3DShapes()
           Remove all axis line 3D area shapes.
 void clearAxisLineShapes()
           Remove all axis line shapes.
 void clearSelectedShapes()
           Sets all shapes to unselected.
 void clearShapesListener()
           Remove all the shapes of the listener.
 void clearTickMarkShapes()
           Remove all tick mark shapes.
 java.lang.Object clone()
           Returns a clone of the axis.
 void copyShapes(AxisShapeCollection axisShapes)
           Add all shapes of a AxisShapeCollection to this object.
 void draw(java.awt.Graphics2D g2)
           Drawing all ChartShape in this collection.
 boolean equals(java.lang.Object obj)
           Tests this axis for equality with another object.
 IChartShape findChartShape(java.awt.geom.Point2D point, ChartShapeDrawType drawType)
           Returns the IChartShape whose area contains the specified point.
 java.util.List getAxisLabelShapes()
           Returns the list of axis label shapes and is unmodifiable.
 java.util.List getAxisLine3DShapes()
           Returns the list of axis line 3D area and is unmodifiable.
 java.util.List getAxisLineShapes()
           Returns the list of axis line shape and is unmodifiable.
 RectangleEdge getEdge()
           Returns the axis edge.
 java.util.List getHotspotAreas(java.util.List drawTypes, IAreaFragment fragment)
           Returns the hotspot areas.
 java.util.List getTickLabelShapes()
           Returns the list of axis tick label shapes and is unmodifiable.
 java.util.List getTickMarkShapes()
           Returns the list of axis tick mark shapes and is unmodifiable.
 int hashCode()
           Returns a hash code value for the object.
 void setEdge(RectangleEdge edge)
           Sets the axis edge.
 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.
 
Methods inherited from class com.ijchart.xychart.chartinfo.AbstractShapeCollection
addChangeListener, addHotspotArea, addHotspotArea, chartShapeChanged, clearSelectedShape, clearSelectedShape, clearShapesListener, clip, draw, findShape, fireChartShapeChanged, getDrawArea, hasListener, isDrawAreaContains, notifyListeners, removeAllChangeListener, removeChangeListener, removeShapesListener, resetShapeIdSequence, restoreClip, setDrawArea, translate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AxisShapeCollection

public AxisShapeCollection()
No argument constructor.

Method Detail

getEdge

public RectangleEdge getEdge()
Returns the axis edge.

Returns:
RectangleEdge The axis edge.

setEdge

public void setEdge(RectangleEdge edge)
Sets the axis edge.

Parameters:
edge - RectangleEdge The axis edge.

getAxisLabelShapes

public java.util.List getAxisLabelShapes()
Returns the list of axis label shapes and is unmodifiable.

Returns:
List The list of axis label shape (never null).

clearAxisLabelShapes

public void clearAxisLabelShapes()
Remove all axis label shapes.


addAxisLabelShape

public void addAxisLabelShape(IChartShape axisLabelShape)
Add an axis label shape.

Parameters:
axisLabelShape - IChartShape The axis label shape (null permitted).

addAxisLineShape

public void addAxisLineShape(IChartShape axisLineShape)
Add an axis line shape.

Parameters:
axisLineShape - IChartShape The axis line shape (null permitted).

getAxisLineShapes

public java.util.List getAxisLineShapes()
Returns the list of axis line shape and is unmodifiable.

Returns:
List The list of axis line shape (never null).

clearAxisLineShapes

public void clearAxisLineShapes()
Remove all axis line shapes.


addAxisLine3DShape

public void addAxisLine3DShape(IChartShape line3DShape)
Add an axis line 3D area shape.

Parameters:
line3DShape - IChartShape The axis line 3D area (null permitted).

getAxisLine3DShapes

public java.util.List getAxisLine3DShapes()
Returns the list of axis line 3D area and is unmodifiable.

Returns:
List The list of axis line 3D area (never null).

clearAxisLine3DShapes

public void clearAxisLine3DShapes()
Remove all axis line 3D area shapes.


addTickLabelShape

public void addTickLabelShape(IChartShape labelShape)
Add an axis tick label shape.

Parameters:
labelShape - IChartShape An axis tick label shape (null permitted).

getTickLabelShapes

public java.util.List getTickLabelShapes()
Returns the list of axis tick label shapes and is unmodifiable.

Returns:
IChartShape The list of axis tick label shapes and is unmodifiable.

addTickMarkShape

public void addTickMarkShape(IChartShape markShape)
Add an axis tick mark shape.

Parameters:
markShape - IChartShape An axis tick mark shape (null permitted).

getTickMarkShapes

public java.util.List getTickMarkShapes()
Returns the list of axis tick mark shapes and is unmodifiable.

Returns:
IChartShape The list of axis tick mark shapes and is unmodifiable.

clearTickMarkShapes

public void clearTickMarkShapes()
Remove all tick mark shapes.


draw

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

Specified by:
draw in interface IShapeCollection
Parameters:
g2 - Graphics2D The graphics device (null not permitted).

translate

public 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.

Specified by:
translate in interface IShapeCollection
Overrides:
translate in class AbstractShapeCollection
Parameters:
x - double The x coordinate.
y - double The y coordinate.

clearShapesListener

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

Specified by:
clearShapesListener in interface IShapeCollection

clearSelectedShapes

public void clearSelectedShapes()
Sets all shapes to unselected.

Specified by:
clearSelectedShapes in interface IShapeCollection

copyShapes

public void copyShapes(AxisShapeCollection axisShapes)
Add all shapes of a AxisShapeCollection to this object.

Parameters:
axisShapes - AxisShapeCollection The AxisShapeCollection (null permitted).

findChartShape

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

Specified by:
findChartShape in interface IShapeCollection
Parameters:
point - Point2D The point (null not permitted).
drawType - ChartShapeDrawType The shape draw shape (null permitted).
Returns:
IChartShape The chart shape (maybe null).

getHotspotAreas

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

Specified by:
getHotspotAreas in interface IShapeCollection
Overrides:
getHotspotAreas in class AbstractShapeCollection
Parameters:
drawTypes - List The types of hotspot shape.
fragment - IAreaFragment The IAreaFragment object (maybe null).
Returns:
List The hotspot areas (never null).

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a clone of the axis.

Overrides:
clone in class AbstractShapeCollection
Returns:
A clone.
Throws:
java.lang.CloneNotSupportedException - if some component of the axis does not support cloning.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class AbstractShapeCollection
Returns:
A hash code value for this object.

equals

public boolean equals(java.lang.Object obj)
Tests this axis for equality with another object.

Overrides:
equals in class AbstractShapeCollection
Parameters:
obj - The object (null permitted).
Returns:
true or false.

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class AbstractShapeCollection
Returns:
A string representation of the object.