1 7 package java.awt; 8 9 19 public class GridBagConstraints implements Cloneable , java.io.Serializable { 20 21 31 public static final int RELATIVE = -1; 32 33 37 public static final int REMAINDER = 0; 38 39 42 public static final int NONE = 0; 43 44 47 public static final int BOTH = 1; 48 49 52 public static final int HORIZONTAL = 2; 53 54 57 public static final int VERTICAL = 3; 58 59 62 public static final int CENTER = 10; 63 64 68 public static final int NORTH = 11; 69 70 73 public static final int NORTHEAST = 12; 74 75 79 public static final int EAST = 13; 80 81 84 public static final int SOUTHEAST = 14; 85 86 90 public static final int SOUTH = 15; 91 92 95 public static final int SOUTHWEST = 16; 96 97 101 public static final int WEST = 17; 102 103 106 public static final int NORTHWEST = 18; 107 108 114 public static final int PAGE_START = 19; 115 116 122 public static final int PAGE_END = 20; 123 124 131 public static final int LINE_START = 21; 132 133 140 public static final int LINE_END = 22; 141 142 149 public static final int FIRST_LINE_START = 23; 150 151 158 public static final int FIRST_LINE_END = 24; 159 160 167 public static final int LAST_LINE_START = 25; 168 169 176 public static final int LAST_LINE_END = 26; 177 178 196 public int gridx; 197 198 211 public int gridy; 212 213 230 public int gridwidth; 231 232 249 public int gridheight; 250 251 270 public double weightx; 271 272 291 public double weighty; 292 293 314 public int anchor; 315 316 341 public int fill; 342 343 352 public Insets insets; 353 354 365 public int ipadx; 366 367 378 public int ipady; 379 380 384 int tempX; 385 389 int tempY; 390 394 int tempWidth; 395 399 int tempHeight; 400 406 int minWidth; 407 413 int minHeight; 414 415 418 private static final long serialVersionUID = -1000070633030801713L; 419 420 424 public GridBagConstraints () { 425 gridx = RELATIVE; 426 gridy = RELATIVE; 427 gridwidth = 1; 428 gridheight = 1; 429 430 weightx = 0; 431 weighty = 0; 432 anchor = CENTER; 433 fill = NONE; 434 435 insets = new Insets (0, 0, 0, 0); 436 ipadx = 0; 437 ipady = 0; 438 } 439 440 474 public GridBagConstraints(int gridx, int gridy, 475 int gridwidth, int gridheight, 476 double weightx, double weighty, 477 int anchor, int fill, 478 Insets insets, int ipadx, int ipady) { 479 this.gridx = gridx; 480 this.gridy = gridy; 481 this.gridwidth = gridwidth; 482 this.gridheight = gridheight; 483 this.fill = fill; 484 this.ipadx = ipadx; 485 this.ipady = ipady; 486 this.insets = insets; 487 this.anchor = anchor; 488 this.weightx = weightx; 489 this.weighty = weighty; 490 } 491 492 496 public Object clone () { 497 try { 498 GridBagConstraints c = (GridBagConstraints )super.clone(); 499 c.insets = (Insets )insets.clone(); 500 return c; 501 } catch (CloneNotSupportedException e) { 502 throw new InternalError (); 504 } 505 } 506 } 507 | Popular Tags |