コード例 #1
0
  private void llenarBindingGroup() {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

    contabilidadBBTipo1 = new shrimp.contabilidad.beanbinding.ContabilidadBBTipo();
    org.jdesktop.beansbinding.ELProperty eLProperty =
        org.jdesktop.beansbinding.ELProperty.create("${listaConTipoTO}");
    org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            contabilidadBBTipo1,
            eLProperty,
            jcboTipo);
    bindingGroup.addBinding(jComboBoxBinding);

    sistemaBBPeriodo1 = new shrimp.sistema.beanbinding.SistemaBBPeriodo();
    eLProperty = org.jdesktop.beansbinding.ELProperty.create("${listaPeriodoTO}");
    jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            sistemaBBPeriodo1,
            eLProperty,
            jcboPeriodo);
    bindingGroup.addBinding(jComboBoxBinding);
    bindingGroup.bind();
  }
  private void doBindings() {
    BindingGroup bindingGroup = new BindingGroup();

    Binding binding =
        Bindings.createAutoBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            model,
            ELProperty.create("${registroEditado.descricao}"),
            descricaoField,
            BeanProperty.create("text"));
    binding.setSourceUnreadableValue("");
    bindingGroup.addBinding(binding);

    binding =
        Bindings.createAutoBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            model,
            ELProperty.create("${registroEditado.valor}"),
            valorField,
            BeanProperty.create("text"));
    binding.setSourceUnreadableValue("");
    bindingGroup.addBinding(binding);

    bindingGroup.bind();
  }
 @Override
 public void setCidsBean(final CidsBean cidsBean) {
   bindingGroup.unbind();
   this.resource = cidsBean;
   DefaultCustomObjectEditor.setMetaClassInformationToMetaClassStoreComponentsInBindingGroup(
       bindingGroup, this.resource);
   geometryChooserPanel.setCidsBean(resource);
   bindingGroup.bind();
 }
コード例 #4
0
 @Override
 public void setCidsBean(final CidsBean cidsBean) {
   bindingGroup.unbind();
   if (cidsBean != null) {
     this.cidsBean = cidsBean;
     DefaultCustomObjectEditor.setMetaClassInformationToMetaClassStoreComponentsInBindingGroup(
         bindingGroup, this.cidsBean);
     bindingGroup.bind();
   }
 }
コード例 #5
0
  /** Binds list, navigation and simple direct properties. */
  @SuppressWarnings("unchecked")
  private void bindBasics() {
    // bind the list
    JListBinding listBinding =
        SwingBindings.createJListBinding(UpdateStrategy.READ_WRITE, beanList, list);
    listBinding.setDetailBinding(BeanProperty.create("value"));
    listBinding.bind();

    // bind the properties
    Validator notEmpty = new NotEmptyValidator();
    BindingGroupBean context = new BindingGroupBean();
    // bind the navigation to list selection
    context.addBinding(
        Bindings.createAutoBinding(
            UpdateStrategy.READ,
            list,
            BeanProperty.create("selectedElement"),
            navigation,
            BeanProperty.create("selectedElement")));
    Binding valueBinding =
        Bindings.createAutoBinding(
            UpdateStrategy.READ_WRITE,
            navigation,
            BeanProperty.create("selectedElement.value"),
            valueField,
            BeanProperty.create("text"));
    valueBinding.setSourceUnreadableValue(null);
    context.addBinding(valueBinding);
    valueBinding.setValidator(notEmpty);
    Binding activityBinding =
        Bindings.createAutoBinding(
            UpdateStrategy.READ_WRITE,
            navigation,
            BeanProperty.create("selectedElement.active"),
            activityBox,
            BeanProperty.create("selected"));
    activityBinding.setSourceUnreadableValue(Boolean.FALSE);
    context.addBinding(activityBinding);
    context.bind();

    BindingGroup bufferingContext = new BindingGroup();
    bufferingContext.addBinding(
        Bindings.createAutoBinding(
            UpdateStrategy.READ,
            context,
            BeanProperty.create("dirty"),
            uncommittedBox,
            BeanProperty.create("selected")));
    bufferingContext.bind();
  }
コード例 #6
0
ファイル: JIFResumenPesca.java プロジェクト: todocompu/Shrimp
 private void llenarCombo() throws Exception {
   bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
   produccionBBSector1 = new shrimp.produccion.beanbinding.ProduccionBBSector();
   eLProperty = org.jdesktop.beansbinding.ELProperty.create("${listaPrdListaSectorTO}");
   org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding =
       org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
           org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
           produccionBBSector1,
           eLProperty,
           jcboCP);
   bindingGroup.addBinding(jComboBoxBinding);
   this.bindingGroup.bind();
   this.produccionBBSector1.setPrdListaSectorTO(
       shrimp.produccion.delegate.ProduccionDelegate.getInstance()
           .getListaSectorTO(sisUsuarioEmpresaTO.getEmpCodigo(), false));
   this.bindingGroup.bind();
   this.jcboCP.updateUI();
   this.jcboCP.setSelectedIndex(0);
   codigoSector =
       "'"
           + produccionBBSector1
               .getListaPrdListaSectorTO()
               .get(jcboCP.getSelectedIndex())
               .getSecCodigo()
           + "'";
   jcboCP.requestFocus();
 }
コード例 #7
0
ファイル: JIFResumenPesca.java プロジェクト: todocompu/Shrimp
 private void llenarBindingGroup() {
   bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
   org.jdesktop.beansbinding.ELProperty eLProperty =
       org.jdesktop.beansbinding.ELProperty.create(
           "${listaPrdListaResumenCorridaTO}"); // listaPrdListaResumenCorridaTO
   bindingGroup.bind();
 }
コード例 #8
0
 @Override
 public void dispose() {
   wkGwPanOne1.dispose();
   wkGwPanTwo1.dispose();
   wkGwPanThree1.dispose();
   wkGwPanFour1.dispose();
   wkGwPanFive1.dispose();
   wkGwPanSix1.dispose();
   bindingGroup.unbind();
 }
コード例 #9
0
ファイル: BasicInfoManagement.java プロジェクト: javaee5/TMS
  public void refresh() throws IOException {

    blookupService.setServiceName("/getByLookupId");
    bLookups =
        new ObjectMapper()
            .readValue(
                new RESTfulClientUtil()
                    .restFullService(
                        blookupService.getServerUrl(),
                        blookupService.getServiceName(),
                        new ObjectMapper().writeValueAsString(lookup.getId())),
                new TypeReference<List<BLookup>>() {});

    JTableBinding jTableBinding =
        org.jdesktop.swingbinding.SwingBindings.createJTableBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            bLookups,
            mainTable,
            "");
    JTableBinding.ColumnBinding columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${code}"));
    columnBinding.setColumnName("CODE");
    columnBinding.setColumnClass(String.class);
    columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${name}"));
    columnBinding.setColumnName("NAME");
    columnBinding.setColumnClass(String.class);
    columnBinding =
        jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${persianName}"));
    columnBinding.setColumnName("PERSIANNAME");
    columnBinding.setColumnClass(String.class);
    columnBinding =
        jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${description}"));
    columnBinding.setColumnName("DESC");
    columnBinding.setColumnClass(String.class);
    BindingGroup bindingGroup = new BindingGroup();
    bindingGroup.addBinding(jTableBinding);
    jTableBinding.bind();
  }
コード例 #10
0
ファイル: KassenzeichenPanel.java プロジェクト: cismet/verdis
  @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));
  }
コード例 #11
0
  private void llenarComboPeriodo() throws Exception {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
    jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            rRHHBBFunciones.getRhComboUtilidadesPeriodoTO(),
            jcboPeriodo);
    bindingGroup.addBinding(jComboBoxBinding);

    this.rRHHBBFunciones.setRhComboUtilidadesPeriodoTO(
        shrimp.rrhh.delegate.RrhhDelegate.getInstance()
            .getRhComboUtilidadesPeriodoTO(sisUsuarioEmpresaTO.getEmpCodigo()));
    this.bindingGroup.bind();
    this.jcboPeriodo.updateUI();
    this.jcboPeriodo.setSelectedItem(null);
    jcboPeriodo.setRenderer(new shrimp.validaciones.ComboTooltipRenderer());
  }
コード例 #12
0
  private void llenarComboSector() throws Exception {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
    eLProperty = org.jdesktop.beansbinding.ELProperty.create("${listaPrdListaSectorTO}");
    jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            bbProduccionSector1,
            eLProperty,
            jcboSector);
    bindingGroup.addBinding(jComboBoxBinding);

    this.bbProduccionSector1.setPrdListaSectorTO(
        shrimp.produccion.delegate.ProduccionDelegate.getInstance()
            .getListaSectorTO(empresa, false));
    this.bindingGroup.bind();
    this.jcboSector.updateUI();
    this.jcboSector.setSelectedItem(null);
    jcboSector.setRenderer(new shrimp.validaciones.ComboTooltipRenderer());
  }
コード例 #13
0
  private void doBindings() {
    BindingGroup bindingGroup = new BindingGroup();

    Binding binding =
        Bindings.createAutoBinding(
            AutoBinding.UpdateStrategy.READ,
            model,
            ELProperty.create("${registroEditado.idveiculo}"),
            idVeiculoField,
            BeanProperty.create("text"));
    binding.setSourceUnreadableValue("");
    bindingGroup.addBinding(binding);

    binding =
        Bindings.createAutoBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            model,
            ELProperty.create("${registroEditado.placa}"),
            placaField,
            BeanProperty.create("text"));
    binding.setSourceUnreadableValue("");
    bindingGroup.addBinding(binding);

    binding =
        Bindings.createAutoBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            model,
            ELProperty.create("${registroEditado.modelo}"),
            modeloField,
            BeanProperty.create("text"));
    binding.setSourceUnreadableValue("");
    bindingGroup.addBinding(binding);

    binding =
        Bindings.createAutoBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            model,
            ELProperty.create("${registroEditado.cor}"),
            corField,
            BeanProperty.create("text"));
    binding.setSourceUnreadableValue("");
    bindingGroup.addBinding(binding);
    bindingGroup.bind();
  }
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

    createNewLocation = new de.cismet.cids.custom.switchon.gui.utils.CreateNewTagAction();
    geometryChooserPanel = new de.cismet.cids.custom.switchon.gui.GeometryChooserPanel();
    pnlOtherProperties = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    cmbSrid =
        FastBindableReferenceComboFactory.createTagsFastBindableReferenceComboBox(Taggroups.SRID);
    jLabel2 = new javax.swing.JLabel();
    cmbLocation =
        FastBindableReferenceComboFactory.createTagsFastBindableReferenceComboBox(
            Taggroups.LOCATION);
    btnAddLocation = new javax.swing.JButton();
    filler1 =
        new javax.swing.Box.Filler(
            new java.awt.Dimension(0, 0),
            new java.awt.Dimension(0, 0),
            new java.awt.Dimension(0, 32767));
    infoBoxPanel = new de.cismet.cids.custom.switchon.gui.InfoBoxPanel();

    setLayout(new java.awt.GridBagLayout());

    geometryChooserPanel.setBorder(
        javax.swing.BorderFactory.createTitledBorder(
            org.openide.util.NbBundle.getMessage(
                GeographicInformationVisualPanel.class,
                "GeographicInformationVisualPanel.geometryChooserPanel.border.title"))); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 0.6;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
    add(geometryChooserPanel, gridBagConstraints);

    pnlOtherProperties.setBorder(
        javax.swing.BorderFactory.createTitledBorder(
            org.openide.util.NbBundle.getMessage(
                GeographicInformationVisualPanel.class,
                "GeographicInformationVisualPanel.pnlOtherProperties.border.title"))); // NOI18N
    pnlOtherProperties.setLayout(new java.awt.GridBagLayout());

    org.openide.awt.Mnemonics.setLocalizedText(
        jLabel1,
        org.openide.util.NbBundle.getMessage(
            GeographicInformationVisualPanel.class,
            "GeographicInformationVisualPanel.jLabel1.text")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(10, 10, 5, 10);
    pnlOtherProperties.add(jLabel1, gridBagConstraints);

    org.jdesktop.beansbinding.Binding binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.srid}"),
            cmbSrid,
            org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
    bindingGroup.addBinding(binding);

    cmbSrid.addFocusListener(
        new java.awt.event.FocusAdapter() {

          @Override
          public void focusGained(final java.awt.event.FocusEvent evt) {
            cmbSridFocusGained(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 5, 10);
    pnlOtherProperties.add(cmbSrid, gridBagConstraints);

    org.openide.awt.Mnemonics.setLocalizedText(
        jLabel2,
        org.openide.util.NbBundle.getMessage(
            GeographicInformationVisualPanel.class,
            "GeographicInformationVisualPanel.jLabel2.text")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(10, 10, 5, 10);
    pnlOtherProperties.add(jLabel2, gridBagConstraints);

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.location}"),
            cmbLocation,
            org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
    bindingGroup.addBinding(binding);

    cmbLocation.addFocusListener(
        new java.awt.event.FocusAdapter() {

          @Override
          public void focusGained(final java.awt.event.FocusEvent evt) {
            cmbLocationFocusGained(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 10, 10);
    pnlOtherProperties.add(cmbLocation, gridBagConstraints);

    createNewLocation.setCombo((FastBindableReferenceCombo) cmbLocation);
    btnAddLocation.setAction(createNewLocation);
    org.openide.awt.Mnemonics.setLocalizedText(
        btnAddLocation,
        org.openide.util.NbBundle.getMessage(
            GeographicInformationVisualPanel.class,
            "GeographicInformationVisualPanel.btnAddLocation.text")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 10, 10, 10);
    pnlOtherProperties.add(btnAddLocation, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
    gridBagConstraints.weighty = 1.0;
    pnlOtherProperties.add(filler1, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 0.4;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(10, 0, 10, 10);
    add(pnlOtherProperties, gridBagConstraints);

    infoBoxPanel.setGeneralInformation(
        org.openide.util.NbBundle.getMessage(
            GeographicInformationVisualPanel.class,
            "GeographicInformationVisualPanel.infoBoxPanel.generalInformation")); // NOI18N
    infoBoxPanel.setMinimumSize(new java.awt.Dimension(134, 55));
    infoBoxPanel.setPreferredSize(new java.awt.Dimension(748, 55));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(0, 10, 10, 10);
    add(infoBoxPanel, gridBagConstraints);

    bindingGroup.bind();
  } // </editor-fold>//GEN-END:initComponents
 @Override
 public void dispose() {
   bindingGroup.unbind();
   geometryChooserPanel.dispose();
 }
コード例 #16
0
 @Override
 public void dispose() {
   bindingGroup.unbind();
 }
コード例 #17
0
  /** Initialize ConditionsPanel components */
  private void initConditionsPanel() {
    // set selected matrix dimension to "2D"
    setupConditionsPanel.getEcmDimensionComboBox().setSelectedIndex(0);
    setupConditionsPanel.getjTabbedPane1().setEnabled(false);
    // set current and previous conditions indexes
    conditionIndex = 0;
    previousConditionIndex = -1;

    conditionsPanel.getAddButton().setEnabled(false);
    // init conditionJList (create new empty list) (conditions are NOT retrieved from DB)
    plateConditionBindingList =
        ObservableCollections.observableList(new ArrayList<PlateCondition>());

    // autobind cell line
    // autobind seeding density
    Binding binding =
        Bindings.createAutoBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            conditionsPanel.getConditionsJList(),
            BeanProperty.create("selectedElement.cellLine.seedingDensity"),
            setupConditionsPanel.getSeedingDensityTextField(),
            BeanProperty.create("text"),
            "seedingdensitybinding");
    bindingGroup.addBinding(binding);
    // autobind seeding time
    binding =
        Bindings.createAutoBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            conditionsPanel.getConditionsJList(),
            BeanProperty.create("selectedElement.cellLine.seedingTime"),
            setupConditionsPanel.getSeedingTimeTextField(),
            BeanProperty.create("text"),
            "seedingtimebinding");
    bindingGroup.addBinding(binding);
    // autobind growth medium
    binding =
        Bindings.createAutoBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            conditionsPanel.getConditionsJList(),
            BeanProperty.create("selectedElement.cellLine.growthMedium"),
            setupConditionsPanel.getGrowthMediumComboBox(),
            BeanProperty.create("selectedItem"),
            "growthmediumbinding");
    bindingGroup.addBinding(binding);
    // autobind serum
    binding =
        Bindings.createAutoBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            conditionsPanel.getConditionsJList(),
            BeanProperty.create("selectedElement.cellLine.serum"),
            setupConditionsPanel.getSerumComboBox(),
            BeanProperty.create("selectedItem"),
            "celllineserumbinding");
    bindingGroup.addBinding(binding);
    // autobind serum concentration
    binding =
        Bindings.createAutoBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            conditionsPanel.getConditionsJList(),
            BeanProperty.create("selectedElement.cellLine.serumConcentration"),
            setupConditionsPanel.getSerumConcentrationTextField(),
            BeanProperty.create("text"),
            "celllineserumconcentrationbinding");
    bindingGroup.addBinding(binding);
    // autobind cell line type
    binding =
        Bindings.createAutoBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            conditionsPanel.getConditionsJList(),
            BeanProperty.create("selectedElement.cellLine.cellLineType"),
            setupConditionsPanel.getCellLineComboBox(),
            BeanProperty.create("selectedItem"),
            "celllinetypebinding");
    bindingGroup.addBinding(binding);

    // autobind assay medium
    // autobind medium
    binding =
        Bindings.createAutoBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            conditionsPanel.getConditionsJList(),
            BeanProperty.create("selectedElement.assayMedium.medium"),
            treatmentsController.getTreatmentsPanel().getAssayMediumComboBox(),
            BeanProperty.create("selectedItem"),
            "assaymediumbinding");
    bindingGroup.addBinding(binding);
    // autobind serum
    binding =
        Bindings.createAutoBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            conditionsPanel.getConditionsJList(),
            BeanProperty.create("selectedElement.assayMedium.serum"),
            treatmentsController.getTreatmentsPanel().getSerumComboBox(),
            BeanProperty.create("selectedItem"),
            "assayserumbinding");
    bindingGroup.addBinding(binding);
    // autobind serum concentration
    binding =
        Bindings.createAutoBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            conditionsPanel.getConditionsJList(),
            BeanProperty.create("selectedElement.assayMedium.serumConcentration"),
            treatmentsController.getTreatmentsPanel().getSerumConcentrationTextField(),
            BeanProperty.create("text"),
            "assayserumconcentrationbinding");
    bindingGroup.addBinding(binding);
    // autobind volume
    binding =
        Bindings.createAutoBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            conditionsPanel.getConditionsJList(),
            BeanProperty.create("selectedElement.assayMedium.volume"),
            treatmentsController.getTreatmentsPanel().getMediumVolumeTextField(),
            BeanProperty.create("text"),
            "assayvolumebinding");
    bindingGroup.addBinding(binding);

    // autobind matrix dimension
    binding =
        Bindings.createAutoBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            conditionsPanel.getConditionsJList(),
            BeanProperty.create("selectedElement.matrixDimension"),
            setupConditionsPanel.getEcmDimensionComboBox(),
            BeanProperty.create("selectedItem"),
            "matrixdimensionbinding");
    bindingGroup.addBinding(binding);
    bindingGroup.bind();

    // init conditionListBinding
    JListBinding conditionListBinding =
        SwingBindings.createJListBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            plateConditionBindingList,
            conditionsPanel.getConditionsJList());
    bindingGroup.addBinding(conditionListBinding);
    bindingGroup.bind();

    // create and init the first condition (Condition 1)
    PlateCondition firstCondition = createFirstCondition();
    // add Condition 1 to the list
    plateConditionBindingList.add(firstCondition);

    // set cell renderer for conditionJList
    conditionsPanel.getConditionsJList().setCellRenderer(new ConditionsSetupListRenderer());

    /** add mouse listeners */
    // if Condition validation is OK, update previous condition and user input fields
    conditionsPanel
        .getConditionsJList()
        .getSelectionModel()
        .addListSelectionListener(
            new ListSelectionListener() {
              @Override
              public void valueChanged(ListSelectionEvent e) {
                if (!e.getValueIsAdjusting()) {
                  conditionsPanel.getAddButton().setEnabled(true);
                  int selectedIndex = conditionsPanel.getConditionsJList().getSelectedIndex();
                  if (selectedIndex != -1) {
                    // add mouse listener and enable tabbed pane on the right (only once, for
                    // Condition 1)
                    if (selectedIndex == 0) {
                      setupExperimentController.addMouseListener();
                      setupConditionsPanel.getjTabbedPane1().setEnabled(true);
                    }
                    if (previousConditionIndex < plateConditionBindingList.size()
                        && previousConditionIndex != -1) {
                      // check if validation of condition is OK
                      if (setupExperimentController.validateCondition(
                          plateConditionBindingList.get(previousConditionIndex))) {
                        // update fields of previous condition
                        updateCondition(previousConditionIndex);
                        // update and reset fields for the assay-ecm panel
                        assayEcmController.updateAssayEcmInputFields(
                            plateConditionBindingList.get(selectedIndex));
                        // assayEcmPanelController.resetAssayEcmInputFields(plateConditionBindingList.get(locationToIndex));
                        // keep source and destination lists sync: show actual treatment collection
                        treatmentsController.updateLists(
                            plateConditionBindingList.get(selectedIndex));
                      }
                    }
                    previousConditionIndex = selectedIndex;
                  }
                }
              }
            });

    // add an empty list of rectangles for Condition 1
    setupExperimentController.onNewConditionAdded(firstCondition);
    // disable the Remove Button
    conditionsPanel.getRemoveButton().setEnabled(false);

    /** add action listeners */
    // add a new Condition to the List
    // each new Condition is init through values selected from the previously created one!
    conditionsPanel
        .getAddButton()
        .addActionListener(
            new ActionListener() {
              @Override
              public void actionPerformed(ActionEvent e) {
                // create and init a new Condition
                PlateCondition newCondition = new PlateCondition();
                initNewCondition(newCondition);
                // add the new Condition to the list
                plateConditionBindingList.add(newCondition);
                // add a new empty list of rectangles for the just added Condition
                setupExperimentController.onNewConditionAdded(newCondition);
                // after a new condition is added enable the remove button
                if (!conditionsPanel.getRemoveButton().isEnabled()) {
                  conditionsPanel.getRemoveButton().setEnabled(true);
                }
              }
            });

    // remove a Condition from the list
    conditionsPanel
        .getRemoveButton()
        .addActionListener(
            new ActionListener() {
              @Override
              public void actionPerformed(ActionEvent e) {
                if (conditionsPanel.getConditionsJList().getSelectedValue() != null) {
                  // empty the list of rectangles for this Condition and reset to null the Condition
                  // of the associated wells
                  setupExperimentController.onConditionToRemove(
                      (PlateCondition) (conditionsPanel.getConditionsJList().getSelectedValue()));
                  // remove the Condition from the list
                  int selectedIndex = conditionsPanel.getConditionsJList().getSelectedIndex();
                  PlateCondition conditionToRemove = plateConditionBindingList.get(selectedIndex);
                  // if the condition to remove is the last one, decrease previous condition index
                  if (plateConditionBindingList.indexOf(conditionToRemove)
                      == plateConditionBindingList.size() - 1) {
                    previousConditionIndex = plateConditionBindingList.size() - 2;
                  }
                  // remove condition from the list
                  plateConditionBindingList.remove(conditionToRemove);
                  // select first condition after removing
                  conditionsPanel.getConditionsJList().setSelectedIndex(0);
                  // if there's only one condition left, disable again the remove button
                  if (plateConditionBindingList.size() == 1) {
                    conditionsPanel.getRemoveButton().setEnabled(false);
                  }
                }
              }
            });
  }
コード例 #18
0
  /** Initialize cell Line panel */
  private void initCellLinePanel() {
    // init cellLineJCombo
    cellLineTypeBindingList =
        ObservableCollections.observableList(cellLineService.findAllCellLineTypes());
    JComboBoxBinding jComboBoxBinding =
        SwingBindings.createJComboBoxBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            cellLineTypeBindingList,
            setupConditionsPanel.getCellLineComboBox());
    bindingGroup.addBinding(jComboBoxBinding);
    // init growth medium JCombo
    mediumBindingList = ObservableCollections.observableList(cellLineService.findAllGrowthMedia());
    jComboBoxBinding =
        SwingBindings.createJComboBoxBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            mediumBindingList,
            setupConditionsPanel.getGrowthMediumComboBox());
    bindingGroup.addBinding(jComboBoxBinding);

    // init serum JCombo
    serumBindingList = ObservableCollections.observableList(cellLineService.findAllSera());
    jComboBoxBinding =
        SwingBindings.createJComboBoxBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            serumBindingList,
            setupConditionsPanel.getSerumComboBox());
    bindingGroup.addBinding(jComboBoxBinding);

    // init the other serum ComboBox
    jComboBoxBinding =
        SwingBindings.createJComboBoxBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            serumBindingList,
            treatmentsController.getTreatmentsPanel().getSerumComboBox());
    bindingGroup.addBinding(jComboBoxBinding);

    // init assay medium JCombo (it's actually in the treatment panel, but ca not be bind before
    // since the mediumBindingList would still be null)
    jComboBoxBinding =
        SwingBindings.createJComboBoxBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            mediumBindingList,
            treatmentsController.getTreatmentsPanel().getAssayMediumComboBox());
    bindingGroup.addBinding(jComboBoxBinding);
    bindingGroup.bind();

    /** add action listeners */
    /** insert a new cell line Type in the DB if it's not present yet */
    setupConditionsPanel
        .getAddCellLineButton()
        .addActionListener(
            new ActionListener() {
              @Override
              public void actionPerformed(ActionEvent e) {
                if (!setupConditionsPanel.getCellLineNameTextField().getText().isEmpty()) {
                  CellLineType newCellLineType = new CellLineType();
                  newCellLineType.setName(
                      setupConditionsPanel.getCellLineNameTextField().getText());
                  try {
                    // insert cell line to DB
                    saveCellLineType(newCellLineType);
                    // add the new cell line to the list
                    cellLineTypeBindingList.add(newCellLineType);
                    setupConditionsPanel.getCellLineNameTextField().setText("");
                    showMessage(
                        "Cell line inserted to DB!",
                        "cell line saved",
                        JOptionPane.INFORMATION_MESSAGE);
                  } catch (PersistenceException exception) {
                    LOG.error(exception.getMessage());
                    showMessage(
                        "Cell Line already present in DB!", "", JOptionPane.WARNING_MESSAGE);
                    setupConditionsPanel.getCellLineNameTextField().setText("");
                    setupConditionsPanel.getCellLineNameTextField().requestFocusInWindow();
                  }
                } else {
                  showMessage(
                      "Please insert a name for the cell line!", "", JOptionPane.WARNING_MESSAGE);
                  setupConditionsPanel.getCellLineNameTextField().requestFocusInWindow();
                }
              }
            });
  }
コード例 #19
0
ファイル: DoubleSlitPanel.java プロジェクト: haikn/jasper
  private void initComponents(BindingGroup bindingGroup) {
    panelButton = new javax.swing.JPanel();
    panelDoubleSlit = new javax.swing.JPanel();
    lblWidthDoubleSlit = new javax.swing.JLabel();
    lblHeightDoubleSlit = new javax.swing.JLabel();
    lblRotationDoubleSlit = new javax.swing.JLabel();
    lblPosDoubleSlit = new javax.swing.JLabel();
    lblGrayDoubleSlit = new javax.swing.JLabel();
    text_single_widthDoubleSlit = new javax.swing.JTextField();
    text_single_heightDoubleSlit = new javax.swing.JTextField();
    text_single_rotationDoubleSlit = new javax.swing.JTextField();
    text_single_positionDoubleSlit = new javax.swing.JTextField();
    text_single_grayDoubleSlit = new javax.swing.JTextField();
    s_single_widthDoubleSlit = new javax.swing.JSlider();
    s_single_heightDoubleSlit = new javax.swing.JSlider();
    s_single_rotationDoubleSlit = new javax.swing.JSlider();
    s_single_positionDoubleSlit = new javax.swing.JSlider();
    s_single_grayDoubleSlit = new javax.swing.JSlider();
    jLabelSpacingDoubleSlit = new javax.swing.JLabel();
    text_single_spacingDoubleSlit = new javax.swing.JTextField();
    s_single_spacingDoubleSlit = new javax.swing.JSlider();
    buttonGennerateDoubleSlit = new javax.swing.JButton();
    buttong11LensOnDoubleSlit = new javax.swing.JButton();
    buttonSecondDisplayDoubleSlit = new javax.swing.JButton();

    lblWidthDoubleSlit.setText(labels.getString("paramWidth"));

    lblHeightDoubleSlit.setText(labels.getString("paramWidth"));

    lblRotationDoubleSlit.setText(labels.getString("paramRotationNoDegree"));

    lblPosDoubleSlit.setText(labels.getString("paramPositions"));

    lblGrayDoubleSlit.setText(labels.getString("paramGrayLevel"));

    Binding binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            s_single_widthDoubleSlit,
            org.jdesktop.beansbinding.ELProperty.create("${value}"),
            text_single_widthDoubleSlit,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            s_single_heightDoubleSlit,
            org.jdesktop.beansbinding.ELProperty.create("${value}"),
            text_single_heightDoubleSlit,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            s_single_rotationDoubleSlit,
            org.jdesktop.beansbinding.ELProperty.create("${value}"),
            text_single_rotationDoubleSlit,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            s_single_positionDoubleSlit,
            org.jdesktop.beansbinding.ELProperty.create("${value}"),
            text_single_positionDoubleSlit,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            s_single_grayDoubleSlit,
            org.jdesktop.beansbinding.ELProperty.create("${value}"),
            text_single_grayDoubleSlit,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jLabelSpacingDoubleSlit.setText(labels.getString("paramSpacing"));

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            s_single_spacingDoubleSlit,
            org.jdesktop.beansbinding.ELProperty.create("${value}"),
            text_single_spacingDoubleSlit,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    s_single_widthDoubleSlit.setMaximum(3866);
    s_single_widthDoubleSlit.setValue(3866);
    s_single_widthDoubleSlit.addChangeListener(
        new javax.swing.event.ChangeListener() {
          public void stateChanged(javax.swing.event.ChangeEvent evt) {
            sliderGenerateActionPerformedDoubleSlit(evt);
          }
        });
    s_single_heightDoubleSlit.setMaximum(image1.getBounds().height);
    s_single_heightDoubleSlit.setValue(100);
    s_single_heightDoubleSlit.addChangeListener(
        new javax.swing.event.ChangeListener() {
          public void stateChanged(javax.swing.event.ChangeEvent evt) {
            sliderGenerateActionPerformedDoubleSlit(evt);
          }
        });
    s_single_rotationDoubleSlit.setMaximum(180);
    s_single_rotationDoubleSlit.setMinimum(-180);
    s_single_rotationDoubleSlit.setValue(0);
    s_single_rotationDoubleSlit.addChangeListener(
        new javax.swing.event.ChangeListener() {
          public void stateChanged(javax.swing.event.ChangeEvent evt) {
            sliderGenerateActionPerformedDoubleSlit(evt);
          }
        });
    s_single_positionDoubleSlit.setMaximum(image1.getBounds().height / 2);
    s_single_positionDoubleSlit.setMinimum(-(image1.getBounds().height / 2));
    s_single_positionDoubleSlit.setValue(0);
    s_single_positionDoubleSlit.addChangeListener(
        new javax.swing.event.ChangeListener() {
          public void stateChanged(javax.swing.event.ChangeEvent evt) {
            sliderGenerateActionPerformedDoubleSlit(evt);
          }
        });
    s_single_grayDoubleSlit.setMajorTickSpacing(255);
    s_single_grayDoubleSlit.setPaintLabels(true);
    s_single_grayDoubleSlit.setMaximum(255);
    s_single_grayDoubleSlit.setValue(255);
    s_single_grayDoubleSlit.addChangeListener(
        new javax.swing.event.ChangeListener() {
          public void stateChanged(javax.swing.event.ChangeEvent evt) {
            sliderGenerateActionPerformedDoubleSlit(evt);
          }
        });
    s_single_spacingDoubleSlit.setMaximum(image1.getBounds().height);
    s_single_spacingDoubleSlit.setValue(150);
    s_single_spacingDoubleSlit.addChangeListener(
        new javax.swing.event.ChangeListener() {
          public void stateChanged(javax.swing.event.ChangeEvent evt) {
            sliderGenerateActionPerformedDoubleSlit(evt);
          }
        });

    text_single_heightDoubleSlit.addKeyListener(
        new KeyAdapter() {
          public void keyReleased(KeyEvent ke) {
            keyeventGenerateActionPerformedDoubleSlit(ke);
            if (text_single_heightDoubleSlit.getText() == null
                || text_single_heightDoubleSlit.getText().equals("")) {
              lblHeightDoubleSlit.setForeground(Color.red);
            } else {
              lblHeightDoubleSlit.setForeground(Color.black);
            }
          }
        });

    text_single_rotationDoubleSlit.addKeyListener(
        new KeyAdapter() {
          public void keyReleased(KeyEvent ke) {
            keyeventGenerateActionPerformedDoubleSlit(ke);
            if (text_single_rotationDoubleSlit.getText() == null
                || text_single_rotationDoubleSlit.getText().equals("")) {
              lblRotationDoubleSlit.setForeground(Color.red);
            } else {
              lblRotationDoubleSlit.setForeground(Color.black);
            }
          }
        });

    text_single_positionDoubleSlit.addKeyListener(
        new KeyAdapter() {
          public void keyReleased(KeyEvent ke) {
            keyeventGenerateActionPerformedDoubleSlit(ke);
            if (text_single_positionDoubleSlit.getText() == null
                || text_single_positionDoubleSlit.getText().equals("")) {
              lblPosDoubleSlit.setForeground(Color.red);
            } else {
              lblPosDoubleSlit.setForeground(Color.black);
            }
          }
        });

    text_single_grayDoubleSlit.addKeyListener(
        new KeyAdapter() {
          public void keyReleased(KeyEvent ke) {
            keyeventGenerateActionPerformedDoubleSlit(ke);
            if (text_single_grayDoubleSlit.getText() == null
                || text_single_grayDoubleSlit.getText().equals("")) {
              lblGrayDoubleSlit.setForeground(Color.red);
            } else {
              lblGrayDoubleSlit.setForeground(Color.black);
            }
          }
        });

    text_single_spacingDoubleSlit.addKeyListener(
        new KeyAdapter() {
          public void keyReleased(KeyEvent ke) {
            keyeventGenerateActionPerformedDoubleSlit(ke);
            if (text_single_spacingDoubleSlit.getText() == null
                || text_single_spacingDoubleSlit.getText().equals("")) {
              jLabelSpacingDoubleSlit.setForeground(Color.red);
            } else {
              jLabelSpacingDoubleSlit.setForeground(Color.black);
            }
          }
        });

    buttonGennerateDoubleSlit.setText(labels.getString("btnGenerate"));
    buttonGennerateDoubleSlit.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonGenerateActionPerformedDoubleSlit(evt);
          }
        });
    buttong11LensOnDoubleSlit.setEnabled(false);
    buttong11LensOnDoubleSlit.setText(labels.getString("btnLensOn"));
    buttong11LensOnDoubleSlit.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            button11LensOnDoubleSlitActionPerformed(evt);
            countLenOnDoubleSlit++;
            if (countLenOnDoubleSlit % 2 == 0) {
              buttong11LensOnDoubleSlit.setText(labels.getString("btnLensOff"));
              panelPattern.addMouseListener(
                  new java.awt.event.MouseAdapter() {
                    public void mouseClicked(java.awt.event.MouseEvent evt) {
                      patternFrameDoubleClick.show();
                    }
                  });
            } else {
              buttong11LensOnDoubleSlit.setText(labels.getString("btnLensOn"));
            }
          }
        });
    buttonSecondDisplayDoubleSlit.setEnabled(false);
    buttonSecondDisplayDoubleSlit.setText(labels.getString("btnSecondDisplayOn"));
    buttonSecondDisplayDoubleSlit.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonSecondGenerateActionPerformedDoubleSlit(evt);
            countSecondDisplayDoubleSlit++;
            if (countSecondDisplayDoubleSlit % 2 == 0) {
              buttonSecondDisplayDoubleSlit.setText(labels.getString("btnSecondDisplayOff"));
            } else {
              buttonSecondDisplayDoubleSlit.setText(labels.getString("btnSecondDisplayOn"));
            }
          }
        });

    javax.swing.GroupLayout panelButtonDoubleSlitLayout = new javax.swing.GroupLayout(panelButton);
    panelButton.setLayout(panelButtonDoubleSlitLayout);
    panelButtonDoubleSlitLayout.setHorizontalGroup(
        panelButtonDoubleSlitLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                panelButtonDoubleSlitLayout
                    .createSequentialGroup()
                    .addGroup(
                        panelButtonDoubleSlitLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                panelButtonDoubleSlitLayout
                                    .createSequentialGroup()
                                    .addGap(0, 0, 0)
                                    .addComponent(
                                        buttonGennerateDoubleSlit,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        120,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(20, 20, 20)
                                    .addComponent(
                                        buttong11LensOnDoubleSlit,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        150,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(20, 20, 20)
                                    .addComponent(
                                        buttonSecondDisplayDoubleSlit,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        200,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap(190, Short.MAX_VALUE)))));
    panelButtonDoubleSlitLayout.setVerticalGroup(
        panelButtonDoubleSlitLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                panelButtonDoubleSlitLayout
                    .createSequentialGroup()
                    .addGap(45, 45, 45)
                    .addGroup(
                        panelButtonDoubleSlitLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE, false)
                            .addComponent(
                                buttonSecondDisplayDoubleSlit,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                35,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                buttong11LensOnDoubleSlit,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                35,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                buttonGennerateDoubleSlit,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                35,
                                javax.swing.GroupLayout.PREFERRED_SIZE))));

    javax.swing.GroupLayout panelDoubleSlitLayout = new javax.swing.GroupLayout(panelDoubleSlit);
    panelDoubleSlit.setLayout(panelDoubleSlitLayout);
    panelDoubleSlitLayout.setHorizontalGroup(
        panelDoubleSlitLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                panelDoubleSlitLayout
                    .createSequentialGroup()
                    .addGap(10, 10, 10)
                    .addGroup(
                        panelDoubleSlitLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(
                                javax.swing.GroupLayout.Alignment.LEADING,
                                panelDoubleSlitLayout
                                    .createSequentialGroup()
                                    .addGroup(
                                        panelDoubleSlitLayout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.TRAILING, false)
                                            .addComponent(
                                                lblRotationDoubleSlit,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                82,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                lblHeightDoubleSlit,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                lblPosDoubleSlit,
                                                javax.swing.GroupLayout.Alignment.LEADING,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                Short.MAX_VALUE))
                                    .addGap(10, 10, 10)
                                    .addGroup(
                                        panelDoubleSlitLayout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(
                                                text_single_heightDoubleSlit,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                75,
                                                Short.MAX_VALUE)
                                            .addComponent(text_single_rotationDoubleSlit)
                                            .addComponent(text_single_positionDoubleSlit))
                                    .addGap(15, 15, 15)
                                    .addGroup(
                                        panelDoubleSlitLayout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(
                                                s_single_heightDoubleSlit,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                445,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                s_single_rotationDoubleSlit,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                445,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                s_single_positionDoubleSlit,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                445,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(
                                javax.swing.GroupLayout.Alignment.LEADING,
                                panelDoubleSlitLayout
                                    .createSequentialGroup()
                                    .addGroup(
                                        panelDoubleSlitLayout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(
                                                lblGrayDoubleSlit,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                82,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                jLabelSpacingDoubleSlit,
                                                javax.swing.GroupLayout.Alignment.LEADING,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                82,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(
                                        panelDoubleSlitLayout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(
                                                panelDoubleSlitLayout
                                                    .createSequentialGroup()
                                                    .addGap(10, 10, 10)
                                                    .addComponent(
                                                        text_single_spacingDoubleSlit,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        75,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGap(15, 15, 15)
                                                    .addComponent(
                                                        s_single_spacingDoubleSlit,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        445,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGroup(
                                                panelDoubleSlitLayout
                                                    .createSequentialGroup()
                                                    .addGap(10, 10, 10)
                                                    .addComponent(
                                                        text_single_grayDoubleSlit,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        75,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGap(10, 10, 10)
                                                    .addComponent(
                                                        s_single_grayDoubleSlit,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        455,
                                                        javax.swing.GroupLayout
                                                            .PREFERRED_SIZE)))))));
    panelDoubleSlitLayout.setVerticalGroup(
        panelDoubleSlitLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                panelDoubleSlitLayout
                    .createSequentialGroup()
                    .addGap(5, 5, 5)
                    .addGroup(
                        panelDoubleSlitLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                s_single_heightDoubleSlit,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(
                                panelDoubleSlitLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(
                                        lblHeightDoubleSlit,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        24,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(
                                        text_single_heightDoubleSlit,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(10, 10, 10)
                    .addGroup(
                        panelDoubleSlitLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                panelDoubleSlitLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(
                                        text_single_rotationDoubleSlit,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(
                                        lblRotationDoubleSlit,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        23,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(
                                s_single_rotationDoubleSlit,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(10, 10, 10)
                    .addGroup(
                        panelDoubleSlitLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                lblPosDoubleSlit,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                24,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(
                                panelDoubleSlitLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(
                                        s_single_positionDoubleSlit,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(
                                        text_single_positionDoubleSlit,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(10, 10, 10)
                    .addGroup(
                        panelDoubleSlitLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(
                                panelDoubleSlitLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(
                                        jLabelSpacingDoubleSlit,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        22,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(
                                        text_single_spacingDoubleSlit,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(
                                s_single_spacingDoubleSlit,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(10, 10, 10)
                    .addGroup(
                        panelDoubleSlitLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                panelDoubleSlitLayout
                                    .createSequentialGroup()
                                    .addGap(8, 8, 8)
                                    .addComponent(
                                        s_single_grayDoubleSlit,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(0, 0, 0))
                            .addGroup(
                                panelDoubleSlitLayout
                                    .createSequentialGroup()
                                    .addGroup(
                                        panelDoubleSlitLayout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(
                                                lblGrayDoubleSlit,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                26,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                text_single_grayDoubleSlit,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))))));
  }
コード例 #20
0
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

    panQuality = new de.cismet.tools.gui.RoundedPanel();
    panHeadQuality = new de.cismet.tools.gui.SemiRoundedPanel();
    lblHeading = new javax.swing.JLabel();
    panQualityContent = new javax.swing.JPanel();
    lblEcoStat = new javax.swing.JLabel();
    lblEcoPot = new javax.swing.JLabel();
    lblChemStat = new javax.swing.JLabel();
    lblFwstat_dat = new javax.swing.JLabel();
    lblConfidence = new javax.swing.JLabel();
    lblNon_comp = new javax.swing.JLabel();
    cbEcoStat = new de.cismet.cids.editors.DefaultBindableReferenceCombo();
    cbEcoPot = new de.cismet.cids.editors.DefaultBindableReferenceCombo();
    cbChemStat = new de.cismet.cids.editors.DefaultBindableReferenceCombo();
    cbNon_comp = new de.cismet.cids.editors.DefaultBindableReferenceCombo();
    lblSpace = new javax.swing.JLabel();
    jPanel1 = new javax.swing.JPanel();
    txtFwstat_dat = new javax.swing.JTextField();
    cbConfidence = new de.cismet.cids.editors.DefaultBindableReferenceCombo();

    setMinimumSize(new java.awt.Dimension(520, 290));
    setOpaque(false);
    setPreferredSize(new java.awt.Dimension(520, 290));
    setLayout(new java.awt.BorderLayout());

    panHeadQuality.setBackground(new java.awt.Color(51, 51, 51));
    panHeadQuality.setMinimumSize(new java.awt.Dimension(109, 24));
    panHeadQuality.setPreferredSize(new java.awt.Dimension(109, 24));
    panHeadQuality.setLayout(new java.awt.FlowLayout());

    lblHeading.setForeground(new java.awt.Color(255, 255, 255));
    lblHeading.setText("Überblicksinformationen Qualität");
    panHeadQuality.add(lblHeading);

    panQuality.add(panHeadQuality, java.awt.BorderLayout.NORTH);

    panQualityContent.setMinimumSize(new java.awt.Dimension(450, 260));
    panQualityContent.setOpaque(false);
    panQualityContent.setPreferredSize(new java.awt.Dimension(450, 260));
    panQualityContent.setLayout(new java.awt.GridBagLayout());

    lblEcoStat.setText("Ökologischer Zustand");
    lblEcoStat.setMaximumSize(new java.awt.Dimension(170, 17));
    lblEcoStat.setMinimumSize(new java.awt.Dimension(170, 17));
    lblEcoStat.setPreferredSize(new java.awt.Dimension(170, 17));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(15, 10, 5, 5);
    panQualityContent.add(lblEcoStat, gridBagConstraints);

    lblEcoPot.setText("Ökologisches Potential");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 5);
    panQualityContent.add(lblEcoPot, gridBagConstraints);

    lblChemStat.setText("Chemischer Zustand");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 5);
    panQualityContent.add(lblChemStat, gridBagConstraints);

    lblFwstat_dat.setText("Gültigkeitsdatum der QK");
    lblFwstat_dat.setToolTipText("Gültigkeitsdatum der Statusmeldung der QK");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 5);
    panQualityContent.add(lblFwstat_dat, gridBagConstraints);

    lblConfidence.setText("Verlässlichk. d. ök. Bew.");
    lblConfidence.setToolTipText("Verlässlichkeit der Ökologischen Bewertung");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 5);
    panQualityContent.add(lblConfidence, gridBagConstraints);

    lblNon_comp.setText("Einhalt. UQN Schadst.");
    lblNon_comp.setToolTipText("Einhaltung UQN Spezifische Schadstoffe");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 5);
    panQualityContent.add(lblNon_comp, gridBagConstraints);

    cbEcoStat.setMinimumSize(new java.awt.Dimension(300, 20));
    cbEcoStat.setPreferredSize(new java.awt.Dimension(300, 20));

    org.jdesktop.beansbinding.Binding binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.eco_stat}"),
            cbEcoStat,
            org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
    bindingGroup.addBinding(binding);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(15, 5, 5, 10);
    panQualityContent.add(cbEcoStat, gridBagConstraints);

    cbEcoPot.setMinimumSize(new java.awt.Dimension(300, 20));
    cbEcoPot.setPreferredSize(new java.awt.Dimension(300, 20));

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.eco_pot}"),
            cbEcoPot,
            org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
    bindingGroup.addBinding(binding);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 10);
    panQualityContent.add(cbEcoPot, gridBagConstraints);

    cbChemStat.setMinimumSize(new java.awt.Dimension(300, 20));
    cbChemStat.setPreferredSize(new java.awt.Dimension(300, 20));

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.chem_stat}"),
            cbChemStat,
            org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
    bindingGroup.addBinding(binding);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 10);
    panQualityContent.add(cbChemStat, gridBagConstraints);

    cbNon_comp.setMinimumSize(new java.awt.Dimension(300, 20));
    cbNon_comp.setPreferredSize(new java.awt.Dimension(300, 20));

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.non_comp}"),
            cbNon_comp,
            org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
    bindingGroup.addBinding(binding);

    cbNon_comp.addActionListener(
        new java.awt.event.ActionListener() {

          @Override
          public void actionPerformed(final java.awt.event.ActionEvent evt) {
            cbNon_compActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 10);
    panQualityContent.add(cbNon_comp, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.weighty = 1.0;
    panQualityContent.add(lblSpace, gridBagConstraints);

    jPanel1.setOpaque(false);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridheight = 8;
    panQualityContent.add(jPanel1, gridBagConstraints);

    txtFwstat_dat.setMinimumSize(new java.awt.Dimension(300, 20));
    txtFwstat_dat.setPreferredSize(new java.awt.Dimension(300, 20));

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.fwstat_dat}"),
            txtFwstat_dat,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setSourceNullValue("");
    binding.setSourceUnreadableValue("<Error>");
    bindingGroup.addBinding(binding);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 10);
    panQualityContent.add(txtFwstat_dat, gridBagConstraints);

    cbConfidence.setMinimumSize(new java.awt.Dimension(300, 20));
    cbConfidence.setPreferredSize(new java.awt.Dimension(300, 20));

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.confidence}"),
            cbConfidence,
            org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
    bindingGroup.addBinding(binding);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 10);
    panQualityContent.add(cbConfidence, gridBagConstraints);

    panQuality.add(panQualityContent, java.awt.BorderLayout.CENTER);

    add(panQuality, java.awt.BorderLayout.CENTER);

    bindingGroup.bind();
  } // </editor-fold>//GEN-END:initComponents
コード例 #21
0
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

    panInfo = new de.cismet.tools.gui.RoundedPanel();
    panHeadInfo = new de.cismet.tools.gui.SemiRoundedPanel();
    lblHeading = new javax.swing.JLabel();
    panInfoContent = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();
    jPanel9 = new javax.swing.JPanel();
    jPanel12 = new javax.swing.JPanel();
    jPanel6 = new javax.swing.JPanel();
    stationEditor1 = new de.cismet.cids.custom.objecteditors.wrrl_db_mv.StationEditor();
    lblStat09BisKey1 = new javax.swing.JLabel();
    lblRHWertBisKey1 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jPanel10 = new javax.swing.JPanel();
    jPanel5 = new javax.swing.JPanel();
    stationEditor2 = new de.cismet.cids.custom.objecteditors.wrrl_db_mv.StationEditor();
    lblStat09BisKey = new javax.swing.JLabel();
    lblRHWertBisKey = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jPanel11 = new javax.swing.JPanel();
    jSeparator1 = new javax.swing.JSeparator();

    setOpaque(false);
    setLayout(new java.awt.BorderLayout());

    panHeadInfo.setBackground(new java.awt.Color(51, 51, 51));
    panHeadInfo.setMinimumSize(new java.awt.Dimension(109, 24));
    panHeadInfo.setPreferredSize(new java.awt.Dimension(109, 24));
    panHeadInfo.setLayout(new java.awt.FlowLayout());

    lblHeading.setForeground(new java.awt.Color(255, 255, 255));
    lblHeading.setText(
        org.openide.util.NbBundle.getMessage(
            QuerbauwerkePanSix.class, "QuerbauwerkePanSix.lblHeading.text")); // NOI18N
    panHeadInfo.add(lblHeading);

    panInfo.add(panHeadInfo, java.awt.BorderLayout.NORTH);

    panInfoContent.setOpaque(false);
    panInfoContent.setLayout(new java.awt.GridBagLayout());

    jPanel2.setOpaque(false);

    final javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE));
    jPanel2Layout.setVerticalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weighty = 1.0;
    panInfoContent.add(jPanel2, gridBagConstraints);

    jPanel9.setOpaque(false);
    jPanel9.setLayout(new java.awt.GridBagLayout());

    jPanel12.setOpaque(false);

    final javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
    jPanel12.setLayout(jPanel12Layout);
    jPanel12Layout.setHorizontalGroup(
        jPanel12Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE));
    jPanel12Layout.setVerticalGroup(
        jPanel12Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weighty = 1.0;
    jPanel9.add(jPanel12, gridBagConstraints);

    jPanel6.setBorder(
        javax.swing.BorderFactory.createTitledBorder(
            org.openide.util.NbBundle.getMessage(
                QuerbauwerkePanSix.class, "QuerbauwerkePanSix.jPanel6.border.title"))); // NOI18N
    jPanel6.setOpaque(false);
    jPanel6.setLayout(new java.awt.GridBagLayout());

    org.jdesktop.beansbinding.Binding binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.stat09}"),
            stationEditor1,
            org.jdesktop.beansbinding.BeanProperty.create("cidsBean"));
    bindingGroup.addBinding(binding);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel6.add(stationEditor1, gridBagConstraints);

    lblStat09BisKey1.setText(
        org.openide.util.NbBundle.getMessage(
            QuerbauwerkePanSix.class, "QuerbauwerkePanSix.lblStat09BisKey1.text")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel6.add(lblStat09BisKey1, gridBagConstraints);

    lblRHWertBisKey1.setText(
        org.openide.util.NbBundle.getMessage(
            QuerbauwerkePanSix.class, "QuerbauwerkePanSix.lblRHWertBisKey1.text")); // NOI18N
    lblRHWertBisKey1.setMinimumSize(new java.awt.Dimension(150, 17));
    lblRHWertBisKey1.setPreferredSize(new java.awt.Dimension(150, 17));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel6.add(lblRHWertBisKey1, gridBagConstraints);

    jLabel3.setMinimumSize(new java.awt.Dimension(300, 25));
    jLabel3.setPreferredSize(new java.awt.Dimension(300, 25));

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.stat09.real_point}"),
            jLabel3,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setSourceNullValue("/");
    binding.setSourceUnreadableValue("<Error>");
    binding.setConverter(new CoordinateConverter());
    bindingGroup.addBinding(binding);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel6.add(jLabel3, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel9.add(jPanel6, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 5);
    panInfoContent.add(jPanel9, gridBagConstraints);

    jPanel10.setOpaque(false);
    jPanel10.setLayout(new java.awt.GridBagLayout());

    jPanel5.setBorder(
        javax.swing.BorderFactory.createTitledBorder(
            org.openide.util.NbBundle.getMessage(
                QuerbauwerkePanSix.class, "QuerbauwerkePanSix.jPanel5.border.title"))); // NOI18N
    jPanel5.setOpaque(false);
    jPanel5.setLayout(new java.awt.GridBagLayout());

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.stat09_bis}"),
            stationEditor2,
            org.jdesktop.beansbinding.BeanProperty.create("cidsBean"));
    bindingGroup.addBinding(binding);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel5.add(stationEditor2, gridBagConstraints);

    lblStat09BisKey.setText(
        org.openide.util.NbBundle.getMessage(
            QuerbauwerkePanSix.class, "QuerbauwerkePanSix.lblStat09BisKey.text")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel5.add(lblStat09BisKey, gridBagConstraints);

    lblRHWertBisKey.setText(
        org.openide.util.NbBundle.getMessage(
            QuerbauwerkePanSix.class, "QuerbauwerkePanSix.lblRHWertBisKey.text")); // NOI18N
    lblRHWertBisKey.setMinimumSize(new java.awt.Dimension(150, 17));
    lblRHWertBisKey.setPreferredSize(new java.awt.Dimension(150, 17));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel5.add(lblRHWertBisKey, gridBagConstraints);

    jLabel2.setMinimumSize(new java.awt.Dimension(300, 25));
    jLabel2.setPreferredSize(new java.awt.Dimension(300, 25));

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.stat09_bis.real_point}"),
            jLabel2,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setSourceNullValue("/");
    binding.setSourceUnreadableValue("<Error>");
    binding.setConverter(new CoordinateConverter());
    bindingGroup.addBinding(binding);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel5.add(jLabel2, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel10.add(jPanel5, gridBagConstraints);

    jPanel11.setOpaque(false);

    final javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
    jPanel11.setLayout(jPanel11Layout);
    jPanel11Layout.setHorizontalGroup(
        jPanel11Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE));
    jPanel11Layout.setVerticalGroup(
        jPanel11Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weighty = 1.0;
    jPanel10.add(jPanel11, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 0);
    panInfoContent.add(jPanel10, gridBagConstraints);

    jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.insets = new java.awt.Insets(15, 5, 15, 5);
    panInfoContent.add(jSeparator1, gridBagConstraints);

    panInfo.add(panInfoContent, java.awt.BorderLayout.CENTER);

    add(panInfo, java.awt.BorderLayout.CENTER);

    bindingGroup.bind();
  } // </editor-fold>//GEN-END:initComponents
コード例 #22
0
 @Override
 public void dispose() {
   bindingGroup.unbind();
   stationEditor1.dispose();
   stationEditor2.dispose();
 }
コード例 #23
0
  private void llenarjTable() throws Exception {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
    bindingGroup.bind();

    this.carBBPagosCobrosConsulta.setCarFunPagosDetalleTOs(
        shrimp.cartera.delegate.CarDelegate.getInstance()
            .getCarFunPagosDetalleTO(
                sisUsuarioEmpresaTO.getEmpCodigo(),
                codigoSector,
                fechaDesde,
                fechaHasta,
                proveedorId,
                null));
    this.bindingGroup.bind(); // consigue los datos
    this.jTableBinding =
        org.jdesktop.swingbinding.SwingBindings.createJTableBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_ONCE,
            this.carBBPagosCobrosConsulta.getCarFunPagosDetalleTOs(),
            jtable);

    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding =
        this.jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${pagNumeroSistema}"));
    columnBinding.setColumnName("Número");
    columnBinding.setColumnClass(String.class);
    columnBinding.setEditable(false);

    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding1 =
        this.jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${pagFecha}")); // ${nombreAtributo}
    columnBinding1.setColumnName("Fecha");
    columnBinding1.setColumnClass(String.class);
    columnBinding1.setEditable(false);

    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding2 =
        this.jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${pagProveedor}"));
    columnBinding2.setColumnName("Proveedor");
    columnBinding2.setColumnClass(String.class);
    columnBinding2.setEditable(false);

    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding3 =
        this.jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${pagValor}"));
    columnBinding3.setColumnName("Valor");
    columnBinding3.setColumnClass(java.math.BigDecimal.class);
    columnBinding3.setEditable(false);

    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding4 =
        this.jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${pagObservaciones}"));
    columnBinding4.setColumnName("Observaciones");
    columnBinding4.setColumnClass(String.class);
    columnBinding4.setEditable(false);

    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding5 =
        this.jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${pagPendiente}"));
    columnBinding5.setColumnName("Pendiente");
    columnBinding5.setColumnClass(Boolean.class);
    columnBinding5.setEditable(false);

    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding6 =
        this.jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${pagAnulado}"));
    columnBinding6.setColumnName("Anulado");
    columnBinding6.setColumnClass(Boolean.class);
    columnBinding6.setEditable(false);

    this.bindingGroup.addBinding(this.jTableBinding);
    this.bindingGroup.bind();

    jtable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
    // Metemos el modelo ordenable en la tabla.
    javax.swing.table.TableRowSorter modeloOrdenado =
        new javax.swing.table.TableRowSorter(jtable.getModel());
    jtable.setRowSorter(modeloOrdenado);

    ///// PARA CAMBIAR EL ANCHO DE LAS COLUMNAS
    javax.swing.table.TableColumn col = null;
    col = jtable.getColumnModel().getColumn(0);
    col.setPreferredWidth(200);
    col = jtable.getColumnModel().getColumn(1);
    col.setPreferredWidth(100);
    col = jtable.getColumnModel().getColumn(2);
    col.setPreferredWidth(200);
    col = jtable.getColumnModel().getColumn(3);
    col.setPreferredWidth(100);
    col = jtable.getColumnModel().getColumn(4);
    col.setPreferredWidth(200);
    col = jtable.getColumnModel().getColumn(5);
    col.setPreferredWidth(80);
    col = jtable.getColumnModel().getColumn(6);
    col.setPreferredWidth(80);
  }
コード例 #24
0
  private void llenarjTable() throws Exception {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
    eLProperty = org.jdesktop.beansbinding.ELProperty.create("${listaConsolidadoBonosViaticosTO}");
    bindingGroup.bind();

    this.bbRRHHFunciones.setListaConsolidadoBonosViaticosTO(
        shrimp.rrhh.delegate.RrhhDelegate.getInstance()
            .getRhConsolidadoBonosViaticosTO(
                sisUsuarioEmpresaTO.getEmpCodigo(), fechaDesde, fechaHasta));
    this.bindingGroup.bind(); // consigue los datos
    this.jTableBinding =
        org.jdesktop.swingbinding.SwingBindings.createJTableBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_ONCE,
            this.bbRRHHFunciones.getListaConsolidadoBonosViaticosTO(),
            jtable);

    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding =
        this.jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${cbvCategoria}"));
    columnBinding.setColumnName("Categoria");
    columnBinding.setColumnClass(String.class);
    columnBinding.setEditable(false);

    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding1 =
        this.jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${cbvId}"));
    columnBinding1.setColumnName("ID");
    columnBinding1.setColumnClass(String.class);
    columnBinding1.setEditable(false);

    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding2 =
        this.jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${cbvNombres}")); // ${nombreAtributo}
    columnBinding2.setColumnName("Nombres");
    columnBinding2.setColumnClass(String.class);
    columnBinding2.setEditable(false);

    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding3 =
        this.jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${cbvBonos}"));
    columnBinding3.setColumnName("Bonos");
    columnBinding3.setColumnClass(java.math.BigDecimal.class);
    columnBinding3.setEditable(false);

    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding4 =
        this.jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${cbvBonosND}"));
    columnBinding4.setColumnName("Bonos ND");
    columnBinding4.setColumnClass(java.math.BigDecimal.class);
    columnBinding4.setEditable(false);

    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding5 =
        this.jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${cbvBonoFijo}"));
    columnBinding5.setColumnName("Bono Fijo");
    columnBinding5.setColumnClass(java.math.BigDecimal.class);
    columnBinding5.setEditable(false);

    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding6 =
        this.jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${cbvBonoFijoND}"));
    columnBinding6.setColumnName("Bono Fijo ND");
    columnBinding6.setColumnClass(java.math.BigDecimal.class);
    columnBinding6.setEditable(false);

    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding7 =
        this.jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${cbvViaticos}"));
    columnBinding7.setColumnName("Viaticos");
    columnBinding7.setColumnClass(java.math.BigDecimal.class);
    columnBinding7.setEditable(false);

    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding8 =
        this.jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${cbvTotal}"));
    columnBinding8.setColumnName("Total");
    columnBinding8.setColumnClass(java.math.BigDecimal.class);
    columnBinding8.setEditable(false);

    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding9 =
        this.jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${cbvOrden}"));
    columnBinding9.setColumnName("Orden");
    columnBinding9.setColumnClass(String.class);
    columnBinding9.setEditable(false);

    this.bindingGroup.addBinding(this.jTableBinding);
    this.bindingGroup.bind();
    ///// PARA CAMBIAR EL ANCHO DE LAS COLUMNAS
    javax.swing.table.TableColumn col = null;
    col = jtable.getColumnModel().getColumn(0);
    col.setPreferredWidth(70);
    col = jtable.getColumnModel().getColumn(1);
    col.setPreferredWidth(90);
    col = jtable.getColumnModel().getColumn(2);
    col.setPreferredWidth(90);
    col = jtable.getColumnModel().getColumn(3);
    col.setPreferredWidth(300);

    jtable.setColumnSelectionAllowed(true);
    jtable.repaint();
    jtable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
    // Metemos el modelo ordenable en la tabla.
    javax.swing.table.TableRowSorter modeloOrdenado =
        new javax.swing.table.TableRowSorter(jtable.getModel());
    jtable.setRowSorter(modeloOrdenado);
  }
コード例 #25
0
ファイル: KassenzeichenPanel.java プロジェクト: cismet/verdis
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

    btgMode = new javax.swing.ButtonGroup();
    lblLastModification = new javax.swing.JLabel();
    panSearch = new javax.swing.JPanel();
    txtSearch = new javax.swing.JTextField();
    lblSuche = new javax.swing.JLabel();
    btnSearch = new javax.swing.JButton();
    panKZValues = new javax.swing.JPanel();
    lblKassenzeichen = new javax.swing.JLabel();
    lblErfassungsdatum = new javax.swing.JLabel();
    lblBemerkung = new javax.swing.JLabel();
    lblSperre = new javax.swing.JLabel();
    txtErfassungsdatum = new javax.swing.JTextField();
    chkSperre = new javax.swing.JCheckBox();
    scpBemerkung = new javax.swing.JScrollPane();
    txtBemerkung = new javax.swing.JTextArea();
    txtKassenzeichen = new javax.swing.JTextField();
    txtSperreBemerkung = new javax.swing.JTextField();
    jPanel2 = new javax.swing.JPanel();
    jLabel2 = new javax.swing.JLabel();
    togRegenMode = new javax.swing.JToggleButton();
    togWDSRMode = new javax.swing.JToggleButton();
    togInfoMode = new javax.swing.JToggleButton();
    sepTitle1 = new javax.swing.JSeparator();
    sepTitle2 = new javax.swing.JSeparator();

    lblLastModification.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/de/cismet/verdis/res/images/titlebars/goto.png"))); // NOI18N

    org.jdesktop.beansbinding.Binding binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.letzte_aenderung_von}"),
            lblLastModification,
            org.jdesktop.beansbinding.BeanProperty.create("toolTipText"));
    bindingGroup.addBinding(binding);

    setLayout(new java.awt.GridBagLayout());

    panSearch.setLayout(new java.awt.GridBagLayout());

    txtSearch.addActionListener(
        new java.awt.event.ActionListener() {

          @Override
          public void actionPerformed(final java.awt.event.ActionEvent evt) {
            txtSearchActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
    panSearch.add(txtSearch, gridBagConstraints);

    lblSuche.setText("Kassenzeichen");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 10);
    panSearch.add(lblSuche, gridBagConstraints);

    btnSearch.setMnemonic('s');
    btnSearch.setText("suchen");
    btnSearch.addActionListener(
        new java.awt.event.ActionListener() {

          @Override
          public void actionPerformed(final java.awt.event.ActionEvent evt) {
            btnSearchActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
    gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
    panSearch.add(btnSearch, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(7, 7, 7, 7);
    add(panSearch, gridBagConstraints);

    panKZValues.setLayout(new java.awt.GridBagLayout());

    lblKassenzeichen.setText("Kassenzeichen");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    panKZValues.add(lblKassenzeichen, gridBagConstraints);

    lblErfassungsdatum.setText("Datum der Erfassung");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    panKZValues.add(lblErfassungsdatum, gridBagConstraints);

    lblBemerkung.setText("Bemerkung");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    panKZValues.add(lblBemerkung, gridBagConstraints);

    lblSperre.setText("Veranlagung gesperrt");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    panKZValues.add(lblSperre, gridBagConstraints);

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.datum_erfassung}"),
            txtErfassungsdatum,
            org.jdesktop.beansbinding.BeanProperty.create("text"),
            KassenzeichenPropertyConstants.PROP__DATUM_ERFASSUNG);
    binding.setConverter(new SqlDateToStringConverter());
    bindingGroup.addBinding(binding);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(3, 6, 3, 0);
    panKZValues.add(txtErfassungsdatum, gridBagConstraints);

    chkSperre.setForeground(java.awt.Color.red);
    chkSperre.setEnabled(false);
    chkSperre.setFocusPainted(false);

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.sperre}"),
            chkSperre,
            org.jdesktop.beansbinding.BeanProperty.create("selected"));
    bindingGroup.addBinding(binding);

    chkSperre.addActionListener(
        new java.awt.event.ActionListener() {

          @Override
          public void actionPerformed(final java.awt.event.ActionEvent evt) {
            chkSperreActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(3, 6, 3, 0);
    panKZValues.add(chkSperre, gridBagConstraints);

    scpBemerkung.setHorizontalScrollBarPolicy(
        javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    scpBemerkung.setVerticalScrollBarPolicy(
        javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
    scpBemerkung.setMinimumSize(new java.awt.Dimension(6, 36));

    txtBemerkung.setColumns(3);
    txtBemerkung.setLineWrap(true);
    txtBemerkung.setRows(3);
    txtBemerkung.setMinimumSize(new java.awt.Dimension(0, 36));

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.bemerkung}"),
            txtBemerkung,
            org.jdesktop.beansbinding.BeanProperty.create("text"),
            KassenzeichenPropertyConstants.PROP__BEMERKUNG);
    bindingGroup.addBinding(binding);

    scpBemerkung.setViewportView(txtBemerkung);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(3, 6, 3, 0);
    panKZValues.add(scpBemerkung, gridBagConstraints);

    txtKassenzeichen.setEditable(false);

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.kassenzeichennummer8}"),
            txtKassenzeichen,
            org.jdesktop.beansbinding.BeanProperty.create("text"),
            KassenzeichenPropertyConstants.PROP__KASSENZEICHENNUMMER);
    bindingGroup.addBinding(binding);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 6, 3, 0);
    panKZValues.add(txtKassenzeichen, gridBagConstraints);

    txtSperreBemerkung.setBackground(getBackground());
    txtSperreBemerkung.setEditable(false);
    txtSperreBemerkung.setForeground(java.awt.Color.red);
    txtSperreBemerkung.setBorder(null);

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${cidsBean.bemerkung_sperre}"),
            txtSperreBemerkung,
            org.jdesktop.beansbinding.BeanProperty.create("text"),
            KassenzeichenPropertyConstants.PROP__BEMERKUNG_SPERRE);
    bindingGroup.addBinding(binding);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(0, 6, 0, 0);
    panKZValues.add(txtSperreBemerkung, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(7, 7, 7, 7);
    add(panKZValues, gridBagConstraints);

    jPanel2.setLayout(new java.awt.GridBagLayout());

    jLabel2.setText("Modus");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    jPanel2.add(jLabel2, gridBagConstraints);

    btgMode.add(togRegenMode);
    togRegenMode.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/de/cismet/verdis/res/regen_gr.png"))); // NOI18N
    togRegenMode.setToolTipText("Versiegelte Flächen");
    togRegenMode.setFocusable(false);
    togRegenMode.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    togRegenMode.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    togRegenMode.addActionListener(
        new java.awt.event.ActionListener() {

          @Override
          public void actionPerformed(final java.awt.event.ActionEvent evt) {
            togRegenModeActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    jPanel2.add(togRegenMode, gridBagConstraints);

    btgMode.add(togWDSRMode);
    togWDSRMode.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/de/cismet/verdis/res/esw_gr.png"))); // NOI18N
    togWDSRMode.setToolTipText("ESW");
    togWDSRMode.setFocusable(false);
    togWDSRMode.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    togWDSRMode.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    togWDSRMode.addActionListener(
        new java.awt.event.ActionListener() {

          @Override
          public void actionPerformed(final java.awt.event.ActionEvent evt) {
            togWDSRModeActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.insets = new java.awt.Insets(0, 2, 0, 2);
    jPanel2.add(togWDSRMode, gridBagConstraints);

    btgMode.add(togInfoMode);
    togInfoMode.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/de/cismet/verdis/res/info_gr.png"))); // NOI18N
    togInfoMode.setSelected(true);
    togInfoMode.setToolTipText("Info");
    togInfoMode.setFocusable(false);
    togInfoMode.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    togInfoMode.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    togInfoMode.addActionListener(
        new java.awt.event.ActionListener() {

          @Override
          public void actionPerformed(final java.awt.event.ActionEvent evt) {
            togInfoModeActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 0;
    jPanel2.add(togInfoMode, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(3, 7, 3, 7);
    add(jPanel2, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
    gridBagConstraints.weightx = 1.0;
    add(sepTitle1, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
    gridBagConstraints.weightx = 1.0;
    add(sepTitle2, gridBagConstraints);

    bindingGroup.bind();
  } // </editor-fold>//GEN-END:initComponents
コード例 #26
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);
                  }
                }
              }
            }
          });
    }
  }