public class ExtendedCategoryAxis extends CategoryAxis
CategoryAxis
class that supports
sublabels on the axis.DEFAULT_AXIS_MARGIN, DEFAULT_CATEGORY_MARGIN
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_LABEL_FONT, DEFAULT_TICK_LABEL_INSETS, DEFAULT_TICK_LABEL_PAINT, DEFAULT_TICK_LABELS_VISIBLE, DEFAULT_TICK_MARK_INSIDE_LENGTH, DEFAULT_TICK_MARK_OUTSIDE_LENGTH, DEFAULT_TICK_MARK_PAINT, DEFAULT_TICK_MARK_STROKE, DEFAULT_TICK_MARKS_VISIBLE
Constructor and Description |
---|
ExtendedCategoryAxis(java.lang.String label)
Creates a new axis.
|
Modifier and Type | Method and Description |
---|---|
void |
addSubLabel(java.lang.Comparable category,
java.lang.String label)
Adds a sublabel for a category.
|
java.lang.Object |
clone()
Returns a clone of this axis.
|
protected org.jfree.text.TextBlock |
createLabel(java.lang.Comparable category,
float width,
org.jfree.ui.RectangleEdge edge,
java.awt.Graphics2D g2)
Overrides the default behaviour by adding the sublabel to the text
block that is used for the category label.
|
boolean |
equals(java.lang.Object obj)
Tests this axis for equality with an arbitrary object.
|
java.awt.Font |
getSubLabelFont()
Returns the font for the sublabels.
|
java.awt.Paint |
getSubLabelPaint()
Returns the paint for the sublabels.
|
void |
setSubLabelFont(java.awt.Font font)
Sets the font for the sublabels and sends an
AxisChangeEvent to
all registered listeners. |
void |
setSubLabelPaint(java.awt.Paint paint)
Sets the paint for the sublabels and sends an
AxisChangeEvent
to all registered listeners. |
addCategoryLabelToolTip, addCategoryLabelURL, calculateCategoryGapSize, calculateCategorySize, calculateTextBlockHeight, calculateTextBlockWidth, clearCategoryLabelToolTips, clearCategoryLabelURLs, configure, draw, drawCategoryLabels, drawCategoryLabels, drawTickMarks, getCategoryEnd, getCategoryJava2DCoordinate, getCategoryLabelPositionOffset, getCategoryLabelPositions, getCategoryLabelToolTip, getCategoryLabelURL, getCategoryMargin, getCategoryMiddle, getCategoryMiddle, getCategorySeriesMiddle, getCategorySeriesMiddle, getCategoryStart, getLowerMargin, getMaximumCategoryLabelLines, getMaximumCategoryLabelWidthRatio, getTickLabelFont, getTickLabelPaint, getUpperMargin, hashCode, refreshTicks, removeCategoryLabelToolTip, removeCategoryLabelURL, reserveSpace, setCategoryLabelPositionOffset, setCategoryLabelPositions, setCategoryMargin, setLowerMargin, setMaximumCategoryLabelLines, setMaximumCategoryLabelWidthRatio, setTickLabelFont, setTickLabelPaint, setUpperMargin
addChangeListener, createAndAddEntity, createAttributedLabel, drawAttributedLabel, drawAxisLine, drawLabel, fireChangeEvent, getAttributedLabel, getAxisLinePaint, getAxisLineStroke, getFixedDimension, getLabel, getLabelAngle, getLabelEnclosure, getLabelFont, getLabelInsets, getLabelLocation, getLabelPaint, getMinorTickMarkInsideLength, getMinorTickMarkOutsideLength, getPlot, getTickLabelFont, getTickLabelInsets, getTickLabelPaint, getTickMarkInsideLength, getTickMarkOutsideLength, getTickMarkPaint, getTickMarkStroke, hasListener, isAxisLineVisible, isMinorTickMarksVisible, isTickLabelsVisible, isTickMarksVisible, isVisible, labelAnchorH, labelAnchorV, labelLocationX, labelLocationY, notifyListeners, removeChangeListener, setAttributedLabel, setAttributedLabel, setAxisLinePaint, setAxisLineStroke, setAxisLineVisible, setFixedDimension, setLabel, setLabelAngle, setLabelFont, setLabelInsets, setLabelInsets, setLabelLocation, setLabelPaint, setMinorTickMarkInsideLength, setMinorTickMarkOutsideLength, setMinorTickMarksVisible, setPlot, setTickLabelFont, setTickLabelInsets, setTickLabelPaint, setTickLabelsVisible, setTickMarkInsideLength, setTickMarkOutsideLength, setTickMarkPaint, setTickMarkStroke, setTickMarksVisible, setVisible
public ExtendedCategoryAxis(java.lang.String label)
label
- the axis label.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 void addSubLabel(java.lang.Comparable category, java.lang.String label)
category
- the category.label
- the label.protected org.jfree.text.TextBlock createLabel(java.lang.Comparable category, float width, org.jfree.ui.RectangleEdge edge, java.awt.Graphics2D g2)
createLabel
in class CategoryAxis
category
- the category.width
- the width (not used yet).edge
- the location of the axis.g2
- the graphics device.public boolean equals(java.lang.Object obj)
equals
in class CategoryAxis
obj
- the object (null
permitted).public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class CategoryAxis
java.lang.CloneNotSupportedException
- if there is a problem cloning.