|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.axis.AbstractAxis
com.ijchart.xychart.axis.category.CategoryAxis
com.ijchart.xychart.axis.category.GroupCategoryAxis
public class GroupCategoryAxis
Title: IJChart
Description: a chart library for the Java(tm) platform.
A group category axis that can display group-categories.Copyright: Copyright (c) 2013
Company:
Field Summary |
---|
Fields inherited from class com.ijchart.xychart.axis.category.CategoryAxis |
---|
acategoryWidth, categoryLabelPosition, DEFAULT_CATEGORY_MARGIN, DEFAULT_HORIZONTAL_ALIGNMENT, DEFAULT_MAX_CATEGORY_LABEL_LINE |
Constructor Summary | |
---|---|
GroupCategoryAxis(AbstractCategoryRender categoryRender,
IMatrixDataset dataset)
Constructs an axis using a dataset. |
|
GroupCategoryAxis(AbstractCategoryRender categoryRender,
java.lang.String label,
IMatrixDataset dataset)
Constructs an axis using label and a dataset. |
Method Summary | |
---|---|
void |
addSubCategoryAxis(CategoryAxis categoryAxis)
Adds a sub-category to the axis and sends an AxisChangeEvent to all registered listeners. |
double |
calculateAxisSpace(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D maxAxisArea,
RectangleEdge edge)
Calculation the width or height of painting coordinate axis. |
java.lang.Object |
clone()
Creates a clone of the axis. |
double |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D axisArea,
RectangleEdge edge,
AxisShapeCollection shapeCollection,
boolean alignEdge)
Draw the X-axis or Y-axis on plot area(plotArea).All axis shape is stored in shapeCollection. |
protected double |
drawTickLabel(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D axisArea,
RectangleEdge edge,
AxisShapeCollection shapeCollection,
double cursor)
Draws tick mark labels in a specified area and edge. |
boolean |
equals(java.lang.Object obj)
Tests this axis for equality with an arbitrary object. |
AbstractCategoryRender |
getCategoryRender()
Returns the render for category item. |
protected java.lang.String[] |
getFormatedTickLabels(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D maxAxisArea,
RectangleEdge edge)
Returns the formated tick labels. |
java.util.List |
getSubCategoryAxes()
Returns the collection of sub-category axes,this list is unmodifiable. |
int |
getSubCategoryAxisCount()
Returns the size of sub-category axes. |
int |
hashCode()
Returns a hash code for this object. |
void |
removeAllSubCategoryAxes()
Remove all sub-category axes. |
CategoryAxis |
removeSubCategoryAxis(int index)
Removes the category at the specified position and sends an AxisChangeEvent to all registered listeners. |
void |
setCategoryRender(AbstractCategoryRender categoryRender)
Sets the render for category item and sends an AxisChangeEvent to all registered listeners. |
Methods inherited from class com.ijchart.xychart.axis.category.CategoryAxis |
---|
addCategoryMarker, categoryToJava2D, clearCategoryMarkers, createChartShape, drawGridLine, drawTickMark, getCategoryLabelHorizontalAlignment, getCategoryMargin, getCategoryMarkers, getLabelMaxDrawWidth, getMaximumCategoryLabelLines, markerChanged, removeCategoryMarker, setCategoryLabelHorizontalAlignment, setCategoryMargin, setMaximumCategoryLabelLines |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ijchart.xychart.listener.IMarkerChangeListener |
---|
markerChanged |
Constructor Detail |
---|
public GroupCategoryAxis(AbstractCategoryRender categoryRender, IMatrixDataset dataset)
categoryRender
- AbstractCategoryRender
The render for category item (null not permitted).dataset
- IMatrixDataset
The two dimension matrix dataset (null not permitted).public GroupCategoryAxis(AbstractCategoryRender categoryRender, java.lang.String label, IMatrixDataset dataset)
categoryRender
- AbstractCategoryRender
The render for category item (null not permitted).label
-
The axis label (null permitted).dataset
- IMatrixDataset
The two dimension matrix dataset (null not permitted).Method Detail |
---|
public void addSubCategoryAxis(CategoryAxis categoryAxis)
AxisChangeEvent
to all registered listeners.
categoryAxis
- CategoryAxis
The sub-category (null not permitted).public int getSubCategoryAxisCount()
public java.util.List getSubCategoryAxes()
public CategoryAxis removeSubCategoryAxis(int index)
AxisChangeEvent
to all registered listeners.
index
- int
The index.
public void removeAllSubCategoryAxes()
public AbstractCategoryRender getCategoryRender()
public void setCategoryRender(AbstractCategoryRender categoryRender)
AxisChangeEvent
to all registered listeners.
categoryRender
- AbstractCategoryRenderpublic double calculateAxisSpace(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D maxAxisArea, RectangleEdge edge)
calculateAxisSpace
in interface IAxis
calculateAxisSpace
in class AbstractAxis
g2
- Graphics2D
The graphics device (null not permitted).plotArea
- Rectangle2D
The area within which the plot should be drawn.maxAxisArea
- Rectangle2D
The maximum area within which the axis should be drawn.edge
- RectangleEdge
The axis position.
public double draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D axisArea, RectangleEdge edge, AxisShapeCollection shapeCollection, boolean alignEdge)
draw
in interface IAxis
draw
in class AbstractAxis
g2
- Graphics2D
The graphics device (null not permitted).plotArea
- Rectangle2D
The area within which the plot should be drawn.axisArea
- Rectangle2D
The empty chart area.edge
- RectangleEdge
The axis position.shapeCollection
- AxisShapeCollection
Collects information about the axis (null permitted).alignEdge
- boolean
Controls whether or not translate shapes when the draw area less than the axis area.
protected double drawTickLabel(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D axisArea, RectangleEdge edge, AxisShapeCollection shapeCollection, double cursor)
drawTickLabel
in class CategoryAxis
g2
- Graphics2D
The graphics device (null not permitted).plotArea
- Rectangle2D
The area within which the plot should be drawn.axisArea
- Rectangle2D
The empty chart area.edge
- RectangleEdge
The axis position.shapeCollection
- AxisShapeCollection
Collects information about the axis (null permitted).cursor
-
The cursor location.
protected java.lang.String[] getFormatedTickLabels(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D maxAxisArea, RectangleEdge edge)
getFormatedTickLabels
in class CategoryAxis
g2
- Graphics2D
The graphics device (null permitted).maxAxisArea
- Rectangle2D
The maximum area within which the axis should be drawn (null permitted).edge
- RectangleEdge
The axis position (null permitted).
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class CategoryAxis
java.lang.CloneNotSupportedException
- if some component of the axis does
not support cloning.public boolean equals(java.lang.Object obj)
equals
in class CategoryAxis
obj
-
The object (null permitted).
public int hashCode()
hashCode
in class CategoryAxis
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |