org.jfree.chart.axis
Class ExtendedCategoryAxis
- Cloneable, Serializable
An extended version of the
CategoryAxis
class that supports
sublabels on the axis.
DEFAULT_AXIS_LABEL_FONT , DEFAULT_AXIS_LABEL_INSETS , DEFAULT_AXIS_LABEL_PAINT , DEFAULT_AXIS_LINE_PAINT , DEFAULT_AXIS_LINE_STROKE , DEFAULT_AXIS_VISIBLE , DEFAULT_TICK_LABELS_VISIBLE , DEFAULT_TICK_LABEL_FONT , DEFAULT_TICK_LABEL_INSETS , DEFAULT_TICK_LABEL_PAINT , DEFAULT_TICK_MARKS_VISIBLE , DEFAULT_TICK_MARK_INSIDE_LENGTH , DEFAULT_TICK_MARK_OUTSIDE_LENGTH , DEFAULT_TICK_MARK_PAINT , DEFAULT_TICK_MARK_STROKE |
void | addSubLabel(Comparable category, String label) - Adds a sublabel for a category.
|
Object | clone() - Returns a clone of this axis.
|
protected TextBlock | createLabel(Comparable category, float width, RectangleEdge edge, Graphics2D g2) - Overrides the default behaviour by adding the sublabel to the text
block that is used for the category label.
|
boolean | equals(Object obj) - Tests this axis for equality with an arbitrary object.
|
Font | getSubLabelFont() - Returns the font for the sublabels.
|
Paint | getSubLabelPaint() - Returns the paint for the sublabels.
|
void | setSubLabelFont(Font font) - Sets the font for the sublabels and sends an
AxisChangeEvent to
all registered listeners.
|
void | setSubLabelPaint(Paint paint) - Sets the paint for the sublabels and sends an
AxisChangeEvent
to all registered listeners.
|
addCategoryLabelToolTip , calculateCategoryGapSize , calculateCategorySize , calculateTextBlockHeight , calculateTextBlockWidth , clearCategoryLabelToolTips , clone , configure , createLabel , draw , drawCategoryLabels , drawCategoryLabels , equals , getCategoryEnd , getCategoryJava2DCoordinate , getCategoryLabelPositionOffset , getCategoryLabelPositions , getCategoryLabelToolTip , getCategoryMargin , getCategoryMiddle , getCategoryStart , getLowerMargin , getMaximumCategoryLabelLines , getMaximumCategoryLabelWidthRatio , getTickLabelFont , getTickLabelPaint , getUpperMargin , hashCode , refreshTicks , removeCategoryLabelToolTip , reserveSpace , setCategoryLabelPositionOffset , setCategoryLabelPositions , setCategoryMargin , setLowerMargin , setMaximumCategoryLabelLines , setMaximumCategoryLabelWidthRatio , setTickLabelFont , setTickLabelPaint , setUpperMargin |
addChangeListener , clone , configure , draw , drawAxisLine , drawLabel , equals , getAxisLinePaint , getAxisLineStroke , getFixedDimension , getLabel , getLabelAngle , getLabelEnclosure , getLabelFont , getLabelInsets , getLabelPaint , getPlot , getTickLabelFont , getTickLabelInsets , getTickLabelPaint , getTickMarkInsideLength , getTickMarkOutsideLength , getTickMarkPaint , getTickMarkStroke , hasListener , isAxisLineVisible , isTickLabelsVisible , isTickMarksVisible , isVisible , notifyListeners , refreshTicks , removeChangeListener , reserveSpace , setAxisLinePaint , setAxisLineStroke , setAxisLineVisible , setFixedDimension , setLabel , setLabelAngle , setLabelFont , setLabelInsets , setLabelPaint , setPlot , setTickLabelFont , setTickLabelInsets , setTickLabelPaint , setTickLabelsVisible , setTickMarkInsideLength , setTickMarkOutsideLength , setTickMarkPaint , setTickMarkStroke , setTickMarksVisible , setVisible |
addSubLabel
public void addSubLabel(Comparable category,
String label)
Adds a sublabel for a category.
category
- the category.label
- the label.
clone
public Object clone()
throws CloneNotSupportedException
Returns a clone of this axis.
- clone in interface CategoryAxis
createLabel
protected TextBlock createLabel(Comparable category,
float width,
RectangleEdge edge,
Graphics2D g2)
Overrides the default behaviour by adding the sublabel to the text
block that is used for the category label.
- createLabel in interface CategoryAxis
category
- the category.width
- the width (not used yet).edge
- the location of the axis.g2
- the graphics device.
equals
public boolean equals(Object obj)
Tests this axis for equality with an arbitrary object.
- equals in interface CategoryAxis
obj
- the object (null
permitted).
getSubLabelFont
public Font getSubLabelFont()
Returns the font for the sublabels.
getSubLabelPaint
public Paint getSubLabelPaint()
Returns the paint for the sublabels.
setSubLabelFont
public void setSubLabelFont(Font font)
Sets the font for the sublabels and sends an
AxisChangeEvent
to
all registered listeners.
font
- the font (null
not permitted).
setSubLabelPaint
public void setSubLabelPaint(Paint paint)
Sets the paint for the sublabels and sends an
AxisChangeEvent
to all registered listeners.
paint
- the paint (null
not permitted).