Class Outlier

java.lang.Object
org.jfree.chart.renderer.Outlier
All Implemented Interfaces:
Comparable

public class Outlier extends Object implements Comparable
Represents one outlier in the box and whisker plot.

All the coordinates in this class are in Java2D space.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Outlier(double xCoord, double yCoord, double radius)
    Constructs an outlier item consisting of a point and the radius of the outlier ellipse
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Compares this object with the specified object for order, based on the outlier's point.
    boolean
    Tests this outlier for equality with an arbitrary object.
    Returns the xy coordinates of the bounding box containing the outlier ellipse.
    double
    Returns the radius of the outlier ellipse.
    double
    Returns the x coordinate of the bounding box containing the outlier ellipse.
    double
    Returns the y coordinate of the bounding box containing the outlier ellipse.
    boolean
    Returns a true if outlier is overlapped and false if it is not.
    void
    Sets the xy coordinates of the bounding box containing the outlier ellipse.
    void
    setRadius(double radius)
    Sets the radius of the outlier ellipse.
    Returns a textual representation of the outlier.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Outlier

      public Outlier(double xCoord, double yCoord, double radius)
      Constructs an outlier item consisting of a point and the radius of the outlier ellipse
      Parameters:
      xCoord - the x coordinate of the point.
      yCoord - the y coordinate of the point.
      radius - the radius of the ellipse.
  • Method Details

    • getPoint

      public Point2D getPoint()
      Returns the xy coordinates of the bounding box containing the outlier ellipse.
      Returns:
      The location of the outlier ellipse.
    • setPoint

      public void setPoint(Point2D point)
      Sets the xy coordinates of the bounding box containing the outlier ellipse.
      Parameters:
      point - the location.
    • getX

      public double getX()
      Returns the x coordinate of the bounding box containing the outlier ellipse.
      Returns:
      The x coordinate.
    • getY

      public double getY()
      Returns the y coordinate of the bounding box containing the outlier ellipse.
      Returns:
      The y coordinate.
    • getRadius

      public double getRadius()
      Returns the radius of the outlier ellipse.
      Returns:
      The radius.
    • setRadius

      public void setRadius(double radius)
      Sets the radius of the outlier ellipse.
      Parameters:
      radius - the new radius.
    • compareTo

      public int compareTo(Object o)
      Compares this object with the specified object for order, based on the outlier's point.
      Specified by:
      compareTo in interface Comparable
      Parameters:
      o - the Object to be compared.
      Returns:
      A negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
    • overlaps

      public boolean overlaps(Outlier other)
      Returns a true if outlier is overlapped and false if it is not. Overlapping is determined by the respective bounding boxes plus a small margin.
      Parameters:
      other - the other outlier.
      Returns:
      A boolean indicating whether or not an overlap has occurred.
    • equals

      public boolean equals(Object obj)
      Tests this outlier for equality with an arbitrary object.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object (null permitted).
      Returns:
      A boolean.
    • toString

      public String toString()
      Returns a textual representation of the outlier.
      Overrides:
      toString in class Object
      Returns:
      A String representing the outlier.