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();
  }
  /** 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();
  }
Esempio n. 3
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();
  }
Esempio n. 4
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() {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

    mainPanel = new javax.swing.JPanel();
    masterScrollPane = new javax.swing.JScrollPane();
    masterTable = new javax.swing.JTable();
    idLabel = new javax.swing.JLabel();
    imeLabel = new javax.swing.JLabel();
    prezimeLabel = new javax.swing.JLabel();
    adresaLabel = new javax.swing.JLabel();
    brojlicneLabel = new javax.swing.JLabel();
    sifraotiskaLabel = new javax.swing.JLabel();
    idField = new javax.swing.JTextField();
    imeField = new javax.swing.JTextField();
    prezimeField = new javax.swing.JTextField();
    adresaField = new javax.swing.JTextField();
    brojlicneField = new javax.swing.JTextField();
    sifraotiskaField = new javax.swing.JTextField();
    saveButton = new javax.swing.JButton();
    refreshButton = new javax.swing.JButton();
    newButton = new javax.swing.JButton();
    deleteButton = new javax.swing.JButton();
    menuBar = new javax.swing.JMenuBar();
    javax.swing.JMenu fileMenu = new javax.swing.JMenu();
    javax.swing.JMenuItem newRecordMenuItem = new javax.swing.JMenuItem();
    javax.swing.JMenuItem deleteRecordMenuItem = new javax.swing.JMenuItem();
    jSeparator1 = new javax.swing.JSeparator();
    javax.swing.JMenuItem saveMenuItem = new javax.swing.JMenuItem();
    javax.swing.JMenuItem refreshMenuItem = new javax.swing.JMenuItem();
    jSeparator2 = new javax.swing.JSeparator();
    javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
    statusPanel = new javax.swing.JPanel();
    javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
    statusMessageLabel = new javax.swing.JLabel();
    statusAnimationLabel = new javax.swing.JLabel();
    progressBar = new javax.swing.JProgressBar();
    org.jdesktop.application.ResourceMap resourceMap =
        org.jdesktop.application.Application.getInstance(
                fingerprintapplication.FingerprintApplication.class)
            .getContext()
            .getResourceMap(FingerprintView.class);
    entityManager =
        java.beans.Beans.isDesignTime()
            ? null
            : javax.persistence.Persistence.createEntityManagerFactory(
                    resourceMap.getString("entityManager.persistenceUnit"))
                .createEntityManager(); // NOI18N
    query =
        java.beans.Beans.isDesignTime()
            ? null
            : entityManager.createQuery(resourceMap.getString("query.query")); // NOI18N
    list =
        java.beans.Beans.isDesignTime()
            ? java.util.Collections.emptyList()
            : org.jdesktop.observablecollections.ObservableCollections.observableList(
                query.getResultList());

    mainPanel.setName("mainPanel"); // NOI18N

    masterScrollPane.setName("masterScrollPane"); // NOI18N

    masterTable.setName("masterTable"); // NOI18N

    org.jdesktop.swingbinding.JTableBinding jTableBinding =
        org.jdesktop.swingbinding.SwingBindings.createJTableBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, list, masterTable);
    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${id}"));
    columnBinding.setColumnName("Id");
    columnBinding.setColumnClass(Integer.class);
    columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${ime}"));
    columnBinding.setColumnName("Ime");
    columnBinding.setColumnClass(String.class);
    columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${prezime}"));
    columnBinding.setColumnName("Prezime");
    columnBinding.setColumnClass(String.class);
    columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${adresa}"));
    columnBinding.setColumnName("Adresa");
    columnBinding.setColumnClass(String.class);
    columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${brojlicne}"));
    columnBinding.setColumnName("Brojlicne");
    columnBinding.setColumnClass(String.class);
    columnBinding =
        jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${sifraotiska}"));
    columnBinding.setColumnName("Sifraotiska");
    columnBinding.setColumnClass(String.class);
    bindingGroup.addBinding(jTableBinding);

    masterScrollPane.setViewportView(masterTable);

    idLabel.setText(resourceMap.getString("idLabel.text")); // NOI18N
    idLabel.setName("idLabel"); // NOI18N

    imeLabel.setText(resourceMap.getString("imeLabel.text")); // NOI18N
    imeLabel.setName("imeLabel"); // NOI18N

    prezimeLabel.setText(resourceMap.getString("prezimeLabel.text")); // NOI18N
    prezimeLabel.setName("prezimeLabel"); // NOI18N

    adresaLabel.setText(resourceMap.getString("adresaLabel.text")); // NOI18N
    adresaLabel.setName("adresaLabel"); // NOI18N

    brojlicneLabel.setText(resourceMap.getString("brojlicneLabel.text")); // NOI18N
    brojlicneLabel.setName("brojlicneLabel"); // NOI18N

    sifraotiskaLabel.setText(resourceMap.getString("sifraotiskaLabel.text")); // NOI18N
    sifraotiskaLabel.setName("sifraotiskaLabel"); // NOI18N

    idField.setName("idField"); // NOI18N

    org.jdesktop.beansbinding.Binding binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement.id}"),
            idField,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setSourceUnreadableValue(null);
    bindingGroup.addBinding(binding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"),
            idField,
            org.jdesktop.beansbinding.BeanProperty.create("enabled"));
    bindingGroup.addBinding(binding);

    imeField.setName("imeField"); // NOI18N

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement.ime}"),
            imeField,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setSourceUnreadableValue(null);
    bindingGroup.addBinding(binding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"),
            imeField,
            org.jdesktop.beansbinding.BeanProperty.create("enabled"));
    bindingGroup.addBinding(binding);

    prezimeField.setName("prezimeField"); // NOI18N

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement.prezime}"),
            prezimeField,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setSourceUnreadableValue(null);
    bindingGroup.addBinding(binding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"),
            prezimeField,
            org.jdesktop.beansbinding.BeanProperty.create("enabled"));
    bindingGroup.addBinding(binding);

    adresaField.setName("adresaField"); // NOI18N

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement.adresa}"),
            adresaField,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setSourceUnreadableValue(null);
    bindingGroup.addBinding(binding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"),
            adresaField,
            org.jdesktop.beansbinding.BeanProperty.create("enabled"));
    bindingGroup.addBinding(binding);

    brojlicneField.setName("brojlicneField"); // NOI18N

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement.brojlicne}"),
            brojlicneField,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setSourceUnreadableValue(null);
    bindingGroup.addBinding(binding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"),
            brojlicneField,
            org.jdesktop.beansbinding.BeanProperty.create("enabled"));
    bindingGroup.addBinding(binding);

    sifraotiskaField.setName("sifraotiskaField"); // NOI18N

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement.sifraotiska}"),
            sifraotiskaField,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setSourceUnreadableValue(null);
    bindingGroup.addBinding(binding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"),
            sifraotiskaField,
            org.jdesktop.beansbinding.BeanProperty.create("enabled"));
    bindingGroup.addBinding(binding);

    javax.swing.ActionMap actionMap =
        org.jdesktop.application.Application.getInstance(
                fingerprintapplication.FingerprintApplication.class)
            .getContext()
            .getActionMap(FingerprintView.class, this);
    saveButton.setAction(actionMap.get("save")); // NOI18N
    saveButton.setText(resourceMap.getString("saveButton.text")); // NOI18N
    saveButton.setName("saveButton"); // NOI18N

    refreshButton.setAction(actionMap.get("refresh")); // NOI18N
    refreshButton.setText(resourceMap.getString("refreshButton.text")); // NOI18N
    refreshButton.setName("refreshButton"); // NOI18N

    newButton.setAction(actionMap.get("newRecord")); // NOI18N
    newButton.setText(resourceMap.getString("newButton.text")); // NOI18N
    newButton.setName("newButton"); // NOI18N

    deleteButton.setAction(actionMap.get("deleteRecord")); // NOI18N
    deleteButton.setText(resourceMap.getString("deleteButton.text")); // NOI18N
    deleteButton.setName("deleteButton"); // NOI18N

    javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
    mainPanel.setLayout(mainPanelLayout);
    mainPanelLayout.setHorizontalGroup(
        mainPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                mainPanelLayout
                    .createSequentialGroup()
                    .addGroup(
                        mainPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                mainPanelLayout
                                    .createSequentialGroup()
                                    .addComponent(newButton)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(deleteButton)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(refreshButton)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(saveButton))
                            .addGroup(
                                mainPanelLayout
                                    .createSequentialGroup()
                                    .addContainerGap()
                                    .addGroup(
                                        mainPanelLayout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(idLabel)
                                            .addComponent(imeLabel)
                                            .addComponent(prezimeLabel)
                                            .addComponent(adresaLabel)
                                            .addComponent(brojlicneLabel)
                                            .addComponent(sifraotiskaLabel))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        mainPanelLayout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(
                                                idField,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                369,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                imeField,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                369,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                prezimeField,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                369,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                adresaField,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                369,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                brojlicneField,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                369,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                sifraotiskaField,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                369,
                                                Short.MAX_VALUE)))
                            .addGroup(
                                mainPanelLayout
                                    .createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(
                                        masterScrollPane,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        427,
                                        Short.MAX_VALUE)))
                    .addContainerGap()));

    mainPanelLayout.linkSize(
        javax.swing.SwingConstants.HORIZONTAL,
        new java.awt.Component[] {deleteButton, newButton, refreshButton, saveButton});

    mainPanelLayout.setVerticalGroup(
        mainPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                mainPanelLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        masterScrollPane,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        189,
                        Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        mainPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(idLabel)
                            .addComponent(
                                idField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        mainPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(imeLabel)
                            .addComponent(
                                imeField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        mainPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(prezimeLabel)
                            .addComponent(
                                prezimeField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        mainPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(adresaLabel)
                            .addComponent(
                                adresaField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        mainPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(brojlicneLabel)
                            .addComponent(
                                brojlicneField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        mainPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(sifraotiskaLabel)
                            .addComponent(
                                sifraotiskaField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        mainPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(saveButton)
                            .addComponent(refreshButton)
                            .addComponent(deleteButton)
                            .addComponent(newButton))
                    .addContainerGap()));

    menuBar.setName("menuBar"); // NOI18N

    fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N
    fileMenu.setName("fileMenu"); // NOI18N

    newRecordMenuItem.setAction(actionMap.get("newRecord")); // NOI18N
    newRecordMenuItem.setText(resourceMap.getString("newRecordMenuItem.text")); // NOI18N
    newRecordMenuItem.setName("newRecordMenuItem"); // NOI18N
    fileMenu.add(newRecordMenuItem);

    deleteRecordMenuItem.setAction(actionMap.get("deleteRecord")); // NOI18N
    deleteRecordMenuItem.setText(resourceMap.getString("deleteRecordMenuItem.text")); // NOI18N
    deleteRecordMenuItem.setName("deleteRecordMenuItem"); // NOI18N
    fileMenu.add(deleteRecordMenuItem);

    jSeparator1.setName("jSeparator1"); // NOI18N
    fileMenu.add(jSeparator1);

    saveMenuItem.setAction(actionMap.get("save")); // NOI18N
    saveMenuItem.setText(resourceMap.getString("saveMenuItem.text")); // NOI18N
    saveMenuItem.setName("saveMenuItem"); // NOI18N
    fileMenu.add(saveMenuItem);

    refreshMenuItem.setAction(actionMap.get("refresh")); // NOI18N
    refreshMenuItem.setText(resourceMap.getString("refreshMenuItem.text")); // NOI18N
    refreshMenuItem.setName("refreshMenuItem"); // NOI18N
    fileMenu.add(refreshMenuItem);

    jSeparator2.setName("jSeparator2"); // NOI18N
    fileMenu.add(jSeparator2);

    exitMenuItem.setAction(actionMap.get("quit")); // NOI18N
    exitMenuItem.setText(resourceMap.getString("exitMenuItem.text")); // NOI18N
    exitMenuItem.setName("exitMenuItem"); // NOI18N
    fileMenu.add(exitMenuItem);

    menuBar.add(fileMenu);

    statusPanel.setName("statusPanel"); // NOI18N

    statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N

    statusMessageLabel.setName("statusMessageLabel"); // NOI18N

    statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N

    progressBar.setName("progressBar"); // NOI18N

    javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel);
    statusPanel.setLayout(statusPanelLayout);
    statusPanelLayout.setHorizontalGroup(
        statusPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 447, Short.MAX_VALUE)
            .addGroup(
                statusPanelLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(statusMessageLabel)
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED, 277, Short.MAX_VALUE)
                    .addComponent(
                        progressBar,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(statusAnimationLabel)
                    .addContainerGap()));
    statusPanelLayout.setVerticalGroup(
        statusPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                statusPanelLayout
                    .createSequentialGroup()
                    .addComponent(
                        statusPanelSeparator,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        2,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)
                    .addGroup(
                        statusPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(statusMessageLabel)
                            .addComponent(statusAnimationLabel)
                            .addComponent(
                                progressBar,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(3, 3, 3)));

    setComponent(mainPanel);
    setMenuBar(menuBar);
    setStatusBar(statusPanel);

    bindingGroup.bind();
  } // </editor-fold>//GEN-END:initComponents
  /**
   * 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();

    javax.swing.JLabel jLabel1 = new javax.swing.JLabel();
    txtName = new javax.swing.JTextField();
    javax.swing.JLabel jLabel2 = new javax.swing.JLabel();
    javax.swing.JScrollPane jScrollPane1 = new javax.swing.JScrollPane();
    txtSource = new javax.swing.JTextArea();
    javax.swing.JPanel jPanel1 = new javax.swing.JPanel();
    btnApply = new javax.swing.JButton();
    btnCancel = new javax.swing.JButton();
    txtErrorMsg = new javax.swing.JLabel();

    setBorder(
        javax.swing.BorderFactory.createCompoundBorder(
            javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)),
            javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5)));
    setLayout(new java.awt.GridBagLayout());

    jLabel1.setFont(new java.awt.Font("Lucida Sans", 0, 12));
    jLabel1.setText("Name:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    add(jLabel1, gridBagConstraints);

    txtName.setFont(new java.awt.Font("Lucida Sans", 0, 12)); // NOI18N
    txtName.setMinimumSize(new java.awt.Dimension(4, 25));
    txtName.setPreferredSize(new java.awt.Dimension(4, 25));

    org.jdesktop.beansbinding.Binding binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${entityName}"),
            txtName,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setValidator(new NameValidator());
    bindingGroup.addBinding(binding);

    txtName.addAncestorListener(
        new javax.swing.event.AncestorListener() {
          public void ancestorMoved(javax.swing.event.AncestorEvent evt) {}

          public void ancestorAdded(javax.swing.event.AncestorEvent evt) {
            txtNameAncestorAdded(evt);
          }

          public void ancestorRemoved(javax.swing.event.AncestorEvent evt) {}
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
    add(txtName, gridBagConstraints);

    jLabel2.setFont(new java.awt.Font("Lucida Sans", 0, 12));
    jLabel2.setText("Source:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    add(jLabel2, gridBagConstraints);

    jScrollPane1.setMinimumSize(new java.awt.Dimension(223, 78));

    txtSource.setColumns(20);
    txtSource.setFont(new java.awt.Font("Lucida Sans", 0, 12)); // NOI18N
    txtSource.setRows(5);

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

    jScrollPane1.setViewportView(txtSource);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    add(jScrollPane1, gridBagConstraints);

    btnApply.setFont(new java.awt.Font("Lucida Sans", 0, 12));
    btnApply.setText("Apply");
    btnApply.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnApplyActionPerformed(evt);
          }
        });
    jPanel1.add(btnApply);

    btnCancel.setFont(new java.awt.Font("Lucida Sans", 0, 12));
    btnCancel.setText("Cancel");
    btnCancel.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCancelActionPerformed(evt);
          }
        });
    jPanel1.add(btnCancel);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    add(jPanel1, gridBagConstraints);

    txtErrorMsg.setFont(new java.awt.Font("Lucida Sans", 0, 10));
    txtErrorMsg.setForeground(new java.awt.Color(255, 102, 102));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    add(txtErrorMsg, gridBagConstraints);

    bindingGroup.bind();
  } // </editor-fold>//GEN-END:initComponents
Esempio n. 6
0
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

    sexButtonGroup = new javax.swing.ButtonGroup();
    ageConverter = new clienteditor.AgeConverter();
    ageValidator = new clienteditor.AgeValidator();
    maritalStatusConverter = new clienteditor.MaritalStatusConverter();
    requiredStringValidator = new clienteditor.RequiredStringValidator();
    emailValidator = new clienteditor.EmailValidator();
    clientInfoPane = new javax.swing.JTabbedPane();
    personalPanel = new javax.swing.JPanel();
    firstNameLabel = new javax.swing.JLabel();
    firstNameTextField = new javax.swing.JTextField();
    surnameLabel = new javax.swing.JLabel();
    surnameTextField = new javax.swing.JTextField();
    maritalComboBox = new javax.swing.JComboBox();
    sexLabel = new javax.swing.JLabel();
    maritalStatusLabel = new javax.swing.JLabel();
    maleRadioButton = new javax.swing.JRadioButton();
    femaleRadioButton = new javax.swing.JRadioButton();
    ageLabel = new javax.swing.JLabel();
    ageTextField = new javax.swing.JTextField();
    contactPanel = new javax.swing.JPanel();
    nicknameLabel = new javax.swing.JLabel();
    emailLabel = new javax.swing.JLabel();
    webLabel = new javax.swing.JLabel();
    imLabel = new javax.swing.JLabel();
    nicknameTextField = new javax.swing.JTextField();
    emailTextField = new javax.swing.JTextField();
    webTextField = new javax.swing.JTextField();
    imTextField = new javax.swing.JTextField();
    jFileChooser1 = new javax.swing.JFileChooser();
    usernameLabel = new javax.swing.JLabel();
    clientInfoLabel = new javax.swing.JLabel();
    validationMsgLabel = new javax.swing.JLabel();

    personalPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    firstNameLabel.setText("First Name:"); // NOI18N

    org.jdesktop.beansbinding.Binding binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${client.firstName}"),
            firstNameTextField,
            org.jdesktop.beansbinding.BeanProperty.create("text"),
            "firstName"); // NOI18N
    bindingGroup.addBinding(binding);

    surnameLabel.setText("Surname:"); // NOI18N

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${client.surname}"),
            surnameTextField,
            org.jdesktop.beansbinding.BeanProperty.create("text"),
            "surname"); // NOI18N
    binding.setValidator(requiredStringValidator);
    bindingGroup.addBinding(binding);

    maritalComboBox.setModel(
        new javax.swing.DefaultComboBoxModel(
            new String[] {"Single", "Married", "Separated", "Divorced"}));

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${client.maritalStatus}"),
            maritalComboBox,
            org.jdesktop.beansbinding.BeanProperty.create("selectedItem"),
            "maritalStatus"); // NOI18N
    binding.setConverter(maritalStatusConverter);
    bindingGroup.addBinding(binding);

    sexLabel.setText("Sex:"); // NOI18N

    maritalStatusLabel.setText("Marital status:"); // NOI18N

    sexButtonGroup.add(maleRadioButton);
    maleRadioButton.setText("male"); // NOI18N

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${client.sex}"),
            maleRadioButton,
            org.jdesktop.beansbinding.BeanProperty.create("selected"),
            "sex"); // NOI18N
    bindingGroup.addBinding(binding);

    sexButtonGroup.add(femaleRadioButton);
    femaleRadioButton.setText("female"); // NOI18N

    ageLabel.setText("Age:"); // NOI18N

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${client.age}"),
            ageTextField,
            org.jdesktop.beansbinding.BeanProperty.create("text"),
            "age");
    binding.setConverter(ageConverter);
    binding.setValidator(ageValidator);
    bindingGroup.addBinding(binding);

    org.jdesktop.layout.GroupLayout personalPanelLayout =
        new org.jdesktop.layout.GroupLayout(personalPanel);
    personalPanel.setLayout(personalPanelLayout);
    personalPanelLayout.setHorizontalGroup(
        personalPanelLayout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                personalPanelLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .add(
                        personalPanelLayout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(sexLabel)
                            .add(
                                personalPanelLayout
                                    .createSequentialGroup()
                                    .add(
                                        personalPanelLayout
                                            .createParallelGroup(
                                                org.jdesktop.layout.GroupLayout.LEADING)
                                            .add(firstNameLabel)
                                            .add(surnameLabel)
                                            .add(maritalStatusLabel)
                                            .add(ageLabel))
                                    .add(7, 7, 7)
                                    .add(
                                        personalPanelLayout
                                            .createParallelGroup(
                                                org.jdesktop.layout.GroupLayout.LEADING)
                                            .add(
                                                personalPanelLayout
                                                    .createSequentialGroup()
                                                    .add(maleRadioButton)
                                                    .addPreferredGap(
                                                        org.jdesktop.layout.LayoutStyle.RELATED)
                                                    .add(femaleRadioButton))
                                            .add(
                                                firstNameTextField,
                                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                                519,
                                                Short.MAX_VALUE)
                                            .add(
                                                surnameTextField,
                                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                                519,
                                                Short.MAX_VALUE)
                                            .add(
                                                personalPanelLayout
                                                    .createParallelGroup(
                                                        org.jdesktop.layout.GroupLayout.TRAILING,
                                                        false)
                                                    .add(
                                                        org.jdesktop.layout.GroupLayout.LEADING,
                                                        ageTextField)
                                                    .add(
                                                        org.jdesktop.layout.GroupLayout.LEADING,
                                                        maritalComboBox,
                                                        0,
                                                        org.jdesktop.layout.GroupLayout
                                                            .DEFAULT_SIZE,
                                                        Short.MAX_VALUE)))))
                    .addContainerGap()));
    personalPanelLayout.setVerticalGroup(
        personalPanelLayout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                personalPanelLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .add(
                        personalPanelLayout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(firstNameLabel)
                            .add(
                                firstNameTextField,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        personalPanelLayout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(surnameLabel)
                            .add(
                                surnameTextField,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        personalPanelLayout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(maritalStatusLabel)
                            .add(
                                maritalComboBox,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        personalPanelLayout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(ageLabel)
                            .add(
                                ageTextField,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        personalPanelLayout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(sexLabel)
                            .add(femaleRadioButton)
                            .add(maleRadioButton))
                    .addContainerGap(
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    clientInfoPane.addTab("Personal", personalPanel);

    contactPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    nicknameLabel.setText("Nickname:"); // NOI18N

    emailLabel.setText("E-mail:"); // NOI18N

    webLabel.setText("Web:"); // NOI18N

    imLabel.setText("IM:"); // NOI18N

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${client.nickname}"),
            nicknameTextField,
            org.jdesktop.beansbinding.BeanProperty.create("text"),
            "nickname"); // NOI18N
    bindingGroup.addBinding(binding);

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${client.email}"),
            emailTextField,
            org.jdesktop.beansbinding.BeanProperty.create("text"),
            "email");
    binding.setValidator(emailValidator);
    bindingGroup.addBinding(binding);

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${client.web}"),
            webTextField,
            org.jdesktop.beansbinding.BeanProperty.create("text"),
            "web");
    bindingGroup.addBinding(binding);

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${client.im}"),
            imTextField,
            org.jdesktop.beansbinding.BeanProperty.create("text"),
            "im");
    bindingGroup.addBinding(binding);

    org.jdesktop.layout.GroupLayout contactPanelLayout =
        new org.jdesktop.layout.GroupLayout(contactPanel);
    contactPanel.setLayout(contactPanelLayout);
    contactPanelLayout.setHorizontalGroup(
        contactPanelLayout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                contactPanelLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .add(
                        contactPanelLayout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(nicknameLabel)
                            .add(emailLabel)
                            .add(webLabel)
                            .add(imLabel))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        contactPanelLayout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(
                                nicknameTextField,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                542,
                                Short.MAX_VALUE)
                            .add(
                                emailTextField,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                542,
                                Short.MAX_VALUE)
                            .add(
                                webTextField,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                542,
                                Short.MAX_VALUE)
                            .add(
                                imTextField,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                542,
                                Short.MAX_VALUE))
                    .addContainerGap()));
    contactPanelLayout.setVerticalGroup(
        contactPanelLayout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                contactPanelLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .add(
                        contactPanelLayout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(nicknameLabel)
                            .add(
                                nicknameTextField,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        contactPanelLayout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(emailLabel)
                            .add(
                                emailTextField,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        contactPanelLayout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(webLabel)
                            .add(
                                webTextField,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        contactPanelLayout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(imLabel)
                            .add(
                                imTextField,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(248, Short.MAX_VALUE)));

    clientInfoPane.addTab("Contact", contactPanel);
    clientInfoPane.addTab("tab3", jFileChooser1);

    usernameLabel.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${client.firstName} ${client.surname}"),
            usernameLabel,
            org.jdesktop.beansbinding.BeanProperty.create("text"),
            "displayNameTitle");
    bindingGroup.addBinding(binding);

    clientInfoLabel.setFont(new java.awt.Font("Dialog", 0, 24)); // NOI18N
    clientInfoLabel.setText("Client Info:"); // NOI18N

    validationMsgLabel.setFont(new java.awt.Font("Dialog", 1, 11)); // NOI18N
    validationMsgLabel.setForeground(new java.awt.Color(255, 0, 0));

    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                org.jdesktop.layout.GroupLayout.TRAILING,
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .add(
                        layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(
                                org.jdesktop.layout.GroupLayout.LEADING,
                                clientInfoPane,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                632,
                                Short.MAX_VALUE)
                            .add(
                                org.jdesktop.layout.GroupLayout.LEADING,
                                layout
                                    .createSequentialGroup()
                                    .add(clientInfoLabel)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(
                                        usernameLabel,
                                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                        509,
                                        Short.MAX_VALUE))
                            .add(
                                org.jdesktop.layout.GroupLayout.LEADING,
                                validationMsgLabel,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                632,
                                Short.MAX_VALUE))
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .add(
                        layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(
                                clientInfoLabel,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                27,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(
                                usernameLabel,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                27,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                    .add(
                        clientInfoPane,
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                        380,
                        Short.MAX_VALUE)
                    .add(5, 5, 5)
                    .add(
                        validationMsgLabel,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        18,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));

    bindingGroup.bind();
  } // </editor-fold>//GEN-END:initComponents
Esempio n. 7
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() {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

    entityManager =
        java.beans.Beans.isDesignTime()
            ? null
            : javax.persistence.Persistence.createEntityManagerFactory("celciusPU")
                .createEntityManager();
    query =
        java.beans.Beans.isDesignTime()
            ? null
            : entityManager.createQuery("SELECT b FROM Bolsters b");
    list =
        java.beans.Beans.isDesignTime()
            ? java.util.Collections.emptyList()
            : org.jdesktop.observablecollections.ObservableCollections.observableList(
                query.getResultList());
    masterScrollPane = new javax.swing.JScrollPane();
    masterTable = new javax.swing.JTable();
    rangeLabel = new javax.swing.JLabel();
    sizeLabel = new javax.swing.JLabel();
    smvLabel = new javax.swing.JLabel();
    rangeField = new javax.swing.JTextField();
    sizeField = new javax.swing.JTextField();
    smvField = new javax.swing.JTextField();
    saveButton = new javax.swing.JButton();
    refreshButton = new javax.swing.JButton();
    newButton = new javax.swing.JButton();
    deleteButton = new javax.swing.JButton();
    jComboBox1 = new javax.swing.JComboBox();

    FormListener formListener = new FormListener();

    setBackground(new java.awt.Color(204, 204, 204));
    setMinimumSize(new java.awt.Dimension(400, 400));

    org.jdesktop.swingbinding.JTableBinding jTableBinding =
        org.jdesktop.swingbinding.SwingBindings.createJTableBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, list, masterTable);
    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${range}"));
    columnBinding.setColumnName("Range");
    columnBinding.setColumnClass(String.class);
    columnBinding.setEditable(false);
    columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${size}"));
    columnBinding.setColumnName("Size ( diameter X length )");
    columnBinding.setColumnClass(String.class);
    columnBinding.setEditable(false);
    columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${smv}"));
    columnBinding.setColumnName("Smv");
    columnBinding.setColumnClass(Double.class);
    columnBinding.setEditable(false);
    bindingGroup.addBinding(jTableBinding);
    jTableBinding.bind();
    masterScrollPane.setViewportView(masterTable);

    rangeLabel.setText("Range:");

    sizeLabel.setText("Size:");

    smvLabel.setText("Smv:");

    org.jdesktop.beansbinding.Binding binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement.range}"),
            rangeField,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setSourceUnreadableValue(null);
    bindingGroup.addBinding(binding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"),
            rangeField,
            org.jdesktop.beansbinding.BeanProperty.create("enabled"));
    bindingGroup.addBinding(binding);

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement.size}"),
            sizeField,
            org.jdesktop.beansbinding.BeanProperty.create("text_ON_ACTION_OR_FOCUS_LOST"));
    binding.setSourceUnreadableValue(null);
    bindingGroup.addBinding(binding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"),
            sizeField,
            org.jdesktop.beansbinding.BeanProperty.create("enabled"));
    bindingGroup.addBinding(binding);

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement.smv}"),
            smvField,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setSourceUnreadableValue(null);
    bindingGroup.addBinding(binding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"),
            smvField,
            org.jdesktop.beansbinding.BeanProperty.create("enabled"));
    bindingGroup.addBinding(binding);

    saveButton.setText("Save");
    saveButton.addActionListener(formListener);

    refreshButton.setText("Refresh");
    refreshButton.addActionListener(formListener);

    newButton.setText("New");
    newButton.addActionListener(formListener);

    deleteButton.setText("Delete");

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"),
            deleteButton,
            org.jdesktop.beansbinding.BeanProperty.create("enabled"));
    bindingGroup.addBinding(binding);

    deleteButton.addActionListener(formListener);

    jComboBox1.setModel(
        new javax.swing.DefaultComboBoxModel(new String[] {"", "Classic", "Super", "Other"}));

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

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                layout
                                    .createSequentialGroup()
                                    .addComponent(newButton)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(deleteButton)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(refreshButton)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(saveButton))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addContainerGap()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(rangeLabel)
                                            .addComponent(sizeLabel)
                                            .addComponent(smvLabel))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(
                                                sizeField,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                341,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                smvField,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                341,
                                                Short.MAX_VALUE)
                                            .addGroup(
                                                javax.swing.GroupLayout.Alignment.TRAILING,
                                                layout
                                                    .createSequentialGroup()
                                                    .addComponent(
                                                        jComboBox1,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        128,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(
                                                        javax.swing.LayoutStyle.ComponentPlacement
                                                            .RELATED,
                                                        28,
                                                        Short.MAX_VALUE)
                                                    .addComponent(
                                                        rangeField,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        185,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE))))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(
                                        masterScrollPane,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        380,
                                        Short.MAX_VALUE)))
                    .addContainerGap()));

    layout.linkSize(
        javax.swing.SwingConstants.HORIZONTAL,
        new java.awt.Component[] {deleteButton, newButton, refreshButton, saveButton});

    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        masterScrollPane,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        271,
                        Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(rangeLabel)
                            .addComponent(
                                rangeField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                jComboBox1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(sizeLabel)
                            .addComponent(
                                sizeField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(smvLabel)
                            .addComponent(
                                smvField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(saveButton)
                            .addComponent(refreshButton)
                            .addComponent(deleteButton)
                            .addComponent(newButton))
                    .addContainerGap()));

    rangeField.setVisible(false);

    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();

    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
Esempio n. 9
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();

    jLabel2 = new javax.swing.JLabel();
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    workDirComboBox = new javax.swing.JComboBox();
    saveDirTextField = new javax.swing.JTextField();
    saveExpDestinationNameTF = new javax.swing.JTextField();
    setButton = new javax.swing.JButton();
    jLabel5 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    buttonPane = new javax.swing.JPanel();
    saveButton = new javax.swing.JButton();
    changeDirButton = new javax.swing.JButton();

    jLabel2.setText("Working Directory");
    jLabel2.setName("jLabel2"); // NOI18N

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Save working directory"); // NOI18N
    setName("Form"); // NOI18N
    getContentPane().setLayout(new java.awt.BorderLayout(30, 10));

    jPanel1.setName("jPanel1"); // NOI18N
    jPanel1.setLayout(new java.awt.GridBagLayout());

    jLabel1.setText("Working Directory");
    jLabel1.setName("jLabel1"); // 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.insets = new java.awt.Insets(10, 10, 2, 2);
    jPanel1.add(jLabel1, gridBagConstraints);

    workDirComboBox.setToolTipText(
        "<html><p style=\"margin: 6px;\"><font size=\"4\">\n\nSelect which working directory you wish to save. <br>\nAll currently set working directories are listed. <br>\n\n\n</font></p><html>"); // NOI18N
    workDirComboBox.setName("workDirComboBox"); // NOI18N
    workDirComboBox.addItemListener(
        new java.awt.event.ItemListener() {
          public void itemStateChanged(java.awt.event.ItemEvent evt) {
            workDirComboBoxItemStateChanged(evt);
          }
        });
    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 = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(10, 2, 2, 2);
    jPanel1.add(workDirComboBox, gridBagConstraints);

    saveDirTextField.setEditable(false);
    saveDirTextField.setToolTipText(
        "<html><p style=\"margin: 6px;\"><font size=\"4\">\n\nPath to the destination directory into which<br>\nworking directory will be copied. Use \"Set\" button<br>\nto set this path.\n\n</font></p><html>"); // NOI18N
    saveDirTextField.setBorder(
        new javax.swing.border.SoftBevelBorder(
            javax.swing.border.BevelBorder.RAISED,
            java.awt.Color.lightGray,
            java.awt.Color.darkGray,
            java.awt.Color.lightGray,
            java.awt.Color.darkGray));
    saveDirTextField.setName("saveDirTextField"); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 3.0;
    gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
    jPanel1.add(saveDirTextField, gridBagConstraints);

    saveExpDestinationNameTF.setToolTipText(
        "<html><p style=\"margin: 6px;\"><font size=\"4\">\n\nName under whcih experiment should be saved.\n\n</font></p><html>"); // NOI18N
    saveExpDestinationNameTF.setBorder(
        new javax.swing.border.SoftBevelBorder(
            javax.swing.border.BevelBorder.RAISED,
            java.awt.Color.lightGray,
            java.awt.Color.darkGray,
            java.awt.Color.lightGray,
            java.awt.Color.darkGray));
    saveExpDestinationNameTF.setName("saveExpDestinationNameTF"); // NOI18N

    org.jdesktop.beansbinding.Binding binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ,
            workDirComboBox,
            org.jdesktop.beansbinding.ELProperty.create("${selectedItem}"),
            saveExpDestinationNameTF,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setSourceNullValue("savedBayesExp");
    binding.setSourceUnreadableValue("savedBayesExp");
    bindingGroup.addBinding(binding);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
    jPanel1.add(saveExpDestinationNameTF, gridBagConstraints);

    setButton.setText("Set"); // NOI18N
    setButton.setToolTipText(
        "<html><p style=\"margin: 6px;\"><font size=\"4\">\n\nSelect where you want to save working directory  <br>\n\n</font></p><html>"); // NOI18N
    setButton.setName("setButton"); // NOI18N
    setButton.setPreferredSize(new java.awt.Dimension(50, 22));
    setButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            setButtonActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 0.2;
    gridBagConstraints.insets = new java.awt.Insets(0, 2, 0, 2);
    jPanel1.add(setButton, gridBagConstraints);

    jLabel5.setText("Save to location");
    jLabel5.setName("jLabel5"); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(2, 10, 2, 2);
    jPanel1.add(jLabel5, gridBagConstraints);

    jLabel3.setText("Save as");
    jLabel3.setName("jLabel3"); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(2, 10, 2, 2);
    jPanel1.add(jLabel3, gridBagConstraints);

    getContentPane().add(jPanel1, java.awt.BorderLayout.PAGE_START);

    buttonPane.setName("buttonPane"); // NOI18N

    saveButton.setText("Save"); // NOI18N
    saveButton.setToolTipText(
        "<html><p style=\"margin: 6px;\"><font size=\"4\">\n\nStart saving selected working directory  <br>\n\n</font></p><html>"); // NOI18N
    saveButton.setName("saveButton"); // NOI18N
    saveButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            saveButtonActionPerformed(evt);
          }
        });

    changeDirButton.setText("Cancel"); // NOI18N
    changeDirButton.setToolTipText(
        "<html><p style=\"margin: 6px;\"><font size=\"4\">\n\nCancel saving procedures.<br>\n\n</font></p><html>"); // NOI18N
    changeDirButton.setName("changeDirButton"); // NOI18N
    changeDirButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            changeDirButtonActionPerformed(evt);
          }
        });

    org.jdesktop.layout.GroupLayout buttonPaneLayout =
        new org.jdesktop.layout.GroupLayout(buttonPane);
    buttonPane.setLayout(buttonPaneLayout);
    buttonPaneLayout.setHorizontalGroup(
        buttonPaneLayout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                org.jdesktop.layout.GroupLayout.TRAILING,
                buttonPaneLayout
                    .createSequentialGroup()
                    .addContainerGap(279, Short.MAX_VALUE)
                    .add(changeDirButton)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                    .add(saveButton)
                    .addContainerGap()));
    buttonPaneLayout.setVerticalGroup(
        buttonPaneLayout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                org.jdesktop.layout.GroupLayout.TRAILING,
                buttonPaneLayout
                    .createSequentialGroup()
                    .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(
                        buttonPaneLayout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(saveButton)
                            .add(changeDirButton))));

    getContentPane().add(buttonPane, java.awt.BorderLayout.SOUTH);

    bindingGroup.bind();

    pack();
  } // </editor-fold>//GEN-END:initComponents
  /**
   * 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
  /**
   * 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() {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

    org.jdesktop.application.ResourceMap resourceMap =
        org.jdesktop.application.Application.getInstance(javaproject.Main.class)
            .getContext()
            .getResourceMap(DivisionData.class);
    entityManager =
        java.beans.Beans.isDesignTime()
            ? null
            : javax.persistence.Persistence.createEntityManagerFactory(
                    resourceMap.getString("entityManager.persistenceUnit"))
                .createEntityManager(); // NOI18N
    query =
        java.beans.Beans.isDesignTime()
            ? null
            : entityManager.createQuery(resourceMap.getString("query.query")); // NOI18N
    list =
        java.beans.Beans.isDesignTime()
            ? java.util.Collections.emptyList()
            : org.jdesktop.observablecollections.ObservableCollections.observableList(
                query.getResultList());
    masterScrollPane = new javax.swing.JScrollPane();
    masterTable = new javax.swing.JTable();
    stationNumberLabel = new javax.swing.JLabel();
    address1Label = new javax.swing.JLabel();
    address2Label = new javax.swing.JLabel();
    telephoneLabel = new javax.swing.JLabel();
    stationNameLabel = new javax.swing.JLabel();
    stationNumberField = new javax.swing.JTextField();
    address1Field = new javax.swing.JTextField();
    address2Field = new javax.swing.JTextField();
    telephoneField = new javax.swing.JTextField();
    stationNameField = new javax.swing.JTextField();
    saveButton = new javax.swing.JButton();
    refreshButton = new javax.swing.JButton();
    newButton = new javax.swing.JButton();
    deleteButton = new javax.swing.JButton();

    FormListener formListener = new FormListener();

    setName("Form"); // NOI18N

    masterScrollPane.setName("masterScrollPane"); // NOI18N

    masterTable.setName("masterTable"); // NOI18N

    org.jdesktop.swingbinding.JTableBinding jTableBinding =
        org.jdesktop.swingbinding.SwingBindings.createJTableBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, list, masterTable);
    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding =
        jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${stationNumber}"));
    columnBinding.setColumnName("Station Number");
    columnBinding.setColumnClass(Integer.class);
    columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${address1}"));
    columnBinding.setColumnName("Address1");
    columnBinding.setColumnClass(String.class);
    columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${address2}"));
    columnBinding.setColumnName("Address2");
    columnBinding.setColumnClass(String.class);
    columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${telephone}"));
    columnBinding.setColumnName("Telephone");
    columnBinding.setColumnClass(Integer.class);
    columnBinding =
        jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${stationName}"));
    columnBinding.setColumnName("Station Name");
    columnBinding.setColumnClass(String.class);
    bindingGroup.addBinding(jTableBinding);

    masterScrollPane.setViewportView(masterTable);

    stationNumberLabel.setText(resourceMap.getString("stationNumberLabel.text")); // NOI18N
    stationNumberLabel.setName("stationNumberLabel"); // NOI18N

    address1Label.setText(resourceMap.getString("address1Label.text")); // NOI18N
    address1Label.setName("address1Label"); // NOI18N

    address2Label.setText(resourceMap.getString("address2Label.text")); // NOI18N
    address2Label.setName("address2Label"); // NOI18N

    telephoneLabel.setText(resourceMap.getString("telephoneLabel.text")); // NOI18N
    telephoneLabel.setName("telephoneLabel"); // NOI18N

    stationNameLabel.setText(resourceMap.getString("stationNameLabel.text")); // NOI18N
    stationNameLabel.setName("stationNameLabel"); // NOI18N

    stationNumberField.setName("stationNumberField"); // NOI18N

    org.jdesktop.beansbinding.Binding binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement.stationNumber}"),
            stationNumberField,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setSourceUnreadableValue(null);
    bindingGroup.addBinding(binding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"),
            stationNumberField,
            org.jdesktop.beansbinding.BeanProperty.create("enabled"));
    bindingGroup.addBinding(binding);

    address1Field.setName("address1Field"); // NOI18N

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement.address1}"),
            address1Field,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setSourceUnreadableValue(null);
    bindingGroup.addBinding(binding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"),
            address1Field,
            org.jdesktop.beansbinding.BeanProperty.create("enabled"));
    bindingGroup.addBinding(binding);

    address2Field.setName("address2Field"); // NOI18N

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement.address2}"),
            address2Field,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setSourceUnreadableValue(null);
    bindingGroup.addBinding(binding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"),
            address2Field,
            org.jdesktop.beansbinding.BeanProperty.create("enabled"));
    bindingGroup.addBinding(binding);

    telephoneField.setName("telephoneField"); // NOI18N

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement.telephone}"),
            telephoneField,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setSourceUnreadableValue(null);
    bindingGroup.addBinding(binding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"),
            telephoneField,
            org.jdesktop.beansbinding.BeanProperty.create("enabled"));
    bindingGroup.addBinding(binding);

    stationNameField.setName("stationNameField"); // NOI18N

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement.stationName}"),
            stationNameField,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    binding.setSourceUnreadableValue(null);
    bindingGroup.addBinding(binding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"),
            stationNameField,
            org.jdesktop.beansbinding.BeanProperty.create("enabled"));
    bindingGroup.addBinding(binding);

    saveButton.setText(resourceMap.getString("saveButton.text")); // NOI18N
    saveButton.setName("saveButton"); // NOI18N
    saveButton.addActionListener(formListener);

    refreshButton.setText(resourceMap.getString("refreshButton.text")); // NOI18N
    refreshButton.setName("refreshButton"); // NOI18N
    refreshButton.addActionListener(formListener);

    newButton.setText(resourceMap.getString("newButton.text")); // NOI18N
    newButton.setName("newButton"); // NOI18N
    newButton.addActionListener(formListener);

    deleteButton.setText(resourceMap.getString("deleteButton.text")); // NOI18N
    deleteButton.setName("deleteButton"); // NOI18N

    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ,
            masterTable,
            org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"),
            deleteButton,
            org.jdesktop.beansbinding.BeanProperty.create("enabled"));
    bindingGroup.addBinding(binding);

    deleteButton.addActionListener(formListener);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addComponent(newButton)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(deleteButton)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(refreshButton)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(saveButton)
                    .addContainerGap())
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(stationNumberLabel)
                            .addComponent(address1Label)
                            .addComponent(address2Label)
                            .addComponent(telephoneLabel)
                            .addComponent(stationNameLabel))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                stationNumberField,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                315,
                                Short.MAX_VALUE)
                            .addComponent(
                                address1Field,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                315,
                                Short.MAX_VALUE)
                            .addComponent(
                                address2Field,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                315,
                                Short.MAX_VALUE)
                            .addComponent(
                                telephoneField,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                315,
                                Short.MAX_VALUE)
                            .addComponent(
                                stationNameField,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                315,
                                Short.MAX_VALUE))
                    .addContainerGap())
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        masterScrollPane,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        380,
                        Short.MAX_VALUE)
                    .addContainerGap()));

    layout.linkSize(
        javax.swing.SwingConstants.HORIZONTAL,
        new java.awt.Component[] {deleteButton, newButton, refreshButton, saveButton});

    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        masterScrollPane,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        130,
                        Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(stationNumberLabel)
                            .addComponent(
                                stationNumberField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(address1Label)
                            .addComponent(
                                address1Field,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(address2Label)
                            .addComponent(
                                address2Field,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(telephoneLabel)
                            .addComponent(
                                telephoneField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(stationNameLabel)
                            .addComponent(
                                stationNameField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(saveButton)
                            .addComponent(refreshButton)
                            .addComponent(deleteButton)
                            .addComponent(newButton))
                    .addContainerGap()));

    bindingGroup.bind();
  }
Esempio n. 12
0
  // <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