1 54 55 package org.jfree.chart.entity; 56 57 import java.awt.Shape ; 58 import java.io.Serializable ; 59 60 import org.jfree.data.general.PieDataset; 61 62 65 public class PieSectionEntity extends ChartEntity 66 implements Serializable { 67 68 69 private static final long serialVersionUID = 9199892576531984162L; 70 71 72 private PieDataset dataset; 73 74 75 private int pieIndex; 76 77 78 private int sectionIndex; 79 80 81 private Comparable sectionKey; 82 83 94 public PieSectionEntity(Shape area, 95 PieDataset dataset, 96 int pieIndex, int sectionIndex, 97 Comparable sectionKey, 98 String toolTipText, String urlText) { 99 100 super(area, toolTipText, urlText); 101 this.dataset = dataset; 102 this.pieIndex = pieIndex; 103 this.sectionIndex = sectionIndex; 104 this.sectionKey = sectionKey; 105 106 } 107 108 113 public PieDataset getDataset() { 114 return this.dataset; 115 } 116 117 122 public void setDataset(PieDataset dataset) { 123 this.dataset = dataset; 124 } 125 126 133 public int getPieIndex() { 134 return this.pieIndex; 135 } 136 137 142 public void setPieIndex(int index) { 143 this.pieIndex = index; 144 } 145 146 151 public int getSectionIndex() { 152 return this.sectionIndex; 153 } 154 155 160 public void setSectionIndex(int index) { 161 this.sectionIndex = index; 162 } 163 164 169 public Comparable getSectionKey() { 170 return this.sectionKey; 171 } 172 173 178 public void setSectionKey(Comparable key) { 179 this.sectionKey = key; 180 } 181 182 187 public String toString() { 188 return "PieSection: " + this.pieIndex + ", " + this.sectionIndex + "(" 189 + this.sectionKey.toString() + ")"; 190 } 191 192 } 193 | Popular Tags |