1 43 44 package org.jfree.chart.entity; 45 46 import java.awt.Shape ; 47 import java.io.Serializable ; 48 49 52 public class LegendItemEntity extends ChartEntity 53 implements Cloneable , Serializable { 54 55 56 private static final long serialVersionUID = -7435683933545666702L; 57 58 59 private int seriesIndex; 60 61 66 public LegendItemEntity(Shape area) { 67 super(area); 68 } 69 70 75 public int getSeriesIndex() { 76 return this.seriesIndex; 77 } 78 79 84 public void setSeriesIndex(int index) { 85 this.seriesIndex = index; 86 } 87 88 95 public boolean equals(Object obj) { 96 if (obj == this) { 97 return true; 98 } 99 if (obj instanceof LegendItemEntity && super.equals(obj)) { 100 LegendItemEntity e = (LegendItemEntity) obj; 101 if (this.seriesIndex != e.seriesIndex) { 102 return false; 103 } 104 return true; 105 } 106 return false; 107 } 108 109 117 public Object clone() throws CloneNotSupportedException { 118 return super.clone(); 119 } 120 121 } 122 | Popular Tags |