1 42 43 package org.jfree.chart.entity; 44 45 import java.awt.Shape ; 46 import java.io.Serializable ; 47 48 52 public class XYAnnotationEntity extends ChartEntity 53 implements Serializable { 54 55 56 private static final long serialVersionUID = 2340334068383660799L; 57 58 59 private int rendererIndex; 60 61 69 public XYAnnotationEntity(Shape hotspot, int rendererIndex, 70 String toolTipText, String urlText) { 71 super(hotspot, toolTipText, urlText); 72 this.rendererIndex = rendererIndex; 73 } 74 75 80 public int getRendererIndex() { 81 return this.rendererIndex; 82 } 83 84 89 public void setRendererIndex(int index) { 90 this.rendererIndex = index; 91 } 92 93 100 public boolean equals(Object obj) { 101 if (obj == this) { 102 return true; 103 } 104 if (!super.equals(obj)) { 105 return false; 106 } 107 if (!(obj instanceof XYAnnotationEntity)) { 108 return false; 109 } 110 XYAnnotationEntity that = (XYAnnotationEntity) obj; 111 if (this.rendererIndex != that.rendererIndex) { 112 return false; 113 } 114 return true; 115 } 116 117 } 118 | Popular Tags |