Exemplo n.º 1
0
  private void llenarBindingGroup() {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

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

    sistemaBBPeriodo1 = new shrimp.sistema.beanbinding.SistemaBBPeriodo();
    eLProperty = org.jdesktop.beansbinding.ELProperty.create("${listaPeriodoTO}");
    jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            sistemaBBPeriodo1,
            eLProperty,
            jcboPeriodo);
    bindingGroup.addBinding(jComboBoxBinding);
    bindingGroup.bind();
  }
Exemplo n.º 2
0
 private void llenarCombo() throws Exception {
   bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
   produccionBBSector1 = new shrimp.produccion.beanbinding.ProduccionBBSector();
   eLProperty = org.jdesktop.beansbinding.ELProperty.create("${listaPrdListaSectorTO}");
   org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding =
       org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
           org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
           produccionBBSector1,
           eLProperty,
           jcboCP);
   bindingGroup.addBinding(jComboBoxBinding);
   this.bindingGroup.bind();
   this.produccionBBSector1.setPrdListaSectorTO(
       shrimp.produccion.delegate.ProduccionDelegate.getInstance()
           .getListaSectorTO(sisUsuarioEmpresaTO.getEmpCodigo(), false));
   this.bindingGroup.bind();
   this.jcboCP.updateUI();
   this.jcboCP.setSelectedIndex(0);
   codigoSector =
       "'"
           + produccionBBSector1
               .getListaPrdListaSectorTO()
               .get(jcboCP.getSelectedIndex())
               .getSecCodigo()
           + "'";
   jcboCP.requestFocus();
 }
  private void llenarComboPeriodo() throws Exception {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
    jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            rRHHBBFunciones.getRhComboUtilidadesPeriodoTO(),
            jcboPeriodo);
    bindingGroup.addBinding(jComboBoxBinding);

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

    this.bbProduccionSector1.setPrdListaSectorTO(
        shrimp.produccion.delegate.ProduccionDelegate.getInstance()
            .getListaSectorTO(empresa, false));
    this.bindingGroup.bind();
    this.jcboSector.updateUI();
    this.jcboSector.setSelectedItem(null);
    jcboSector.setRenderer(new shrimp.validaciones.ComboTooltipRenderer());
  }
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

    popupUsers = new javax.swing.JPopupMenu();
    menuAddUser = new javax.swing.JMenuItem();
    menuEditUser = new javax.swing.JMenuItem();
    menuSetPassword = new javax.swing.JMenuItem();
    menuRemoveUser = new javax.swing.JMenuItem();
    groupsList = new org.sola.clients.beans.security.GroupSummaryListBean();
    userSearchParams = new org.sola.clients.beans.security.UserSearchParamsBean();
    userSearchResultList = new org.sola.clients.beans.security.UserSearchAdvancedResultListBean();
    pnlHeader = new org.sola.clients.swing.ui.HeaderPanel();
    pnlSearchCriteria = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();
    jLabel2 = new javax.swing.JLabel();
    txtUsername = new javax.swing.JTextField();
    jPanel3 = new javax.swing.JPanel();
    txtFirstName = new javax.swing.JTextField();
    jLabel1 = new javax.swing.JLabel();
    jPanel4 = new javax.swing.JPanel();
    jLabel3 = new javax.swing.JLabel();
    txtLastName = new javax.swing.JTextField();
    jPanel5 = new javax.swing.JPanel();
    jLabel4 = new javax.swing.JLabel();
    comboGroups = new javax.swing.JComboBox();
    jPanel1 = new javax.swing.JPanel();
    jLabel5 = new javax.swing.JLabel();
    btnSearch = new javax.swing.JButton();
    toolbarUsers = new javax.swing.JToolBar();
    btnAddUser = new javax.swing.JButton();
    btnEditUser = new javax.swing.JButton();
    btnSetPassword = new javax.swing.JButton();
    btnRemoveUser = new javax.swing.JButton();
    jScrollPane1 = new javax.swing.JScrollPane();
    tableUsers = new org.sola.clients.swing.common.controls.JTableWithDefaultStyles();

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

    menuAddUser.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/images/common/add.png"))); // NOI18N
    java.util.ResourceBundle bundle =
        java.util.ResourceBundle.getBundle(
            "org/sola/clients/swing/admin/security/Bundle"); // NOI18N
    menuAddUser.setText(bundle.getString("UsersManagementPanel.menuAddUser.text")); // NOI18N
    menuAddUser.setName("menuAddUser"); // NOI18N
    menuAddUser.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuAddUserActionPerformed(evt);
          }
        });
    popupUsers.add(menuAddUser);

    menuEditUser.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/images/common/pencil.png"))); // NOI18N
    menuEditUser.setText(bundle.getString("UsersManagementPanel.menuEditUser.text")); // NOI18N
    menuEditUser.setName("menuEditUser"); // NOI18N
    menuEditUser.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuEditUserActionPerformed(evt);
          }
        });
    popupUsers.add(menuEditUser);

    menuSetPassword.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/images/common/lock--pencil.png"))); // NOI18N
    menuSetPassword.setText(
        bundle.getString("UsersManagementPanel.menuSetPassword.text")); // NOI18N
    menuSetPassword.setName("menuSetPassword"); // NOI18N
    menuSetPassword.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuSetPasswordActionPerformed(evt);
          }
        });
    popupUsers.add(menuSetPassword);

    menuRemoveUser.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/images/common/remove.png"))); // NOI18N
    menuRemoveUser.setText(bundle.getString("UsersManagementPanel.menuRemoveUser.text")); // NOI18N
    menuRemoveUser.setName("menuRemoveUser"); // NOI18N
    menuRemoveUser.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuRemoveUserActionPerformed(evt);
          }
        });
    popupUsers.add(menuRemoveUser);

    setHeaderPanel(pnlHeader);
    setMinimumSize(new java.awt.Dimension(200, 200));

    pnlHeader.setName("pnlHeader"); // NOI18N
    pnlHeader.setTitleText(bundle.getString("UsersManagementPanel.pnlHeader.titleText")); // NOI18N

    pnlSearchCriteria.setName("pnlSearchCriteria"); // NOI18N
    pnlSearchCriteria.setLayout(new java.awt.GridLayout(1, 4, 15, 0));

    jPanel2.setName(bundle.getString("UsersManagementPanel.jPanel2.name")); // NOI18N

    jLabel2.setText(bundle.getString("UsersManagementPanel.jLabel2.text")); // NOI18N
    jLabel2.setName("jLabel2"); // NOI18N

    txtUsername.setName("txtUsername"); // NOI18N
    txtUsername.setNextFocusableComponent(txtFirstName);

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

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel2Layout
                    .createSequentialGroup()
                    .addComponent(jLabel2)
                    .addGap(0, 53, Short.MAX_VALUE))
            .addComponent(txtUsername));
    jPanel2Layout.setVerticalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel2Layout
                    .createSequentialGroup()
                    .addComponent(jLabel2)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        txtUsername,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)));

    pnlSearchCriteria.add(jPanel2);

    jPanel3.setName(bundle.getString("UsersManagementPanel.jPanel3.name")); // NOI18N

    txtFirstName.setName("txtFirstName"); // NOI18N
    txtFirstName.setNextFocusableComponent(txtLastName);

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

    jLabel1.setText(bundle.getString("UsersManagementPanel.jLabel1.text")); // NOI18N
    jLabel1.setName("jLabel1"); // NOI18N

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(
        jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel3Layout
                    .createSequentialGroup()
                    .addComponent(jLabel1)
                    .addGap(0, 51, Short.MAX_VALUE))
            .addComponent(txtFirstName));
    jPanel3Layout.setVerticalGroup(
        jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel3Layout
                    .createSequentialGroup()
                    .addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        txtFirstName,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)));

    pnlSearchCriteria.add(jPanel3);

    jPanel4.setName(bundle.getString("UsersManagementPanel.jPanel4.name")); // NOI18N

    jLabel3.setText(bundle.getString("UsersManagementPanel.jLabel3.text")); // NOI18N
    jLabel3.setName("jLabel3"); // NOI18N

    txtLastName.setName("txtLastName"); // NOI18N
    txtLastName.setNextFocusableComponent(comboGroups);

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

    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout.setHorizontalGroup(
        jPanel4Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel4Layout
                    .createSequentialGroup()
                    .addComponent(jLabel3)
                    .addGap(0, 52, Short.MAX_VALUE))
            .addComponent(txtLastName));
    jPanel4Layout.setVerticalGroup(
        jPanel4Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel4Layout
                    .createSequentialGroup()
                    .addComponent(jLabel3)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        txtLastName,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)));

    pnlSearchCriteria.add(jPanel4);

    jPanel5.setName(bundle.getString("UsersManagementPanel.jPanel5.name")); // NOI18N

    jLabel4.setText(bundle.getString("UsersManagementPanel.jLabel4.text")); // NOI18N
    jLabel4.setName("jLabel4"); // NOI18N

    comboGroups.setName("comboGroups"); // NOI18N
    comboGroups.setNextFocusableComponent(btnSearch);

    org.jdesktop.beansbinding.ELProperty eLProperty =
        org.jdesktop.beansbinding.ELProperty.create("${groupSummaryList}");
    org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            groupsList,
            eLProperty,
            comboGroups);
    bindingGroup.addBinding(jComboBoxBinding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            userSearchParams,
            org.jdesktop.beansbinding.ELProperty.create("${groupBean}"),
            comboGroups,
            org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
    bindingGroup.addBinding(binding);

    javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
    jPanel5.setLayout(jPanel5Layout);
    jPanel5Layout.setHorizontalGroup(
        jPanel5Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel5Layout
                    .createSequentialGroup()
                    .addComponent(jLabel4)
                    .addGap(0, 67, Short.MAX_VALUE))
            .addComponent(comboGroups, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
    jPanel5Layout.setVerticalGroup(
        jPanel5Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel5Layout
                    .createSequentialGroup()
                    .addComponent(jLabel4)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        comboGroups,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)));

    pnlSearchCriteria.add(jPanel5);

    jPanel1.setName(bundle.getString("UsersManagementPanel.jPanel1.name")); // NOI18N

    jLabel5.setText(bundle.getString("UsersManagementPanel.jLabel5.text")); // NOI18N
    jLabel5.setName(bundle.getString("UsersManagementPanel.jLabel5.name")); // NOI18N

    btnSearch.setText(bundle.getString("UsersManagementPanel.btnSearch.text")); // NOI18N
    btnSearch.setName("btnSearch"); // NOI18N
    btnSearch.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSearchActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addComponent(jLabel5)
                    .addGap(0, 0, Short.MAX_VALUE))
            .addComponent(btnSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addComponent(jLabel5)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(btnSearch)));

    toolbarUsers.setFloatable(false);
    toolbarUsers.setRollover(true);
    toolbarUsers.setName("toolbarUsers"); // NOI18N

    btnAddUser.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/images/common/add.png"))); // NOI18N
    btnAddUser.setText(bundle.getString("UsersManagementPanel.btnAddUser.text")); // NOI18N
    btnAddUser.setFocusable(false);
    btnAddUser.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    btnAddUser.setName("btnAddUser"); // NOI18N
    btnAddUser.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnAddUser.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnAddUserActionPerformed(evt);
          }
        });
    toolbarUsers.add(btnAddUser);

    btnEditUser.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/images/common/pencil.png"))); // NOI18N
    btnEditUser.setText(bundle.getString("UsersManagementPanel.btnEditUser.text")); // NOI18N
    btnEditUser.setFocusable(false);
    btnEditUser.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    btnEditUser.setName("btnEditUser"); // NOI18N
    btnEditUser.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnEditUser.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnEditUserActionPerformed(evt);
          }
        });
    toolbarUsers.add(btnEditUser);

    btnSetPassword.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/images/common/lock--pencil.png"))); // NOI18N
    btnSetPassword.setText(bundle.getString("UsersManagementPanel.btnSetPassword.text")); // NOI18N
    btnSetPassword.setFocusable(false);
    btnSetPassword.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    btnSetPassword.setName("btnSetPassword"); // NOI18N
    btnSetPassword.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnSetPassword.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSetPasswordActionPerformed(evt);
          }
        });
    toolbarUsers.add(btnSetPassword);

    btnRemoveUser.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/images/common/remove.png"))); // NOI18N
    btnRemoveUser.setText(bundle.getString("UsersManagementPanel.btnRemoveUser.text")); // NOI18N
    btnRemoveUser.setFocusable(false);
    btnRemoveUser.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    btnRemoveUser.setName("btnRemoveUser"); // NOI18N
    btnRemoveUser.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnRemoveUser.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnRemoveUserActionPerformed(evt);
          }
        });
    toolbarUsers.add(btnRemoveUser);

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

    tableUsers.setComponentPopupMenu(popupUsers);
    tableUsers.setName("tableUsers"); // NOI18N

    eLProperty = org.jdesktop.beansbinding.ELProperty.create("${usersList}");
    org.jdesktop.swingbinding.JTableBinding jTableBinding =
        org.jdesktop.swingbinding.SwingBindings.createJTableBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            userSearchResultList,
            eLProperty,
            tableUsers);
    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${userName}"));
    columnBinding.setColumnName("Username");
    columnBinding.setColumnClass(String.class);
    columnBinding.setEditable(false);
    columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${firstName}"));
    columnBinding.setColumnName("First name");
    columnBinding.setColumnClass(String.class);
    columnBinding.setEditable(false);
    columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${lastName}"));
    columnBinding.setColumnName("Last name");
    columnBinding.setColumnClass(String.class);
    columnBinding.setEditable(false);
    columnBinding =
        jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${description}"));
    columnBinding.setColumnName("Description");
    columnBinding.setColumnClass(String.class);
    columnBinding.setEditable(false);
    columnBinding =
        jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${groupsList}"));
    columnBinding.setColumnName("Groups");
    columnBinding.setColumnClass(String.class);
    columnBinding.setEditable(false);
    columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${active}"));
    columnBinding.setColumnName("Active");
    columnBinding.setColumnClass(Boolean.class);
    columnBinding.setEditable(false);
    bindingGroup.addBinding(jTableBinding);
    jTableBinding.bind();
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            userSearchResultList,
            org.jdesktop.beansbinding.ELProperty.create("${selectedUser}"),
            tableUsers,
            org.jdesktop.beansbinding.BeanProperty.create("selectedElement"));
    bindingGroup.addBinding(binding);

    jScrollPane1.setViewportView(tableUsers);
    tableUsers.getColumnModel().getColumn(3).setCellRenderer(new TableCellTextAreaRenderer());
    tableUsers.getColumnModel().getColumn(4).setCellRenderer(new TableCellTextAreaRenderer());
    tableUsers.getColumnModel().getColumn(5).setMaxWidth(50);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                pnlHeader,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                Short.MAX_VALUE)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        pnlSearchCriteria,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        0,
                                        Short.MAX_VALUE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(
                                        jPanel1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(
                                toolbarUsers,
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                jScrollPane1,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                563,
                                Short.MAX_VALUE))
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addComponent(
                        pnlHeader,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(
                                jPanel1,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                pnlSearchCriteria,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(
                        toolbarUsers,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        25,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE)
                    .addContainerGap()));

    bindingGroup.bind();
  } // </editor-fold>//GEN-END:initComponents
  /** Initialize cell Line panel */
  private void initCellLinePanel() {
    // init cellLineJCombo
    cellLineTypeBindingList =
        ObservableCollections.observableList(cellLineService.findAllCellLineTypes());
    JComboBoxBinding jComboBoxBinding =
        SwingBindings.createJComboBoxBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            cellLineTypeBindingList,
            setupConditionsPanel.getCellLineComboBox());
    bindingGroup.addBinding(jComboBoxBinding);
    // init growth medium JCombo
    mediumBindingList = ObservableCollections.observableList(cellLineService.findAllGrowthMedia());
    jComboBoxBinding =
        SwingBindings.createJComboBoxBinding(
            AutoBinding.UpdateStrategy.READ_WRITE,
            mediumBindingList,
            setupConditionsPanel.getGrowthMediumComboBox());
    bindingGroup.addBinding(jComboBoxBinding);

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

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

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

    /** add action listeners */
    /** insert a new cell line Type in the DB if it's not present yet */
    setupConditionsPanel
        .getAddCellLineButton()
        .addActionListener(
            new ActionListener() {
              @Override
              public void actionPerformed(ActionEvent e) {
                if (!setupConditionsPanel.getCellLineNameTextField().getText().isEmpty()) {
                  CellLineType newCellLineType = new CellLineType();
                  newCellLineType.setName(
                      setupConditionsPanel.getCellLineNameTextField().getText());
                  try {
                    // insert cell line to DB
                    saveCellLineType(newCellLineType);
                    // add the new cell line to the list
                    cellLineTypeBindingList.add(newCellLineType);
                    setupConditionsPanel.getCellLineNameTextField().setText("");
                    showMessage(
                        "Cell line inserted to DB!",
                        "cell line saved",
                        JOptionPane.INFORMATION_MESSAGE);
                  } catch (PersistenceException exception) {
                    LOG.error(exception.getMessage());
                    showMessage(
                        "Cell Line already present in DB!", "", JOptionPane.WARNING_MESSAGE);
                    setupConditionsPanel.getCellLineNameTextField().setText("");
                    setupConditionsPanel.getCellLineNameTextField().requestFocusInWindow();
                  }
                } else {
                  showMessage(
                      "Please insert a name for the cell line!", "", JOptionPane.WARNING_MESSAGE);
                  setupConditionsPanel.getCellLineNameTextField().requestFocusInWindow();
                }
              }
            });
  }
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

    districtListBean = new org.sola.clients.beans.referencedata.DistrictListBean();
    vdcListBean = new org.sola.clients.beans.referencedata.VdcListBean();
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    cbxDistricts = new javax.swing.JComboBox();
    jPanel4 = new javax.swing.JPanel();
    jLabel3 = new javax.swing.JLabel();
    cbxVdcs = new javax.swing.JComboBox();
    jPanel5 = new javax.swing.JPanel();
    jLabel4 = new javax.swing.JLabel();
    txtWardNo = new javax.swing.JTextField();
    jPanel6 = new javax.swing.JPanel();
    jLabel5 = new javax.swing.JLabel();
    txtParcelNo = new javax.swing.JTextField();
    btnCreate = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Create Property Code");
    setLocationByPlatform(true);
    setResizable(false);

    jLabel1.setText("District");

    org.jdesktop.beansbinding.ELProperty eLProperty =
        org.jdesktop.beansbinding.ELProperty.create("${districts}");
    org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            districtListBean,
            eLProperty,
            cbxDistricts);
    bindingGroup.addBinding(jComboBoxBinding);
    org.jdesktop.beansbinding.Binding binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            districtListBean,
            org.jdesktop.beansbinding.ELProperty.create("${selectedDistrict}"),
            cbxDistricts,
            org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
    bindingGroup.addBinding(binding);

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addComponent(jLabel1)
                    .addGap(0, 106, Short.MAX_VALUE))
            .addComponent(cbxDistricts, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        cbxDistricts,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 16, Short.MAX_VALUE)));

    jLabel3.setText("Vdc");

    eLProperty = org.jdesktop.beansbinding.ELProperty.create("${vdcs}");
    jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            vdcListBean,
            eLProperty,
            cbxVdcs);
    bindingGroup.addBinding(jComboBoxBinding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            vdcListBean,
            org.jdesktop.beansbinding.ELProperty.create("${selectedVdc}"),
            cbxVdcs,
            org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
    bindingGroup.addBinding(binding);

    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout.setHorizontalGroup(
        jPanel4Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel4Layout
                    .createSequentialGroup()
                    .addComponent(jLabel3)
                    .addGap(0, 0, Short.MAX_VALUE))
            .addComponent(cbxVdcs, 0, 139, Short.MAX_VALUE));
    jPanel4Layout.setVerticalGroup(
        jPanel4Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel4Layout
                    .createSequentialGroup()
                    .addComponent(jLabel3)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        cbxVdcs,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 16, Short.MAX_VALUE)));

    jLabel4.setText("Ward No.");

    javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
    jPanel5.setLayout(jPanel5Layout);
    jPanel5Layout.setHorizontalGroup(
        jPanel5Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel5Layout
                    .createSequentialGroup()
                    .addComponent(jLabel4)
                    .addGap(0, 93, Short.MAX_VALUE))
            .addComponent(txtWardNo));
    jPanel5Layout.setVerticalGroup(
        jPanel5Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel5Layout
                    .createSequentialGroup()
                    .addComponent(jLabel4)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        txtWardNo,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 17, Short.MAX_VALUE)));

    jLabel5.setText("Parcel No.");

    javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
    jPanel6.setLayout(jPanel6Layout);
    jPanel6Layout.setHorizontalGroup(
        jPanel6Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel6Layout
                    .createSequentialGroup()
                    .addComponent(jLabel5)
                    .addGap(0, 90, Short.MAX_VALUE))
            .addComponent(txtParcelNo));
    jPanel6Layout.setVerticalGroup(
        jPanel6Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel6Layout
                    .createSequentialGroup()
                    .addComponent(jLabel5)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        txtParcelNo,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 17, Short.MAX_VALUE)));

    btnCreate.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/images/common/create.png"))); // NOI18N
    btnCreate.setText("Create & Close");
    btnCreate.setFocusable(false);
    btnCreate.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnCreate.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCreateActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(
                                                layout
                                                    .createSequentialGroup()
                                                    .addComponent(
                                                        jPanel1,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGap(18, 18, 18)
                                                    .addComponent(
                                                        jPanel4,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGroup(
                                                layout
                                                    .createSequentialGroup()
                                                    .addComponent(
                                                        jPanel5,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGap(18, 18, 18)
                                                    .addComponent(
                                                        jPanel6,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                layout
                                    .createSequentialGroup()
                                    .addGap(0, 0, Short.MAX_VALUE)
                                    .addComponent(btnCreate)))
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(
                                jPanel1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                jPanel4,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                jPanel5,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                jPanel6,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(btnCreate)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    bindingGroup.bind();

    pack();
  } // </editor-fold>//GEN-END:initComponents
Exemplo n.º 8
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("proyectoPU")
                .createEntityManager();
    query =
        java.beans.Beans.isDesignTime()
            ? null
            : entityManager.createQuery("SELECT p FROM Proveedor p");
    list =
        java.beans.Beans.isDesignTime()
            ? java.util.Collections.emptyList()
            : org.jdesktop.observablecollections.ObservableCollections.observableList(
                query.getResultList());
    categoriaArticuloQuery =
        java.beans.Beans.isDesignTime()
            ? null
            : entityManager.createQuery("SELECT c FROM CategoriaArticulo c");
    categoriaArticuloList =
        java.beans.Beans.isDesignTime()
            ? java.util.Collections.emptyList()
            : categoriaArticuloQuery.getResultList();
    jPanel1 = new javax.swing.JPanel();
    tf_telef = new javax.swing.JTextField();
    tf_email = new javax.swing.JTextField();
    lbl_direccion = new javax.swing.JLabel();
    lbl_ruc = new javax.swing.JLabel();
    tf_ruc = new javax.swing.JTextField();
    tf_cedula = new javax.swing.JTextField();
    lbl_email = new javax.swing.JLabel();
    tf_direccion = new javax.swing.JTextField();
    lbl_razonSocial = new javax.swing.JLabel();
    lbl_telef = new javax.swing.JLabel();
    tf_razonSocial = new javax.swing.JTextField();
    lbl_apellido1 = new javax.swing.JLabel();
    jLabel1 = new javax.swing.JLabel();
    combotipo = new javax.swing.JComboBox();
    lbl_cedula1 = new javax.swing.JLabel();
    lbl_telef1 = new javax.swing.JLabel();
    combo_cat = new javax.swing.JComboBox();
    jPanel2 = new javax.swing.JPanel();
    btn_cancelar = new javax.swing.JButton();
    btn_guardar = new javax.swing.JButton();
    jPanel3 = new javax.swing.JPanel();
    lbl_registrarC = new javax.swing.JLabel();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setResizable(false);

    jPanel1.setBackground(new java.awt.Color(204, 204, 204));
    jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    tf_telef.addKeyListener(
        new java.awt.event.KeyAdapter() {
          public void keyTyped(java.awt.event.KeyEvent evt) {
            tf_telefKeyTyped(evt);
          }
        });

    tf_email.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            tf_emailActionPerformed(evt);
          }
        });
    tf_email.addKeyListener(
        new java.awt.event.KeyAdapter() {
          public void keyTyped(java.awt.event.KeyEvent evt) {
            tf_emailKeyTyped(evt);
          }
        });

    lbl_direccion.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N
    lbl_direccion.setText("Dirección:");

    lbl_ruc.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N
    lbl_ruc.setText("RUC:");

    tf_ruc.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            tf_rucActionPerformed(evt);
          }
        });
    tf_ruc.addFocusListener(
        new java.awt.event.FocusAdapter() {
          public void focusLost(java.awt.event.FocusEvent evt) {
            tf_rucFocusLost(evt);
          }
        });
    tf_ruc.addKeyListener(
        new java.awt.event.KeyAdapter() {
          public void keyTyped(java.awt.event.KeyEvent evt) {
            tf_rucKeyTyped(evt);
          }
        });

    tf_cedula.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            tf_cedulaActionPerformed(evt);
          }
        });
    tf_cedula.addFocusListener(
        new java.awt.event.FocusAdapter() {
          public void focusLost(java.awt.event.FocusEvent evt) {
            tf_cedulaFocusLost(evt);
          }
        });
    tf_cedula.addKeyListener(
        new java.awt.event.KeyAdapter() {
          public void keyTyped(java.awt.event.KeyEvent evt) {
            tf_cedulaKeyTyped(evt);
          }
        });

    lbl_email.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N
    lbl_email.setText("Email:");

    tf_direccion.addKeyListener(
        new java.awt.event.KeyAdapter() {
          public void keyTyped(java.awt.event.KeyEvent evt) {
            tf_direccionKeyTyped(evt);
          }
        });

    lbl_razonSocial.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N
    lbl_razonSocial.setText("Razon Social:");

    lbl_telef.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N
    lbl_telef.setText("Teléfono:");

    tf_razonSocial.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            tf_razonSocialActionPerformed(evt);
          }
        });
    tf_razonSocial.addKeyListener(
        new java.awt.event.KeyAdapter() {
          public void keyTyped(java.awt.event.KeyEvent evt) {
            tf_razonSocialKeyTyped(evt);
          }
        });

    lbl_apellido1.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N
    lbl_apellido1.setText("Tipo");

    jLabel1.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N
    jLabel1.setText("'N': Natural o 'J': Juridico");

    combotipo.setModel(new javax.swing.DefaultComboBoxModel(new String[] {"N", "J"}));
    combotipo.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            combotipoMouseClicked(evt);
          }
        });
    combotipo.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            combotipoActionPerformed(evt);
          }
        });

    lbl_cedula1.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N
    lbl_cedula1.setText("Cedula:");

    lbl_telef1.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N
    lbl_telef1.setText("Categoria Proveedor:");

    org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            categoriaArticuloList,
            combo_cat);
    bindingGroup.addBinding(jComboBoxBinding);

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbl_razonSocial)
                            .addComponent(lbl_ruc)
                            .addComponent(lbl_apellido1)
                            .addComponent(lbl_cedula1)
                            .addComponent(lbl_telef1))
                    .addGap(32, 32, 32)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        jPanel1Layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(
                                                tf_razonSocial,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                146,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGroup(
                                                jPanel1Layout
                                                    .createSequentialGroup()
                                                    .addComponent(
                                                        combotipo,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(
                                                        javax.swing.LayoutStyle.ComponentPlacement
                                                            .RELATED)
                                                    .addComponent(jLabel1))
                                            .addComponent(
                                                tf_ruc,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                102,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                tf_cedula,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                102,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(
                                        jPanel1Layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(
                                                jPanel1Layout
                                                    .createSequentialGroup()
                                                    .addGap(49, 49, 49)
                                                    .addGroup(
                                                        jPanel1Layout
                                                            .createParallelGroup(
                                                                javax.swing.GroupLayout.Alignment
                                                                    .LEADING)
                                                            .addComponent(lbl_email)
                                                            .addComponent(lbl_direccion)))
                                            .addGroup(
                                                javax.swing.GroupLayout.Alignment.TRAILING,
                                                jPanel1Layout
                                                    .createSequentialGroup()
                                                    .addPreferredGap(
                                                        javax.swing.LayoutStyle.ComponentPlacement
                                                            .RELATED)
                                                    .addComponent(lbl_telef))))
                            .addComponent(
                                combo_cat,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                171,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED, 75, Short.MAX_VALUE)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                tf_email,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                161,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                tf_direccion,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                161,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                tf_telef,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                122,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(20, 20, 20)));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addGap(19, 19, 19)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbl_apellido1)
                            .addComponent(jLabel1)
                            .addComponent(
                                combotipo,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(26, 26, 26)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                tf_email,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lbl_email)
                            .addComponent(lbl_razonSocial)
                            .addComponent(
                                tf_razonSocial,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                tf_ruc,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lbl_ruc)
                            .addComponent(lbl_direccion)
                            .addComponent(
                                tf_direccion,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(21, 21, 21)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                tf_cedula,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lbl_cedula1)
                            .addComponent(
                                tf_telef,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lbl_telef))
                    .addGap(18, 18, 18)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                combo_cat,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lbl_telef1))
                    .addContainerGap(36, Short.MAX_VALUE)));

    jPanel2.setBackground(new java.awt.Color(204, 204, 204));
    jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    btn_cancelar.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/imagenes/delete.png"))); // NOI18N
    btn_cancelar.setText("Cancelar");
    btn_cancelar.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btn_cancelarActionPerformed(evt);
          }
        });

    btn_guardar.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/imagenes/guardar.png"))); // NOI18N
    btn_guardar.setText("Guardar");
    btn_guardar.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btn_guardarActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel2Layout
                    .createSequentialGroup()
                    .addGap(34, 34, 34)
                    .addComponent(btn_guardar)
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED, 63, Short.MAX_VALUE)
                    .addComponent(btn_cancelar)
                    .addGap(34, 34, 34)));
    jPanel2Layout.setVerticalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel2Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                jPanel2Layout
                                    .createSequentialGroup()
                                    .addComponent(btn_cancelar)
                                    .addGap(0, 0, Short.MAX_VALUE))
                            .addComponent(
                                btn_guardar,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addContainerGap()));

    jPanel3.setBackground(new java.awt.Color(0, 153, 255));
    jPanel3.setBorder(
        javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));

    lbl_registrarC.setFont(new java.awt.Font("Corbel", 1, 30)); // NOI18N
    lbl_registrarC.setForeground(new java.awt.Color(255, 255, 255));
    lbl_registrarC.setText("Crear Proveedor");

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(
        jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel3Layout
                    .createSequentialGroup()
                    .addGap(128, 128, 128)
                    .addComponent(lbl_registrarC)
                    .addContainerGap(226, Short.MAX_VALUE)));
    jPanel3Layout.setVerticalGroup(
        jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel3Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(lbl_registrarC)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(
                                        jPanel1,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        Short.MAX_VALUE))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGap(64, 64, 64)
                                    .addComponent(
                                        jPanel3,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap())
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(132, 132, 132)
                    .addComponent(
                        jPanel2,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addGap(20, 20, 20)
                    .addComponent(
                        jPanel3,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(29, 29, 29)
                    .addComponent(
                        jPanel1,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)
                    .addGap(18, 18, 18)
                    .addComponent(
                        jPanel2,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(32, 32, 32)));

    bindingGroup.bind();

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

    BankingAppPUEntityManager =
        javax.persistence.Persistence.createEntityManagerFactory("BankingAppPU")
            .createEntityManager();
    headTypesQuery = BankingAppPUEntityManager.createQuery("SELECT h FROM HeadTypes h");
    headTypesList = headTypesQuery.getResultList();
    saveFileChooser = new javax.swing.JFileChooser();
    jScrollPane2 = new javax.swing.JScrollPane();
    jTable1 = new javax.swing.JTable();
    jButton1 = new javax.swing.JButton();
    fromSpinner = new javax.swing.JSpinner();
    toSpinner = new javax.swing.JSpinner();
    jButton2 = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    jLabel5 = new javax.swing.JLabel();
    catCombo = new javax.swing.JComboBox();
    jButton3 = new javax.swing.JButton();

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

    setClosable(true);
    setMaximizable(true);
    org.jdesktop.application.ResourceMap resourceMap =
        org.jdesktop.application.Application.getInstance(bankingapp.BankingApp.class)
            .getContext()
            .getResourceMap(ReportAssetLiabilityProfitLoss.class);
    setTitle(resourceMap.getString("Form.title")); // NOI18N
    setName("Form"); // NOI18N

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

    jTable1.setModel(
        new javax.swing.table.DefaultTableModel(
            new Object[][] {
              {null, null, null, null},
              {null, null, null, null},
              {null, null, null, null},
              {null, null, null, null}
            },
            new String[] {"Title 1", "Title 2", "Title 3", "Title 4"}));
    jTable1.setName("jTable1"); // NOI18N
    jScrollPane2.setViewportView(jTable1);

    jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
    jButton1.setName("jButton1"); // NOI18N
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });

    fromSpinner.setModel(
        new javax.swing.SpinnerDateModel(
            new java.util.Date(946742400000L), null, null, java.util.Calendar.MONTH));
    fromSpinner.setEditor(new javax.swing.JSpinner.DateEditor(fromSpinner, "dd-MM-yyyy"));
    fromSpinner.setName("fromSpinner"); // NOI18N

    toSpinner.setModel(new javax.swing.SpinnerDateModel());
    toSpinner.setEditor(new javax.swing.JSpinner.DateEditor(toSpinner, "dd-MM-yyyy"));
    toSpinner.setName("toSpinner"); // NOI18N

    javax.swing.ActionMap actionMap =
        org.jdesktop.application.Application.getInstance(bankingapp.BankingApp.class)
            .getContext()
            .getActionMap(ReportAssetLiabilityProfitLoss.class, this);
    jButton2.setAction(actionMap.get("populateDated")); // NOI18N
    jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
    jButton2.setName("jButton2"); // NOI18N

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

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

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

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

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

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

    org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            headTypesList,
            catCombo);
    bindingGroup.addBinding(jComboBoxBinding);

    catCombo.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            catComboActionPerformed(evt);
          }
        });

    jButton3.setAction(actionMap.get("exportToExcel")); // NOI18N
    jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N
    jButton3.setName("jButton3"); // NOI18N

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(
                                        jScrollPane2,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        655,
                                        Short.MAX_VALUE))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(
                                                layout
                                                    .createSequentialGroup()
                                                    .addGap(47, 47, 47)
                                                    .addComponent(jLabel1)
                                                    .addGap(149, 149, 149)
                                                    .addComponent(jLabel2))
                                            .addGroup(
                                                layout
                                                    .createSequentialGroup()
                                                    .addGap(25, 25, 25)
                                                    .addComponent(jLabel3)
                                                    .addGap(18, 18, 18)
                                                    .addComponent(
                                                        fromSpinner,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(
                                                        javax.swing.LayoutStyle.ComponentPlacement
                                                            .RELATED)
                                                    .addComponent(jLabel4)
                                                    .addPreferredGap(
                                                        javax.swing.LayoutStyle.ComponentPlacement
                                                            .RELATED)
                                                    .addComponent(
                                                        toSpinner,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGap(18, 18, 18)
                                    .addComponent(jButton2)
                                    .addGap(33, 33, 33)
                                    .addComponent(jLabel5)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(
                                        catCombo,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                        23,
                                        Short.MAX_VALUE)
                                    .addComponent(jButton3)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jButton1)))
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addContainerGap(47, Short.MAX_VALUE)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jButton1)
                                            .addComponent(jButton3))
                                    .addGap(35, 35, 35))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel1)
                                            .addComponent(jLabel2)
                                            .addComponent(
                                                toSpinner,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                fromSpinner,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel3)
                                            .addComponent(jLabel4)
                                            .addComponent(jButton2)
                                            .addComponent(jLabel5)
                                            .addComponent(
                                                catCombo,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGap(18, 18, 18)))
                    .addComponent(
                        jScrollPane2,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        415,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(37, 37, 37)));

    bindingGroup.bind();

    pack();
  } // </editor-fold>//GEN-END:initComponents
Exemplo n.º 10
0
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

    cadastreObjectBean1 = createCadastreBean();
    cadastreObjectTypeListBean1 =
        new org.sola.clients.beans.referencedata.CadastreObjectTypeListBean();
    landUseTypeListBean1 = new org.sola.clients.beans.referencedata.LandUseTypeListBean();
    popUpAddresses = new javax.swing.JPopupMenu();
    menuAdd1 = new org.sola.clients.swing.common.menuitems.MenuAdd();
    menuEdit1 = new org.sola.clients.swing.common.menuitems.MenuEdit();
    menuRemove1 = new org.sola.clients.swing.common.menuitems.MenuRemove();
    lgaTypeListBean1 = new org.sola.clients.beans.referencedata.LgaTypeListBean();
    zoneTypeListBean1 = new org.sola.clients.beans.referencedata.ZoneTypeListBean();
    jPanel1 = new javax.swing.JPanel();
    jPanel9 = new javax.swing.JPanel();
    jLabel3 = new javax.swing.JLabel();
    txtPlot = new javax.swing.JTextField();
    jPanel5 = new javax.swing.JPanel();
    jLabel9 = new javax.swing.JLabel();
    txtParcelSurveyRef = new javax.swing.JTextField();
    jPanel8 = new javax.swing.JPanel();
    jLabel2 = new javax.swing.JLabel();
    txtBlock = new javax.swing.JTextField();
    jPanel4 = new javax.swing.JPanel();
    jLabel10 = new javax.swing.JLabel();
    cbxParcelEstateType = new javax.swing.JComboBox();
    jPanel7 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    txtArea = new javax.swing.JFormattedTextField();
    jPanel6 = new javax.swing.JPanel();
    labLandUse = new javax.swing.JLabel();
    cbxLandUse = new javax.swing.JComboBox();
    jPanel11 = new javax.swing.JPanel();
    jLabel4 = new javax.swing.JLabel();
    jComboBox1 = new javax.swing.JComboBox();
    jPanel13 = new javax.swing.JPanel();
    jLabel6 = new javax.swing.JLabel();
    jTextField3 = new javax.swing.JTextField();
    jPanel2 = new javax.swing.JPanel();
    jLabel17 = new javax.swing.JLabel();
    txtParcelFirstPart = new javax.swing.JTextField();
    jPanel3 = new javax.swing.JPanel();
    jLabel7 = new javax.swing.JLabel();
    txtParcelLastPart = new javax.swing.JTextField();
    jPanel12 = new javax.swing.JPanel();
    jPanel14 = new javax.swing.JPanel();
    jToolBar1 = new javax.swing.JToolBar();
    btnAdd1 = new org.sola.clients.swing.common.buttons.BtnAdd();
    btnEdit1 = new org.sola.clients.swing.common.buttons.BtnEdit();
    btnRemove1 = new org.sola.clients.swing.common.buttons.BtnRemove();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTableWithDefaultStyles1 = new org.sola.clients.swing.common.controls.JTableWithDefaultStyles();
    groupPanel1 = new org.sola.clients.swing.ui.GroupPanel();

    java.util.ResourceBundle bundle =
        java.util.ResourceBundle.getBundle("org/sola/clients/swing/ui/cadastre/Bundle"); // NOI18N
    popUpAddresses.setName(bundle.getString("ParcelPanel.popUpAddresses.name")); // NOI18N

    menuAdd1.setName(bundle.getString("ParcelPanel.menuAdd1.name")); // NOI18N
    menuAdd1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuAdd1ActionPerformed(evt);
          }
        });
    popUpAddresses.add(menuAdd1);

    menuEdit1.setName(bundle.getString("ParcelPanel.menuEdit1.name")); // NOI18N
    menuEdit1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuEdit1ActionPerformed(evt);
          }
        });
    popUpAddresses.add(menuEdit1);

    menuRemove1.setName(bundle.getString("ParcelPanel.menuRemove1.name")); // NOI18N
    menuRemove1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            menuRemove1ActionPerformed(evt);
          }
        });
    popUpAddresses.add(menuRemove1);

    setName("Form"); // NOI18N

    jPanel1.setName(bundle.getString("ParcelPanel.jPanel1.name")); // NOI18N
    jPanel1.setLayout(new java.awt.GridLayout(3, 3, 15, 15));

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

    jLabel3.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/images/common/red_asterisk.gif"))); // NOI18N
    jLabel3.setText(bundle.getString("ParcelPanel.jLabel3.text")); // NOI18N
    jLabel3.setName("jLabel3"); // NOI18N

    txtPlot.setText(bundle.getString("ParcelPanel.txtPlot.text")); // NOI18N
    txtPlot.setName("txtPlot"); // NOI18N

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

    org.jdesktop.layout.GroupLayout jPanel9Layout = new org.jdesktop.layout.GroupLayout(jPanel9);
    jPanel9.setLayout(jPanel9Layout);
    jPanel9Layout.setHorizontalGroup(
        jPanel9Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(txtPlot)
            .add(
                jLabel3,
                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                Short.MAX_VALUE));
    jPanel9Layout.setVerticalGroup(
        jPanel9Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel9Layout
                    .createSequentialGroup()
                    .add(jLabel3)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        txtPlot,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(0, 18, Short.MAX_VALUE)));

    jPanel1.add(jPanel9);

    jPanel5.setName(bundle.getString("ParcelPanel.jPanel5.name")); // NOI18N

    jLabel9.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/images/common/red_asterisk.gif"))); // NOI18N
    jLabel9.setText(bundle.getString("ParcelPanel.jLabel9.text")); // NOI18N
    jLabel9.setName("jLabel9"); // NOI18N

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

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

    org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5);
    jPanel5.setLayout(jPanel5Layout);
    jPanel5Layout.setHorizontalGroup(
        jPanel5Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(txtParcelSurveyRef)
            .add(
                jLabel9,
                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                Short.MAX_VALUE));
    jPanel5Layout.setVerticalGroup(
        jPanel5Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel5Layout
                    .createSequentialGroup()
                    .add(jLabel9)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        txtParcelSurveyRef,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));

    jPanel1.add(jPanel5);

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

    jLabel2.setText(bundle.getString("ParcelPanel.jLabel2.text")); // NOI18N
    jLabel2.setName("jLabel2"); // NOI18N

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

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

    org.jdesktop.layout.GroupLayout jPanel8Layout = new org.jdesktop.layout.GroupLayout(jPanel8);
    jPanel8.setLayout(jPanel8Layout);
    jPanel8Layout.setHorizontalGroup(
        jPanel8Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(txtBlock, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
            .add(
                jLabel2,
                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                Short.MAX_VALUE));
    jPanel8Layout.setVerticalGroup(
        jPanel8Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel8Layout
                    .createSequentialGroup()
                    .add(jLabel2)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        txtBlock,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(0, 18, Short.MAX_VALUE)));

    jPanel1.add(jPanel8);

    jPanel4.setName(bundle.getString("ParcelPanel.jPanel4.name")); // NOI18N

    jLabel10.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/images/common/red_asterisk.gif"))); // NOI18N
    jLabel10.setText(bundle.getString("ParcelPanel.jLabel10.text")); // NOI18N
    jLabel10.setName("jLabel10"); // NOI18N

    cbxParcelEstateType.setName("cbxParcelEstateType"); // NOI18N
    cbxParcelEstateType.setRenderer(new SimpleComboBoxRenderer("getDisplayValue"));

    org.jdesktop.beansbinding.ELProperty eLProperty =
        org.jdesktop.beansbinding.ELProperty.create("${cadastreObjectTypeList}");
    org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            cadastreObjectTypeListBean1,
            eLProperty,
            cbxParcelEstateType);
    bindingGroup.addBinding(jComboBoxBinding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            cadastreObjectBean1,
            org.jdesktop.beansbinding.ELProperty.create("${cadastreObjectType}"),
            cbxParcelEstateType,
            org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
    bindingGroup.addBinding(binding);

    org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout.setHorizontalGroup(
        jPanel4Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel4Layout.createSequentialGroup().add(jLabel10).add(0, 88, Short.MAX_VALUE))
            .add(
                cbxParcelEstateType,
                0,
                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                Short.MAX_VALUE));
    jPanel4Layout.setVerticalGroup(
        jPanel4Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel4Layout
                    .createSequentialGroup()
                    .add(jLabel10)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        cbxParcelEstateType,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(0, 0, Short.MAX_VALUE)));

    jPanel1.add(jPanel4);

    jPanel7.setName(bundle.getString("ParcelPanel.jPanel7.name")); // NOI18N

    jLabel1.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/images/common/red_asterisk.gif"))); // NOI18N
    jLabel1.setText(bundle.getString("ParcelPanel.jLabel1.text")); // NOI18N
    jLabel1.setName(bundle.getString("ParcelPanel.jLabel1.name")); // NOI18N

    txtArea.setFormatterFactory(FormattersFactory.getInstance().getDecimalFormatterFactory());
    txtArea.setText(bundle.getString("ParcelPanel.txtArea.text")); // NOI18N
    txtArea.setName(bundle.getString("ParcelPanel.txtArea.name")); // NOI18N

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

    org.jdesktop.layout.GroupLayout jPanel7Layout = new org.jdesktop.layout.GroupLayout(jPanel7);
    jPanel7.setLayout(jPanel7Layout);
    jPanel7Layout.setHorizontalGroup(
        jPanel7Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel7Layout
                    .createSequentialGroup()
                    .add(jLabel1)
                    .addContainerGap(64, Short.MAX_VALUE))
            .add(txtArea));
    jPanel7Layout.setVerticalGroup(
        jPanel7Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel7Layout
                    .createSequentialGroup()
                    .add(jLabel1)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        txtArea,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)));

    jPanel1.add(jPanel7);

    jPanel6.setName(bundle.getString("ParcelPanel.jPanel6.name")); // NOI18N

    labLandUse.setText(bundle.getString("ParcelPanel.labLandUse.text")); // NOI18N
    labLandUse.setName(bundle.getString("ParcelPanel.labLandUse.name")); // NOI18N

    cbxLandUse.setName(bundle.getString("ParcelPanel.cbxLandUse.name")); // NOI18N

    eLProperty = org.jdesktop.beansbinding.ELProperty.create("${landUseTypeList}");
    jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            landUseTypeListBean1,
            eLProperty,
            cbxLandUse);
    bindingGroup.addBinding(jComboBoxBinding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            cadastreObjectBean1,
            org.jdesktop.beansbinding.ELProperty.create("${landUseType}"),
            cbxLandUse,
            org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
    bindingGroup.addBinding(binding);

    org.jdesktop.layout.GroupLayout jPanel6Layout = new org.jdesktop.layout.GroupLayout(jPanel6);
    jPanel6.setLayout(jPanel6Layout);
    jPanel6Layout.setHorizontalGroup(
        jPanel6Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel6Layout.createSequentialGroup().add(labLandUse).add(0, 82, Short.MAX_VALUE))
            .add(cbxLandUse, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
    jPanel6Layout.setVerticalGroup(
        jPanel6Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel6Layout
                    .createSequentialGroup()
                    .add(labLandUse)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        cbxLandUse,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(0, 0, Short.MAX_VALUE)));

    jPanel1.add(jPanel6);

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

    jLabel4.setText(bundle.getString("ParcelPanel.jLabel4.text")); // NOI18N
    jLabel4.setName("jLabel4"); // NOI18N

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

    eLProperty = org.jdesktop.beansbinding.ELProperty.create("${lgaTypeList}");
    jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            lgaTypeListBean1,
            eLProperty,
            jComboBox1);
    bindingGroup.addBinding(jComboBoxBinding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            lgaTypeListBean1,
            org.jdesktop.beansbinding.ELProperty.create("${selectedLgaType}"),
            jComboBox1,
            org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
    bindingGroup.addBinding(binding);

    org.jdesktop.layout.GroupLayout jPanel11Layout = new org.jdesktop.layout.GroupLayout(jPanel11);
    jPanel11.setLayout(jPanel11Layout);
    jPanel11Layout.setHorizontalGroup(
        jPanel11Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel11Layout.createSequentialGroup().add(jLabel4).add(0, 0, Short.MAX_VALUE))
            .add(jComboBox1, 0, 126, Short.MAX_VALUE));
    jPanel11Layout.setVerticalGroup(
        jPanel11Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel11Layout
                    .createSequentialGroup()
                    .add(jLabel4)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        jComboBox1,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(0, 18, Short.MAX_VALUE)));

    jPanel1.add(jPanel11);

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

    jLabel6.setText(bundle.getString("ParcelPanel.jLabel6.text")); // NOI18N
    jLabel6.setName("jLabel6"); // NOI18N

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

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

    org.jdesktop.layout.GroupLayout jPanel13Layout = new org.jdesktop.layout.GroupLayout(jPanel13);
    jPanel13.setLayout(jPanel13Layout);
    jPanel13Layout.setHorizontalGroup(
        jPanel13Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel13Layout.createSequentialGroup().add(jLabel6).add(0, 59, Short.MAX_VALUE))
            .add(jTextField3));
    jPanel13Layout.setVerticalGroup(
        jPanel13Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel13Layout
                    .createSequentialGroup()
                    .add(jLabel6)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        jTextField3,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(0, 18, Short.MAX_VALUE)));

    jPanel1.add(jPanel13);

    jPanel2.setName(bundle.getString("ParcelPanel.jPanel2.name")); // NOI18N

    jLabel17.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/images/common/red_asterisk.gif"))); // NOI18N
    jLabel17.setText(bundle.getString("ParcelPanel.jLabel17.text")); // NOI18N
    jLabel17.setName("jLabel17"); // NOI18N

    txtParcelFirstPart.setEditable(false);
    txtParcelFirstPart.setName("txtParcelFirstPart"); // NOI18N

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

    org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
        jPanel2Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup().add(jLabel17).add(0, 68, Short.MAX_VALUE))
            .add(txtParcelFirstPart));
    jPanel2Layout.setVerticalGroup(
        jPanel2Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel2Layout
                    .createSequentialGroup()
                    .add(jLabel17)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        txtParcelFirstPart,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(0, 0, Short.MAX_VALUE)));

    jPanel1.add(jPanel2);

    jPanel3.setName(bundle.getString("ParcelPanel.jPanel3.name")); // NOI18N

    jLabel7.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/images/common/red_asterisk.gif"))); // NOI18N
    jLabel7.setText(bundle.getString("ParcelPanel.jLabel7.text")); // NOI18N
    jLabel7.setName("jLabel7"); // NOI18N

    txtParcelLastPart.setEditable(false);
    txtParcelLastPart.setName("txtParcelLastPart"); // NOI18N

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

    org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(
        jPanel3Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel3Layout.createSequentialGroup().add(jLabel7).add(0, 69, Short.MAX_VALUE))
            .add(txtParcelLastPart));
    jPanel3Layout.setVerticalGroup(
        jPanel3Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel3Layout
                    .createSequentialGroup()
                    .add(jLabel7)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        txtParcelLastPart,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(0, 0, Short.MAX_VALUE)));

    jPanel1.add(jPanel3);

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

    org.jdesktop.layout.GroupLayout jPanel12Layout = new org.jdesktop.layout.GroupLayout(jPanel12);
    jPanel12.setLayout(jPanel12Layout);
    jPanel12Layout.setHorizontalGroup(
        jPanel12Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 126, Short.MAX_VALUE));
    jPanel12Layout.setVerticalGroup(
        jPanel12Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 58, Short.MAX_VALUE));

    jPanel1.add(jPanel12);

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

    org.jdesktop.layout.GroupLayout jPanel14Layout = new org.jdesktop.layout.GroupLayout(jPanel14);
    jPanel14.setLayout(jPanel14Layout);
    jPanel14Layout.setHorizontalGroup(
        jPanel14Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 126, Short.MAX_VALUE));
    jPanel14Layout.setVerticalGroup(
        jPanel14Layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 58, Short.MAX_VALUE));

    jPanel1.add(jPanel14);

    jToolBar1.setFloatable(false);
    jToolBar1.setRollover(true);
    jToolBar1.setName(bundle.getString("ParcelPanel.jToolBar1.name")); // NOI18N

    btnAdd1.setName(bundle.getString("ParcelPanel.btnAdd1.name")); // NOI18N
    btnAdd1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnAdd1ActionPerformed(evt);
          }
        });
    jToolBar1.add(btnAdd1);

    btnEdit1.setName(bundle.getString("ParcelPanel.btnEdit1.name")); // NOI18N
    btnEdit1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnEdit1ActionPerformed(evt);
          }
        });
    jToolBar1.add(btnEdit1);

    btnRemove1.setName(bundle.getString("ParcelPanel.btnRemove1.name")); // NOI18N
    btnRemove1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnRemove1ActionPerformed(evt);
          }
        });
    jToolBar1.add(btnRemove1);

    jScrollPane1.setName(bundle.getString("ParcelPanel.jScrollPane1.name")); // NOI18N

    jTableWithDefaultStyles1.setName(
        bundle.getString("ParcelPanel.jTableWithDefaultStyles1.name")); // NOI18N

    eLProperty = org.jdesktop.beansbinding.ELProperty.create("${addressFilteredList}");
    org.jdesktop.swingbinding.JTableBinding jTableBinding =
        org.jdesktop.swingbinding.SwingBindings.createJTableBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            cadastreObjectBean1,
            eLProperty,
            jTableWithDefaultStyles1);
    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding =
        jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${description}"));
    columnBinding.setColumnName("Description");
    columnBinding.setColumnClass(String.class);
    columnBinding.setEditable(false);
    bindingGroup.addBinding(jTableBinding);
    jTableBinding.bind();
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            cadastreObjectBean1,
            org.jdesktop.beansbinding.ELProperty.create("${selectedAddress}"),
            jTableWithDefaultStyles1,
            org.jdesktop.beansbinding.BeanProperty.create("selectedElement"));
    bindingGroup.addBinding(binding);

    jScrollPane1.setViewportView(jTableWithDefaultStyles1);
    if (jTableWithDefaultStyles1.getColumnModel().getColumnCount() > 0) {
      jTableWithDefaultStyles1
          .getColumnModel()
          .getColumn(0)
          .setHeaderValue(
              bundle.getString(
                  "ParcelPanel.jTableWithDefaultStyles1.columnModel.title0_1")); // NOI18N
      jTableWithDefaultStyles1
          .getColumnModel()
          .getColumn(0)
          .setCellRenderer(new org.sola.clients.swing.ui.renderers.TableCellTextAreaRenderer());
    }

    groupPanel1.setName(bundle.getString("ParcelPanel.groupPanel1.name")); // NOI18N
    groupPanel1.setTitleText(bundle.getString("ParcelPanel.groupPanel1.titleText")); // NOI18N

    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                jPanel1,
                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                Short.MAX_VALUE)
            .add(
                jToolBar1,
                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                Short.MAX_VALUE)
            .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
            .add(groupPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                layout
                    .createSequentialGroup()
                    .add(
                        jPanel1,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        205,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        groupPanel1,
                        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(
                        jToolBar1,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                        25,
                        org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(
                        jScrollPane1,
                        org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                        173,
                        Short.MAX_VALUE)));

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

    tesisUpecPUEntityManager =
        java.beans.Beans.isDesignTime()
            ? null
            : javax.persistence.Persistence.createEntityManagerFactory("tesisUpecPU")
                .createEntityManager();
    cursoPostgradoQuery =
        java.beans.Beans.isDesignTime()
            ? null
            : tesisUpecPUEntityManager.createQuery("SELECT c FROM CursoPostgrado c");
    cursoPostgradoList =
        java.beans.Beans.isDesignTime()
            ? java.util.Collections.emptyList()
            : org.jdesktop.observablecollections.ObservableCollections.observableList(
                cursoPostgradoQuery.getResultList());
    jPanel1 = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jPanel4 = new javax.swing.JPanel();
    jLabel3 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    jTextField1 = new javax.swing.JTextField();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();
    jPanel5 = new javax.swing.JPanel();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jButton3 = new javax.swing.JButton();
    jButton5 = new javax.swing.JButton();
    jPanel3 = new javax.swing.JPanel();
    jScrollPane2 = new javax.swing.JScrollPane();
    jTable1 = new javax.swing.JTable();
    jLabel5 = new javax.swing.JLabel();
    jComboBox1 = new javax.swing.JComboBox();
    jButton4 = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Gestionar Curso Postgrado");
    setResizable(false);
    addWindowListener(
        new java.awt.event.WindowAdapter() {
          public void windowOpened(java.awt.event.WindowEvent evt) {
            formWindowOpened(evt);
          }
        });

    jPanel1.setBackground(new java.awt.Color(30, 76, 89));

    jPanel2.setBackground(new java.awt.Color(30, 76, 89));

    jLabel1.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/imagenes/banergrande.jpg"))); // NOI18N

    jPanel4.setBackground(new java.awt.Color(255, 255, 255));
    jPanel4.setBorder(
        javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(30, 76, 89)));

    jLabel3.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/imagenes/gestioncursopostgrado.jpg"))); // NOI18N
    jLabel3.setText("jLabel3");

    jLabel2.setText("Tipo de Curso Postgrado:");

    jLabel4.setText("Descripción:");

    jTextField1.addKeyListener(
        new java.awt.event.KeyAdapter() {
          public void keyTyped(java.awt.event.KeyEvent evt) {
            jTextField1KeyTyped(evt);
          }
        });

    jTextArea1.setColumns(20);
    jTextArea1.setRows(5);
    jTextArea1.addKeyListener(
        new java.awt.event.KeyAdapter() {
          public void keyTyped(java.awt.event.KeyEvent evt) {
            jTextArea1KeyTyped(evt);
          }
        });
    jScrollPane1.setViewportView(jTextArea1);

    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout.setHorizontalGroup(
        jPanel4Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel4Layout
                    .createSequentialGroup()
                    .addGap(26, 26, 26)
                    .addGroup(
                        jPanel4Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                jLabel3,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                432,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(
                                jPanel4Layout
                                    .createSequentialGroup()
                                    .addGap(10, 10, 10)
                                    .addGroup(
                                        jPanel4Layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel2)
                                            .addComponent(jLabel4))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        jPanel4Layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(jScrollPane1)
                                            .addComponent(
                                                jTextField1,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                268,
                                                Short.MAX_VALUE))))
                    .addContainerGap(72, Short.MAX_VALUE)));
    jPanel4Layout.setVerticalGroup(
        jPanel4Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel4Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel3)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        jPanel4Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(
                                jTextField1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(
                        jPanel4Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel4)
                            .addComponent(
                                jScrollPane1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                61,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(46, Short.MAX_VALUE)));

    jPanel5.setBackground(new java.awt.Color(255, 255, 255));
    jPanel5.setBorder(
        javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(30, 76, 89)));

    jButton1.setText("Insertar");
    jButton1.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mousePressed(java.awt.event.MouseEvent evt) {
            jButton1MousePressed(evt);
          }
        });

    jButton2.setText("Modificar");
    jButton2.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mousePressed(java.awt.event.MouseEvent evt) {
            jButton2MousePressed(evt);
          }
        });

    jButton3.setText("Eliminar");
    jButton3.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mousePressed(java.awt.event.MouseEvent evt) {
            jButton3MousePressed(evt);
          }
        });

    jButton5.setText("Cancelar");
    jButton5.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mousePressed(java.awt.event.MouseEvent evt) {
            jButton5MousePressed(evt);
          }
        });

    javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
    jPanel5.setLayout(jPanel5Layout);
    jPanel5Layout.setHorizontalGroup(
        jPanel5Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel5Layout
                    .createSequentialGroup()
                    .addGap(111, 111, 111)
                    .addComponent(jButton1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jButton2)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jButton3)
                    .addGap(18, 18, 18)
                    .addComponent(jButton5)
                    .addContainerGap(99, Short.MAX_VALUE)));
    jPanel5Layout.setVerticalGroup(
        jPanel5Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel5Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel5Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton2)
                            .addComponent(jButton1)
                            .addComponent(jButton3)
                            .addComponent(jButton5))
                    .addContainerGap(13, Short.MAX_VALUE)));

    jPanel3.setBackground(new java.awt.Color(255, 255, 255));
    jPanel3.setBorder(
        javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(30, 76, 89)));

    org.jdesktop.swingbinding.JTableBinding jTableBinding =
        org.jdesktop.swingbinding.SwingBindings.createJTableBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            cursoPostgradoList,
            jTable1);
    org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding =
        jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${tipoPostgrado}"));
    columnBinding.setColumnName("Tipo de Postgrado");
    columnBinding.setColumnClass(String.class);
    columnBinding.setEditable(false);
    columnBinding =
        jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${descripcionPostgrado}"));
    columnBinding.setColumnName("Descripción");
    columnBinding.setColumnClass(String.class);
    columnBinding.setEditable(false);
    bindingGroup.addBinding(jTableBinding);
    jTableBinding.bind();
    jScrollPane2.setViewportView(jTable1);

    jLabel5.setText("Cudorso Postgrado:");

    org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            cursoPostgradoList,
            jComboBox1);
    bindingGroup.addBinding(jComboBoxBinding);

    jButton4.setText("Buscar");
    jButton4.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mousePressed(java.awt.event.MouseEvent evt) {
            jButton4MousePressed(evt);
          }
        });

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(
        jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel3Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel5)
                    .addGap(18, 18, 18)
                    .addComponent(
                        jComboBox1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        187,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(51, 51, 51)
                    .addComponent(jButton4)
                    .addContainerGap(103, Short.MAX_VALUE))
            .addComponent(
                jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 530, Short.MAX_VALUE));
    jPanel3Layout.setVerticalGroup(
        jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel3Layout
                    .createSequentialGroup()
                    .addGap(20, 20, 20)
                    .addGroup(
                        jPanel3Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel5)
                            .addComponent(
                                jComboBox1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jButton4))
                    .addGap(18, 18, 18)
                    .addComponent(
                        jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 131, Short.MAX_VALUE)));

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                jPanel3,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                Short.MAX_VALUE)
            .addComponent(
                jPanel5,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                Short.MAX_VALUE)
            .addComponent(
                jPanel4,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                Short.MAX_VALUE)
            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE));
    jPanel2Layout.setVerticalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel2Layout
                    .createSequentialGroup()
                    .addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jPanel4,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jPanel5,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jPanel3,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                jPanel2,
                javax.swing.GroupLayout.PREFERRED_SIZE,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                javax.swing.GroupLayout.PREFERRED_SIZE));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addComponent(
                        jPanel2,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                jPanel1,
                javax.swing.GroupLayout.PREFERRED_SIZE,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                javax.swing.GroupLayout.PREFERRED_SIZE));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                jPanel1,
                javax.swing.GroupLayout.PREFERRED_SIZE,
                629,
                javax.swing.GroupLayout.PREFERRED_SIZE));

    bindingGroup.bind();

    pack();
  } // </editor-fold>//GEN-END:initComponents
Exemplo n.º 12
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();

    jComboBox1 = new javax.swing.JComboBox();
    mapSheetListBean = new org.sola.clients.beans.cadastre.MapSheetListBean();
    landTypeBeanList = new org.sola.clients.beans.referencedata.LandTypeListBean();
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    cboMapSheets = new javax.swing.JComboBox();
    jPanel2 = new javax.swing.JPanel();
    jLabel2 = new javax.swing.JLabel();
    txtFirstPartName = new javax.swing.JTextField();
    jLabel3 = new javax.swing.JLabel();
    txtSecondPartName = new javax.swing.JTextField();
    jLabel4 = new javax.swing.JLabel();
    txtParcelNumber = new javax.swing.JTextField();
    jLabel5 = new javax.swing.JLabel();
    jComboBox2 = new javax.swing.JComboBox();
    jLabel6 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();
    btnSave = new javax.swing.JButton();

    jComboBox1.setModel(
        new javax.swing.DefaultComboBoxModel(
            new String[] {"Item 1", "Item 2", "Item 3", "Item 4"}));

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    addWindowListener(
        new java.awt.event.WindowAdapter() {
          public void windowOpened(java.awt.event.WindowEvent evt) {
            formWindowOpened(evt);
          }
        });

    jLabel1.setText("Map sheet number:");

    org.jdesktop.beansbinding.ELProperty eLProperty =
        org.jdesktop.beansbinding.ELProperty.create("${mapSheets}");
    org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            mapSheetListBean,
            eLProperty,
            cboMapSheets);
    bindingGroup.addBinding(jComboBoxBinding);
    org.jdesktop.beansbinding.Binding binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${parcel.mapSheet}"),
            cboMapSheets,
            org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
    bindingGroup.addBinding(binding);

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addComponent(jLabel1)
                    .addGap(0, 111, Short.MAX_VALUE))
            .addComponent(cboMapSheets, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        cboMapSheets,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jLabel2.setText("First Part Name:");

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

    jLabel3.setText("Last Part Name:");

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

    jLabel4.setText("Parcel Number:");

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

    txtParcelNumber.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            txtParcelNumberActionPerformed(evt);
          }
        });

    jLabel5.setText("Parcel Type:");

    eLProperty = org.jdesktop.beansbinding.ELProperty.create("${landTypes}");
    jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            landTypeBeanList,
            eLProperty,
            jComboBox2);
    bindingGroup.addBinding(jComboBoxBinding);
    binding =
        org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            this,
            org.jdesktop.beansbinding.ELProperty.create("${parcel.landTypeBean}"),
            jComboBox2,
            org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
    bindingGroup.addBinding(binding);

    jLabel6.setText("Parcel Note (Maximum 255 Characters):");

    jTextArea1.setColumns(20);
    jTextArea1.setRows(5);

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

    jScrollPane1.setViewportView(jTextArea1);

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel2Layout
                    .createSequentialGroup()
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(
                                jPanel2Layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        jPanel2Layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(
                                                jPanel2Layout
                                                    .createParallelGroup(
                                                        javax.swing.GroupLayout.Alignment.TRAILING,
                                                        false)
                                                    .addComponent(txtParcelNumber)
                                                    .addComponent(
                                                        jLabel2,
                                                        javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(txtFirstPartName)
                                                    .addComponent(
                                                        jLabel6,
                                                        javax.swing.GroupLayout.Alignment.LEADING,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                                        196,
                                                        Short.MAX_VALUE))
                                            .addComponent(jLabel4))
                                    .addGap(34, 34, 34)
                                    .addGroup(
                                        jPanel2Layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(jLabel3)
                                            .addComponent(txtSecondPartName)
                                            .addComponent(jLabel5)
                                            .addComponent(jComboBox2, 0, 161, Short.MAX_VALUE)))
                            .addComponent(jScrollPane1))
                    .addGap(0, 0, Short.MAX_VALUE)));
    jPanel2Layout.setVerticalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel2Layout
                    .createSequentialGroup()
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(jLabel3))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                txtFirstPartName,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                txtSecondPartName,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(jLabel5))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                txtParcelNumber,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                jComboBox2,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jLabel6)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jScrollPane1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)));

    btnSave.setText("Save");
    btnSave.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSaveActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(
                                btnSave,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                94,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(
                                layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(
                                        jPanel1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(
                                        jPanel2,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        jPanel1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jPanel2,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(btnSave)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    bindingGroup.bind();

    pack();
  } // </editor-fold>//GEN-END:initComponents
Exemplo n.º 13
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();

    rentajetPUEntityManager =
        java.beans.Beans.isDesignTime()
            ? null
            : javax.persistence.Persistence.createEntityManagerFactory("rentajetPU")
                .createEntityManager();
    anredeQuery =
        java.beans.Beans.isDesignTime()
            ? null
            : rentajetPUEntityManager.createQuery("SELECT a FROM Anrede a");
    anredeList =
        java.beans.Beans.isDesignTime()
            ? java.util.Collections.emptyList()
            : anredeQuery.getResultList();
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jTextField1 = new javax.swing.JTextField();
    jTextField2 = new javax.swing.JTextField();
    jTextField3 = new javax.swing.JTextField();
    jButton1 = new javax.swing.JButton();
    jLabel7 = new javax.swing.JLabel();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    jPanel2 = new javax.swing.JPanel();
    jLabel8 = new javax.swing.JLabel();
    jLabel9 = new javax.swing.JLabel();
    jLabel10 = new javax.swing.JLabel();
    jTextField4 = new javax.swing.JTextField();
    jComboBox1 = new javax.swing.JComboBox();
    jTextField5 = new javax.swing.JTextField();
    jPanel3 = new javax.swing.JPanel();
    jLabel4 = new javax.swing.JLabel();
    jLabel5 = new javax.swing.JLabel();
    jLabel6 = new javax.swing.JLabel();
    jTextField6 = new javax.swing.JTextField();
    jTextField7 = new javax.swing.JTextField();
    jTextField8 = new javax.swing.JTextField();
    jToolBar1 = new javax.swing.JToolBar();
    jButton17 = new javax.swing.JButton();
    jSeparator5 = new javax.swing.JToolBar.Separator();
    jButton18 = new javax.swing.JButton();
    jButton19 = new javax.swing.JButton();
    jButton20 = new javax.swing.JButton();
    jButton21 = new javax.swing.JButton();
    jButton22 = new javax.swing.JButton();
    jSeparator6 = new javax.swing.JToolBar.Separator();
    jButton23 = new javax.swing.JButton();
    jButton24 = new javax.swing.JButton();
    jButton25 = new javax.swing.JButton();
    jButton26 = new javax.swing.JButton();
    jSeparator7 = new javax.swing.JToolBar.Separator();
    jButton27 = new javax.swing.JButton();

    jLabel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
    jLabel1.setText("Nummer");

    jLabel2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
    jLabel2.setText("Nachname");

    jLabel3.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
    jLabel3.setText("Kunde");

    jTextField1.addFocusListener(
        new java.awt.event.FocusAdapter() {
          public void focusLost(java.awt.event.FocusEvent evt) {
            jTextField1FocusLost(evt);
          }
        });

    jButton1.setText("...");
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });

    jLabel7.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
    jLabel7.setText(" ");

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(
                                jLabel1,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)
                            .addComponent(
                                jLabel3,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextField2)
                            .addGroup(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        jTextField1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        90,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        jTextField3,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        81,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(
                                        jButton1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        23,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        jLabel7,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        Short.MAX_VALUE)))
                    .addContainerGap()));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(
                                jTextField1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(
                                jTextField2,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(
                                jTextField3,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jButton1)
                            .addComponent(jLabel7))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jLabel8.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
    jLabel8.setText("Anrede");

    jLabel9.setText("Vorname");

    jLabel10.setText("Info");

    jComboBox1.setRenderer(
        new DefaultListCellRenderer() {
          @Override
          public Component getListCellRendererComponent(
              JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
            super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
            if (value instanceof Anrede) {
              Anrede mec = (Anrede) value;
              setText(mec.getBezeichnung());
            }
            return this;
          }
        });

    org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding =
        org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            anredeList,
            jComboBox1);
    bindingGroup.addBinding(jComboBoxBinding);

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel2Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(
                                jLabel8,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)
                            .addComponent(
                                jLabel10,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextField4)
                            .addGroup(
                                jPanel2Layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        jComboBox1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        103,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(0, 148, Short.MAX_VALUE))
                            .addComponent(jTextField5))
                    .addContainerGap()));
    jPanel2Layout.setVerticalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel2Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel8)
                            .addComponent(
                                jComboBox1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel9)
                            .addComponent(
                                jTextField4,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel10)
                            .addComponent(
                                jTextField5,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Anschrift", jPanel2);

    jLabel4.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
    jLabel4.setText("Telefon");

    jLabel5.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
    jLabel5.setText("Telefax");

    jLabel6.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
    jLabel6.setText("Mobil");

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(
        jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel3Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel3Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(
                                jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)
                            .addComponent(
                                jLabel5,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                jLabel6,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        jPanel3Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextField6)
                            .addComponent(jTextField7)
                            .addComponent(
                                jTextField8,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                251,
                                Short.MAX_VALUE))
                    .addContainerGap()));
    jPanel3Layout.setVerticalGroup(
        jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel3Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel3Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(
                                jTextField6,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(
                        jPanel3Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel5)
                            .addComponent(
                                jTextField7,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(
                        jPanel3Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6)
                            .addComponent(
                                jTextField8,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Kommunikation", jPanel3);

    jToolBar1.setRollover(true);

    jButton17.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/de/rentajet/bilder/24/st/drucker_24st.gif"))); // NOI18N
    jButton17.setFocusable(false);
    jButton17.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton17.setName("btnDrucken"); // NOI18N
    jButton17.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton17.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton17ActionPerformed(evt);
          }
        });
    jToolBar1.add(jButton17);
    jToolBar1.add(jSeparator5);

    jButton18.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/de/rentajet/bilder/24/st/vcrbegin_24st.gif"))); // NOI18N
    jButton18.setFocusable(false);
    jButton18.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton18.setName("btnErster"); // NOI18N
    jButton18.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton18.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton18ActionPerformed(evt);
          }
        });
    jToolBar1.add(jButton18);

    jButton19.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/de/rentajet/bilder/24/st/vcrback_24st.gif"))); // NOI18N
    jButton19.setFocusable(false);
    jButton19.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton19.setName("btnVorheriger"); // NOI18N
    jButton19.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton19.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton19ActionPerformed(evt);
          }
        });
    jToolBar1.add(jButton19);

    jButton20.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/de/rentajet/bilder/24/st/vcrforward_24st.gif"))); // NOI18N
    jButton20.setFocusable(false);
    jButton20.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton20.setName("btnNaechster"); // NOI18N
    jButton20.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton20.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton20ActionPerformed(evt);
          }
        });
    jToolBar1.add(jButton20);

    jButton21.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/de/rentajet/bilder/24/st/vcrend_24st.gif"))); // NOI18N
    jButton21.setFocusable(false);
    jButton21.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton21.setName("btnLetzter"); // NOI18N
    jButton21.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton21.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton21ActionPerformed(evt);
          }
        });
    jToolBar1.add(jButton21);

    jButton22.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/de/rentajet/bilder/24/st/row_24st.gif"))); // NOI18N
    jButton22.setFocusable(false);
    jButton22.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton22.setName("btnSuche"); // NOI18N
    jButton22.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton22.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton22ActionPerformed(evt);
          }
        });
    jToolBar1.add(jButton22);
    jToolBar1.add(jSeparator6);

    jButton23.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/de/rentajet/bilder/24/st/save_24st.gif"))); // NOI18N
    jButton23.setFocusable(false);
    jButton23.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton23.setName("btnSpeichern"); // NOI18N
    jButton23.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton23.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton23ActionPerformed(evt);
          }
        });
    jToolBar1.add(jButton23);

    jButton24.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/de/rentajet/bilder/24/st/erase2_24st.gif"))); // NOI18N
    jButton24.setFocusable(false);
    jButton24.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton24.setName("btnAbbrechen"); // NOI18N
    jButton24.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton24.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton24ActionPerformed(evt);
          }
        });
    jToolBar1.add(jButton24);

    jButton25.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/de/rentajet/bilder/24/st/deleterow_24st.gif"))); // NOI18N
    jButton25.setFocusable(false);
    jButton25.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton25.setName("btnLöschen"); // NOI18N
    jButton25.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton25.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton25ActionPerformed(evt);
          }
        });
    jToolBar1.add(jButton25);

    jButton26.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/de/rentajet/bilder/24/st/partie_24st.gif"))); // NOI18N
    jButton26.setFocusable(false);
    jButton26.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton26.setName("btnAktualisieren"); // NOI18N
    jButton26.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton26.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton26ActionPerformed(evt);
          }
        });
    jToolBar1.add(jButton26);
    jToolBar1.add(jSeparator7);

    jButton27.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/de/rentajet/bilder/24/st/schrank1_24st.gif"))); // NOI18N
    jButton27.setFocusable(false);
    jButton27.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton27.setName("btnArchiv"); // NOI18N
    jButton27.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton27.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton27ActionPerformed(evt);
          }
        });
    jToolBar1.add(jButton27);

    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()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jTabbedPane1)
                            .addComponent(
                                jPanel1,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addContainerGap())
            .addComponent(
                jToolBar1,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                Short.MAX_VALUE));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addComponent(
                        jToolBar1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        33,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jPanel1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(
                        jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE)
                    .addContainerGap()));

    bindingGroup.bind();
  } // </editor-fold>//GEN-END:initComponents