Java源码示例:org.jfree.chart.util.PaintUtilities
示例1
/**
* 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);
}
示例2
/**
* Tests this instance for equality with an arbitrary object. The icon
* fields are NOT included in the test, so this implementation is a little
* weak.
*
* @param obj the object (<code>null</code> permitted).
*
* @return A boolean.
*
* @since 1.0.7
*/
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof MinMaxCategoryRenderer)) {
return false;
}
MinMaxCategoryRenderer that = (MinMaxCategoryRenderer) obj;
if (this.plotLines != that.plotLines) {
return false;
}
if (!PaintUtilities.equal(this.groupPaint, that.groupPaint)) {
return false;
}
if (!this.groupStroke.equals(that.groupStroke)) {
return false;
}
return super.equals(obj);
}
示例3
/**
* 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);
}
示例4
/**
* 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);
}
示例5
/**
* 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);
}
示例6
/**
* 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 StatisticalLineAndShapeRenderer)) {
return false;
}
StatisticalLineAndShapeRenderer that
= (StatisticalLineAndShapeRenderer) obj;
if (!PaintUtilities.equal(this.errorIndicatorPaint,
that.errorIndicatorPaint)) {
return false;
}
if (!ObjectUtilities.equal(this.errorIndicatorStroke,
that.errorIndicatorStroke)) {
return false;
}
return super.equals(obj);
}
示例7
/**
* 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;
}
示例8
/**
* 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;
}
示例9
/**
* 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 LineBorder)) {
return false;
}
LineBorder that = (LineBorder) obj;
if (!PaintUtilities.equal(this.paint, that.paint)) {
return false;
}
if (!ObjectUtilities.equal(this.stroke, that.stroke)) {
return false;
}
if (!this.insets.equals(that.insets)) {
return false;
}
return true;
}
示例10
/**
* 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);
}
示例11
/**
* 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;
}
示例12
/**
* 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 ExtendedCategoryAxis)) {
return false;
}
ExtendedCategoryAxis that = (ExtendedCategoryAxis) obj;
if (!this.sublabelFont.equals(that.sublabelFont)) {
return false;
}
if (!PaintUtilities.equal(this.sublabelPaint, that.sublabelPaint)) {
return false;
}
if (!this.sublabels.equals(that.sublabels)) {
return false;
}
return super.equals(obj);
}
示例13
/**
* 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 StatisticalBarRenderer)) {
return false;
}
if (!super.equals(obj)) {
return false;
}
StatisticalBarRenderer that = (StatisticalBarRenderer) obj;
if (!PaintUtilities.equal(this.errorIndicatorPaint,
that.errorIndicatorPaint)) {
return false;
}
return true;
}
示例14
/**
* 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 StatisticalBarRenderer)) {
return false;
}
if (!super.equals(obj)) {
return false;
}
StatisticalBarRenderer that = (StatisticalBarRenderer) obj;
if (!PaintUtilities.equal(this.errorIndicatorPaint,
that.errorIndicatorPaint)) {
return false;
}
return true;
}
示例15
/**
* 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 StatisticalLineAndShapeRenderer)) {
return false;
}
StatisticalLineAndShapeRenderer that
= (StatisticalLineAndShapeRenderer) obj;
if (!PaintUtilities.equal(this.errorIndicatorPaint,
that.errorIndicatorPaint)) {
return false;
}
return super.equals(obj);
}
示例16
/**
* 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 LineBorder)) {
return false;
}
LineBorder that = (LineBorder) obj;
if (!PaintUtilities.equal(this.paint, that.paint)) {
return false;
}
if (!ObjectUtilities.equal(this.stroke, that.stroke)){
return false;
}
if (!this.insets.equals(that.insets)) {
return false;
}
return true;
}
示例17
/**
* 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);
}
示例18
/**
* 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);
}
示例19
/**
* 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 StatisticalBarRenderer)) {
return false;
}
if (!super.equals(obj)) {
return false;
}
StatisticalBarRenderer that = (StatisticalBarRenderer) obj;
if (!PaintUtilities.equal(this.errorIndicatorPaint,
that.errorIndicatorPaint)) {
return false;
}
return true;
}
示例20
/**
* 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);
}
示例21
/**
* Tests this plot for equality with an arbitrary object. Note that the
* plot's dataset is not considered in the equality test.
*
* @param obj the object (<code>null</code> permitted).
*
* @return <code>true</code> if this plot is equal to <code>obj</code>, and
* <code>false</code> otherwise.
*/
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof MultiplePiePlot)) {
return false;
}
MultiplePiePlot that = (MultiplePiePlot) obj;
if (this.dataExtractOrder != that.dataExtractOrder) {
return false;
}
if (this.limit != that.limit) {
return false;
}
if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) {
return false;
}
if (!PaintUtilities.equal(this.aggregatedItemsPaint,
that.aggregatedItemsPaint)) {
return false;
}
if (!ObjectUtilities.equal(this.pieChart, that.pieChart)) {
return false;
}
if (!super.equals(obj)) {
return false;
}
return true;
}
示例22
/**
* Tests this annotation 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;
}
// 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;
}
示例23
/**
* Tests this plot for equality with an arbitrary object. Note that the
* plot's dataset is not considered in the equality test.
*
* @param obj the object (<code>null</code> permitted).
*
* @return <code>true</code> if this plot is equal to <code>obj</code>, and
* <code>false</code> otherwise.
*/
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof MultiplePiePlot)) {
return false;
}
MultiplePiePlot that = (MultiplePiePlot) obj;
if (this.dataExtractOrder != that.dataExtractOrder) {
return false;
}
if (this.limit != that.limit) {
return false;
}
if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) {
return false;
}
if (!PaintUtilities.equal(this.aggregatedItemsPaint,
that.aggregatedItemsPaint)) {
return false;
}
if (!ObjectUtilities.equal(this.pieChart, that.pieChart)) {
return false;
}
if (!super.equals(obj)) {
return false;
}
return true;
}
示例24
/**
* Tests this plot for equality with an arbitrary object. Note that the
* plot's dataset is not considered in the equality test.
*
* @param obj the object (<code>null</code> permitted).
*
* @return <code>true</code> if this plot is equal to <code>obj</code>, and
* <code>false</code> otherwise.
*/
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof MultiplePiePlot)) {
return false;
}
MultiplePiePlot that = (MultiplePiePlot) obj;
if (this.dataExtractOrder != that.dataExtractOrder) {
return false;
}
if (this.limit != that.limit) {
return false;
}
if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) {
return false;
}
if (!PaintUtilities.equal(this.aggregatedItemsPaint,
that.aggregatedItemsPaint)) {
return false;
}
if (!ObjectUtilities.equal(this.pieChart, that.pieChart)) {
return false;
}
if (!super.equals(obj)) {
return false;
}
return true;
}
示例25
/**
* Tests this object for equality with an arbitrary object.
*
* @param obj the object (<code>null</code> permitted).
*
* @return <code>true</code> or <code>false</code>.
*/
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
// now try to reject equality...
if (!(obj instanceof TextAnnotation)) {
return false;
}
TextAnnotation that = (TextAnnotation) obj;
if (!ObjectUtilities.equal(this.text, that.getText())) {
return false;
}
if (!ObjectUtilities.equal(this.font, that.getFont())) {
return false;
}
if (!PaintUtilities.equal(this.paint, that.getPaint())) {
return false;
}
if (!ObjectUtilities.equal(this.textAnchor, that.getTextAnchor())) {
return false;
}
if (!ObjectUtilities.equal(this.rotationAnchor,
that.getRotationAnchor())) {
return false;
}
if (this.rotationAngle != that.getRotationAngle()) {
return false;
}
// seem to be the same...
return true;
}
示例26
/**
* Tests this plot for equality with an arbitrary object.
*
* @param obj the object to test against (<code>null</code> permitted).
*
* @return A boolean.
*/
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof RingPlot)) {
return false;
}
RingPlot that = (RingPlot) obj;
if (this.separatorsVisible != that.separatorsVisible) {
return false;
}
if (!ObjectUtilities.equal(this.separatorStroke,
that.separatorStroke)) {
return false;
}
if (!PaintUtilities.equal(this.separatorPaint, that.separatorPaint)) {
return false;
}
if (this.innerSeparatorExtension != that.innerSeparatorExtension) {
return false;
}
if (this.outerSeparatorExtension != that.outerSeparatorExtension) {
return false;
}
if (this.sectionDepth != that.sectionDepth) {
return false;
}
return super.equals(obj);
}
示例27
/**
* Tests this plot for equality with an arbitrary object. Note that the
* plot's dataset is not considered in the equality test.
*
* @param obj the object (<code>null</code> permitted).
*
* @return <code>true</code> if this plot is equal to <code>obj</code>, and
* <code>false</code> otherwise.
*/
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof MultiplePiePlot)) {
return false;
}
MultiplePiePlot that = (MultiplePiePlot) obj;
if (this.dataExtractOrder != that.dataExtractOrder) {
return false;
}
if (this.limit != that.limit) {
return false;
}
if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) {
return false;
}
if (!PaintUtilities.equal(this.aggregatedItemsPaint,
that.aggregatedItemsPaint)) {
return false;
}
if (!ObjectUtilities.equal(this.pieChart, that.pieChart)) {
return false;
}
if (!super.equals(obj)) {
return false;
}
return true;
}
示例28
/**
* Tests this plot for equality with an arbitrary object. Note that the
* plot's dataset is not considered in the equality test.
*
* @param obj the object (<code>null</code> permitted).
*
* @return <code>true</code> if this plot is equal to <code>obj</code>, and
* <code>false</code> otherwise.
*/
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof MultiplePiePlot)) {
return false;
}
MultiplePiePlot that = (MultiplePiePlot) obj;
if (this.dataExtractOrder != that.dataExtractOrder) {
return false;
}
if (this.limit != that.limit) {
return false;
}
if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) {
return false;
}
if (!PaintUtilities.equal(this.aggregatedItemsPaint,
that.aggregatedItemsPaint)) {
return false;
}
if (!ObjectUtilities.equal(this.pieChart, that.pieChart)) {
return false;
}
if (!super.equals(obj)) {
return false;
}
return true;
}
示例29
/**
* Tests this object for equality with another.
*
* @param obj the object (<code>null</code> permitted).
*
* @return <code>true</code> or <code>false</code>.
*/
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof CategoryLineAnnotation)) {
return false;
}
CategoryLineAnnotation that = (CategoryLineAnnotation) obj;
if (!this.category1.equals(that.getCategory1())) {
return false;
}
if (this.value1 != that.getValue1()) {
return false;
}
if (!this.category2.equals(that.getCategory2())) {
return false;
}
if (this.value2 != that.getValue2()) {
return false;
}
if (!PaintUtilities.equal(this.paint, that.paint)) {
return false;
}
if (!ObjectUtilities.equal(this.stroke, that.stroke)) {
return false;
}
return true;
}
示例30
/**
* 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 XYDifferenceRenderer)) {
return false;
}
if (!super.equals(obj)) {
return false;
}
XYDifferenceRenderer that = (XYDifferenceRenderer) obj;
if (!PaintUtilities.equal(this.positivePaint, that.positivePaint)) {
return false;
}
if (!PaintUtilities.equal(this.negativePaint, that.negativePaint)) {
return false;
}
if (this.shapesVisible != that.shapesVisible) {
return false;
}
if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) {
return false;
}
if (this.roundXCoordinates != that.roundXCoordinates) {
return false;
}
return true;
}