@Test public void testEquals() { XYPlot plot1 = new XYPlot(); LegendTitle t1 = new LegendTitle(plot1); LegendTitle t2 = new LegendTitle(plot1); assertEquals(t1, t2); t1.setBackgroundPaint( new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.yellow) ); assertFalse(t1.equals(t2)); t2.setBackgroundPaint( new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.yellow) ); assertEquals(t1, t2); t1.setLegendItemGraphicEdge(RectangleEdge.BOTTOM); assertFalse(t1.equals(t2)); t2.setLegendItemGraphicEdge(RectangleEdge.BOTTOM); assertEquals(t1, t2); t1.setLegendItemGraphicAnchor(RectangleAnchor.BOTTOM_LEFT); assertFalse(t1.equals(t2)); t2.setLegendItemGraphicAnchor(RectangleAnchor.BOTTOM_LEFT); assertEquals(t1, t2); t1.setLegendItemGraphicLocation(RectangleAnchor.TOP_LEFT); assertFalse(t1.equals(t2)); t2.setLegendItemGraphicLocation(RectangleAnchor.TOP_LEFT); assertEquals(t1, t2); t1.setItemFont(new Font("Dialog", Font.PLAIN, 19)); assertFalse(t1.equals(t2)); t2.setItemFont(new Font("Dialog", Font.PLAIN, 19)); assertEquals(t1, t2); t1.setSortOrder(SortOrder.DESCENDING); assertFalse(t1.equals(t2)); t2.setSortOrder(SortOrder.DESCENDING); assertEquals(t1, t2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LegendTitle)) { return false; } if (!super.equals(obj)) { return false; } LegendTitle that = (LegendTitle) obj; if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) { return false; } if (this.legendItemGraphicEdge != that.legendItemGraphicEdge) { return false; } if (this.legendItemGraphicAnchor != that.legendItemGraphicAnchor) { return false; } if (this.legendItemGraphicLocation != that.legendItemGraphicLocation) { return false; } if (!this.itemFont.equals(that.itemFont)) { return false; } if (!this.itemPaint.equals(that.itemPaint)) { return false; } if (!this.hLayout.equals(that.hLayout)) { return false; } if (!this.vLayout.equals(that.vLayout)) { return false; } if (!this.sortOrder.equals(that.sortOrder)) { return false; } return true; }
LegendTitle extends Title implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LegendTitle)) { return false; } if (!super.equals(obj)) { return false; } LegendTitle that = (LegendTitle) obj; if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) { return false; } if (this.legendItemGraphicEdge != that.legendItemGraphicEdge) { return false; } if (this.legendItemGraphicAnchor != that.legendItemGraphicAnchor) { return false; } if (this.legendItemGraphicLocation != that.legendItemGraphicLocation) { return false; } if (!this.itemFont.equals(that.itemFont)) { return false; } if (!this.itemPaint.equals(that.itemPaint)) { return false; } if (!this.hLayout.equals(that.hLayout)) { return false; } if (!this.vLayout.equals(that.vLayout)) { return false; } if (!this.sortOrder.equals(that.sortOrder)) { return false; } return true; } }
LegendTitle extends Title implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LegendTitle)) { return false; } if (!super.equals(obj)) { return false; } LegendTitle that = (LegendTitle) obj; if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) { return false; } if (this.legendItemGraphicEdge != that.legendItemGraphicEdge) { return false; } if (this.legendItemGraphicAnchor != that.legendItemGraphicAnchor) { return false; } if (this.legendItemGraphicLocation != that.legendItemGraphicLocation) { return false; } if (!this.itemFont.equals(that.itemFont)) { return false; } if (!this.itemPaint.equals(that.itemPaint)) { return false; } if (!this.hLayout.equals(that.hLayout)) { return false; } if (!this.vLayout.equals(that.vLayout)) { return false; } if (!this.sortOrder.equals(that.sortOrder)) { return false; } return true; } LegendTitle(LegendItemSource source);  LegendTitle(LegendItemSource source,
                       Arrangement hLayout, Arrangement vLayout); }
LegendTitle extends Title implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LegendTitle)) { return false; } if (!super.equals(obj)) { return false; } LegendTitle that = (LegendTitle) obj; if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) { return false; } if (this.legendItemGraphicEdge != that.legendItemGraphicEdge) { return false; } if (this.legendItemGraphicAnchor != that.legendItemGraphicAnchor) { return false; } if (this.legendItemGraphicLocation != that.legendItemGraphicLocation) { return false; } if (!this.itemFont.equals(that.itemFont)) { return false; } if (!this.itemPaint.equals(that.itemPaint)) { return false; } if (!this.hLayout.equals(that.hLayout)) { return false; } if (!this.vLayout.equals(that.vLayout)) { return false; } if (!this.sortOrder.equals(that.sortOrder)) { return false; } return true; } LegendTitle(LegendItemSource source);  LegendTitle(LegendItemSource source,
                       Arrangement hLayout, Arrangement vLayout); LegendItemSource[] getSources(); void setSources(LegendItemSource[] sources); Paint getBackgroundPaint(); void setBackgroundPaint(Paint paint); RectangleEdge getLegendItemGraphicEdge(); void setLegendItemGraphicEdge(RectangleEdge edge); RectangleAnchor getLegendItemGraphicAnchor(); void setLegendItemGraphicAnchor(RectangleAnchor anchor); RectangleAnchor getLegendItemGraphicLocation(); void setLegendItemGraphicLocation(RectangleAnchor anchor); RectangleInsets getLegendItemGraphicPadding(); void setLegendItemGraphicPadding(RectangleInsets padding); Font getItemFont(); void setItemFont(Font font); Paint getItemPaint(); void setItemPaint(Paint paint); RectangleInsets getItemLabelPadding(); void setItemLabelPadding(RectangleInsets padding); SortOrder getSortOrder(); void setSortOrder(SortOrder order); BlockContainer getItemContainer(); @Override Size2D arrange(Graphics2D g2, RectangleConstraint constraint); @Override void draw(Graphics2D g2, Rectangle2D area); @Override Object draw(Graphics2D g2, Rectangle2D area, Object params); BlockContainer getWrapper(); void setWrapper(BlockContainer wrapper); @Override boolean equals(Object obj); }
LegendTitle extends Title implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LegendTitle)) { return false; } if (!super.equals(obj)) { return false; } LegendTitle that = (LegendTitle) obj; if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) { return false; } if (this.legendItemGraphicEdge != that.legendItemGraphicEdge) { return false; } if (this.legendItemGraphicAnchor != that.legendItemGraphicAnchor) { return false; } if (this.legendItemGraphicLocation != that.legendItemGraphicLocation) { return false; } if (!this.itemFont.equals(that.itemFont)) { return false; } if (!this.itemPaint.equals(that.itemPaint)) { return false; } if (!this.hLayout.equals(that.hLayout)) { return false; } if (!this.vLayout.equals(that.vLayout)) { return false; } if (!this.sortOrder.equals(that.sortOrder)) { return false; } return true; } LegendTitle(LegendItemSource source);  LegendTitle(LegendItemSource source,
                       Arrangement hLayout, Arrangement vLayout); LegendItemSource[] getSources(); void setSources(LegendItemSource[] sources); Paint getBackgroundPaint(); void setBackgroundPaint(Paint paint); RectangleEdge getLegendItemGraphicEdge(); void setLegendItemGraphicEdge(RectangleEdge edge); RectangleAnchor getLegendItemGraphicAnchor(); void setLegendItemGraphicAnchor(RectangleAnchor anchor); RectangleAnchor getLegendItemGraphicLocation(); void setLegendItemGraphicLocation(RectangleAnchor anchor); RectangleInsets getLegendItemGraphicPadding(); void setLegendItemGraphicPadding(RectangleInsets padding); Font getItemFont(); void setItemFont(Font font); Paint getItemPaint(); void setItemPaint(Paint paint); RectangleInsets getItemLabelPadding(); void setItemLabelPadding(RectangleInsets padding); SortOrder getSortOrder(); void setSortOrder(SortOrder order); BlockContainer getItemContainer(); @Override Size2D arrange(Graphics2D g2, RectangleConstraint constraint); @Override void draw(Graphics2D g2, Rectangle2D area); @Override Object draw(Graphics2D g2, Rectangle2D area, Object params); BlockContainer getWrapper(); void setWrapper(BlockContainer wrapper); @Override boolean equals(Object obj); static final Font DEFAULT_ITEM_FONT; static final Paint DEFAULT_ITEM_PAINT; }