コード例 #1
0
ファイル: ParcelPanel.java プロジェクト: amcdowell/clients
  private void addAddress() {
    AddressDialog form = new AddressDialog(null, null, true);
    WindowUtility.centerForm(form);
    form.addPropertyChangeListener(
        new PropertyChangeListener() {

          @Override
          public void propertyChange(PropertyChangeEvent evt) {
            if (evt.getPropertyName().equals(AddressDialog.ADDRESS_SAVED)) {
              cadastreObjectBean1.addAddress((AddressBean) evt.getNewValue());
            }
          }
        });
    form.setVisible(true);
  }
コード例 #2
0
ファイル: ParcelPanel.java プロジェクト: amcdowell/clients
  private void editAddress() {
    if (cadastreObjectBean1.getSelectedAddress() == null) {
      return;
    }

    AddressDialog form =
        new AddressDialog(
            (AddressBean) cadastreObjectBean1.getSelectedAddress().copy(), null, true);
    WindowUtility.centerForm(form);
    form.addPropertyChangeListener(
        new PropertyChangeListener() {

          @Override
          public void propertyChange(PropertyChangeEvent evt) {
            if (evt.getPropertyName().equals(AddressDialog.ADDRESS_SAVED)) {
              cadastreObjectBean1
                  .getSelectedAddress()
                  .copyFromObject((AddressBean) evt.getNewValue());
            }
          }
        });
    form.setVisible(true);
  }