コード例 #1
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();
 }
コード例 #2
0
 public Address getAddress() {
   if (linkTelAddress == false) {
     return addressView.get();
   } else {
     return null;
   }
 }
コード例 #3
0
 public Vector getAddressAll() {
   if (linkTelAddress == false) {
     return addressView.getAll();
   } else {
     return null;
   }
 }
コード例 #4
0
  public void clear() {
    contact = null;
    personView.clear();
    teleView.clear();
    emailView.clear();
    websiteView.clear();
    addressView.clear();

    if (cbTelAddress != null) {
      cbTelAddress.removeItemListener(this);
      remove(cbTelAddress);
      revalidate();
      cbTelAddress = null;
    }
    linkTelAddress = false;
    note.setText("");
  }
コード例 #5
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);
  }
コード例 #6
0
 public void setAddress(Address a) {
   if (a != null) {
     addressView.set(a);
   }
 }
コード例 #7
0
 public void setLinkTelAddress(boolean b) {
   addressView.setEditable(!b);
   addressView.getArchive().setEnabled(!b);
   teleView.setEditable(!b);
   linkTelAddress = b;
 }
コード例 #8
0
 public void setCodePostalCtrl(CodePostalCtrl ctrl) {
   addressView.setCodePostalCtrl(ctrl);
 }