Beispiel #1
0
  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);
  }
Beispiel #2
0
 public void setLinkTelAddress(Vector a, Vector t, JCheckBox cb) {
   if (a != null && a.size() > 0) {
     addressView.set((Address) a.elementAt(0));
   }
   addressView.setEditable(false);
   addressView.getArchive().setEnabled(false);
   teleView.setLien(t);
   teleView.setEditable(false);
   gb.add(cb, 0, 1, 1, 1, GridBagHelper.WEST);
   cbTelAddress = cb;
   linkTelAddress = true;
   revalidate();
 }