Example usage for org.jfree.util PaintUtilities equal

List of usage examples for org.jfree.util PaintUtilities equal

Introduction

In this page you can find the example usage for org.jfree.util PaintUtilities equal.

Prototype

public static boolean equal(final Paint p1, final Paint p2) 

Source Link

Document

Returns true if the two Paint objects are equal OR both null.

Usage

From source file:nl.strohalm.cyclos.utils.jfreeAsymmetric.AsymmetricStatisticalBarRenderer.java

/**
 * Tests this renderer for equality with an arbitrary object.
 * /*from   w w  w .jav a  2 s . c  om*/
 * @param obj the object (<code>null</code> permitted).
 * 
 * @return A boolean.
 */
@Override
public boolean equals(final Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof AsymmetricStatisticalBarRenderer)) {
        return false;
    }
    if (!super.equals(obj)) {
        return false;
    }
    final AsymmetricStatisticalBarRenderer that = (AsymmetricStatisticalBarRenderer) obj;
    if (!PaintUtilities.equal(getErrorIndicatorPaint(), that.getErrorIndicatorPaint())) {
        return false;
    }
    return true;
}

From source file:org.jfree.experimental.chart.plot.dial.DialBackground.java

/**
 * Tests this instance for equality with an arbitrary object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return A boolean.//  ww w.j  a  v a  2 s. com
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof DialBackground)) {
        return false;
    }
    DialBackground that = (DialBackground) obj;
    if (!PaintUtilities.equal(this.paint, that.paint)) {
        return false;
    }
    if (!this.gradientPaintTransformer.equals(that.gradientPaintTransformer)) {
        return false;
    }
    return true;
}

From source file:edu.cuny.jfree.chart.annotations.CategoryIntervalAnnotation.java

@Override
public boolean equals(final Object obj) {
    if (obj == this) {
        return true;
    }// w  w  w. j a v a 2  s.co m
    if (!(obj instanceof CategoryIntervalAnnotation)) {
        return false;
    }
    final CategoryIntervalAnnotation that = (CategoryIntervalAnnotation) obj;
    if (!category.equals(that.getCategory())) {
        return false;
    }
    if (value1 != that.getValue1()) {
        return false;
    }
    if (value2 != that.getValue2()) {
        return false;
    }
    if (!PaintUtilities.equal(paint, that.paint)) {
        return false;
    }
    return ObjectUtilities.equal(stroke, that.stroke);
}

From source file:org.jfree.experimental.chart.plot.dial.DialCap.java

/**
 * Tests this instance for equality with an arbitrary object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return A boolean.//w  ww  .j av  a  2  s .c  o m
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof DialCap)) {
        return false;
    }
    DialCap that = (DialCap) obj;
    if (this.radius != that.radius) {
        return false;
    }
    if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) {
        return false;
    }
    if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) {
        return false;
    }
    if (!this.outlineStroke.equals(that.outlineStroke)) {
        return false;
    }
    return true;
}

From source file:org.jfree.experimental.chart.plot.dial.SimpleDialFrame.java

/**
 * Tests this instance for equality with an arbitrary object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return A boolean./*from   w ww. j  av a 2s .  c  o  m*/
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof SimpleDialFrame)) {
        return false;
    }
    SimpleDialFrame that = (SimpleDialFrame) obj;
    if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) {
        return false;
    }
    if (!PaintUtilities.equal(this.foregroundPaint, that.foregroundPaint)) {
        return false;
    }
    if (this.radius != that.radius) {
        return false;
    }
    if (!this.stroke.equals(that.stroke)) {
        return false;
    }
    return true;
}

From source file:edu.scripps.fl.curves.plot.MyXYErrorRenderer.java

public boolean equals(Object obj) {
    if (obj == this)
        return true;
    if (!(obj instanceof MyXYErrorRenderer))
        return false;
    MyXYErrorRenderer that = (MyXYErrorRenderer) obj;
    if (capLength != that.capLength)
        return false;
    if (!PaintUtilities.equal(errorPaint, that.errorPaint))
        return false;
    if (!ObjectUtilities.equal(errorStroke, that.errorStroke))
        return false;
    else/*from  w w  w  . j  a  v  a 2 s .  c  o m*/
        return super.equals(obj);
}

From source file:org.jfree.experimental.chart.plot.dial.DialTextAnnotation.java

/**
 * Tests this instance for equality with an arbitrary object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return A boolean./*from   ww w  . j  a  va 2  s . c om*/
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof DialTextAnnotation)) {
        return false;
    }
    DialTextAnnotation that = (DialTextAnnotation) obj;
    if (!this.label.equals(that.label)) {
        return false;
    }
    if (!this.font.equals(that.font)) {
        return false;
    }
    if (!PaintUtilities.equal(this.paint, that.paint)) {
        return false;
    }
    if (this.radius != that.radius) {
        return false;
    }
    if (this.angle != that.angle) {
        return false;
    }
    if (!this.anchor.equals(that.anchor)) {
        return false;
    }
    return true;
}

From source file:org.jfree.experimental.chart.plot.dial.StandardDialRange.java

/**
 * Tests this instance for equality with an arbitrary object.
 * /*w  ww .ja v  a  2 s .com*/
 * @param obj  the object (<code>null</code> permitted).
 * 
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof StandardDialRange)) {
        return false;
    }
    StandardDialRange that = (StandardDialRange) obj;
    if (this.lowerBound != that.lowerBound) {
        return false;
    }
    if (this.upperBound != that.upperBound) {
        return false;
    }
    if (this.increment != that.increment) {
        return false;
    }
    if (!PaintUtilities.equal(this.paint, that.paint)) {
        return false;
    }
    if (this.innerRadius != that.innerRadius) {
        return false;
    }
    if (this.outerRadius != that.outerRadius) {
        return false;
    }
    return true;
}

From source file:net.sf.maltcms.chromaui.annotations.XYSelectableShapeAnnotation.java

/**
 * Tests this annotation for equality with an arbitrary object.
 *
 * @param obj the object ( <code>null</code> permitted).
 *
 * @return A boolean.//from   www . j  av a2s. com
 */
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    // now try to reject equality
    if (!super.equals(obj)) {
        return false;
    }
    if (!(obj instanceof XYShapeAnnotation)) {
        return false;
    }
    XYSelectableShapeAnnotation that = (XYSelectableShapeAnnotation) obj;
    if (!this.s.equals(that.s)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.stroke, that.stroke)) {
        return false;
    }
    if (!PaintUtilities.equal(this.outline, that.outline)) {
        return false;
    }
    if (!PaintUtilities.equal(this.highlight, that.highlight)) {
        return false;
    }
    // seem to be the same
    return true;
}

From source file:vteaexploration.XYPolygonAnnotation.java

/**
 * Tests this annotation for equality with an arbitrary object.
 *
 * @param obj the object (null permitted).
 *
 * @return A boolean./*from w  w  w. j  a  v  a 2  s.  c  om*/
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    // now try to reject equality
    if (!super.equals(obj)) {
        return false;
    }
    if (!(obj instanceof XYPolygonAnnotation)) {
        return false;
    }
    XYPolygonAnnotation that = (XYPolygonAnnotation) obj;
    if (!Arrays.equals(this.polygon, that.polygon)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.stroke, that.stroke)) {
        return false;
    }
    if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) {
        return false;
    }
    if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) {
        return false;
    }
    // seem to be the same
    return true;
}