Class 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. Instances of this class are immutable.
    See Also:
    Serialized Form
    • Constructor Detail

      • 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 (null not permitted).
        bottom - the label position info used when an axis is at the bottom (null not permitted).
        left - the label position info used when an axis is at the left (null not permitted).
        right - the label position info used when an axis is at the right (null not permitted).
    • 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.
      • equals

        public boolean equals​(java.lang.Object obj)
        Returns true if this object is equal to the specified object, and false otherwise.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the other object.
        Returns:
        A boolean.
      • hashCode

        public int hashCode()
        Returns a hash code for this object.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        A hash code.