org.jfree.chart.axis
Class CategoryLabelPositions

java.lang.Object
  extended byorg.jfree.chart.axis.CategoryLabelPositions
All Implemented Interfaces:
java.io.Serializable

public class CategoryLabelPositions
extends java.lang.Object
implements java.io.Serializable

Records the label positions for a category axis.

See Also:
Serialized Form

Field Summary
static CategoryLabelPositions DOWN_45
          DOWN_45 category label positions.
static CategoryLabelPositions DOWN_90
          DOWN_90 category label positions.
static CategoryLabelPositions STANDARD
          STANDARD category label positions.
static CategoryLabelPositions UP_45
          UP_45 category label positions.
static CategoryLabelPositions UP_90
          UP_90 category label positions.
 
Constructor Summary
CategoryLabelPositions()
          Default constructor.
CategoryLabelPositions(CategoryLabelPosition positionForAxisAtTop, CategoryLabelPosition positionForAxisAtBottom, CategoryLabelPosition positionForAxisAtLeft, CategoryLabelPosition positionForAxisAtRight)
          Creates a new position specification.
 
Method Summary
static CategoryLabelPositions createDownRotationLabelPositions(double angle)
          Creates a new instance where the category labels angled downwards by the specified amount.
static CategoryLabelPositions createUpRotationLabelPositions(double angle)
          Creates a new instance where the category labels angled upwards by the specified amount.
 CategoryLabelPosition getLabelPosition(org.jfree.ui.RectangleEdge edge)
          Returns the category label position specification for an axis at the given location.
static CategoryLabelPositions replaceBottomPosition(CategoryLabelPositions base, CategoryLabelPosition bottom)
          Returns a new instance based on an existing instance but with the bottom position changed.
static CategoryLabelPositions replaceLeftPosition(CategoryLabelPositions base, CategoryLabelPosition left)
          Returns a new instance based on an existing instance but with the left position changed.
static CategoryLabelPositions replaceRightPosition(CategoryLabelPositions base, CategoryLabelPosition right)
          Returns a new instance based on an existing instance but with the right position changed.
static CategoryLabelPositions replaceTopPosition(CategoryLabelPositions base, CategoryLabelPosition top)
          Returns a new instance based on an existing instance but with the top position changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STANDARD

public static CategoryLabelPositions STANDARD
STANDARD category label positions.


UP_90

public static CategoryLabelPositions UP_90
UP_90 category label positions.


DOWN_90

public static CategoryLabelPositions DOWN_90
DOWN_90 category label positions.


UP_45

public static CategoryLabelPositions UP_45
UP_45 category label positions.


DOWN_45

public static CategoryLabelPositions DOWN_45
DOWN_45 category label positions.

Constructor Detail

CategoryLabelPositions

public CategoryLabelPositions()
Default constructor.


CategoryLabelPositions

public CategoryLabelPositions(CategoryLabelPosition positionForAxisAtTop,
                              CategoryLabelPosition positionForAxisAtBottom,
                              CategoryLabelPosition positionForAxisAtLeft,
                              CategoryLabelPosition positionForAxisAtRight)
Creates a new position specification.

Parameters:
positionForAxisAtTop - the label position info used when an axis is at the top;
positionForAxisAtBottom - the label position info used when an axis is at the bottom;
positionForAxisAtLeft - the label position info used when an axis is at the left;
positionForAxisAtRight - the label position info used when an axis is at the right;
Method Detail

createUpRotationLabelPositions

public static CategoryLabelPositions createUpRotationLabelPositions(double angle)
Creates a new instance where the category labels angled upwards by the specified amount.

Parameters:
angle - the rotation angle (should be < Math.PI / 2.0).
Returns:
A category label position specification.

createDownRotationLabelPositions

public static CategoryLabelPositions createDownRotationLabelPositions(double angle)
Creates a new instance where the category labels angled downwards by the specified amount.

Parameters:
angle - the rotation angle (should be < Math.PI / 2.0).
Returns:
A category label position specification.

getLabelPosition

public CategoryLabelPosition getLabelPosition(org.jfree.ui.RectangleEdge edge)
Returns the category label position specification for an axis at the given location.

Parameters:
edge - the axis location.
Returns:
The category label position specification.

replaceTopPosition

public static CategoryLabelPositions replaceTopPosition(CategoryLabelPositions base,
                                                        CategoryLabelPosition top)
Returns a new instance based on an existing instance but with the top position changed.

Parameters:
base - the base.
top - the top position.
Returns:
A new instance.

replaceBottomPosition

public static CategoryLabelPositions replaceBottomPosition(CategoryLabelPositions base,
                                                           CategoryLabelPosition bottom)
Returns a new instance based on an existing instance but with the bottom position changed.

Parameters:
base - the base.
bottom - the bottom position.
Returns:
A new instance.

replaceLeftPosition

public static CategoryLabelPositions replaceLeftPosition(CategoryLabelPositions base,
                                                         CategoryLabelPosition left)
Returns a new instance based on an existing instance but with the left position changed.

Parameters:
base - the base.
left - the left position.
Returns:
A new instance.

replaceRightPosition

public static CategoryLabelPositions replaceRightPosition(CategoryLabelPositions base,
                                                          CategoryLabelPosition right)
Returns a new instance based on an existing instance but with the right position changed.

Parameters:
base - the base.
right - the right position.
Returns:
A new instance.