Package jadex.tools.comanalyzer.chart
Class ChartSubCategoryAxis
- java.lang.Object
-
- org.jfree.chart.axis.Axis
-
- org.jfree.chart.axis.CategoryAxis
-
- org.jfree.chart.axis.SubCategoryAxis
-
- jadex.tools.comanalyzer.chart.ChartSubCategoryAxis
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class ChartSubCategoryAxis extends org.jfree.chart.axis.SubCategoryAxis
Subclass that implements automatic label rotation for the axis, if the they dont fit in the given space. In addition the use of label generator for legend items is introduced.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.jfree.chart.axis.CategoryAxis
DEFAULT_AXIS_MARGIN, DEFAULT_CATEGORY_MARGIN
-
Fields inherited from class org.jfree.chart.axis.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_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 Summary
Constructors Constructor Description ChartSubCategoryAxis()
Create an axis without a label.ChartSubCategoryAxis(java.lang.String label)
Create an axis with a given label.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.jfree.text.TextBlock
createLabel(java.lang.Comparable category, float width, org.jfree.ui.RectangleEdge edge, java.awt.Graphics2D g2)
Creates a label by using the BaseItemLabelGenerator form the plot.org.jfree.chart.axis.AxisState
draw(java.awt.Graphics2D g2, double cursor, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D dataArea, org.jfree.ui.RectangleEdge edge, org.jfree.chart.plot.PlotRenderingInfo plotState)
Calculats the width for the passed labels and if they dont fit in the data area set a rotation label position.-
Methods inherited from class org.jfree.chart.axis.SubCategoryAxis
addSubCategory, drawSubCategoryLabels, equals, getSubLabelFont, getSubLabelPaint, reserveSpace, setSubLabelFont, setSubLabelPaint
-
Methods inherited from class org.jfree.chart.axis.CategoryAxis
addCategoryLabelToolTip, calculateCategoryGapSize, calculateCategorySize, calculateTextBlockHeight, calculateTextBlockWidth, clearCategoryLabelToolTips, clone, configure, drawCategoryLabels, drawCategoryLabels, getCategoryEnd, getCategoryJava2DCoordinate, getCategoryLabelPositionOffset, getCategoryLabelPositions, getCategoryLabelToolTip, getCategoryMargin, getCategoryMiddle, getCategoryMiddle, getCategorySeriesMiddle, getCategoryStart, getLowerMargin, getMaximumCategoryLabelLines, getMaximumCategoryLabelWidthRatio, getTickLabelFont, getTickLabelPaint, getUpperMargin, hashCode, refreshTicks, removeCategoryLabelToolTip, setCategoryLabelPositionOffset, setCategoryLabelPositions, setCategoryMargin, setLowerMargin, setMaximumCategoryLabelLines, setMaximumCategoryLabelWidthRatio, setTickLabelFont, setTickLabelPaint, setUpperMargin
-
Methods inherited from class org.jfree.chart.axis.Axis
addChangeListener, drawAxisLine, drawLabel, fireChangeEvent, getAxisLinePaint, getAxisLineStroke, getFixedDimension, getLabel, getLabelAngle, getLabelEnclosure, getLabelFont, getLabelInsets, getLabelPaint, getMinorTickMarkInsideLength, getMinorTickMarkOutsideLength, getPlot, getTickLabelFont, getTickLabelInsets, getTickLabelPaint, getTickMarkInsideLength, getTickMarkOutsideLength, getTickMarkPaint, getTickMarkStroke, hasListener, isAxisLineVisible, isMinorTickMarksVisible, isTickLabelsVisible, isTickMarksVisible, isVisible, notifyListeners, removeChangeListener, setAxisLinePaint, setAxisLineStroke, setAxisLineVisible, setFixedDimension, setLabel, setLabelAngle, setLabelFont, setLabelInsets, setLabelInsets, setLabelPaint, setMinorTickMarkInsideLength, setMinorTickMarkOutsideLength, setMinorTickMarksVisible, setPlot, setTickLabelFont, setTickLabelInsets, setTickLabelPaint, setTickLabelsVisible, setTickMarkInsideLength, setTickMarkOutsideLength, setTickMarkPaint, setTickMarkStroke, setTickMarksVisible, setVisible
-
-
-
-
Method Detail
-
draw
public org.jfree.chart.axis.AxisState draw(java.awt.Graphics2D g2, double cursor, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D dataArea, org.jfree.ui.RectangleEdge edge, org.jfree.chart.plot.PlotRenderingInfo plotState)
Calculats the width for the passed labels and if they dont fit in the data area set a rotation label position. The actual drawing is done by delegating to the superclass.- Overrides:
draw
in classorg.jfree.chart.axis.SubCategoryAxis
-
createLabel
protected org.jfree.text.TextBlock createLabel(java.lang.Comparable category, float width, org.jfree.ui.RectangleEdge edge, java.awt.Graphics2D g2)
Creates a label by using the BaseItemLabelGenerator form the plot.- Overrides:
createLabel
in classorg.jfree.chart.axis.CategoryAxis
- Parameters:
category
- the category.width
- the available width.edge
- the edge on which the axis appears.g2
- the graphics device.- Returns:
- A label.
-
-