public class

ExtendedCategoryAxis

extends CategoryAxis
java.lang.Object
   ↳ org.jfree.chart.axis.Axis
     ↳ org.jfree.chart.axis.CategoryAxis
       ↳ org.jfree.chart.axis.ExtendedCategoryAxis

Class Overview

An extended version of the CategoryAxis class that supports sublabels on the axis.

Summary

[Expand]
Inherited Constants
From class org.jfree.chart.axis.CategoryAxis
From class org.jfree.chart.axis.Axis
[Expand]
Inherited Fields
From class org.jfree.chart.axis.Axis
Public Constructors
ExtendedCategoryAxis(String label)
Creates a new axis.
Public Methods
void addSubLabel(Comparable category, String label)
Adds a sublabel for a category.
Object clone()
Returns a clone of this axis.
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.
Protected Methods
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.
[Expand]
Inherited Methods
From class org.jfree.chart.axis.CategoryAxis
From class org.jfree.chart.axis.Axis
From class java.lang.Object

Public Constructors

public ExtendedCategoryAxis (String label)

Creates a new axis.

Parameters
label the axis label.

Public Methods

public void addSubLabel (Comparable category, String label)

Adds a sublabel for a category.

Parameters
category the category.
label the label.

public Object clone ()

Returns a clone of this axis.

Returns
  • A clone.
Throws
CloneNotSupportedException if there is a problem cloning.

public boolean equals (Object obj)

Tests this axis for equality with an arbitrary object.

Parameters
obj the object (null permitted).
Returns
  • A boolean.

public Font getSubLabelFont ()

Returns the font for the sublabels.

Returns
  • The font (never null).

public Paint getSubLabelPaint ()

Returns the paint for the sublabels.

Returns
  • The paint (never null).

public void setSubLabelFont (Font font)

Sets the font for the sublabels and sends an AxisChangeEvent to all registered listeners.

Parameters
font the font (null not permitted).

public void setSubLabelPaint (Paint paint)

Sets the paint for the sublabels and sends an AxisChangeEvent to all registered listeners.

Parameters
paint the paint (null not permitted).

Protected Methods

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.

Parameters
category the category.
width the width (not used yet).
edge the location of the axis.
g2 the graphics device.
Returns
  • A label.