@Override
 public void setCidsBean(final CidsBean cidsBean) {
   bindingGroup.unbind();
   this.resource = cidsBean;
   DefaultCustomObjectEditor.setMetaClassInformationToMetaClassStoreComponentsInBindingGroup(
       bindingGroup, this.resource);
   geometryChooserPanel.setCidsBean(resource);
   bindingGroup.bind();
 }
Exemplo n.º 2
0
 @Override
 public void dispose() {
   wkGwPanOne1.dispose();
   wkGwPanTwo1.dispose();
   wkGwPanThree1.dispose();
   wkGwPanFour1.dispose();
   wkGwPanFive1.dispose();
   wkGwPanSix1.dispose();
   bindingGroup.unbind();
 }
 @Override
 public void setCidsBean(final CidsBean cidsBean) {
   bindingGroup.unbind();
   if (cidsBean != null) {
     this.cidsBean = cidsBean;
     DefaultCustomObjectEditor.setMetaClassInformationToMetaClassStoreComponentsInBindingGroup(
         bindingGroup, this.cidsBean);
     bindingGroup.bind();
   }
 }
Exemplo n.º 4
0
  @Override
  public void setCidsBean(final CidsBean cidsBean) {
    if (cidsBean == null) {
      txtErfassungsdatum.setText("");
      txtKassenzeichen.setText("");
      txtBemerkung.setText("");
      txtSperreBemerkung.setText("");
      chkSperre.setSelected(false);
    }

    aggVal.clear();
    aggVal.add(bindingValidator);

    bindingGroup.unbind();
    kassenzeichenBean = cidsBean;
    bindingGroup.bind();

    attachBeanValidators();

    aggVal.add(getValidatorKassenzeichenNummer(kassenzeichenBean));
  }
 @Override
 public void dispose() {
   bindingGroup.unbind();
   geometryChooserPanel.dispose();
 }
Exemplo n.º 6
0
  @Override
  public void setCidsBean(final CidsBean cidsBean) {
    bindingGroup.unbind();
    this.cidsBean = cidsBean;
    if (cidsBean != null) {
      wkGwPanOne1.setCidsBean(cidsBean);
      wkGwPanTwo1.setCidsBean(cidsBean);
      wkGwPanThree1.setCidsBean(cidsBean);
      wkGwPanFour1.setCidsBean(cidsBean);
      wkGwPanFive1.setCidsBean(cidsBean);
      wkGwPanSix1.setCidsBean(cidsBean);
      bindingGroup.bind();

      cidsBean.addPropertyChangeListener(
          new PropertyChangeListener() {

            @Override
            public void propertyChange(final PropertyChangeEvent pce) {
              if (pce.getPropertyName().equals("name")) {
                try {
                  cidsBean.setProperty("ms_cd_gb", "DEMV_" + (String) pce.getNewValue());
                } catch (Exception ex) {
                  if (LOG.isDebugEnabled()) {
                    LOG.debug("autosetting ms_cd_gb failed", ex);
                  }
                }
              }
            }
          });

      cidsBean.addPropertyChangeListener(
          new PropertyChangeListener() {

            @Override
            public void propertyChange(final PropertyChangeEvent pce) {
              if (pce.getPropertyName().equals("ms_cd_gb")) {
                try {
                  cidsBean.setProperty("eu_cd_gb", "DE_GB_" + (String) pce.getNewValue());
                } catch (Exception ex) {
                  if (LOG.isDebugEnabled()) {
                    LOG.debug("autosetting eu_cd_gb failed", ex);
                  }
                }
              }
            }
          });

      cidsBean.addPropertyChangeListener(
          new PropertyChangeListener() {

            @Override
            public void propertyChange(final PropertyChangeEvent pce) {
              if (pce.getPropertyName().equals("nitrat")
                  || pce.getPropertyName().equals("pesticides")
                  || pce.getPropertyName().equals("actsubpest")
                  || pce.getPropertyName().equals("annex_ii")
                  || pce.getPropertyName().equals("othpl")) {
                try {
                  int worstCaseValue = 0;
                  final String[] props = {
                    "nitrat", "pesticides", "actsubpest", "annex_ii", "othpl"
                  };
                  int worstCasePropIndex = 0;
                  for (int propIndex = 0; propIndex < props.length; propIndex++) {
                    final String prop = props[propIndex];
                    final String baseValue =
                        (String) ((CidsBean) cidsBean.getProperty(prop)).getProperty("value");
                    int propValue = 0;
                    try {
                      propValue = Integer.valueOf(baseValue);
                    } catch (Exception ex) {
                      if (LOG.isDebugEnabled()) {
                        LOG.debug("baseValInt cast", ex);
                      }
                    }

                    if (propValue >= worstCaseValue) {
                      worstCasePropIndex = propIndex;
                      worstCaseValue = propValue;
                    }
                  }
                  cidsBean.setProperty(
                      "chem_stat", (CidsBean) cidsBean.getProperty(props[worstCasePropIndex]));
                } catch (Exception ex) {
                  if (LOG.isDebugEnabled()) {
                    LOG.debug("autosetting chem_stat failed", ex);
                  }
                }
              }
            }
          });
    }
  }
 @Override
 public void dispose() {
   bindingGroup.unbind();
   stationEditor1.dispose();
   stationEditor2.dispose();
 }
Exemplo n.º 8
0
 @Override
 public void dispose() {
   bindingGroup.unbind();
 }