3 public class GridBagConstraints {
5 public static final int NONE = 0;
6 public static final int CENTER = 10;
7 public static final int WEST = 17;
8 public static final int EAST = 13;
13 public int gridheight;
22 public GridBagConstraints(int gridx, int gridy, int gridwidth,
23 int gridheight, double weightx, double weighty, int anchor, int fill,
24 Insets insets, int ipadx, int ipady) {
27 this.gridwidth = gridwidth;
28 this.gridheight = gridheight;
29 this.weightx = weightx;
30 this.weighty = weighty;
34 insets = new Insets(0, 0, 0, 0);
40 String getStyle(boolean margins) {
41 return "style='" + (margins ?
42 "margin:" + insets.top + "px " + (ipady + insets.right) + "px "
43 + insets.bottom + "px " + (ipadx + insets.left) + "px;"
44 : "text-align:" + (anchor == EAST ? "right" : anchor == WEST? "left" : "center")) + "'";