/** * DOCUMENT ME! * * @param gbg DOCUMENT ME! * @param comp DOCUMENT ME! * @param x DOCUMENT ME! * @param y DOCUMENT ME! */ public static void insert(GridBagGroup gbg, Component comp, int x, int y) { set(gbg.constraints, x, y); insert(gbg.panel, comp, gbg.gridbag, gbg.constraints); }
/** * DOCUMENT ME! * * @param gbg DOCUMENT ME! * @param comp DOCUMENT ME! * @param x DOCUMENT ME! * @param y DOCUMENT ME! * @param w DOCUMENT ME! * @param h DOCUMENT ME! */ public static void insert(GridBagGroup gbg, Component comp, int x, int y, int w, int h) { set(gbg.constraints, x, y, w, h); insert(gbg.panel, comp, gbg.gridbag, gbg.constraints); }
/** * DOCUMENT ME! * * @param gbg DOCUMENT ME! * @param comp DOCUMENT ME! * @param x DOCUMENT ME! * @param y DOCUMENT ME! * @param w DOCUMENT ME! * @param h DOCUMENT ME! * @param f DOCUMENT ME! */ public static void insert(GridBagGroup gbg, Component comp, int x, int y, int w, int h, int f) { set(gbg.constraints, x, y, w, h, 0, 0, f); insert(gbg.panel, comp, gbg.gridbag, gbg.constraints); }
/** * DOCUMENT ME! * * @param gbg DOCUMENT ME! * @param comp DOCUMENT ME! * @param x DOCUMENT ME! * @param y DOCUMENT ME! * @param w DOCUMENT ME! * @param h DOCUMENT ME! * @param weightx DOCUMENT ME! * @param weighty DOCUMENT ME! * @param f DOCUMENT ME! */ public static void insert(GridBagGroup gbg, Component comp, int x, int y, int w, int h, int weightx, int weighty, int f) { set(gbg.constraints, x, y, w, h, weightx, weighty, f); insert(gbg.panel, comp, gbg.gridbag, gbg.constraints); }
MiscGB.insert(this.myGBG, new JLabel("Map Attribute:", SwingConstants.RIGHT), 0, yPos); MiscGB.insert(this.myGBG, Box.createHorizontalStrut(5), 1, yPos); attrBox.setSelectedItem(selectedAttr); MiscGB.insert(this.myGBG, attrBox, 2, yPos, 1, 1, 1, 0, GridBagConstraints.HORIZONTAL); MiscGB.insert(this.myGBG, mapperUI, 0, yPos, 3, 1, 1, 0, GridBagConstraints.HORIZONTAL); MiscGB.insert(this.myGBG, new JLabel(), 0, yPos + 1, 3, 1, 1, 1, GridBagConstraints.BOTH);
public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { JComboBox c = (JComboBox) e.getItemSelectable(); String attrName = (String) c.getSelectedItem(); updateAttribute(attrName, network, this.mapIndex); // change the panel referenced to get a new panel from the // mapping // to reflect the new mapped attribute. remove(this.mapperUI); this.mapperUI = ((ObjectMapping) mappings.get(mapIndex)).getUI(this.parent, network); MiscGB.insert(myGBG, this.mapperUI, 0, this.yPos, 3, 1, 2, 2, GridBagConstraints.BOTH); parent.validate(); } } }