@Override public GemPanel init() { number = new GemNumericField(6); number.addActionListener(this); name = new GemField(15); name.addActionListener(this); style = new GemField(15); style.addActionListener(this); site = new GemField(15); site.addActionListener(this); btErase = new GemButton(GemCommand.ERASE_CMD); btErase.addActionListener(this); mask = new GemPanel(); mask.setLayout(new GridBagLayout()); GridBagHelper gb = new GridBagHelper(mask); gb.add(new GemLabel(BundleUtil.getLabel("Number.label")), 0, 0, 1, 1, GridBagHelper.WEST); gb.add(new GemLabel(BundleUtil.getLabel("Name.label")), 0, 1, 1, 1, GridBagHelper.WEST); gb.add(new GemLabel(BundleUtil.getLabel("Style.label")), 0, 2, 1, 1, GridBagHelper.WEST); gb.add(new GemLabel(BundleUtil.getLabel("Website.label")), 0, 3, 1, 1, GridBagHelper.WEST); gb.add(number, 1, 0, 1, 1, GridBagHelper.WEST); gb.add(name, 1, 1, 1, 1, GridBagHelper.WEST); gb.add(style, 1, 2, 1, 1, GridBagHelper.WEST); gb.add(site, 1, 3, 1, 1, GridBagHelper.WEST); gb.add(btErase, 2, 4, 1, 1, GridBagHelper.WEST); return mask; }
public ContactFileEditor(GemDesktop _desktop) { super(_desktop); note = new GemLabel(); note.setForeground(java.awt.Color.red); personView = new PersonView(); infosView = new GemPanel(); infosView.setBorder(BorderFactory.createMatteBorder(0, 1, 0, 0, Color.lightGray)); teleView = new TelView( ParamTableIO.find(Category.TELEPHONE.getTable(), Category.TELEPHONE.getCol(), dc)); emailView = new EmailView(); websiteView = new WebSiteView( ParamTableIO.find(Category.SITEWEB.getTable(), Category.SITEWEB.getCol(), dc)); infosView.setLayout(new BoxLayout(infosView, BoxLayout.Y_AXIS)); infosView.add(teleView); infosView.add(emailView); infosView.add(websiteView); JScrollPane scp = new JScrollPane(infosView); scp.setBorder(null); scp.setPreferredSize(new Dimension(400, scp.getPreferredSize().height)); GemPanel addressPanel = new GemPanel(); addressPanel.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); addressView = new AddressView(); addressView.setBorder(null); addressPanel.add(addressView, BorderLayout.SOUTH); this.setLayout(new GridBagLayout()); gb = new GridBagHelper(this); GemBorderPanel gp = new GemBorderPanel(new BorderLayout()); gp.add(personView, BorderLayout.WEST); gp.add(scp, BorderLayout.EAST); gb.add(gp, 0, 0, 1, 1, GridBagHelper.BOTH, 1.0, 1.0); gb.add(addressPanel, 0, 2, 1, 1, GridBagHelper.BOTH, GridBagHelper.WEST); gb.add(note, 0, 3, 1, 1, GridBagHelper.HORIZONTAL, GridBagHelper.WEST); }