|
Header
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jfree.chart.axis.Axis org.jfree.chart.axis.CategoryAxis org.jfree.chart.axis.SubCategoryAxis
public class SubCategoryAxis
A specialised category axis that can display sub-categories.
Field Summary |
---|
Fields inherited from class org.jfree.chart.axis.CategoryAxis |
---|
DEFAULT_AXIS_MARGIN, DEFAULT_CATEGORY_MARGIN |
Constructor Summary | |
---|---|
SubCategoryAxis(java.lang.String label)
Creates a new axis. |
Method Summary | |
---|---|
void |
addSubCategory(java.lang.Comparable subCategory)
Adds a sub-category to the axis and sends an AxisChangeEvent to
all registered listeners. |
AxisState |
draw(java.awt.Graphics2D g2,
double cursor,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D dataArea,
org.jfree.ui.RectangleEdge edge,
PlotRenderingInfo plotState)
Draws the axis on a Java 2D graphics device (such as the screen or a printer). |
protected AxisState |
drawSubCategoryLabels(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D dataArea,
org.jfree.ui.RectangleEdge edge,
AxisState state,
PlotRenderingInfo plotState)
Draws the category labels and returns the updated axis state. |
boolean |
equals(java.lang.Object obj)
Tests the axis for equality with an arbitrary object. |
java.awt.Font |
getSubLabelFont()
Returns the font used to display the sub-category labels. |
java.awt.Paint |
getSubLabelPaint()
Returns the paint used to display the sub-category labels. |
AxisSpace |
reserveSpace(java.awt.Graphics2D g2,
Plot plot,
java.awt.geom.Rectangle2D plotArea,
org.jfree.ui.RectangleEdge edge,
AxisSpace space)
Estimates the space required for the axis, given a specific drawing area. |
void |
setSubLabelFont(java.awt.Font font)
Sets the font used to display the sub-category labels and sends an AxisChangeEvent to all registered listeners. |
void |
setSubLabelPaint(java.awt.Paint paint)
Sets the paint used to display the sub-category labels and sends an AxisChangeEvent to all registered listeners. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SubCategoryAxis(java.lang.String label)
label
- the axis label.Method Detail |
---|
public void addSubCategory(java.lang.Comparable subCategory)
AxisChangeEvent
to
all registered listeners.
subCategory
- the sub-category (null
not permitted).public java.awt.Font getSubLabelFont()
null
).setSubLabelFont(Font)
public void setSubLabelFont(java.awt.Font font)
AxisChangeEvent
to all registered listeners.
font
- the font (null
not permitted).getSubLabelFont()
public java.awt.Paint getSubLabelPaint()
null
).setSubLabelPaint(Paint)
public void setSubLabelPaint(java.awt.Paint paint)
AxisChangeEvent
to all registered listeners.
paint
- the paint (null
not permitted).getSubLabelPaint()
public AxisSpace reserveSpace(java.awt.Graphics2D g2, Plot plot, java.awt.geom.Rectangle2D plotArea, org.jfree.ui.RectangleEdge edge, AxisSpace space)
reserveSpace
in class CategoryAxis
g2
- the graphics device (used to obtain font information).plot
- the plot that the axis belongs to.plotArea
- the area within which the axis should be drawn.edge
- the axis location (top or bottom).space
- the space already reserved.
public AxisState draw(java.awt.Graphics2D g2, double cursor, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D dataArea, org.jfree.ui.RectangleEdge edge, PlotRenderingInfo plotState)
draw
in class CategoryAxis
g2
- the graphics device (null
not permitted).cursor
- the cursor location.plotArea
- the area within which the axis should be drawn
(null
not permitted).dataArea
- the area within which the plot is being drawn
(null
not permitted).edge
- the location of the axis (null
not permitted).plotState
- collects information about the plot
(null
permitted).
null
).protected AxisState drawSubCategoryLabels(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D dataArea, org.jfree.ui.RectangleEdge edge, AxisState state, PlotRenderingInfo plotState)
g2
- the graphics device (null
not permitted).plotArea
- the plot area (null
not permitted).dataArea
- the area inside the axes (null
not
permitted).edge
- the axis location (null
not permitted).state
- the axis state (null
not permitted).plotState
- collects information about the plot (null
permitted).
null
).public boolean equals(java.lang.Object obj)
equals
in class CategoryAxis
obj
- the object (null
permitted).
|
Footer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |