Package org.jfree.chart.axis
Class CategoryLabelPositions
java.lang.Object
org.jfree.chart.axis.CategoryLabelPositions
- All Implemented Interfaces:
 Serializable
public class CategoryLabelPositions extends Object implements Serializable
Records the label positions for a category axis. Instances of this class are
 immutable.
- See Also:
 - Serialized Form
 
- 
Field Summary
Fields Modifier and Type Field Description static CategoryLabelPositionsDOWN_45DOWN_45 category label positions.static CategoryLabelPositionsDOWN_90DOWN_90 category label positions.static CategoryLabelPositionsSTANDARDSTANDARD category label positions.static CategoryLabelPositionsUP_45UP_45 category label positions.static CategoryLabelPositionsUP_90UP_90 category label positions. - 
Constructor Summary
Constructors Constructor Description CategoryLabelPositions()Default constructor.CategoryLabelPositions(CategoryLabelPosition top, CategoryLabelPosition bottom, CategoryLabelPosition left, CategoryLabelPosition right)Creates a new position specification. - 
Method Summary
Modifier and Type Method Description static CategoryLabelPositionscreateDownRotationLabelPositions(double angle)Creates a new instance where the category labels angled downwards by the specified amount.static CategoryLabelPositionscreateUpRotationLabelPositions(double angle)Creates a new instance where the category labels angled upwards by the specified amount.booleanequals(Object o)Returnstrueif this object is equal to the specified object, andfalseotherwise.CategoryLabelPositiongetLabelPosition(org.jfree.ui.RectangleEdge edge)Returns the category label position specification for an axis at the given location.static CategoryLabelPositionsreplaceBottomPosition(CategoryLabelPositions base, CategoryLabelPosition bottom)Returns a new instance based on an existing instance but with the bottom position changed.static CategoryLabelPositionsreplaceLeftPosition(CategoryLabelPositions base, CategoryLabelPosition left)Returns a new instance based on an existing instance but with the left position changed.static CategoryLabelPositionsreplaceRightPosition(CategoryLabelPositions base, CategoryLabelPosition right)Returns a new instance based on an existing instance but with the right position changed.static CategoryLabelPositionsreplaceTopPosition(CategoryLabelPositions base, CategoryLabelPosition top)Returns a new instance based on an existing instance but with the top position changed. 
- 
Field Details
- 
STANDARD
STANDARD category label positions. - 
UP_90
UP_90 category label positions. - 
DOWN_90
DOWN_90 category label positions. - 
UP_45
UP_45 category label positions. - 
DOWN_45
DOWN_45 category label positions. 
 - 
 - 
Constructor Details
- 
CategoryLabelPositions
public CategoryLabelPositions()Default constructor. - 
CategoryLabelPositions
public CategoryLabelPositions(CategoryLabelPosition top, CategoryLabelPosition bottom, CategoryLabelPosition left, CategoryLabelPosition right)Creates a new position specification.- Parameters:
 top- the label position info used when an axis is at the top (nullnot permitted).bottom- the label position info used when an axis is at the bottom (nullnot permitted).left- the label position info used when an axis is at the left (nullnot permitted).right- the label position info used when an axis is at the right (nullnot permitted).
 
 - 
 - 
Method Details
- 
createUpRotationLabelPositions
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
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
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 (nullnot permitted).top- the top position (nullnot permitted).- Returns:
 - a new instance (never 
null). 
 - 
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 (nullnot permitted).bottom- the bottom position (nullnot permitted).- Returns:
 - a new instance (never 
null). 
 - 
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 (nullnot permitted).left- the left position (nullnot permitted).- Returns:
 - a new instance (never 
null). 
 - 
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 (nullnot permitted).right- the right position (nullnot permitted).- Returns:
 - a new instance (never 
null). 
 - 
equals
Returnstrueif this object is equal to the specified object, andfalseotherwise. 
 -