1 46 47 package org.jfree.chart.labels; 48 49 import java.io.ObjectStreamException ; 50 import java.io.Serializable ; 51 52 56 public final class ItemLabelAnchor implements Serializable { 57 58 59 private static final long serialVersionUID = -1233101616128695658L; 60 61 62 public static final ItemLabelAnchor CENTER 63 = new ItemLabelAnchor("ItemLabelAnchor.CENTER"); 64 65 66 public static final ItemLabelAnchor INSIDE1 67 = new ItemLabelAnchor("ItemLabelAnchor.INSIDE1"); 68 69 70 public static final ItemLabelAnchor INSIDE2 71 = new ItemLabelAnchor("ItemLabelAnchor.INSIDE2"); 72 73 74 public static final ItemLabelAnchor INSIDE3 75 = new ItemLabelAnchor("ItemLabelAnchor.INSIDE3"); 76 77 78 public static final ItemLabelAnchor INSIDE4 79 = new ItemLabelAnchor("ItemLabelAnchor.INSIDE4"); 80 81 82 public static final ItemLabelAnchor INSIDE5 83 = new ItemLabelAnchor("ItemLabelAnchor.INSIDE5"); 84 85 86 public static final ItemLabelAnchor INSIDE6 87 = new ItemLabelAnchor("ItemLabelAnchor.INSIDE6"); 88 89 90 public static final ItemLabelAnchor INSIDE7 91 = new ItemLabelAnchor("ItemLabelAnchor.INSIDE7"); 92 93 94 public static final ItemLabelAnchor INSIDE8 95 = new ItemLabelAnchor("ItemLabelAnchor.INSIDE8"); 96 97 98 public static final ItemLabelAnchor INSIDE9 99 = new ItemLabelAnchor("ItemLabelAnchor.INSIDE9"); 100 101 102 public static final ItemLabelAnchor INSIDE10 103 = new ItemLabelAnchor("ItemLabelAnchor.INSIDE10"); 104 105 106 public static final ItemLabelAnchor INSIDE11 107 = new ItemLabelAnchor("ItemLabelAnchor.INSIDE11"); 108 109 110 public static final ItemLabelAnchor INSIDE12 111 = new ItemLabelAnchor("ItemLabelAnchor.INSIDE12"); 112 113 114 public static final ItemLabelAnchor OUTSIDE1 115 = new ItemLabelAnchor("ItemLabelAnchor.OUTSIDE1"); 116 117 118 public static final ItemLabelAnchor OUTSIDE2 119 = new ItemLabelAnchor("ItemLabelAnchor.OUTSIDE2"); 120 121 122 public static final ItemLabelAnchor OUTSIDE3 123 = new ItemLabelAnchor("ItemLabelAnchor.OUTSIDE3"); 124 125 126 public static final ItemLabelAnchor OUTSIDE4 127 = new ItemLabelAnchor("ItemLabelAnchor.OUTSIDE4"); 128 129 130 public static final ItemLabelAnchor OUTSIDE5 131 = new ItemLabelAnchor("ItemLabelAnchor.OUTSIDE5"); 132 133 134 public static final ItemLabelAnchor OUTSIDE6 135 = new ItemLabelAnchor("ItemLabelAnchor.OUTSIDE6"); 136 137 138 public static final ItemLabelAnchor OUTSIDE7 139 = new ItemLabelAnchor("ItemLabelAnchor.OUTSIDE7"); 140 141 142 public static final ItemLabelAnchor OUTSIDE8 143 = new ItemLabelAnchor("ItemLabelAnchor.OUTSIDE8"); 144 145 146 public static final ItemLabelAnchor OUTSIDE9 147 = new ItemLabelAnchor("ItemLabelAnchor.OUTSIDE9"); 148 149 150 public static final ItemLabelAnchor OUTSIDE10 151 = new ItemLabelAnchor("ItemLabelAnchor.OUTSIDE10"); 152 153 154 public static final ItemLabelAnchor OUTSIDE11 155 = new ItemLabelAnchor("ItemLabelAnchor.OUTSIDE11"); 156 157 158 public static final ItemLabelAnchor OUTSIDE12 159 = new ItemLabelAnchor("ItemLabelAnchor.OUTSIDE12"); 160 161 162 private String name; 163 164 169 private ItemLabelAnchor(String name) { 170 this.name = name; 171 } 172 173 178 public String toString() { 179 return this.name; 180 } 181 182 190 public boolean equals(Object o) { 191 192 if (this == o) { 193 return true; 194 } 195 if (!(o instanceof ItemLabelAnchor)) { 196 return false; 197 } 198 199 ItemLabelAnchor order = (ItemLabelAnchor) o; 200 if (!this.name.equals(order.toString())) { 201 return false; 202 } 203 204 return true; 205 206 } 207 208 215 private Object readResolve() throws ObjectStreamException { 216 ItemLabelAnchor result = null; 217 if (this.equals(ItemLabelAnchor.CENTER)) { 218 result = ItemLabelAnchor.CENTER; 219 } 220 else if (this.equals(ItemLabelAnchor.INSIDE1)) { 221 result = ItemLabelAnchor.INSIDE1; 222 } 223 else if (this.equals(ItemLabelAnchor.INSIDE2)) { 224 result = ItemLabelAnchor.INSIDE2; 225 } 226 else if (this.equals(ItemLabelAnchor.INSIDE3)) { 227 result = ItemLabelAnchor.INSIDE3; 228 } 229 else if (this.equals(ItemLabelAnchor.INSIDE4)) { 230 result = ItemLabelAnchor.INSIDE4; 231 } 232 else if (this.equals(ItemLabelAnchor.INSIDE5)) { 233 result = ItemLabelAnchor.INSIDE5; 234 } 235 else if (this.equals(ItemLabelAnchor.INSIDE6)) { 236 result = ItemLabelAnchor.INSIDE6; 237 } 238 else if (this.equals(ItemLabelAnchor.INSIDE7)) { 239 result = ItemLabelAnchor.INSIDE7; 240 } 241 else if (this.equals(ItemLabelAnchor.INSIDE8)) { 242 result = ItemLabelAnchor.INSIDE8; 243 } 244 else if (this.equals(ItemLabelAnchor.INSIDE9)) { 245 result = ItemLabelAnchor.INSIDE9; 246 } 247 else if (this.equals(ItemLabelAnchor.INSIDE10)) { 248 result = ItemLabelAnchor.INSIDE10; 249 } 250 else if (this.equals(ItemLabelAnchor.INSIDE11)) { 251 result = ItemLabelAnchor.INSIDE11; 252 } 253 else if (this.equals(ItemLabelAnchor.INSIDE12)) { 254 result = ItemLabelAnchor.INSIDE12; 255 } 256 else if (this.equals(ItemLabelAnchor.OUTSIDE1)) { 257 result = ItemLabelAnchor.OUTSIDE1; 258 } 259 else if (this.equals(ItemLabelAnchor.OUTSIDE2)) { 260 result = ItemLabelAnchor.OUTSIDE2; 261 } 262 else if (this.equals(ItemLabelAnchor.OUTSIDE3)) { 263 result = ItemLabelAnchor.OUTSIDE3; 264 } 265 else if (this.equals(ItemLabelAnchor.OUTSIDE4)) { 266 result = ItemLabelAnchor.OUTSIDE4; 267 } 268 else if (this.equals(ItemLabelAnchor.OUTSIDE5)) { 269 result = ItemLabelAnchor.OUTSIDE5; 270 } 271 else if (this.equals(ItemLabelAnchor.OUTSIDE6)) { 272 result = ItemLabelAnchor.OUTSIDE6; 273 } 274 else if (this.equals(ItemLabelAnchor.OUTSIDE7)) { 275 result = ItemLabelAnchor.OUTSIDE7; 276 } 277 else if (this.equals(ItemLabelAnchor.OUTSIDE8)) { 278 result = ItemLabelAnchor.OUTSIDE8; 279 } 280 else if (this.equals(ItemLabelAnchor.OUTSIDE9)) { 281 result = ItemLabelAnchor.OUTSIDE9; 282 } 283 else if (this.equals(ItemLabelAnchor.OUTSIDE10)) { 284 result = ItemLabelAnchor.OUTSIDE10; 285 } 286 else if (this.equals(ItemLabelAnchor.OUTSIDE11)) { 287 result = ItemLabelAnchor.OUTSIDE11; 288 } 289 else if (this.equals(ItemLabelAnchor.OUTSIDE12)) { 290 result = ItemLabelAnchor.OUTSIDE12; 291 } 292 return result; 293 } 294 295 } 296 | Popular Tags |