Package com.commander4j.gui

Examples of com.commander4j.gui.JButton4j


              }
            }
          }
        }
        {
          jButtonSearch = new JButton4j(Common.icon_search);
          jDesktopPane1.add(jButtonSearch);
          jButtonSearch.setText(lang.get("btn_Search"));
          jButtonSearch.setBounds(-1, 143, 109, 32);
          jButtonSearch.setMnemonic(lang.getMnemonicChar());
          jButtonSearch.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              search();

            }
          });
        }
        {
          jTextFieldMaterial = new JTextField4j();
          jDesktopPane1.add(jTextFieldMaterial);
          jTextFieldMaterial.setBounds(125, 11, 125, 20);
        }
        {
          JLabel4j_std lblInspectionID = new JLabel4j_std(lang.get("lbl_Inspection_ID"));
          lblInspectionID.setBounds(34, 115, 83, 16);
          jDesktopPane1.add(lblInspectionID);
          lblInspectionID.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          textFieldInspectionID = new JTextField4j();
          textFieldInspectionID.setBounds(126, 110, 117, 28);
          jDesktopPane1.add(textFieldInspectionID);
          textFieldInspectionID.setColumns(10);
       
        {
          ComboBoxModel<JDBMaterialType> jComboBox1Model = new DefaultComboBoxModel<JDBMaterialType>(typeList);
          jComboBoxMaterialType = new JComboBox4j<JDBMaterialType>();
          jDesktopPane1.add(jComboBoxMaterialType);
          jComboBoxMaterialType.setModel(jComboBox1Model);
          jComboBoxMaterialType.setBounds(382, 8, 248, 23);
        }
        {
          jTextFieldDescription = new JTextField4j();
          jDesktopPane1.add(jTextFieldDescription);
          jTextFieldDescription.setBounds(126, 44, 506, 20);
        }
        {
          jLabel1 = new JLabel4j_std();
          jLabel1.setHorizontalAlignment(SwingConstants.RIGHT);
          jDesktopPane1.add(jLabel1);
          jLabel1.setText(lang.get("lbl_Material"));
          jLabel1.setBounds(12, 11, 105, 20);
        }
        {
          jLabel2 = new JLabel4j_std();
          jLabel2.setHorizontalAlignment(SwingConstants.RIGHT);
          jDesktopPane1.add(jLabel2);
          jLabel2.setText(lang.get("lbl_Material_Type"));
          jLabel2.setBounds(260, 11, 115, 20);
        }
        {
          jLabel3 = new JLabel4j_std();
          jLabel3.setHorizontalAlignment(SwingConstants.RIGHT);
          jDesktopPane1.add(jLabel3);
          jLabel3.setText(lang.get("lbl_Description"));
          jLabel3.setBounds(12, 44, 106, 20);
        }
        {
          ComboBoxModel<JDBUom> jComboBox2Model = new DefaultComboBoxModel<JDBUom>(uomList);
          jComboBoxBaseUOM = new JComboBox4j<JDBUom>();
          jDesktopPane1.add(jComboBoxBaseUOM);
          jComboBoxBaseUOM.setModel(jComboBox2Model);
          jComboBoxBaseUOM.setBounds(126, 77, 154, 23);
          jComboBoxBaseUOM.setMaximumRowCount(12);
        }
        {
          jLabel4 = new JLabel4j_std();
          jLabel4.setHorizontalAlignment(SwingConstants.RIGHT);
          jDesktopPane1.add(jLabel4);
          jLabel4.setText(lang.get("lbl_Base_UOM"));
          jLabel4.setBounds(12, 80, 106, 20);
        }
        {
          jButtonAdd = new JButton4j(Common.icon_add);
          jDesktopPane1.add(jButtonAdd);
          jButtonAdd.setText(lang.get("btn_Add"));
          jButtonAdd.setBounds(215, 143, 109, 32);
          jButtonAdd.setMnemonic(lang.getMnemonicChar());
          jButtonAdd.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MATERIAL_ADD"));
          jButtonAdd.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              addRecord();
            }
          });
        }
        {
          jButtonEdit = new JButton4j(Common.icon_edit);
          jDesktopPane1.add(jButtonEdit);
          jButtonEdit.setText(lang.get("btn_Edit"));
          jButtonEdit.setBounds(323, 143, 109, 32);
          jButtonEdit.setMnemonic(lang.getMnemonicChar());
          jButtonEdit.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MATERIAL_EDIT"));
          jButtonEdit.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              editRecord();
            }
          });
        }
        {
          jButtonDelete = new JButton4j(Common.icon_delete);
          jDesktopPane1.add(jButtonDelete);
          jButtonDelete.setText(lang.get("btn_Delete"));
          jButtonDelete.setBounds(431, 143, 109, 32);
          jButtonDelete.setMnemonic(lang.getMnemonicChar());
          jButtonDelete.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MATERIAL_DELETE"));
          jButtonDelete.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              deleteRecord();
            }
          });
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setBounds(755, 143, 109, 32);
          jButtonHelp.setMnemonic(lang.getMnemonicChar());
        }
        {
          jLabel7 = new JLabel4j_std();
          jDesktopPane1.add(jLabel7);
          jLabel7.setText(lang.get("lbl_Material_Shelf_Life"));
          jLabel7.setBounds(650, 11, 154, 20);
          jLabel7.setHorizontalAlignment(SwingConstants.RIGHT);
        }
        {
          jTextFieldShelfLife = new JTextField4j();
          jDesktopPane1.add(jTextFieldShelfLife);
          jTextFieldShelfLife.setBounds(812, 11, 125, 20);
        }
        {

          JShelfLifeUom slu = new JShelfLifeUom();
          slu.setUom("");
          slu.setDescription("");
          shelfLifeUomList.add(slu);
          shelfLifeUomList.addAll(slu.getShelfLifeUOMs());
          ComboBoxModel<JShelfLifeUom> jComboBox5Model = new DefaultComboBoxModel<JShelfLifeUom>(shelfLifeUomList);
          jComboBoxShelfLifeUOM = new JComboBox4j<JShelfLifeUom>();
          jDesktopPane1.add(jComboBoxShelfLifeUOM);
          jComboBoxShelfLifeUOM.setModel(jComboBox5Model);
          jComboBoxShelfLifeUOM.setBounds(813, 41, 125, 23);
          jComboBoxShelfLifeUOM.setMaximumRowCount(12);
        }
        {
          jLabel8 = new JLabel4j_std();
          jDesktopPane1.add(jLabel8);
          jLabel8.setText(lang.get("lbl_Material_Shelf_Life_UOM"));
          jLabel8.setBounds(650, 44, 153, 20);
          jLabel8.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jButtonClose = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonClose);
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setBounds(863, 143, 109, 32);
          jButtonClose.setMnemonic(lang.getMnemonicChar());
          jButtonClose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              JDBQuery.closeStatement(listStatement);
              dispose();
            }
          });
        }
        {
          jButtonPrint = new JButton4j(Common.icon_report);
          jDesktopPane1.add(jButtonPrint);
          jButtonPrint.setText(lang.get("btn_Print"));
          jButtonPrint.setBounds(539, 143, 109, 32);
          jButtonPrint.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_MATERIALS"));
          jButtonPrint.setMnemonic(lang.getMnemonicChar());
          jButtonPrint.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              print();
            }
          });
        }
        {
          JShelfLifeRoundingRule slrr = new JShelfLifeRoundingRule();
          slrr.setRule("");
          slrr.setDescription("");
          shelfLifeRule.add(slrr);
          shelfLifeRule.addAll(slrr.getShelfLifeRoundingRules());
          ComboBoxModel<JShelfLifeRoundingRule> jComboBoxRoundingRuleModel = new DefaultComboBoxModel<JShelfLifeRoundingRule>(shelfLifeRule);
          jComboBoxRoundingRule = new JComboBox4j<JShelfLifeRoundingRule>();
          jDesktopPane1.add(jComboBoxRoundingRule);
          jComboBoxRoundingRule.setModel(jComboBoxRoundingRuleModel);
          jComboBoxRoundingRule.setBounds(814, 77, 125, 23);
        }
        {
          jLabel9 = new JLabel4j_std();
          jDesktopPane1.add(jLabel9);
          jLabel9.setText(lang.get("lbl_Material_Shelf_Life_Rounding_Rule"));
          jLabel9.setBounds(650, 80, 157, 20);
          jLabel9.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jLabel10 = new JLabel4j_std();
          jDesktopPane1.add(jLabel10);
          jLabel10.setText(lang.get("lbl_Sort_By"));
          jLabel10.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel10.setBounds(358, 110, 98, 20);
        }
        {
          ComboBoxModel<String> jComboBoxSortByModel = new DefaultComboBoxModel<String>(new String[] { "MATERIAL", "MATERIAL_TYPE", "DESCRIPTION", "BASE_UOM", "PRODUCTION_UOM", "ISSUE_UOM", "SHELF_LIFE", "SHELF_LIFE_RULE", "DEFAULT_PALLET_STATUS",
              "DEFAULT_BATCH_STATUS" });
          jComboBoxSortBy = new JComboBox4j<String>();
          jDesktopPane1.add(jComboBoxSortBy);
          jComboBoxSortBy.setModel(jComboBoxSortByModel);
          jComboBoxSortBy.setBounds(464, 110, 168, 23);
        }
        {
          jLabel12 = new JLabel4j_std();
          jDesktopPane1.add(jLabel12);
          jLabel12.setText(lang.get("lbl_Material_Default_Batch_Status"));
          jLabel12.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel12.setBounds(383, 80, 112, 20);
        }
        {
          ComboBoxModel<String> jComboBoxDefaultBatchStatusModel = new DefaultComboBoxModel<String>(Common.batchStatusIncBlank);
          jComboBoxDefaultBatchStatus = new JComboBox4j<String>();
          jDesktopPane1.add(jComboBoxDefaultBatchStatus);
          jComboBoxDefaultBatchStatus.setModel(jComboBoxDefaultBatchStatusModel);
          jComboBoxDefaultBatchStatus.setBounds(505, 77, 126, 23);
        }
        {
          jToggleButtonSequence = new JToggleButton();
          jDesktopPane1.add(jToggleButtonSequence);
          jToggleButtonSequence.setBounds(639, 110, 21, 21);
          jToggleButtonSequence.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              setSequence(jToggleButtonSequence.isSelected());
            }
          });
        }

        {
          jStatusText = new JLabel4j_std();
          jStatusText.setForeground(new Color(255, 0, 0));
          jStatusText.setBackground(Color.GRAY);
          jStatusText.setBounds(0, 560, 958, 20);
          jDesktopPane1.add(jStatusText);
        }

        {
          jButtonExcel = new JButton4j(Common.icon_XLS);
          jButtonExcel.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent e) {
              export();
            }
          });

          jButtonExcel.setText(lang.get("btn_Excel"));
          jButtonExcel.setMnemonic(lang.getMnemonicChar());
          jButtonExcel.setBounds(647, 143, 109, 32);
          jDesktopPane1.add(jButtonExcel);
        }

        {
          jButtonClear = new JButton4j(Common.icon_clear);
          jButtonClear.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent e) {
              clearFilter();
            }
          });
          jButtonClear.setText(lang.get("btn_Clear_Filter"));
          jButtonClear.setMnemonic(lang.getMnemonicChar());
          jButtonClear.setBounds(107, 143, 109, 32);
          jDesktopPane1.add(jButtonClear);
        }
        {
          JButton4j btnLookupInspection = new JButton4j("");
          btnLookupInspection.setIcon(Common.icon_lookup);
          btnLookupInspection.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              JLaunchLookup.dlgCriteriaDefault = "";
              JLaunchLookup.dlgAutoExec = true;
              if (JLaunchLookup.qmInspections())
              {
                textFieldInspectionID.setText(JLaunchLookup.dlgResult);
              }
            }
          });
          btnLookupInspection.setBounds(242, 113, 22, 21);
          jDesktopPane1.add(btnLookupInspection);
        }
      }
    }
    catch (Exception e)
View Full Code Here


              }
            }
          }
        }
        {
          jButtonAdd = new JButton4j(Common.icon_add);
          jButtonAdd.setBounds(403, 10, 126, 35);
          jDesktopPane1.add(jButtonAdd);
          jButtonAdd.setText(lang.get("btn_Add"));
          jButtonAdd.setMnemonic(lang.getMnemonicChar());
          jButtonAdd.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MODULE_ADD"));
          jButtonAdd.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              addRecord();
            }
          });
        }
        {
          jButtonDelete = new JButton4j(Common.icon_delete);
          jButtonDelete.setBounds(403, 41, 126, 35);
          jDesktopPane1.add(jButtonDelete);
          jButtonDelete.setText(lang.get("btn_Delete"));
          jButtonDelete.setMnemonic(lang.getMnemonicChar());
          jButtonDelete.setFocusTraversalKeysEnabled(false);
          jButtonDelete.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MODULE_DELETE"));
          jButtonDelete.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              delete();
            }
          });
        }
        {
          jButtonEdit = new JButton4j(Common.icon_edit);
          jButtonEdit.setBounds(403, 72, 126, 35);
          jDesktopPane1.add(jButtonEdit);
          jButtonEdit.setText(lang.get("btn_Edit"));
          jButtonEdit.setMnemonic(lang.getMnemonicChar());
          jButtonEdit.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MODULE_EDIT"));
          jButtonEdit.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              editRecord();
            }
          });
        }
        {
          jButtonPrint = new JButton4j(Common.icon_report);
          jButtonPrint.setBounds(403, 134, 126, 35);
          jDesktopPane1.add(jButtonPrint);
          jButtonPrint.setText(lang.get("btn_Print"));
          jButtonPrint.setMnemonic(lang.getMnemonicChar());
          jButtonPrint.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_MODULES"));
          jButtonPrint.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              print();
            }
          });
        }
        {
          jButtonClose = new JButton4j(Common.icon_close);
          jButtonClose.setBounds(403, 258, 126, 35);
          jDesktopPane1.add(jButtonClose);
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setMnemonic(lang.getMnemonicChar());
          jButtonClose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              dispose();
            }
          });
        }
        {
          jButtonRename = new JButton4j(Common.icon_rename);
          jButtonRename.setBounds(403, 103, 126, 35);
          jDesktopPane1.add(jButtonRename);
          jButtonRename.setText(lang.get("btn_Rename"));
          jButtonRename.setMnemonic(lang.getMnemonicChar());
          jButtonRename.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MODULE_RENAME"));
          jButtonRename.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              rename();
            }
          });
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jButtonHelp.setBounds(403, 196, 126, 35);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setMnemonic(lang.getMnemonicChar());
        }
        {
          jButton1 = new JButton4j(Common.icon_refresh);
          jButton1.setBounds(403, 227, 126, 35);
          jDesktopPane1.add(jButton1);
          jButton1.setText(lang.get("btn_Refresh"));
          jButton1.setMnemonic(lang.getMnemonicChar());
          jButton1.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              populateList("");
            }
          });
        }
        {
          jRadioButtonAll = new JRadioButton();
          jRadioButtonAll.setBounds(378, 305, 168, 28);
          jDesktopPane1.add(jRadioButtonAll);
          jRadioButtonAll.setText(lang.get("lbl_Module_ALL"));
          jRadioButtonAll.setFont(Common.font_bold);
          buttonGroup1.add(jRadioButtonAll);
          jRadioButtonAll.setBackground(Common.color_app_window);
          jRadioButtonAll.setSelected(true);
          jRadioButtonAll.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              selectedModuleType = "ALL";
              jRadioButtonActionPerformed(evt);
            }
          });
        }
        {
          jRadioButtonForms = new JRadioButton();
          jRadioButtonForms.setBounds(378, 333, 168, 28);
          jDesktopPane1.add(jRadioButtonForms);
          jRadioButtonForms.setText(lang.get("lbl_Module_Form"));
          jRadioButtonForms.setFont(Common.font_bold);
          buttonGroup1.add(jRadioButtonForms);
          jRadioButtonForms.setBackground(Common.color_app_window);
          jRadioButtonForms.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              selectedModuleType = "FORM";
              jRadioButtonActionPerformed(evt);
            }
          });
        }
        {
          jRadioButtonFunctions = new JRadioButton();
          jRadioButtonFunctions.setBounds(378, 361, 168, 28);
          jDesktopPane1.add(jRadioButtonFunctions);
          jRadioButtonFunctions.setText(lang.get("lbl_Module_Function"));
          jRadioButtonFunctions.setFont(Common.font_bold);
          buttonGroup1.add(jRadioButtonFunctions);
          jRadioButtonFunctions.setBackground(Common.color_app_window);
          jRadioButtonFunctions.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              selectedModuleType = "FUNCTION";
              jRadioButtonActionPerformed(evt);
            }
          });
        }
        {
          jRadioButtonMenus = new JRadioButton();
          jRadioButtonMenus.setBounds(378, 389, 168, 28);
          jDesktopPane1.add(jRadioButtonMenus);
          jRadioButtonMenus.setText(lang.get("lbl_Module_Menu"));
          jRadioButtonMenus.setFont(Common.font_bold);
          buttonGroup1.add(jRadioButtonMenus);
          jRadioButtonMenus.setBackground(Common.color_app_window);
          jRadioButtonMenus.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              selectedModuleType = "MENU";
              jRadioButtonActionPerformed(evt);
            }
          });
        }
        {
          jRadioButtonReports = new JRadioButton();
          jRadioButtonReports.setBounds(378, 417, 168, 28);
          jDesktopPane1.add(jRadioButtonReports);
          jRadioButtonReports.setText(lang.get("lbl_Module_Report"));
          jRadioButtonReports.setFont(Common.font_bold);
          buttonGroup1.add(jRadioButtonReports);
          jRadioButtonReports.setBackground(Common.color_app_window);
          jRadioButtonReports.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              selectedModuleType = "REPORT";
              jRadioButtonActionPerformed(evt);
            }
          });
        }
        {
          jRadioButtonUserReports = new JRadioButton();
          jRadioButtonUserReports.setBounds(378, 473, 168, 28);
          jDesktopPane1.add(jRadioButtonUserReports);
          jRadioButtonUserReports.setText(lang.get("lbl_Module_UserReport"));
          jRadioButtonUserReports.setFont(Common.font_bold);
          buttonGroup1.add(jRadioButtonUserReports);
          jRadioButtonUserReports.setBackground(Common.color_app_window);
          jRadioButtonUserReports.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              selectedModuleType = "USER";
              jRadioButtonActionPerformed(evt);
            }
          });
        }
       
        {
          jRadioButtonExec = new JRadioButton();
          jRadioButtonExec.setBounds(378, 445, 168, 28);
          jDesktopPane1.add(jRadioButtonExec);
          jRadioButtonExec.setText(lang.get("lbl_Module_Executable"));
          jRadioButtonExec.setFont(Common.font_bold);
          jRadioButtonExec.setBackground(Common.color_app_window);
          buttonGroup1.add(jRadioButtonExec);
          jRadioButtonExec.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              selectedModuleType = "EXEC";
              jRadioButtonActionPerformed(evt);
            }
          });
        }

        {
          jButtonExcel = new JButton4j(Common.icon_XLS);
          jButtonExcel.setBounds(403, 165, 126, 35);
          jButtonExcel.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent e) {
              excel();
            }
View Full Code Here

    desktopPane.add(textFieldDescription);
    textFieldDescription.setColumns(10);
   

   
    btnSave = new JButton4j(lang.get("btn_Save"));
    btnSave.setEnabled(false);
    btnSave.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        save();
      }
    });
    btnSave.setIcon(Common.icon_save);
    btnSave.setBounds(175, 263, 117, 29);
    desktopPane.add(btnSave);
   
    btnClose = new JButton4j(lang.get("btn_Close"));
    btnClose.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        dispose();
      }
    });
View Full Code Here

          jDesktopPane1.add(jLabelAvailable);
          jLabelAvailable.setText(lang.get("lbl_Unassigned"));
          jLabelAvailable.setBounds(355, 0, 70, 21);
        }
        {
          jButtonAssign = new JButton4j(Common.icon_arrow_left);
          jDesktopPane1.add(jButtonAssign);
          jButtonAssign.setBounds(322, 154, 26, 24);
          jButtonAssign.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              if (jListUnassigned.getSelectedIndex() > -1)
              {
                for (int j = jListUnassigned.getMaxSelectionIndex(); j >= jListUnassigned.getMinSelectionIndex(); j--)
                {
                  if (jListUnassigned.isSelectedIndex(j))
                  {
                    JDBListData item = (JDBListData) jListUnassigned.getModel().getElementAt(j);
                    addToList(assignedGroupList, item);
                    removeFromList(unAssignedGroupList, item);
                  }
                }
                populateAssignedList();
                populateUnAssignedList();
                setButtonState();
              }
            }
          });
        }
        {
          jButtonUnAssign = new JButton4j(Common.icon_arrow_right);
          jDesktopPane1.add(jButtonUnAssign);
          jButtonUnAssign.setBounds(322, 182, 26, 24);
          jButtonUnAssign.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              if (jListAssigned.getSelectedIndex() > -1)
              {
                for (int j = jListAssigned.getMaxSelectionIndex(); j >= jListAssigned.getMinSelectionIndex(); j--)
                {
                  if (jListAssigned.isSelectedIndex(j))
                  {
                    JDBListData item = (JDBListData) jListAssigned.getModel().getElementAt(j);
                    addToList(unAssignedGroupList, item);
                    removeFromList(assignedGroupList, item);
                  }
                }
                populateAssignedList();
                populateUnAssignedList();
                setButtonState();
              }
            }
          });
        }
        {
          jScrollPaneUnassigned = new JScrollPane();
          jDesktopPane1.add(jScrollPaneUnassigned);
          jScrollPaneUnassigned.setBounds(357, 21, 301, 371);
          jScrollPaneUnassigned.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
          jScrollPaneUnassigned.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
          {
            ListModel<JDBListData> jListUnassignedModel = new DefaultComboBoxModel<JDBListData>();
            jListUnassigned = new JDBModuleJList(Common.selectedHostID, Common.sessionID);
            jScrollPaneUnassigned.setViewportView(jListUnassigned);
            jListUnassigned.setModel(jListUnassignedModel);
            jListUnassigned.setCellRenderer(Common.renderer_list_unassigned);
            jListUnassigned.setBackground(Common.color_list_unassigned);
          }
        }
        {
          jScrollPaneAssigned = new JScrollPane();
          jDesktopPane1.add(jScrollPaneAssigned);
          jScrollPaneAssigned.setBounds(14, 21, 301, 371);
          jScrollPaneAssigned.setFocusable(false);
          jScrollPaneAssigned.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
          jScrollPaneAssigned.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
          {
            ListModel<JDBListData> jListAssignedModel = new DefaultComboBoxModel<JDBListData>();
            jListAssigned = new JDBModuleJList(Common.selectedHostID, Common.sessionID);
            jScrollPaneAssigned.setViewportView(jListAssigned);
            jListAssigned.setCellRenderer(Common.renderer_list_assigned);
            jListAssigned.setBackground(Common.color_list_assigned);
            jListAssigned.setModel(jListAssignedModel);
            jListAssigned.setForeground(Common.color_listFontStandard);
          }
        }
        {
          jButtonUndo = new JButton4j(Common.icon_undo);
          jDesktopPane1.add(jButtonUndo);
          jButtonUndo.setText(lang.get("btn_Undo"));
          jButtonUndo.setBounds(112, 399, 112, 32);
          jButtonUndo.setMnemonic(lang.getMnemonicChar());
          jButtonUndo.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              resetLists();
            }
          });
        }
        {
          jButtonSave = new JButton4j(Common.icon_update);
          jDesktopPane1.add(jButtonSave);
          jButtonSave.setText(lang.get("btn_Save"));
          jButtonSave.setBounds(224, 399, 112, 32);
          jButtonSave.setMnemonic(lang.getMnemonicChar());
          jButtonSave.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              JDBGroup group = new JDBGroup(Common.selectedHostID, Common.sessionID);
              group.setGroupId(lGroupId);
              for (int j = 0; j < unAssignedGroupList.size(); j++)
              {
                group.removeModule(unAssignedGroupList.get(j).toString());
              }
              for (int j = 0; j < assignedGroupList.size(); j++)
              {
                group.addModule(assignedGroupList.get(j).toString());
              }
              jButtonUndo.setEnabled(false);
              jButtonSave.setEnabled(false);
            }
          });
        }
        {
          jButtonClose = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonClose);
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setBounds(448, 399, 112, 32);
          jButtonClose.setMnemonic(lang.getMnemonicChar());
          jButtonClose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              dispose();
            }
          });
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setBounds(336, 399, 112, 32);
          jButtonHelp.setMnemonic(lang.getMnemonicChar());
        }
View Full Code Here

        }
      });
    //listInspection.setLocation(0, 58);
    scrollPaneInspection.setViewportView(listInspection);
   
    JButton4j btnAdd1 = new JButton4j(lang.get("btn_Add"));
    btnAdd1.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        addInspectionRecord();
      }
    });
    btnAdd1.setIcon(Common.icon_add);
    btnAdd1.setBounds(683, 24, 117, 32);
    btnAdd1.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_INSPECTION"));
    panelInspection.add(btnAdd1);
   
    JButton4j btnDelete1 = new JButton4j(lang.get("btn_Delete"));
    btnDelete1.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        deleteInspectionRecord();
      }
    });
    btnDelete1.setBounds(683, 80, 117, 32);
    btnDelete1.setIcon(Common.icon_delete);
    btnDelete1.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_INSPECTION"));
    panelInspection.add(btnDelete1);
   
    JButton4j btnEdit1 = new JButton4j(lang.get("btn_Edit"));
    btnEdit1.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        editInspectionRecord();
      }
    });
    btnEdit1.setIcon(Common.icon_edit);
    btnEdit1.setBounds(683, 52, 117, 32);
    btnEdit1.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_INSPECTION"));
    panelInspection.add(btnEdit1);
   
    JPanel panelActivity = new JPanel();
    panelActivity.setBackground(Common.color_app_window);
    panelActivity.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null), lang.get("lbl_Activity"), TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
    panelActivity.setBounds(6, 245, 810, 184);
    panelActivity.setFont(Common.font_title);
    desktopPane.add(panelActivity);
    panelActivity.setLayout(null);
   
    JScrollPane scrollPaneActivity = new JScrollPane();
    scrollPaneActivity.setBounds(16, 24, 655, 143);
    panelActivity.add(scrollPaneActivity);
   
    listActivity = new JList4j<JDBQMActivity>();
    listActivity.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseClicked(MouseEvent e) {
        if (e.getClickCount() == 2)
        {
          editActivityRecord();
        }
      }
    });
    listActivity.addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent e) {
          String selectedItemInsp = "";
          String selectedItemAct = "";
          if (listActivity.getSelectedIndex() >=0)
          {
            selectedItemInsp =   ((JDBQMActivity) listActivity.getSelectedValue()).getInspectionID();
            selectedItemAct =   ((JDBQMActivity) listActivity.getSelectedValue()).getActivityID();
          }
          populateTestList(selectedItemInsp,selectedItemAct,"");
      }
    });
    scrollPaneActivity.setViewportView(listActivity);
   
    JButton4j btnDelete2 = new JButton4j(lang.get("btn_Delete"));
    btnDelete2.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        deleteActivityRecord();
      }
    });
    btnDelete2.setBounds(683, 80, 117, 32);
    btnDelete2.setIcon(Common.icon_delete);
    btnDelete2.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_ACTIVITY"));
    panelActivity.add(btnDelete2);
   
    JButton4j btnEdit2 = new JButton4j(lang.get("btn_Edit"));
    btnEdit2.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        editActivityRecord();
      }
    });
    btnEdit2.setIcon(Common.icon_edit);
    btnEdit2.setBounds(683, 52, 117, 32);
    btnEdit2.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_ACTIVITY"));
    panelActivity.add(btnEdit2);
   
    JButton4j btnAdd2 = new JButton4j(lang.get("btn_Add"));
    btnAdd2.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        addActivityRecord();
      }
    });
    btnAdd2.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_ACTIVITY"));
    btnAdd2.setBounds(683, 24, 117, 32);
    btnAdd2.setIcon(Common.icon_add);
    panelActivity.add(btnAdd2);
   
    JPanel panelTests = new JPanel();
    panelTests.setBackground(Common.color_app_window);
    panelTests.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null), lang.get("lbl_Test"), TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
    panelTests.setBounds(6, 426, 810, 238);
    panelTests.setFont(Common.font_title);
    desktopPane.add(panelTests);
    panelTests.setLayout(null);
   
    JScrollPane scrollPaneTests = new JScrollPane();
    scrollPaneTests.setBounds(16, 23, 659, 197);
    panelTests.add(scrollPaneTests);
   
    listTest = new JList4j<JDBQMTest>();
    listTest.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseClicked(MouseEvent e) {
        if (e.getClickCount() == 2)
        {
          editTestRecord();
        }
      }
    });
    scrollPaneTests.setViewportView(listTest);
   
    JButton4j btnDelete3 = new JButton4j(lang.get("btn_Delete"));
    btnDelete3.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        deleteTestRecord();
      }
    });
    btnDelete3.setIcon(Common.icon_delete);
    btnDelete3.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_TEST"));
    btnDelete3.setBounds(687, 80, 117, 32);
    panelTests.add(btnDelete3);
   
    JButton4j btnEdit3 = new JButton4j(lang.get("btn_Edit"));
    btnEdit3.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        editTestRecord();
      }
    });
    btnEdit3.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_TEST"));
    btnEdit3.setIcon(Common.icon_edit);
    btnEdit3.setBounds(687, 52, 117, 32);
    panelTests.add(btnEdit3);
   
    JButton4j btnAdd3 = new JButton4j(lang.get("btn_Add"));
    btnAdd3.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        addTestRecord();
      }
    });
    btnAdd3.setIcon(Common.icon_add);
    btnAdd3.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_TEST"));
    btnAdd3.setBounds(687, 24, 117, 32);
    panelTests.add(btnAdd3);
   
    JButton4j btnDictionary = new JButton4j(lang.get("btn_Dictionary"));
    btnDictionary.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        editDictionaryRecord();
      }
    });
    btnDictionary.setIcon(Common.icon_dictionary);
    btnDictionary.setEnabled(true);
    btnDictionary.setBounds(687, 108, 117, 32);
    panelTests.add(btnDictionary);
   
    JLabel4j_std lblInspectionID = new JLabel4j_std(lang.get("lbl_Inspection_ID"));
    lblInspectionID.setBounds(6, 12, 83, 16);
    desktopPane.add(lblInspectionID);
    lblInspectionID.setHorizontalAlignment(SwingConstants.TRAILING);
   
    textFieldInspectionID = new JTextField4j();
    textFieldInspectionID.setBounds(101, 9, 117, 21);
    desktopPane.add(textFieldInspectionID);
    textFieldInspectionID.setColumns(10);
   
    JLabel4j_std lblDescription = new JLabel4j_std(lang.get("lbl_Description"));
    lblDescription.setBounds(252, 12, 110, 16);
    desktopPane.add(lblDescription);
    lblDescription.setHorizontalAlignment(SwingConstants.TRAILING);
   
    textFieldDescription = new JTextField4j();
    textFieldDescription.setBounds(371, 9, 445, 21);
    desktopPane.add(textFieldDescription);
    textFieldDescription.setColumns(10);
   
    JButton4j btnSearch1 = new JButton4j(lang.get("btn_Search"));
    btnSearch1.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        buildSQL();
        populateInspectList("");
      }
    });
    btnSearch1.setBounds(262, 40, 117, 32);
    desktopPane.add(btnSearch1);
    btnSearch1.setIcon(Common.icon_search);
   
    JButton4j btnClose1 = new JButton4j(lang.get("btn_Close"));
    btnClose1.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        dispose();
      }
    });
    btnClose1.setBounds(395, 40, 117, 32);
    desktopPane.add(btnClose1);
    btnClose1.setIcon(Common.icon_close);
   
    chckbxLimit = new JCheckBox4j("");
    chckbxLimit.setBounds(711, 48, 28, 16);
    desktopPane.add(chckbxLimit);
    chckbxLimit.setSelected(true);
   
    spinnerLimit = new JSpinner();
    spinnerLimit.setBounds(740, 43, 76, 28);
    desktopPane.add(spinnerLimit);
    spinnerLimit.setValue(100);
    JSpinner.NumberEditor ne = new JSpinner.NumberEditor(spinnerLimit);
    ne.getTextField().setFont(Common.font_std);
    spinnerLimit.setEditor(ne);
   
    JLabel4j_std lbl_Limit = new JLabel4j_std(lang.get("lbl_Limit"));
    lbl_Limit.setHorizontalAlignment(SwingConstants.TRAILING);
    lbl_Limit.setBounds(589, 47, 110, 16);
    desktopPane.add(lbl_Limit);
   
    JButton4j btnLookupInspection = new JButton4j("");
    btnLookupInspection.setIcon(Common.icon_lookup);
    btnLookupInspection.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        JLaunchLookup.dlgAutoExec = true;
        JLaunchLookup.dlgCriteriaDefault = "";
        if (JLaunchLookup.qmInspections())
        {
          textFieldInspectionID.setText(JLaunchLookup.dlgResult);
          buildSQL();
          populateInspectList("");
        }
      }
    });
    btnLookupInspection.setBounds(216, 8, 21, 22);
    desktopPane.add(btnLookupInspection);
   
    SwingUtilities.invokeLater(new Runnable()
    {
      public void run()
View Full Code Here

        jDesktopPane1.add(labelNewSSCCQuantity);
        labelNewSSCCQuantity.setText(lang.get("lbl_Required_Quantity"));
        labelNewSSCCQuantity.setHorizontalAlignment(SwingConstants.TRAILING);
        labelNewSSCCQuantity.setBounds(137, 86, 125, 21);

        jButtonSplit = new JButton4j(Common.icon_split);
        jButtonSplit.addActionListener(new ActionListener()
        {
          public void actionPerformed(ActionEvent e)
          {
            String splitSSCC = pal.splitPallet(jTextFieldSSCC.getText(), new BigDecimal(jFormattedTextFieldSplitQuantity.getValue().toString()));
            if (splitSSCC.equals("") == false)
            {
              lblStatus.setText("SSCC "+jTextFieldSSCC.getText()+" updated, SSCC "+splitSSCC+" created.");
              jTextFieldNewSSCC.setText(splitSSCC);
              jFormattedTextFieldNewQuantity.setValue(jFormattedTextFieldSplitQuantity.getValue());
              String pq = comboBoxPrintQueue.getSelectedItem().toString();
              if (checkBoxPrintOldSSCC.isSelected())
              {
                buildSQL1Record(jTextFieldSSCC.getText());
                JLaunchReport.runReport(defaultlabel, listStatement, jCheckBoxAutoPreview.isSelected(), pq, Integer.valueOf(jSpinnerCopies.getValue().toString()), checkBoxIncHeaderText.isSelected());
              }
              if (checkBoxPrintNewSSCC.isSelected())
              {
                buildSQL1Record(jTextFieldNewSSCC.getText());
                JLaunchReport.runReport(defaultlabel, listStatement, jCheckBoxAutoPreview.isSelected(), pq, Integer.valueOf(jSpinnerCopies.getValue().toString()), checkBoxIncHeaderText.isSelected());
              }
            } else
            {
              JUtility.errorBeep();
              JOptionPane.showMessageDialog(Common.mainForm, pal.getErrorMessage(), lang.get("dlg_Error"), JOptionPane.WARNING_MESSAGE);
            }
          }
        });

        jDesktopPane1.add(jButtonSplit);
        jButtonSplit.setText(lang.get("btn_Split"));
        jButtonSplit.setMnemonic(lang.getMnemonicChar());
        jButtonSplit.setBounds(151, 205, 111, 28);

        jButtonHelp = new JButton4j(Common.icon_help);
        jDesktopPane1.add(jButtonHelp);
        jButtonHelp.setText(lang.get("btn_Help"));
        jButtonHelp.setMnemonic(lang.getMnemonicChar());
        jButtonHelp.setBounds(265, 205, 111, 28);

        jButtonCancel = new JButton4j(Common.icon_close);
        jDesktopPane1.add(jButtonCancel);
        jButtonCancel.setText(lang.get("btn_Close"));
        jButtonCancel.setMnemonic(lang.getMnemonicChar());
        jButtonCancel.setBounds(378, 205, 111, 28);
        jButtonCancel.addActionListener(new ActionListener()
View Full Code Here

    Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
    Rectangle window = getBounds();
    setLocation((screen.width - window.width) / 2, (screen.height - window.height) / 2);

    {
      jButtonExcel = new JButton4j(Common.icon_XLS);
      jButtonExcel.addActionListener(new ActionListener() {
        public void actionPerformed(final ActionEvent e) {
          JDBControl control = new JDBControl(Common.selectedHostID, Common.sessionID);

          JExcel export = new JExcel();
View Full Code Here

        }

      }
      {
        jButtonEdit = new JButton4j(Common.icon_edit);
        this.getContentPane().add(jButtonEdit);
        jButtonEdit.setText(lang.get("btn_Edit"));
        jButtonEdit.setBounds(115, 275, 106, 30);
        jButtonEdit.setMnemonic(lang.getMnemonicChar());
        jButtonEdit.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_SYSTEM_KEYS_EDIT"));
        jButtonEdit.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            editRecord();
          }
        });
      }
      {
        jButtonClose = new JButton4j(Common.icon_close);
        this.getContentPane().add(jButtonClose);
        jButtonClose.setText(lang.get("btn_Close"));
        jButtonClose.setBounds(655, 275, 106, 30);
        jButtonClose.setMnemonic(lang.getMnemonicChar());
        jButtonClose.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            jButtonCloseActionPerformed(evt);
          }
        });
      }
      {

        jButtonAdd = new JButton4j(Common.icon_add);
        this.getContentPane().add(jButtonAdd);
        jButtonAdd.setText(lang.get("btn_Add"));
        jButtonAdd.setBounds(7, 275, 106, 32);
        jButtonAdd.setMnemonic(lang.getMnemonicChar());
        jButtonAdd.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_SYSTEM_KEYS_ADD"));
        jButtonAdd.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            JDBControl ctl = new JDBControl(Common.selectedHostID, Common.sessionID);

            systemKey = JOptionPane.showInputDialog(Common.mainForm, "Enter new System Key");
            if (systemKey != null)
            {
              if (systemKey.equals("") == false)
              {
                systemKey = systemKey.toUpperCase();
                if (ctl.create(systemKey, "", "") == false)
                {
                  JUtility.errorBeep();
                  JOptionPane.showMessageDialog(Common.mainForm, ctl.getErrorMessage(), lang.get("err_Error"), JOptionPane.ERROR_MESSAGE);
                }
                else
                {

                  populateList("");
                  JLaunchMenu.runDialog("FRM_ADMIN_CONTROL_EDIT", systemKey);
                  populateList("");
                }
              }
            }

          }
        });
      }
      {
        jButtonDelete = new JButton4j(Common.icon_delete);
        this.getContentPane().add(jButtonDelete);
        jButtonDelete.setText(lang.get("btn_Delete"));
        jButtonDelete.setBounds(223, 275, 106, 30);
        jButtonDelete.setMnemonic(lang.getMnemonicChar());
        jButtonDelete.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_SYSTEM_KEYS_DELETE"));
        jButtonDelete.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            int row = jTable1.getSelectedRow();
            if (row >= 0)
            {

              systemKey = jTable1.getValueAt(row, 0).toString();

              int n = JOptionPane.showConfirmDialog(Common.mainForm, lang.get("dlg_System_Key_Delete")+" " + systemKey + " ?", lang.get("dlg_Confirm"), JOptionPane.YES_NO_OPTION, 0, Common.icon_confirm);
              if (n == 0)
              {
                JDBControl c = new JDBControl(Common.selectedHostID, Common.sessionID);
                c.setSystemKey(systemKey);
                c.delete();
                populateList("");
              }
            }
          }
        });
      }
      {
        jButtonPrint = new JButton4j(Common.icon_report);
        this.getContentPane().add(jButtonPrint);
        jButtonPrint.setText(lang.get("btn_Print"));
        jButtonPrint.setBounds(439, 275, 106, 30);
        jButtonPrint.setMnemonic(lang.getMnemonicChar());
        jButtonPrint.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_CONTROL"));
        jButtonPrint.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            JLaunchReport.runReport("RPT_CONTROL",null,"",null,"");
          }
        });
      }
      {
        jButtonHelp = new JButton4j(Common.icon_help);
        this.getContentPane().add(jButtonHelp);
        jButtonHelp.setText(lang.get("btn_Help"));
        jButtonHelp.setBounds(547, 275, 106, 30);
        jButtonHelp.setMnemonic(lang.getMnemonicChar());
View Full Code Here

        }

      }
      {
        jButtonEdit = new JButton4j(Common.icon_edit);
        this.getContentPane().add(jButtonEdit);
        jButtonEdit.setText(lang.get("btn_Edit"));
        jButtonEdit.setBounds(119, 275, 115, 30);
        jButtonEdit.setMnemonic(lang.getMnemonicChar());
        jButtonEdit.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_ARCHIVE_EDIT"));
        jButtonEdit.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            editRecord();
          }
        });
      }
      {
        jButtonClose = new JButton4j(Common.icon_close);
        this.getContentPane().add(jButtonClose);
        jButtonClose.setText(lang.get("btn_Close"));
        jButtonClose.setBounds(821, 275, 115, 30);
        jButtonClose.setMnemonic(lang.getMnemonicChar());
        jButtonClose.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            jButtonCloseActionPerformed(evt);
          }
        });
      }
      {

        jButtonAdd = new JButton4j(Common.icon_add);
        this.getContentPane().add(jButtonAdd);
        jButtonAdd.setText(lang.get("btn_Add"));
        jButtonAdd.setBounds(2, 275, 115, 32);
        jButtonAdd.setMnemonic(lang.getMnemonicChar());
        jButtonAdd.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_ARCHIVE_ADD"));
        jButtonAdd.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            JDBArchive arch = new JDBArchive(Common.selectedHostID, Common.sessionID);

            archID = JOptionPane.showInputDialog(Common.mainForm, lang.get("dlg_Archive_ID_Input"));
            if (archID != null) {
              if (archID.equals("") == false) {
                archID = archID.toUpperCase();
                arch.clear();
                if (arch.create(archID) == false) {
                  JUtility.errorBeep();
                  JOptionPane.showMessageDialog(Common.mainForm, arch.getErrorMessage(), lang.get("err_Error"), JOptionPane.ERROR_MESSAGE);
                } else {
                  arch.update();
                  populateList("");
                  JLaunchMenu.runDialog("FRM_ADMIN_ARCHIVE_EDIT", archID);
                  populateList("");
                }
              }
            }

          }
        });
      }
      {
        jButtonDelete = new JButton4j(Common.icon_delete);
        this.getContentPane().add(jButtonDelete);
        jButtonDelete.setText(lang.get("btn_Delete"));
        jButtonDelete.setBounds(236, 275, 115, 30);
        jButtonDelete.setMnemonic(lang.getMnemonicChar());
        jButtonDelete.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_ARCHIVE_DELETE"));
        jButtonDelete.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            int row = jTable1.getSelectedRow();
            if (row >= 0) {

              archID = jTable1.getValueAt(row, 0).toString();

              int n = JOptionPane.showConfirmDialog(Common.mainForm, lang.get("dlg_Archive_ID_Delete") + " " + archID + " ?", lang.get("dlg_Confirm"), JOptionPane.YES_NO_OPTION, 0, Common.icon_confirm);
              if (n == 0) {
                JDBArchive c = new JDBArchive(Common.selectedHostID, Common.sessionID);
                c.setArchiveID(archID);
                c.delete();
                populateList("");
              }
            }
          }
        });
      }
      {
        jButtonPrint = new JButton4j(Common.icon_report);
        this.getContentPane().add(jButtonPrint);
        jButtonPrint.setText(lang.get("btn_Print"));
        jButtonPrint.setBounds(587, 275, 115, 30);
        jButtonPrint.setMnemonic(lang.getMnemonicChar());
        jButtonPrint.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_ARCHIVE"));
        jButtonPrint.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            JLaunchReport.runReport("RPT_ARCHIVE", null, "", null, "");
          }
        });
      }
      {
        jButtonHelp = new JButton4j(Common.icon_help);
        this.getContentPane().add(jButtonHelp);
        jButtonHelp.setText(lang.get("btn_Help"));
        jButtonHelp.setBounds(704, 275, 115, 30);
        jButtonHelp.setMnemonic(lang.getMnemonicChar());

      }
      {
        jButtonExcel = new JButton4j(Common.icon_XLS);
        jButtonExcel.addActionListener(new ActionListener() {
          public void actionPerformed(final ActionEvent e) {
            JDBArchive arch = new JDBArchive(Common.selectedHostID, Common.sessionID);

            JExcel export = new JExcel();
            buildSQL();
            export.saveAs("archive.xls", arch.getArchiveDataResultSet(listStatement), Common.mainForm);
          }
        });
        jButtonExcel.setText(lang.get("btn_Excel"));
        jButtonExcel.setMnemonic(lang.getMnemonicChar());
        jButtonExcel.setBounds(470, 275, 115, 30);
        getContentPane().add(jButtonExcel);
      }

      JButton4j button4jRun = new JButton4j(Common.icon_execute);
      button4jRun.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          int row = jTable1.getSelectedRow();
          if (row >= 0) {

            archID = jTable1.getValueAt(row, 0).toString();

            JDBArchive c = new JDBArchive(Common.selectedHostID, Common.sessionID);
            c.runManual(archID);
            //String test = c.reportData();
            populateList(archID);
          }
        }
      });
      button4jRun.setText(lang.get("btn_Run"));
      button4jRun.setMnemonic('0');
      button4jRun.setEnabled(false);
      button4jRun.setBounds(353, 275, 115, 30);
      button4jRun.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_ARCHIVE_RUN"));
      getContentPane().add(button4jRun);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

          jLabel1.setText(lang.get("lbl_Storage_Plant"));
          jLabel1.setBounds(256, 11, 129, 21);
          jLabel1.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          JButton4j btnExcel = new JButton4j(Common.icon_XLS);
          btnExcel.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
              export();
            }
          });
          btnExcel.setText(lang.get("btn_Excel"));
          btnExcel.setMnemonic(lang.getMnemonicChar());
          btnExcel.setBounds(628, 110, 103, 28);
          jDesktopPane1.add(btnExcel);
        }
        {
          jTextFieldPlant = new JTextField4j();
          jDesktopPane1.add(jTextFieldPlant);
          jTextFieldPlant.setBounds(392, 11, 80, 21);
        }
        {
          jLabel3 = new JLabel4j_std();
          jDesktopPane1.add(jLabel3);
          jLabel3.setText(lang.get("lbl_Description"));
          jLabel3.setBounds(12, 77, 91, 21);
          jLabel3.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jTextFieldDescription = new JTextField4j();
          jDesktopPane1.add(jTextFieldDescription);
          jTextFieldDescription.setBounds(112, 77, 360, 21);
        }
        {
          jScrollPane1 = new JScrollPane();
          jScrollPane1.getViewport().setBackground(Common.color_tablebackground);
          jDesktopPane1.add(jScrollPane1);
          jScrollPane1.setBounds(0, 150, 946, 335);
          {
            TableModel jTable1Model = new DefaultTableModel(new String[][] { { "One", "Two" }, { "Three", "Four" } }, new String[] { "Column 1", "Column 2" });
            jTable1 = new JTable();
            jTable1.setDefaultRenderer(Object.class, Common.renderer_table);
            jScrollPane1.setViewportView(jTable1);
            jTable1.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
            jTable1.getTableHeader().setFont(Common.font_table_header);
            jTable1.addMouseListener(new MouseAdapter() {
              public void mouseClicked(MouseEvent evt) {
                if (evt.getClickCount() == 2)
                {
                  if (Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_LOCATION_EDIT"))
                  {
                    editRecord();
                  }
                }
              }
            });
            jTable1.setModel(jTable1Model);

            {
              final JPopupMenu popupMenu = new JPopupMenu();
              addPopup(jTable1, popupMenu);

              {
                final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_find);
                newItemMenuItem.addActionListener(new ActionListener() {
                  public void actionPerformed(final ActionEvent e) {
                    search();
                  }
                });
                newItemMenuItem.setText(lang.get("btn_Search"));
                popupMenu.add(newItemMenuItem);
              }

              {
                final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_add);
                newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_LOCATION_ADD"));
                newItemMenuItem.addActionListener(new ActionListener() {
                  public void actionPerformed(final ActionEvent e) {
                    addRecord();
                  }
                });
                newItemMenuItem.setText(lang.get("btn_Add"));
                popupMenu.add(newItemMenuItem);
              }

              {
                final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_edit);
                newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_LOCATION_EDIT"));
                newItemMenuItem.addActionListener(new ActionListener() {
                  public void actionPerformed(final ActionEvent e) {
                    editRecord();
                  }
                });
                newItemMenuItem.setText(lang.get("btn_Edit"));
                popupMenu.add(newItemMenuItem);
              }

              {
                final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_delete);
                newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_LOCATION_DELETE"));
                newItemMenuItem.addActionListener(new ActionListener() {
                  public void actionPerformed(final ActionEvent e) {
                    deleteRecord();
                  }
                });
                newItemMenuItem.setText(lang.get("btn_Delete"));
                popupMenu.add(newItemMenuItem);
              }

              {
                final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_print);
                newItemMenuItem.addActionListener(new ActionListener() {
                  public void actionPerformed(final ActionEvent e) {
                    print();
                  }
                });
                newItemMenuItem.setText(lang.get("btn_Print"));
                popupMenu.add(newItemMenuItem);
              }

              {
                final JMenu4j sortByMenu = new JMenu4j();
                sortByMenu.setText(lang.get("lbl_Sort_By"));
                popupMenu.add(sortByMenu);

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      sortBy("LOCATION_ID");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Storage_Location"));
                  sortByMenu.add(newItemMenuItem);
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      sortBy("PLANT");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Storage_Plant"));
                  sortByMenu.add(newItemMenuItem);
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      sortBy("WAREHOUSE");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Storage_Warehouse"));
                  sortByMenu.add(newItemMenuItem);
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      sortBy("DESCRIPTION");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Description"));
                  sortByMenu.add(newItemMenuItem);
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      sortBy("GLN");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_GLN"));
                  sortByMenu.add(newItemMenuItem);
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      sortBy("STORAGE_LOCATION");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Storage_Location"));
                  sortByMenu.add(newItemMenuItem);
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      sortBy("STORAGE_TYPE");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Storage_Type"));
                  sortByMenu.add(newItemMenuItem);
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      sortBy("STORAGE_SECTION");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Storage_Section"));
                  sortByMenu.add(newItemMenuItem);
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      sortBy("STORAGE_BIN");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Storage_Bin"));
                  sortByMenu.add(newItemMenuItem);
                }
              }

              {
                final JMenu4j filterByMenu = new JMenu4j();
                filterByMenu.setText("Filter by");
                popupMenu.add(filterByMenu);

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      filterBy("LOCATION_ID");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Storage_Location"));
                  filterByMenu.add(newItemMenuItem);
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      filterBy("PLANT");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Storage_Plant"));
                  filterByMenu.add(newItemMenuItem);
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      filterBy("WAREHOUSE");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Storage_Warehouse"));
                  filterByMenu.add(newItemMenuItem);
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      filterBy("GLN");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_GLN"));
                  filterByMenu.add(newItemMenuItem);
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      filterBy("DESCRIPTION");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Description"));
                  filterByMenu.add(newItemMenuItem);
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      filterBy("STORAGE_LOCATION");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Storage_Location"));
                  filterByMenu.add(newItemMenuItem);
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      filterBy("STORAGE_TYPE");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Storage_Type"));
                  filterByMenu.add(newItemMenuItem);
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      filterBy("STORAGE_SECTION");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Storage_Section"));
                  filterByMenu.add(newItemMenuItem);
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      filterBy("STORAGE_BIN");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Storage_Bin"));
                  filterByMenu.add(newItemMenuItem);
                }

                {
                  filterByMenu.addSeparator();
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      clearFilter();
                    }
                  });
                  newItemMenuItem.setText(lang.get("btn_Clear_Filter"));
                  filterByMenu.add(newItemMenuItem);
                }
              }
            }
          }
        }
        {
          jLabel2 = new JLabel4j_std();
          jDesktopPane1.add(jLabel2);
          jLabel2.setText(lang.get("lbl_Storage_Warehouse"));
          jLabel2.setBounds(472, 11, 103, 21);
          jLabel2.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jTextFieldWarehouse = new JTextField4j();
          jDesktopPane1.add(jTextFieldWarehouse);
          jTextFieldWarehouse.setBounds(583, 11, 80, 21);
        }
        {
          jLabel4 = new JLabel4j_std();
          jDesktopPane1.add(jLabel4);
          jLabel4.setText(lang.get("lbl_Storage_Bin"));
          jLabel4.setBounds(681, 44, 113, 21);
          jLabel4.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jTextFieldStorageBin = new JTextField4j();
          jDesktopPane1.add(jTextFieldStorageBin);
          jTextFieldStorageBin.setBounds(801, 44, 80, 21);
        }
        {
          jTextFieldLocationID = new JTextField4j();
          jDesktopPane1.add(jTextFieldLocationID);
          jTextFieldLocationID.setBounds(112, 11, 126, 21);
        }
        {
          jLabel5 = new JLabel4j_std();
          jDesktopPane1.add(jLabel5);
          jLabel5.setText(lang.get("lbl_Storage_Location"));
          jLabel5.setBounds(12, 11, 93, 21);
          jLabel5.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jLabel6 = new JLabel4j_std();
          jDesktopPane1.add(jLabel6);
          jLabel6.setText(lang.get("lbl_Storage_GLN"));
          jLabel6.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel6.setBounds(681, 11, 114, 21);
        }
        {
          jTextFieldGLN = new JTextField4j();
          jDesktopPane1.add(jTextFieldGLN);
          jTextFieldGLN.setBounds(802, 11, 126, 21);
        }
        {
          jLabel7 = new JLabel4j_std();
          jDesktopPane1.add(jLabel7);
          jLabel7.setText(lang.get("lbl_Storage_Section"));
          jLabel7.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel7.setBounds(472, 44, 103, 21);
        }
        {
          jTextFieldStorageSection = new JTextField4j();
          jDesktopPane1.add(jTextFieldStorageSection);
          jTextFieldStorageSection.setBounds(583, 44, 80, 21);
        }
        {
          jLabel8 = new JLabel4j_std();
          jDesktopPane1.add(jLabel8);
          jLabel8.setText(lang.get("lbl_Storage_Location"));
          jLabel8.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel8.setBounds(0, 44, 105, 21);
        }
        {
          jTextFieldStorageLocation = new JTextField4j();
          jDesktopPane1.add(jTextFieldStorageLocation);
          jTextFieldStorageLocation.setBounds(112, 44, 105, 21);
        }
        {
          jLabel9 = new JLabel4j_std();
          jDesktopPane1.add(jLabel9);
          jLabel9.setText(lang.get("lbl_Storage_Type"));
          jLabel9.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel9.setBounds(235, 44, 149, 21);
        }
        {
          jTextFieldStorageType = new JTextField4j();
          jDesktopPane1.add(jTextFieldStorageType);
          jTextFieldStorageType.setBounds(391, 44, 80, 21);
        }
        {
          jLabel10 = new JLabel4j_std();
          jDesktopPane1.add(jLabel10);
          jLabel10.setText(lang.get("lbl_Sort_By"));
          jLabel10.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel10.setBounds(472, 77, 103, 21);
        }
        {
          ComboBoxModel jComboBoxSortByModel = new DefaultComboBoxModel(new String[] { "LOCATION_ID", "PLANT", "WAREHOUSE", "DESCRIPTION", "GLN", "STORAGE_LOCATION", "STORAGE_TYPE", "STORAGE_SECTION", "STORAGE_BIN" });
          jComboBoxSortBy = new JComboBox4j();
          jDesktopPane1.add(jComboBoxSortBy);
          jComboBoxSortBy.setModel(jComboBoxSortByModel);
          jComboBoxSortBy.setBounds(582, 75, 231, 23);
          jComboBoxSortBy.setSelectedItem("LOCATION_ID,PLANT,WAREHOUSE");
          jComboBoxSortBy.setRequestFocusEnabled(false);
        }
        {
          jButtonSearch = new JButton4j(Common.icon_find);
          jDesktopPane1.add(jButtonSearch);
          jButtonSearch.setText(lang.get("btn_Search"));
          jButtonSearch.setMnemonic(lang.getMnemonicChar());
          jButtonSearch.setBounds(4, 110, 103, 28);
          jButtonSearch.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              search();

            }
          });
        }
        {
          jButtonAdd = new JButton4j(Common.icon_add);
          jDesktopPane1.add(jButtonAdd);
          jButtonAdd.setText(lang.get("btn_Add"));
          jButtonAdd.setMnemonic(lang.getMnemonicChar());
          jButtonAdd.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_LOCATION_ADD"));
          jButtonAdd.setBounds(212, 110, 103, 28);
          jButtonAdd.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              addRecord();
            }
          });
        }
        {
          jButtonEdit = new JButton4j(Common.icon_edit);
          jDesktopPane1.add(jButtonEdit);
          jButtonEdit.setText(lang.get("btn_Edit"));
          jButtonEdit.setMnemonic(lang.getMnemonicChar());
          jButtonEdit.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_LOCATION_EDIT"));
          jButtonEdit.setBounds(316, 110, 103, 28);
          jButtonEdit.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              editRecord();
            }
          });
        }
        {
          jButtonDelete = new JButton4j(Common.icon_delete);
          jDesktopPane1.add(jButtonDelete);
          jButtonDelete.setText(lang.get("btn_Delete"));
          jButtonDelete.setMnemonic(lang.getMnemonicChar());
          jButtonDelete.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_LOCATION_DELETE"));
          jButtonDelete.setBounds(420, 110, 103, 28);
          jButtonDelete.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              deleteRecord();
            }
          });
        }
        {
          jButtonPrint = new JButton4j(Common.icon_report);
          jDesktopPane1.add(jButtonPrint);
          jButtonPrint.setText(lang.get("btn_Print"));
          jButtonPrint.setMnemonic(lang.getMnemonicChar());
          jButtonPrint.setBounds(524, 110, 103, 28);
          jButtonPrint.setEnabled(true);
          jButtonPrint.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              print();
            }
          });
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setMnemonic(lang.getMnemonicChar());
          jButtonHelp.setBounds(732, 110, 103, 28);
        }
        {

          jButtonClose = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonClose);
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setMnemonic(lang.getMnemonicChar());
          jButtonClose.setBounds(836, 110, 103, 28);
          jButtonClose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              JDBQuery2.closeStatement(listStatement);
              dispose();
            }
          });
        }
        {
          jToggleButtonSequence = new JToggleButton();
          jDesktopPane1.add(jToggleButtonSequence);
          jToggleButtonSequence.setBounds(820, 77, 21, 21);
          jToggleButtonSequence.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              setSequence(jToggleButtonSequence.isSelected());
            }
          });
        }

        {
          jStatusText = new JLabel4j_std();
          jStatusText.setForeground(new Color(255, 0, 0));
          jStatusText.setBackground(Color.GRAY);
          jStatusText.setBounds(0, 487, 941, 21);
          jDesktopPane1.add(jStatusText);
        }

        {
          jButtonClear = new JButton4j(Common.icon_clear);
          jButtonClear.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent e) {
              clearFilter();
            }
          });
View Full Code Here

TOP

Related Classes of com.commander4j.gui.JButton4j

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.