|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.chart.axis.Axis
org.jfree.chart.axis.CategoryAxis
org.jfree.chart.axis.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, logger |
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. |
AxisState |
draw(java.awt.Graphics2D g2,
double cursor,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D dataArea,
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,
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,
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, hashCode, 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)
subCategory
- the sub-category.public java.awt.Font getSubLabelFont()
null
).public void setSubLabelFont(java.awt.Font font)
AxisChangeEvent
to all registered listeners.
font
- the font (null
not permitted).public java.awt.Paint getSubLabelPaint()
null
).public void setSubLabelPaint(java.awt.Paint paint)
AxisChangeEvent
to all registered listeners.
paint
- the paint (null
not permitted).public AxisSpace reserveSpace(java.awt.Graphics2D g2, Plot plot, java.awt.geom.Rectangle2D plotArea, 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, 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, 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).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |