/** * Tests this item for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PaintItem)) { return false; } PaintItem that = (PaintItem) obj; if (this.value != that.value) { return false; } if (!PaintUtilities.equal(this.paint, that.paint)) { return false; } return true; }
/** * Sets the parameters of this description object to match the supplied object. * * @param o the object (should be an instance of <code>Color</code>). * * @throws ObjectFactoryException if there is a problem while reading the * properties of the given object. */ public void setParameterFromObject(final Object o) throws ObjectFactoryException { if (!(o instanceof Color)) { throw new ObjectFactoryException("Is no instance of java.awt.Color"); } final Color c = (Color) o; setParameter("value", PaintUtilities.colorToString(c)); } }
/** * Creates an object based on this description. * * @return The object. */ public Object createObject() { final String value = (String) getParameter("value"); return PaintUtilities.stringToColor(value); }
if (!PaintUtilities.equal(this.firstBarPaint, that.firstBarPaint)) { return false; if (!PaintUtilities.equal(this.lastBarPaint, that.lastBarPaint)) { return false; if (!PaintUtilities.equal(this.positiveBarPaint, that.positiveBarPaint)) { return false; if (!PaintUtilities.equal(this.negativeBarPaint, that.negativeBarPaint)) { return false;
/** * Tests this instance for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LookupPaintScale)) { return false; } LookupPaintScale that = (LookupPaintScale) obj; if (this.lowerBound != that.lowerBound) { return false; } if (this.upperBound != that.upperBound) { return false; } if (!PaintUtilities.equal(this.defaultPaint, that.defaultPaint)) { return false; } if (!this.lookupTable.equals(that.lookupTable)) { return false; } return true; }
/** * Tests this renderer for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof GanttRenderer)) { return false; } GanttRenderer that = (GanttRenderer) obj; if (!PaintUtilities.equal(this.completePaint, that.completePaint)) { return false; } if (!PaintUtilities.equal(this.incompletePaint, that.incompletePaint)) { return false; } if (this.startPercent != that.startPercent) { return false; } if (this.endPercent != that.endPercent) { return false; } return super.equals(obj); }
/** * Tests this pointer for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DialPointer.Pointer)) { return false; } DialPointer.Pointer that = (DialPointer.Pointer) obj; if (this.widthRadius != that.widthRadius) { return false; } if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) { return false; } if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) { return false; } return super.equals(obj); }
/** * Tests this instance for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardDialFrame)) { return false; } StandardDialFrame that = (StandardDialFrame) 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 super.equals(obj); }
/** * Tests this axis for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof SymbolAxis)) { return false; } SymbolAxis that = (SymbolAxis) obj; if (!this.symbols.equals(that.symbols)) { return false; } if (this.gridBandsVisible != that.gridBandsVisible) { return false; } if (!PaintUtilities.equal(this.gridBandPaint, that.gridBandPaint)) { return false; } if (!PaintUtilities.equal(this.gridBandAlternatePaint, that.gridBandAlternatePaint)) { return false; } return super.equals(obj); }
/** * Tests this instance for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ 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 super.equals(obj); }
/** * Tests this block for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ColorBlock)) { return false; } ColorBlock that = (ColorBlock) obj; if (!PaintUtilities.equal(this.paint, that.paint)) { return false; } return super.equals(obj); }
/** * Tests two maps containing (<code>Comparable</code>, <code>Paint</code>) * elements for equality. * * @param map1 the first map (<code>null</code> not permitted). * @param map2 the second map (<code>null</code> not permitted). * * @return A boolean. */ private boolean equalPaintMaps(Map map1, Map map2) { if (map1.size() != map2.size()) { return false; } Set entries = map1.entrySet(); Iterator iterator = entries.iterator(); while (iterator.hasNext()) { Map.Entry entry = (Map.Entry) iterator.next(); Paint p1 = (Paint) entry.getValue(); Paint p2 = (Paint) map2.get(entry.getKey()); if (!PaintUtilities.equal(p1, p2)) { return false; } } return true; }
/** * Tests this border for equality with an arbitrary instance. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BlockBorder)) { return false; } BlockBorder that = (BlockBorder) obj; if (!this.insets.equals(that.insets)) { return false; } if (!PaintUtilities.equal(this.paint, that.paint)) { return false; } return true; }
/** * Tests this pointer for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DialPointer.Pin)) { return false; } DialPointer.Pin that = (DialPointer.Pin) obj; if (!PaintUtilities.equal(this.paint, that.paint)) { return false; } if (!this.stroke.equals(that.stroke)) { return false; } return super.equals(obj); }
/** * Checks this renderer for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LineRenderer3D)) { return false; } LineRenderer3D that = (LineRenderer3D) obj; if (this.xOffset != that.xOffset) { return false; } if (this.yOffset != that.yOffset) { return false; } if (!PaintUtilities.equal(this.wallPaint, that.wallPaint)) { return false; } return super.equals(obj); }
/** * Tests this instance for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ 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 super.equals(obj); }