Package com.commander4j.gui

Examples of com.commander4j.gui.JButton4j


        jDesktopPane1.setPreferredSize(new java.awt.Dimension(357, 518));
        jDesktopPane1.setBorder(BorderFactory.createTitledBorder(""));
        jDesktopPane1.setLayout(null);
        jDesktopPane1.setLocation(0, 0);
        {
          jButtonSelect = new JButton4j(Common.icon_ok);
          jDesktopPane1.add(jButtonSelect);
          jButtonSelect.setText(lang.get("btn_Select"));
          jButtonSelect.setBounds(119, 98, 113, 32);
          jButtonSelect.setMnemonic(java.awt.event.KeyEvent.VK_L);
          jButtonSelect.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              if (jListData.isSelectionEmpty() == false)
              {
                dlg_selected_var = ((String) jListData.getSelectedValue()).substring(0, dlg_table.getColumnSizeForField(dlg_key_field_name));
                dlg_selected = true;
                try
                {
                  listStatement.close();
                }
                catch (SQLException e)
                {
                  e.printStackTrace();
                }
                dispose();
              }
            }
          });
        }
        {
          jButtonCancel = new JButton4j(Common.icon_cancel);
          jDesktopPane1.add(jButtonCancel);
          jButtonCancel.setText(lang.get("web_Cancel"));
          jButtonCancel.setBounds(235, 98, 113, 32);
          jButtonCancel.setMnemonic(java.awt.event.KeyEvent.VK_C);
          jButtonCancel.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              dlg_selected = false;
              dlg_selected_var = "";
              try
              {
                listStatement.close();
              }
              catch (SQLException e)
              {
                e.printStackTrace();
              }
              dispose();
            }
          });
        }
        {
          jTextFieldCriteria = new JTextField4j();
          jDesktopPane1.add(jTextFieldCriteria);
          jTextFieldCriteria.setBounds(70, 35, 385, 21);
        }
        {
          ComboBoxModel<String> jComboBox1Model = new DefaultComboBoxModel<String>(dlg_table.getFieldNames());
          jComboBoxCriteria = new JComboBox4j<String>();
          jDesktopPane1.add(jComboBoxCriteria);
          jComboBoxCriteria.setModel(jComboBox1Model);
          jComboBoxCriteria.setBounds(70, 7, 182, 23);
          jComboBoxCriteria.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              jTextFieldCriteria.setText("");
            }
          });
          jComboBoxCriteria.setSelectedIndex(dlg_criteria_field_name_default_pos);
        }
        {
          ComboBoxModel<String> jComboBox2Model = new DefaultComboBoxModel<String>(dlg_table.getFieldNames());
          jComboBoxOrderBy = new JComboBox4j<String>();
          jDesktopPane1.add(jComboBoxOrderBy);
          jComboBoxOrderBy.setModel(jComboBox2Model);
          jComboBoxOrderBy.setBounds(70, 63, 182, 23);
          jComboBoxOrderBy.setSelectedIndex(dlg_orderBy_name_default_pos);
        }

        {
          jLabel1 = new JLabel4j_std();
          jDesktopPane1.add(jLabel1);
          jLabel1.setText("Value :");
          jLabel1.setBounds(0, 35, 63, 21);
          jLabel1.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jLabel2 = new JLabel4j_std();
          jDesktopPane1.add(jLabel2);
          jLabel2.setText("Criteria :");
          jLabel2.setBounds(0, 7, 63, 21);
          jLabel2.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jLabel3 = new JLabel4j_std();
          jDesktopPane1.add(jLabel3);
          jLabel3.setText(lang.get("lbl_Sort_By")+" :");
          jLabel3.setBounds(0, 63, 63, 21);
          jLabel3.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jScrollPane1 = new JScrollPane();
          jDesktopPane1.add(jScrollPane1);
          jScrollPane1.setBounds(7, 154, 448, 350);
          jScrollPane1.getHorizontalScrollBar().addComponentListener(new ComponentAdapter() {
            public void componentResized(ComponentEvent evt) {
              if (jScrollPane1.getHorizontalScrollBar().isVisible() == true)
              {
                me.setSize(me.getSize().width + 50, (me.getSize().height));
                screen = Toolkit.getDefaultToolkit().getScreenSize();
                window = getBounds();
                setLocation((screen.width - window.width) / 2, (screen.height - window.height) / 2);
                me.validate();
              }
            }
          });
          {
            ListModel<String> jList1Model = new DefaultComboBoxModel<String>();

            jListData = new JList4j<String>();
            jScrollPane1.setViewportView(jListData);
            jListData.setModel(jList1Model);
            jListData.setCellRenderer(Common.renderer_list);
            jListData.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            jListData.setFont(Common.font_list);
            jListData.addMouseListener(new MouseAdapter() {
              public void mouseClicked(MouseEvent evt) {
                if (evt.getClickCount() == 2)
                {
                  jButtonSelect.doClick();
                }
              }
            });
          }
        }
        {
          jToggleButtonSequence = new JToggleButton(Common.icon_ascending);
          jDesktopPane1.add(jToggleButtonSequence);
          jToggleButtonSequence.setBounds(259, 63, 21, 21);
          jToggleButtonSequence.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              setSequence(jToggleButtonSequence.isSelected());
            }
          });
        }
        {

          jButtonSearch = new JButton4j(Common.icon_search);
          jDesktopPane1.add(jButtonSearch);
          jButtonSearch.setText(lang.get("btn_Search"));
          jButtonSearch.setBounds(3, 98, 113, 32);
          jButtonSearch.setMnemonic(java.awt.event.KeyEvent.VK_S);
          jButtonSearch.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              search();
            }
          });
        }
        {
          jTextFieldHeading = new JLabel4j_std();
          jDesktopPane1.add(jTextFieldHeading);
          jTextFieldHeading.setBounds(7, 133, 448, 21);
          jTextFieldHeading.setHorizontalAlignment(SwingConstants.LEFT);
          jTextFieldHeading.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setMnemonic(java.awt.event.KeyEvent.VK_H);
          jButtonHelp.setBounds(351, 98, 113, 32);
        }
View Full Code Here


    desktopPane.add(textFieldInspectionDescription);
    textFieldInspectionDescription.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(292, 113, 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

            jListHosts.setModel(jListHostsModel);
          }
        }
        {

          jButtonConnect = new JButton4j(Common.icon_connect);
          jButtonConnect.setBounds(45, 245, 110, 32);
          jDesktopPane1.add(jButtonConnect);
          jButtonConnect.setText("Connect");
          jButtonConnect.setMnemonic(java.awt.event.KeyEvent.VK_N);
          jButtonConnect.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              selectHost();
            }
          });
        }
        {
          jButtonClose = new JButton4j(Common.icon_close);
          jButtonClose.setBounds(161, 245, 110, 32);
          jDesktopPane1.add(jButtonClose);
          jButtonClose.setText("Close");
          jButtonClose.setMnemonic(java.awt.event.KeyEvent.VK_C);
          jButtonClose.addActionListener(new ActionListener() {
View Full Code Here

            }

          }
        }
        {
          jButtonSearch1 = new JButton4j(Common.icon_search);
          jDesktopPane1.add(jButtonSearch1);
          jButtonSearch1.setText(lang.get("btn_Search"));
          jButtonSearch1.setBounds(14, 176, 129, 32);
          jButtonSearch1.setMnemonic(java.awt.event.KeyEvent.VK_S);
          jButtonSearch1.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              buildSQL();
              populateList();

            }
          });
        }
        {
          jTextFieldMaterial = new JTextField4j();
          jDesktopPane1.add(jTextFieldMaterial);
          jTextFieldMaterial.setBounds(134, 44, 120, 21);
        }
        {
          jTextFieldLocation = new JTextField4j();
          jDesktopPane1.add(jTextFieldLocation);
          jTextFieldLocation.setBounds(594, 44, 98, 21);
        }
        {
          jLabel1 = new JLabel4j_std();
          jDesktopPane1.add(jLabel1);
          jLabel1.setText(lang.get("lbl_Material"));
          jLabel1.setBounds(1, 44, 121, 21);
          jLabel1.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jLabel3 = new JLabel4j_std();
          jDesktopPane1.add(jLabel3);
          jLabel3.setText(lang.get("lbl_Location_ID"));
          jLabel3.setBounds(485, 44, 103, 21);
        }
        {
          ComboBoxModel<JDBUom> jComboBox2Model = new DefaultComboBoxModel<JDBUom>(uomList);
          jComboBoxUOM = new JComboBox4j<JDBUom>();
          jDesktopPane1.add(jComboBoxUOM);
          jComboBoxUOM.setModel(jComboBox2Model);
          jComboBoxUOM.setBounds(865, 75, 130, 23);
          jComboBoxUOM.setMaximumRowCount(12);
        }
        {
          jLabel4 = new JLabel4j_std();
          jDesktopPane1.add(jLabel4);
          jLabel3.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel4.setText(lang.get("lbl_Pallet_UOM"));
          jLabel4.setBounds(764, 77, 96, 21);
          jLabel4.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setBounds(582, 176, 129, 32);
          jButtonHelp.setMnemonic(lang.getMnemonicChar());
        }
        {
          jButtonClose = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonClose);
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setBounds(866, 176, 129, 32);
          jButtonClose.setMnemonic(lang.getMnemonicChar());
          jButtonClose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              JDBQuery2.closeStatement(listStatement);
              dispose();
            }
          });
        }
        {
          jButtonPrint = new JButton4j(Common.icon_report);
          jDesktopPane1.add(jButtonPrint);
          jButtonPrint.setText(lang.get("btn_Print"));
          jButtonPrint.setBounds(298, 176, 129, 32);
          jButtonPrint.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_PALLETS"));
          jButtonPrint.setMnemonic(lang.getMnemonicChar());
          jButtonPrint.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              print();
            }
          });
        }
        {
          jButtonPrint = new JButton4j(Common.icon_report);
          jDesktopPane1.add(jButtonPrint);
          jButtonPrint.setText(lang.get("btn_Print_Summary"));
          jButtonPrint.setBounds(440, 176, 129, 32);
          jButtonPrint.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_HIST_SUMMARY"));
          jButtonPrint.setMnemonic(lang.getMnemonicChar());
          jButtonPrint.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              print_summary();
            }
          });
        }
        {
          jLabel10 = new JLabel4j_std();
          jDesktopPane1.add(jLabel10);
          jLabel10.setText(lang.get("lbl_Limit"));
          jLabel10.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel10.setBounds(661, 145, 87, 21);
        }
        {
          ComboBoxModel<String> jComboBoxSortByModel = new DefaultComboBoxModel<String>(new String[] { "TRANSACTION_REF,SSCC", "TRANSACTION_TYPE,TRANSACTION_SUBTYPE", "TRANSACTION_DATE,SSCC", "MATERIAL,BATCH_NUMBER", "MATERIAL,PROCESS_ORDER", "BATCH_NUMBER,MATERIAL", "PROCESS_ORDER", "QUANTITY",
              "DATE_OF_MANUFACTURE", "STATUS", "LOCATION_ID", "UOM", "EAN", "VARIANT" });
          jComboBoxSortBy = new JComboBox4j<String>();
          jDesktopPane1.add(jComboBoxSortBy);
          jComboBoxSortBy.setModel(jComboBoxSortByModel);
          jComboBoxSortBy.setBounds(330, 143, 299, 23);
        }
        {
          ComboBoxModel<String> jComboBoxDefaultPalletStatusModel = new DefaultComboBoxModel<String>(Common.palletStatusIncBlank);
          jComboBoxPalletStatus = new JComboBox4j<String>();
          jDesktopPane1.add(jComboBoxPalletStatus);
          jComboBoxPalletStatus.setModel(jComboBoxDefaultPalletStatusModel);
          jComboBoxPalletStatus.setBounds(844, 44, 150, 23);
        }
        {
          jLabel15 = new JLabel4j_std();
          jDesktopPane1.add(jLabel15);
          jLabel15.setText(lang.get("lbl_Pallet_Status"));
          jLabel15.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel15.setBounds(731, 44, 108, 21);
        }
        {
          jToggleButtonSequence = new JToggleButton();
          jToggleButtonSequence.setSelected(true);
          jDesktopPane1.add(jToggleButtonSequence);
          jToggleButtonSequence.setBounds(637, 145, 21, 21);
          jToggleButtonSequence.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              setSequence(jToggleButtonSequence.isSelected());
            }
          });
        }
        {
          jLabelQuantity = new JLabel4j_std();
          jDesktopPane1.add(jLabelQuantity);
          jLabelQuantity.setText(lang.get("lbl_Pallet_Quantity"));
          jLabelQuantity.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabelQuantity.setBounds(1, 110, 121, 21);
        }
        {

          jFormattedTextFieldQuantity = new JQuantityInput(new BigDecimal("0"));
          jDesktopPane1.add(jFormattedTextFieldQuantity);
          jFormattedTextFieldQuantity.setFont(Common.font_std);
          jFormattedTextFieldQuantity.setHorizontalAlignment(SwingConstants.TRAILING);
          jFormattedTextFieldQuantity.setBounds(161, 110, 70, 21);
          jFormattedTextFieldQuantity.setVerifyInputWhenFocusTarget(false);
          jFormattedTextFieldQuantity.setEnabled(false);
        }
        {
          jLabel2 = new JLabel4j_std();
          jDesktopPane1.add(jLabel2);
          jLabel2.setText(lang.get("lbl_Material_Batch"));
          jLabel2.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel2.setBounds(266, 44, 77, 21);
        }
        {
          jTextFieldBatch = new JTextField4j();
          jDesktopPane1.add(jTextFieldBatch);
          jTextFieldBatch.setBounds(347, 44, 100, 21);
        }
        {
          jLabelProcessOrder = new JLabel4j_std();
          jDesktopPane1.add(jLabelProcessOrder);
          jLabelProcessOrder.setText(lang.get("lbl_Process_Order"));
          jLabelProcessOrder.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabelProcessOrder.setBounds(691, 110, 144, 21);
        }
        {
          jTextFieldProcessOrder = new JTextField4j();
          jDesktopPane1.add(jTextFieldProcessOrder);
          jTextFieldProcessOrder.setBounds(844, 110, 119, 21);
        }
        {
          jTextFieldEAN = new JTextField4j();
          jDesktopPane1.add(jTextFieldEAN);
          jTextFieldEAN.setBounds(594, 77, 119, 21);
          jTextFieldEAN.setFocusCycleRoot(true);
        }
        {
          jLabel5 = new JLabel4j_std();
          jDesktopPane1.add(jLabel5);
          jLabel5.setText(lang.get("lbl_Material_UOM_EAN"));
          jLabel5.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabel5.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabel5.setBounds(485, 77, 103, 21);
        }
        {
          jLabel6 = new JLabel4j_std();
          jDesktopPane1.add(jLabel6);
          jLabel6.setText("/");
          jLabel6.setHorizontalAlignment(SwingConstants.CENTER);
          jLabel6.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabel6.setBounds(714, 77, 10, 21);
        }
        {
          jTextFieldVariant = new JTextField4j();
          jDesktopPane1.add(jTextFieldVariant);
          jTextFieldVariant.setBounds(725, 77, 21, 21);
          jTextFieldVariant.setFocusCycleRoot(true);
        }
        {
          jCheckBoxQuantity = new JCheckBox4j();
          jDesktopPane1.add(jCheckBoxQuantity);
          jCheckBoxQuantity.setBackground(new java.awt.Color(255, 255, 255));
          jCheckBoxQuantity.setBounds(129, 110, 21, 21);
          jCheckBoxQuantity.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              if (jCheckBoxQuantity.isSelected())
              {
                jFormattedTextFieldQuantity.setValue(0);
                jFormattedTextFieldQuantity.setEnabled(true);
              }
              else
              {
                jFormattedTextFieldQuantity.setValue(0);
                jFormattedTextFieldQuantity.setEnabled(false);
              }
            }
          });
        }
        {
          jLabel7 = new JLabel4j_std();
          jDesktopPane1.add(jLabel7);
          jLabel7.setText(lang.get("lbl_Sort_By"));
          jLabel7.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel7.setBounds(161, 145, 158, 21);
        }
        {
          SpinnerNumberModel jSpinnerIntModel = new SpinnerNumberModel();
          jSpinnerIntModel.setMinimum(1);
          jSpinnerIntModel.setMaximum(100000);
          jSpinnerIntModel.setStepSize(1);

          jSpinnerLimit = new JSpinner();
          jDesktopPane1.add(jSpinnerLimit);
         
          jSpinnerLimit.setModel(jSpinnerIntModel);
          JSpinner.NumberEditor ne = new JSpinner.NumberEditor(jSpinnerLimit);
          ne.getTextField().setFont(Common.font_std);
          jSpinnerLimit.setEditor(ne);
          jSpinnerLimit.setBounds(776, 145, 73, 21);
          jSpinnerLimit.setValue(1000);
          jSpinnerLimit.getEditor().setSize(45, 21);
        }
        {
          jCheckBoxLimit = new JCheckBox4j();
          jDesktopPane1.add(jCheckBoxLimit);
          jCheckBoxLimit.setBackground(new java.awt.Color(255, 255, 255));
          jCheckBoxLimit.setBounds(755, 145, 21, 21);
          jCheckBoxLimit.setSelected(true);
          jCheckBoxLimit.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              if (jCheckBoxLimit.isSelected())
              {
                jSpinnerLimit.setEnabled(true);
              }
              else
              {
                jSpinnerLimit.setEnabled(false);
              }
            }
          });
        }
        {
          jButtonLookupProcessOrder = new JButton4j(Common.icon_lookup);
          jDesktopPane1.add(jButtonLookupProcessOrder);
          jButtonLookupProcessOrder.setBounds(963, 110, 21, 21);
          jButtonLookupProcessOrder.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              JLaunchLookup.dlgCriteriaDefault = "Ready";
              JLaunchLookup.dlgAutoExec = true;
              if (JLaunchLookup.processOrders())
              {
                jTextFieldProcessOrder.setText(JLaunchLookup.dlgResult);
              }
            }
          });
        }
        {
          jButtonLookupBatch = new JButton4j(Common.icon_lookup);
          jDesktopPane1.add(jButtonLookupBatch);
          jButtonLookupBatch.setBounds(446, 44, 21, 21);
          jButtonLookupBatch.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              JLaunchLookup.dlgCriteriaDefault = jTextFieldMaterial.getText();
              JLaunchLookup.dlgAutoExec = true;
              if (JLaunchLookup.materialBatches())
              {
                jTextFieldBatch.setText(JLaunchLookup.dlgResult);
              }
            }
          });
        }
        {
          jButtonLookupMaterial = new JButton4j(Common.icon_lookup);
          jDesktopPane1.add(jButtonLookupMaterial);
          jButtonLookupMaterial.setBounds(253, 44, 21, 21);
          jButtonLookupMaterial.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              JLaunchLookup.dlgAutoExec = false;
              JLaunchLookup.dlgCriteriaDefault = "";
              if (JLaunchLookup.materials())
              {
                jTextFieldMaterial.setText(JLaunchLookup.dlgResult);
              }
            }
          });
        }
        {
          jButtonLookupLocation = new JButton4j(Common.icon_lookup);
          jDesktopPane1.add(jButtonLookupLocation);
          jButtonLookupLocation.setBounds(691, 44, 21, 21);
          jButtonLookupLocation.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              JLaunchLookup.dlgAutoExec = true;
              JLaunchLookup.dlgCriteriaDefault = "Y";
              if (JLaunchLookup.locations())
              {
                jTextFieldLocation.setText(JLaunchLookup.dlgResult);
              }
            }
          });
        }
        {
          jTextFieldSSCC = new JTextField4j();
          jDesktopPane1.add(jTextFieldSSCC);
          jTextFieldSSCC.setBounds(134, 77, 140, 21);
        }
        {
          jLabelSCC = new JLabel4j_std();
          jDesktopPane1.add(jLabelSCC);
          jLabelSCC.setText(lang.get("lbl_Pallet_SSCC"));
          jLabelSCC.setBounds(1, 77, 121, 21);
          jLabelSCC.setHorizontalAlignment(SwingConstants.TRAILING);
        }

        {
          jLabel8_1 = new JLabel4j_std();
          jLabel8_1.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel8_1.setText(lang.get("lbl_Despatch_No"));
          jLabel8_1.setBounds(266, 77, 77, 21);
          jDesktopPane1.add(jLabel8_1);
        }

        {
          jTextFieldDespatch_No = new JTextField4j();
          jTextFieldDespatch_No.setFocusCycleRoot(true);
          jTextFieldDespatch_No.setBounds(347, 77, 119, 21);
          jDesktopPane1.add(jTextFieldDespatch_No);
        }

        {
          jLabel1_1 = new JLabel4j_std();
          jLabel1_1.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel1_1.setText(lang.get("lbl_Transaction_Ref"));
          jLabel1_1.setBounds(485, 110, 103, 21);
          jDesktopPane1.add(jLabel1_1);
        }

        {
          transactionDateFrom = new JDateControl();
          transactionDateFrom.setBounds(154, 7, 128, 25);
          transactionDateFrom.setEnabled(false);
          jDesktopPane1.add(transactionDateFrom);
        }

        {
          jCheckBoxTransactionDate = new JCheckBox4j();
          jCheckBoxTransactionDate.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent e) {
              if (jCheckBoxTransactionDate.isSelected())
              {
                transactionDateFrom.setEnabled(true);
                transactionDateTo.setEnabled(true);
                calendarButtontransactionDateFrom.setEnabled(true);
                calendarButtontransactionDateTo.setEnabled(true);
              }
              else
              {
                transactionDateFrom.setEnabled(false);
                transactionDateTo.setEnabled(false);
                calendarButtontransactionDateFrom.setEnabled(false);
                calendarButtontransactionDateTo.setEnabled(false);
              }
            }
          });
          jCheckBoxTransactionDate.setBackground(new Color(255, 255, 255));
          jCheckBoxTransactionDate.setBounds(129, 9, 21, 21);
          jDesktopPane1.add(jCheckBoxTransactionDate);
        }

        {
          jLabel1_2 = new JLabel4j_std();
          jLabel1_2.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel1_2.setText(lang.get("lbl_Transaction_Date"));
          jLabel1_2.setBounds(1, 12, 121, 21);
          jDesktopPane1.add(jLabel1_2);
        }

        {
          jLabel1_3 = new JLabel4j_std();
          jLabel1_3.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel1_3.setText(lang.get("lbl_Transaction_Type"));
          jLabel1_3.setBounds(495, 11, 93, 21);
          jDesktopPane1.add(jLabel1_3);
        }

        {
          jLabel1_4 = new JLabel4j_std();
          jLabel1_4.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel1_4.setText(lang.get("lbl_Transaction_Subtype"));
          jLabel1_4.setBounds(721, 11, 140, 23);
          jDesktopPane1.add(jLabel1_4);
        }

        {
          comboBoxTransactionType = new JComboBox4j<String>();
          comboBoxTransactionType.setModel(new DefaultComboBoxModel<String>(Common.transactionTypes));
          comboBoxTransactionType.setBounds(593, 11, 124, 23);
          jDesktopPane1.add(comboBoxTransactionType);
        }

        {
          comboBoxTransactionSubtype = new JComboBox4j<String>();
          comboBoxTransactionSubtype.setModel(new DefaultComboBoxModel<String>(Common.transactionSubTypes));
          comboBoxTransactionSubtype.setBounds(865, 11, 130, 23);
          jDesktopPane1.add(comboBoxTransactionSubtype);
        }

        {
          jTextFieldTransaction_Ref = new JTextField4j();
          jTextFieldTransaction_Ref.setBounds(595, 110, 87, 21);
          jDesktopPane1.add(jTextFieldTransaction_Ref);
        }

        {
          transactionDateTo = new JDateControl();
          transactionDateTo.setBounds(347, 7, 128, 25);
          transactionDateTo.setEnabled(false);
          jDesktopPane1.add(transactionDateTo);
        }

        {
          final JButton4j exportXlsButton = new JButton4j(Common.icon_XLS);
          exportXlsButton.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent e) {
              export();
            }
          });
          exportXlsButton.setText(lang.get("btn_Excel"));
          exportXlsButton.setBounds(724, 176, 129, 32);
          jDesktopPane1.add(exportXlsButton);
        }

        {
          jTextFieldUser = new JTextField4j();
          jTextFieldUser.setBounds(348, 110, 119, 21);
          jDesktopPane1.add(jTextFieldUser);
        }

        {
          jLabel5_1 = new JLabel4j_std();
          jLabel5_1.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel5_1.setText(lang.get("lbl_User_ID"));
          jLabel5_1.setBounds(266, 110, 77, 21);
          jDesktopPane1.add(jLabel5_1);
        }

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

            });
            jListPrinters.setModel(jList1Model);
          }
        }
        {
          jButtonSelect = new JButton4j(Common.icon_select);
          jDesktopPane1.add(jButtonSelect);
          jButtonSelect.setText(lang.get("btn_Select"));
          jButtonSelect.setBounds(141, 241, 110, 32);
          jButtonSelect.setMnemonic(lang.getMnemonicChar());
          jButtonSelect.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              selectQueue();
            }
          });
        }
        {
          jButtonCancel = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonCancel);
          jButtonCancel.setText(lang.get("btn_Close"));
          jButtonCancel.setFont(Common.font_btn);
          jButtonCancel.setBounds(375, 241, 110, 32);
          jButtonCancel.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              dispose();
            }
          });
        }
        {
          jButtonRefresh = new JButton4j(Common.icon_refresh);
          jDesktopPane1.add(jButtonRefresh);
          jButtonRefresh.setText(lang.get("btn_Refresh"));
          jButtonRefresh.setBounds(258, 241, 110, 32);
          jButtonRefresh.setMnemonic(lang.getMnemonicChar());
          jButtonRefresh.addActionListener(new ActionListener() {
View Full Code Here

          jTextFieldSampleID.setEditable(true);
          jTextFieldSampleID.setEnabled(true);
          jTextFieldSampleID.setBounds(147, 12, 77, 21);
        }
        {
          jButtonSave = new JButton4j(Common.icon_save);
          jDesktopPane1.add(jButtonSave);
          jButtonSave.setEnabled(true);
          jButtonSave.setText(lang.get("btn_Save"));
          jButtonSave.setMnemonic(lang.getMnemonicChar());
          jButtonSave.setBounds(111, 333, 100, 28);
          jButtonSave.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {

              updateRecord();
            }
          });
        }
        {
          jButtonCancel = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonCancel);
          jButtonCancel.setText(lang.get("btn_Close"));
          jButtonCancel.setMnemonic(lang.getMnemonicChar());
          jButtonCancel.setBounds(315, 333, 100, 28);
          jButtonCancel.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              dispose();
            }
          });
        }

        {
          lblSampleID = new JLabel4j_std();
          jDesktopPane1.add(lblSampleID);
          lblSampleID.setText(lang.get("lbl_SampleID"));
          lblSampleID.setBounds(7, 14, 133, 21);
          lblSampleID.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          lblUserData2 = new JLabel4j_std();
          jDesktopPane1.add(lblUserData2);
          lblUserData2.setBounds(7, 250, 133, 21);
          lblUserData2.setHorizontalAlignment(SwingConstants.TRAILING);
          lblUserData2.setText(lang.get("lbl_User_Data2"));
        }

        {
          lblMaterial = new JLabel4j_std();
          jDesktopPane1.add(lblMaterial);
          lblMaterial.setText(lang.get("lbl_Material"));
          lblMaterial.setHorizontalAlignment(SwingConstants.TRAILING);
          lblMaterial.setBounds(7, 118, 133, 21);
        }
        {
          jTextFieldMaterial = new JTextField4j();
          jDesktopPane1.add(jTextFieldMaterial);
          jTextFieldMaterial.setBounds(147, 116, 119, 21);
          jTextFieldMaterial.setEnabled(false);
        }
        {
          lblActivityID = new JLabel4j_std();
          jDesktopPane1.add(lblActivityID);
          lblActivityID.setText(lang.get("lbl_Activity_ID"));
          lblActivityID.setHorizontalAlignment(SwingConstants.TRAILING);
          lblActivityID.setBounds(7, 196, 133, 21);
        }
        {
          jTextFieldActivityID = new JTextField4j();
          jDesktopPane1.add(jTextFieldActivityID);
          jTextFieldActivityID.setBounds(147, 194, 119, 21);
          jTextFieldActivityID.setEnabled(false);
        }

        {
          lblProcessOrder = new JLabel4j_std();
          jDesktopPane1.add(lblProcessOrder);
          lblProcessOrder.setText(lang.get("lbl_Process_Order"));
          lblProcessOrder.setHorizontalAlignment(SwingConstants.TRAILING);
          lblProcessOrder.setBounds(7, 66, 133, 21);
        }
        {
          jTextFieldProcessOrder = new JTextField4j();
          jDesktopPane1.add(jTextFieldProcessOrder);
          jTextFieldProcessOrder.setBounds(147, 64, 119, 21);
          jTextFieldProcessOrder.setEnabled(false);

        }
        {
          jTextFieldUserData2 = new JTextField4j();
          jDesktopPane1.add(jTextFieldUserData2);
          jTextFieldUserData2.setBounds(147, 246, 119, 21);
          jTextFieldUserData2.setFocusCycleRoot(true);
        }
        {
          lblUserData1 = new JLabel4j_std();
          jDesktopPane1.add(lblUserData1);
          lblUserData1.setText(lang.get("lbl_User_Data1"));
          lblUserData1.setHorizontalAlignment(SwingConstants.TRAILING);
          lblUserData1.setBounds(7, 224, 133, 21);
        }

        {
          jTextFieldProcessOrderDescription = new JTextField4j();
          jDesktopPane1.add(jTextFieldProcessOrderDescription);
          jTextFieldProcessOrderDescription.setBounds(147, 90, 287, 21);
          jTextFieldProcessOrderDescription.setEnabled(false);
        }
        {
          lblProcessOrderDescription = new JLabel4j_std();
          jDesktopPane1.add(lblProcessOrderDescription);
          lblProcessOrderDescription.setText(lang.get("lbl_Description"));
          lblProcessOrderDescription.setHorizontalAlignment(SwingConstants.TRAILING);
          lblProcessOrderDescription.setBounds(7, 92, 133, 21);
        }
        {
          lblMaterialDescription = new JLabel4j_std();
          jDesktopPane1.add(lblMaterialDescription);
          lblMaterialDescription.setText(lang.get("lbl_Description"));
          lblMaterialDescription.setHorizontalAlignment(SwingConstants.TRAILING);
          lblMaterialDescription.setBounds(7, 144, 133, 21);
        }
        {
          jTextFieldMaterialDescription = new JTextField4j();
          jDesktopPane1.add(jTextFieldMaterialDescription);
          jTextFieldMaterialDescription.setBounds(147, 142, 287, 21);
          jTextFieldMaterialDescription.setEnabled(false);

        }
        {
          jStatusText = new JLabel4j_std();
          jDesktopPane1.add(jStatusText);
          jStatusText.setForeground(new java.awt.Color(255, 0, 0));
          jStatusText.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
          jStatusText.setBounds(0, 373, 510, 21);
        }

        {
          jTextFieldUserData1 = new JTextField4j();
          jTextFieldUserData1.setFocusCycleRoot(true);
          jTextFieldUserData1.setBounds(147, 220, 119, 21);
          jDesktopPane1.add(jTextFieldUserData1);
        }

        {
          lblInspectionID = new JLabel4j_std();
          lblInspectionID.setHorizontalAlignment(SwingConstants.TRAILING);
          lblInspectionID.setText(lang.get("lbl_Location_ID"));
          lblInspectionID.setBounds(7, 170, 133, 21);
          jDesktopPane1.add(lblInspectionID);
        }

        {
          jTextFieldInspectionID = new JTextField4j();
          jTextFieldInspectionID.setBounds(147, 168, 119, 21);
          jTextFieldInspectionID.setEnabled(false);
          jDesktopPane1.add(jTextFieldInspectionID);
        }
       
        {
          JLabel4j_std lblSampleDate = new JLabel4j_std();
          lblSampleDate.setText(lang.get("lbl_Sample_Date"));
          lblSampleDate.setHorizontalAlignment(SwingConstants.TRAILING);
          lblSampleDate.setBounds(7, 40, 133, 21);
          jDesktopPane1.add(lblSampleDate);
        }
       
        {
          sampleDate = new JDateControl();
          jDesktopPane1.add(sampleDate);
          sampleDate.setBounds(147, 36, 125, 25);
          sampleDate.getEditor().setPreferredSize(new java.awt.Dimension(87, 19));
          sampleDate.getEditor().setSize(87, 21);
        }
        {
          JButton4j btnPrint = new JButton4j(Common.icon_print);
          btnPrint.setText(lang.get("btn_Print"));
          btnPrint.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              updateRecord();
              Long sampleID = sample.generateSampleID();
              String pq = comboBoxPrintQueue.getSelectedItem().toString();
              buildSQL1Record(sampleID);
              JLaunchReport.runReport("RPT_SAMPLE_LABEL", listStatement, false, pq, Integer.valueOf(spinnerCopies.getValue().toString()), false);
              jStatusText.setText(Integer.valueOf(spinnerCopies.getValue().toString()) + " labels printed. " + sample.getSampleDate().toString());
            }
          });
          btnPrint.setMnemonic('0');
          btnPrint.setEnabled(true);
          btnPrint.setBounds(212, 333, 100, 28);
          jDesktopPane1.add(btnPrint);
        }
       
        comboBoxPrintQueue.setBounds(145, 272, 365, 25);
        jDesktopPane1.add(comboBoxPrintQueue);
View Full Code Here

            }
          });
        }
        {

          jButtonUpdate = new JButton4j(Common.icon_update);
          jDesktopPane1.add(jButtonUpdate);
          jButtonUpdate.setEnabled(false);
          jButtonUpdate.setText(lang.get("btn_Save"));
          jButtonUpdate.setHorizontalTextPosition(SwingConstants.RIGHT);
          jButtonUpdate.setMnemonic(lang.getMnemonicChar());
          jButtonUpdate.setBounds(136, 424, 112, 32);
          jButtonUpdate.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {

              module.setResourceKey(jTextFieldResourceKey.getText());

              module.setIconFilename(jTextFieldIconFilename.getText());
              module.setHelpSetID(jTextFieldHelpsetid.getText());

              module.setType((String) jComboBoxType.getSelectedItem());
              module.setReportType((String) comboBox.getSelectedItem());

              if (jCheckBoxDesktop.isSelected())
                module.setDKActive("Y");
              else
                module.setDKActive("N");

              if (jCheckBoxScanner.isSelected())
                module.setRFActive("Y");
              else
                module.setRFActive("N");

              if (jCheckBoxPrintPreview.isSelected())
                module.setPrintPreview("Y");
              else
                module.setPrintPreview("N");

              if (jCheckBoxPrintDialog.isSelected())
                module.setPrintDialog("Y");
              else
                module.setPrintDialog("N");

              module.setPrintCopies(Integer.valueOf(jSpinnerPrintCopies.getValue().toString()));

              module.setReportFilename(jTextFieldReportFilename.getText());
              module.setExecFilename(jTextFieldExecFilename.getText());
              module.setExecDir(jTextFieldExecDir.getText());
             
              module.setAutoLabelCommandFilename(jTextFieldAutoLabelCommandFilename.getText());
              module.setAutoLabelLabelFilename(jTextFieldAutoLabelLabelFilename.getText());

              if (module.update() == false)
              {
                JUtility.errorBeep();
                JOptionPane.showMessageDialog(null, module.getErrorMessage(), lang.get("err_Error"), JOptionPane.ERROR_MESSAGE);
              }

              jButtonUpdate.setEnabled(false);
            }
          });
        }
        {

          jButtonClose = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonClose);
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setMnemonic(lang.getMnemonicChar());
          jButtonClose.setBounds(364, 424, 112, 32);
          jButtonClose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              dispose();
            }
          });
        }
        {
          jLabel3 = new JLabel4j_std();
          jDesktopPane1.add(jLabel3);
          jLabel3.setText(lang.get("lbl_Module_Type"));
          jLabel3.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabel3.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabel3.setBounds(0, 93, 152, 21);
        }
        {
          jLabel4 = new JLabel4j_std();
          jDesktopPane1.add(jLabel4);
          jLabel4.setText(lang.get("lbl_Module_Desktop"));
          jLabel4.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabel4.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabel4.setBounds(0, 122, 152, 21);
        }
        {
          jLabel5 = new JLabel4j_std();
          jDesktopPane1.add(jLabel5);
          jLabel5.setText(lang.get("lbl_Description"));
          jLabel5.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabel5.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabel5.setBounds(0, 60, 152, 21);
        }
        {
          comboBox = new JComboBox4j<String>();
          comboBox.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
              jButtonUpdate.setEnabled(true);
            }
          });
          comboBox.setBounds(164, 206, 180, 23);
          comboBox.addItem("");
          comboBox.addItem("Standard");
          comboBox.addItem("Label");
          jDesktopPane1.add(comboBox);
        }
        {
          jComboBoxType = new JComboBox4j<String>();
          jDesktopPane1.add(jComboBoxType);
          jComboBoxType.setEnabled(true);
          jComboBoxType.setEditable(false);
          jComboBoxType.setLightWeightPopupEnabled(true);
          jComboBoxType.setIgnoreRepaint(false);
          jComboBoxType.setBounds(164, 93, 180, 23);
          jComboBoxType.addItem("EXEC");
          jComboBoxType.addItem("FORM");
          jComboBoxType.addItem("FUNCTION");
          jComboBoxType.addItem("MENU");
          jComboBoxType.addItem("REPORT");
          jComboBoxType.addItem("USER");
          jComboBoxType.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              new_type = jComboBoxType.getSelectedItem();
              if (new_type != null)
              {
                if (new_type.equals(current_type) != true)
                {
                  // module_updated = true;
                  jButtonUpdate.setEnabled(true);
                  jButtonIconPreview.setIcon(JDBModule.getModuleIcon(jTextFieldIconFilename.getText(), (String) jComboBoxType.getSelectedItem()));
                }

                if (new_type.equals("REPORT") || new_type.equals("USER"))
                {
                  jTextFieldReportFilename.setEnabled(true);
                  jButtonReportFileChooser.setEnabled(true);
                  jCheckBoxPrintPreview.setEnabled(true);
                  jCheckBoxPrintDialog.setEnabled(true);
                  jSpinnerPrintCopies.setEnabled(true);
                  comboBox.setEnabled(true);
                  jTextFieldAutoLabelCommandFilename.setEnabled(true);
                  jTextFieldAutoLabelLabelFilename.setEnabled(true);
                  jButtonAutoLabelCommandFileChooser.setEnabled(true);
                  jButtonAutoLabelLabelDirChooser.setEnabled(true);
                }
                else
                {
                  jTextFieldReportFilename.setEnabled(false);
                  jButtonReportFileChooser.setEnabled(false);
                  jCheckBoxPrintPreview.setEnabled(false);
                  jCheckBoxPrintDialog.setEnabled(false);
                  jSpinnerPrintCopies.setEnabled(false);
                  comboBox.setEnabled(false);
                  jTextFieldAutoLabelCommandFilename.setEnabled(false);
                  jTextFieldAutoLabelLabelFilename.setEnabled(false);
                  jButtonAutoLabelCommandFileChooser.setEnabled(false);
                  jButtonAutoLabelLabelDirChooser.setEnabled(false);
                }

                if (new_type.equals("EXEC"))
                {
                  jTextFieldExecFilename.setEnabled(true);
                  jButtonExecFileChooser.setEnabled(true);
                  jTextFieldExecDir.setEnabled(true);
                  jButtonExecDirChooser.setEnabled(true);
                }
                else
                {
                  jTextFieldExecFilename.setEnabled(false);
                  jButtonExecFileChooser.setEnabled(false);
                  jTextFieldExecDir.setEnabled(false);
                  jButtonExecDirChooser.setEnabled(false);
                }
              }
            }
          });
        }
        {
          jCheckBoxScanner = new JCheckBox4j();
          jDesktopPane1.add(jCheckBoxScanner);
          jCheckBoxScanner.setSelected(true);
          jCheckBoxScanner.setBounds(164, 146, 21, 21);
          jCheckBoxScanner.setBackground(new java.awt.Color(255, 255, 255));
          jCheckBoxScanner.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              // module_updated = true;
              jButtonUpdate.setEnabled(true);
            }
          });
        }
        {
          jCheckBoxDesktop = new JCheckBox4j();
          jDesktopPane1.add(jCheckBoxDesktop);
          jCheckBoxDesktop.setSelected(true);
          jCheckBoxDesktop.setBounds(164, 122, 21, 21);
          jCheckBoxDesktop.setBackground(new java.awt.Color(255, 255, 255));
          jCheckBoxDesktop.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              // module_updated = true;
              jButtonUpdate.setEnabled(true);
            }
          });
        }
        {
          jLabel6 = new JLabel4j_std();
          jDesktopPane1.add(jLabel6);
          jLabel6.setText(lang.get("lbl_Module_Scanner"));
          jLabel6.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabel6.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabel6.setBounds(0, 146, 152, 21);
        }

        {
          jLabelMnemonic = new JLabel4j_std();
          jDesktopPane1.add(jLabelMnemonic);
          jLabelMnemonic.setText(lang.get("lbl_Language_Mnemonic"));
          jLabelMnemonic.setBounds(449, 60, 112, 21);
          jLabelMnemonic.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabelMnemonic.setHorizontalTextPosition(SwingConstants.RIGHT);
        }
        {
          jTextFieldMnemonic = new JTextField4j();
          jTextFieldMnemonic.setEditable(false);
          AbstractDocument doc = (AbstractDocument) jTextFieldMnemonic.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBModule.field_mneumonic));

          jDesktopPane1.add(jTextFieldMnemonic);
          jTextFieldMnemonic.setText("");

          jTextFieldMnemonic.setBounds(566, 60, 42, 21);
          jTextFieldMnemonic.setToolTipText("Character to underline");
          jTextFieldMnemonic.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonUpdate.setEnabled(true);
            }
          });
        }
        {
          jLabel2 = new JLabel4j_std();
          jDesktopPane1.add(jLabel2);
          jLabel2.setText(lang.get("lbl_Module_Executable_Directory"));
          jLabel2.setBounds(0, 291, 152, 21);
          jLabel2.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jTextFieldIconFilename = new JTextField4j();
          jDesktopPane1.add(jTextFieldIconFilename);
          jTextFieldIconFilename.setBounds(164, 177, 218, 22);
          jTextFieldIconFilename.addKeyListener(new KeyAdapter() {
            public void keyReleased(KeyEvent evt) {
              jButtonIconPreview.setIcon(JDBModule.getModuleIcon(jTextFieldIconFilename.getText(), (String) jComboBoxType.getSelectedItem()));
            }

            public void keyTyped(KeyEvent evt) {
              jButtonUpdate.setEnabled(true);
            }
          });
        }
        {
          jButtonIconFileChooser = new JButton4j();
          jDesktopPane1.add(jButtonIconFileChooser);
          jButtonIconFileChooser.setText("..");
          jButtonIconFileChooser.setBounds(383, 177, 17, 21);
          jButtonIconFileChooser.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {

              JFileChooser loadIco = new JFileChooser();

              try
              {
                File f = new File(new File("./images").getCanonicalPath());
                loadIco.setCurrentDirectory(f);
                loadIco.addChoosableFileFilter(new JFileFilterImages());
                loadIco.setAcceptAllFileFilterUsed(false);
                loadIco.setSelectedFile(new File(jTextFieldIconFilename.getText()));
              }
              catch (Exception e)
              {
              }

              if (loadIco.showOpenDialog(jButtonIconFileChooser) == JFileChooser.APPROVE_OPTION)
              {
                File selectedFile;
                selectedFile = loadIco.getSelectedFile();

                if (selectedFile != null)
                {
                  if (jTextFieldIconFilename.getText().compareTo(selectedFile.getName()) != 0)
                  {
                    jTextFieldIconFilename.setText(selectedFile.getName());
                    jButtonIconPreview.setIcon(JDBModule.getModuleIcon(jTextFieldIconFilename.getText(), (String) jComboBoxType.getSelectedItem()));
                    jButtonUpdate.setEnabled(true);
                  }
                }
              }
            }
          });
        }
        {
          jButtonIconPreview = new JButton4j();
          jDesktopPane1.add(jButtonIconPreview);
          jButtonIconPreview.setBounds(292, 177, 23, 22);
          jButtonIconPreview.setBorderPainted(false);
          jButtonIconPreview.setContentAreaFilled(false);
          jButtonIconPreview.setRolloverEnabled(false);
          jButtonIconPreview.setRequestFocusEnabled(false);
        }
        {
          jTextFieldHelpsetid = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldHelpsetid.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBModule.field_helpset_id));
          jDesktopPane1.add(jTextFieldHelpsetid);
          jTextFieldHelpsetid.setBounds(164, 318, 427, 21);
          jTextFieldHelpsetid.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {

              jButtonUpdate.setEnabled(true);
            }
          });
        }
        {
          jLabel7 = new JLabel4j_std();
          jDesktopPane1.add(jLabel7);
          jLabel7.setText(lang.get("lbl_Module_Help"));
          jLabel7.setBounds(0, 318, 152, 21);
          jLabel7.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setBounds(250, 424, 112, 32);
          jButtonHelp.setMnemonic(lang.getMnemonicChar());
        }
        {
          jTextFieldReportFilename = new JTextField4j();
          jDesktopPane1.add(jTextFieldReportFilename);
          jTextFieldReportFilename.setBounds(164, 233, 218, 22);
          jTextFieldReportFilename.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonUpdate.setEnabled(true);
            }

            public void keyReleased(KeyEvent evt) {
              jButtonIconPreview.setIcon(JDBModule.getModuleIcon(jTextFieldIconFilename.getText(), (String) jComboBoxType.getSelectedItem()));
            }
          });
        }
        {
          jLabel8 = new JLabel4j_std();
          jDesktopPane1.add(jLabel8);
          jLabel8.setText(lang.get("lbl_Module_Icon_Filename"));
          jLabel8.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel8.setBounds(0, 178, 152, 21);
        }
        {
          jButtonReportFileChooser = new JButton4j();
          jDesktopPane1.add(jButtonReportFileChooser);
          jButtonReportFileChooser.setText("..");
          jButtonReportFileChooser.setBounds(383, 234, 17, 21);
          jButtonReportFileChooser.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {

              JFileChooser loadRpt = new JFileChooser();
              loadRpt.setAcceptAllFileFilterUsed(false);
              try
              {
                String path = "";
                if (((String) comboBox.getSelectedItem()).equals("Standard"))
                {
                  path = "./reports";
                }
                else
                {
                  path = "./labels";
                }
                File f = new File(new File(path).getCanonicalPath());
                loadRpt.setCurrentDirectory(f);

                if (((String) comboBox.getSelectedItem()).equals("Standard"))
                {
                  loadRpt.addChoosableFileFilter(new JFileFilterReports());
                }
                else
                {
                  loadRpt.addChoosableFileFilter(new JFileFilterLabels());
                }

                loadRpt.setSelectedFile(new File(jTextFieldReportFilename.getText()));
              }
              catch (Exception e)
              {
              }

              if (loadRpt.showOpenDialog(jButtonReportFileChooser) == JFileChooser.APPROVE_OPTION)
              {
                File selectedFile;
                selectedFile = loadRpt.getSelectedFile();

                if (selectedFile != null)
                {
                  if (jTextFieldReportFilename.getText().compareTo(selectedFile.getName()) != 0)
                  {
                    jTextFieldReportFilename.setText(selectedFile.getName());
                    jButtonUpdate.setEnabled(true);
                  }
                }
              }
            }
          });
        }
        {
          jTextFieldExecDir = new JTextField4j();
          jDesktopPane1.add(jTextFieldExecDir);
          jTextFieldExecDir.setBounds(164, 290, 427, 22);
          jTextFieldExecDir.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonUpdate.setEnabled(true);
            }

            public void keyReleased(KeyEvent evt) {
              jButtonIconPreview.setIcon(JDBModule.getModuleIcon(jTextFieldIconFilename.getText(), (String) jComboBoxType.getSelectedItem()));
            }
          });
        }
        {
          jTextFieldExecFilename = new JTextField4j();
          jDesktopPane1.add(jTextFieldExecFilename);
          jTextFieldExecFilename.setBounds(164, 262, 427, 22);
          jTextFieldExecFilename.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonUpdate.setEnabled(true);
            }

            public void keyReleased(KeyEvent evt) {
              jButtonIconPreview.setIcon(JDBModule.getModuleIcon(jTextFieldIconFilename.getText(), (String) jComboBoxType.getSelectedItem()));
            }
          });
        }
        {
          jLabel9 = new JLabel4j_std();
          jDesktopPane1.add(jLabel9);
          jLabel9.setText(lang.get("lbl_Module_Report_Filename"));
          jLabel9.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel9.setBounds(0, 234, 152, 21);
        }
        {
          jLabel10 = new JLabel4j_std();
          jDesktopPane1.add(jLabel10);
          jLabel10.setText(lang.get("lbl_Module_Executable_Filename"));
          jLabel10.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel10.setBounds(0, 263, 152, 21);
        }
        {
          jButtonExecDirChooser = new JButton4j();
          jDesktopPane1.add(jButtonExecDirChooser);
          jButtonExecDirChooser.setText("..");
          jButtonExecDirChooser.setBounds(591, 290, 17, 21);
          jButtonExecDirChooser.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {

              JFileChooser loadDir = new JFileChooser();

              try
              {
                File f = new File(new File("").getCanonicalPath());
                loadDir.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
                loadDir.setCurrentDirectory(f);
                loadDir.setSelectedFile(new File(jTextFieldExecDir.getText()));

                if (loadDir.showOpenDialog(jButtonExecDirChooser) == JFileChooser.APPROVE_OPTION)
                {
                  File selectedFile;
                  selectedFile = loadDir.getSelectedFile();

                  if (selectedFile != null)
                  {
                    if (jTextFieldExecDir.getText().compareTo(selectedFile.getCanonicalPath()) != 0)
                    {
                      jTextFieldExecDir.setText(selectedFile.getCanonicalPath());
                      jButtonUpdate.setEnabled(true);
                    }
                  }
                }

              }
              catch (Exception e)
              {
              }

            }
          });
        }
        {
          jButtonExecFileChooser = new JButton4j();
          jDesktopPane1.add(jButtonExecFileChooser);
          jButtonExecFileChooser.setText("..");
          jButtonExecFileChooser.setBounds(591, 262, 17, 21);
          jButtonExecFileChooser.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {

              JFileChooser loadExec = new JFileChooser();

              try
              {
                File f = new File(new File("").getCanonicalPath());
                loadExec.setCurrentDirectory(f);
                loadExec.addChoosableFileFilter(new JFileFilterExecs());
                loadExec.setSelectedFile(new File(jTextFieldExecFilename.getText()));

                if (loadExec.showOpenDialog(jButtonExecFileChooser) == JFileChooser.APPROVE_OPTION)
                {
                  File selectedFile;
                  selectedFile = loadExec.getSelectedFile();

                  if (selectedFile != null)
                  {
                    if (jTextFieldExecFilename.getText().compareTo(selectedFile.getName()) != 0)
                    {
                      jTextFieldExecFilename.setText(selectedFile.getCanonicalPath());
                      jButtonUpdate.setEnabled(true);
                    }
                  }
                }

              }
              catch (Exception e)
              {
              }

            }
          });
        }

        {
          jButtonExecDirChooser_1 = new JButton4j();
          jButtonExecDirChooser_1.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {

              JFileChooser loadWeb = new JFileChooser();
View Full Code Here

            }
          });
          jTextFieldName.setFocusCycleRoot(true);
        }
        {
          jButtonUpdate = new JButton4j(Common.icon_update);
          jDesktopPane1.add(jButtonUpdate, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
          jButtonUpdate.setEnabled(false);
          jButtonUpdate.setText(lang.get("btn_Save"));
          jButtonUpdate.setMnemonic(lang.getMnemonicChar());
          jButtonUpdate.setHorizontalTextPosition(SwingConstants.RIGHT);
          jButtonUpdate.setBounds(72, 197, 112, 28);
          jButtonUpdate.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              mt.setName(jTextFieldName.getText());
              if (checkBoxPrintOnLabel.isSelected()) {
                mt.setPrintOnLabel("Y");
              }
              else {
                mt.setPrintOnLabel("N");
              }
             
              if (checkBoxOverridePackLabel.isSelected())
              {
                if (comboBoxPackModuleID.getSelectedItem().toString().equals(""))
                {
                  mt.setOverridePackLabel("N");
                  mt.setPackLabelModuleID("");
                }
                else
                {
                  mt.setOverridePackLabel("Y");
                  mt.setPackLabelModuleID(comboBoxPackModuleID.getSelectedItem().toString());
                }
               
              }
              else
              {
                mt.setOverridePackLabel("N");
                mt.setPackLabelModuleID("");
              }
             
              if (checkBoxOverridePalletLabel.isSelected())
              {
                if (comboBoxPalletModuleID.getSelectedItem().toString().equals(""))
                {
                  mt.setOverridePalletLabel("N");
                  mt.setPalletLabelModuleID("");
                }
                else
                {
                  mt.setOverridePalletLabel("Y");
                  mt.setPalletLabelModuleID(comboBoxPalletModuleID.getSelectedItem().toString());
                }
              }
              else
              {
                mt.setOverridePalletLabel("N");
                mt.setPalletLabelModuleID("");
             
             
              mt.update();
              jButtonUpdate.setEnabled(false);
            }
          });
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setMnemonic(lang.getMnemonicChar());
          jButtonHelp.setBounds(205, 197, 112, 28);
        }
        {
          label = new JLabel4j_std();
          label.setText((String) null);
          label.setHorizontalTextPosition(SwingConstants.RIGHT);
          label.setHorizontalAlignment(SwingConstants.RIGHT);
          label.setBounds(22, 88, 175, 21);
          label.setText(lang.get("lbl_Print_Customer_on_Label"));
          jDesktopPane1.add(label);
        }
        {
          checkBoxPrintOnLabel = new JCheckBox4j();
          checkBoxPrintOnLabel.setSelected(true);
          checkBoxPrintOnLabel.setBackground(Color.WHITE);
          checkBoxPrintOnLabel.setBounds(201, 88, 21, 24);
          checkBoxPrintOnLabel.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              jButtonUpdate.setEnabled(true);
            }
          });
          jDesktopPane1.add(checkBoxPrintOnLabel);

        }
        {
          jButtonClose = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonClose, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setMnemonic(lang.getMnemonicChar());
          jButtonClose.setBounds(336, 197, 112, 28);
          jButtonClose.addActionListener(new ActionListener() {
View Full Code Here

      }
    });
    findButton.setBounds(672, 298, 143, 30);
    desktopPane.add(findButton);

    final JButton4j printButton = new JButton4j(Common.icon_report);
    printButton.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        if (list_despatch.getModel().getSize() > 0)
        {
          if (list_despatch.getSelectedIndex() >= 0)
          {
            JDBDespatch d = (JDBDespatch) list_despatch.getSelectedValue();
            HashMap<String, Object> parameters = new HashMap<String, Object>();
            parameters.put("p_despatch_no", d.getDespatchNo());
            JLaunchReport.runReport("RPT_DESPATCH", parameters, "", null, "");
          }
        }
      }
    });
    printButton.setText(lang.get("btn_Print"));
    printButton.setBounds(474, 388, 116, 30);
    desktopPane.add(printButton);

    jLabel10 = new JLabel4j_std();
    jLabel10.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
    jLabel10.setHorizontalAlignment(SwingConstants.TRAILING);
    jLabel10.setText(lang.get("lbl_Limit"));
    jLabel10.setBounds(672, 244, 128, 21);
    desktopPane.add(jLabel10);

    jCheckBoxLimit = new JCheckBox4j();
    jCheckBoxLimit.setSelected(true);
    jCheckBoxLimit.setBackground(new Color(255, 255, 255));
    jCheckBoxLimit.setBounds(672, 264, 21, 21);
    desktopPane.add(jCheckBoxLimit);

    spinnerUnassignedLimit = new JSpinner();
    JSpinner.NumberEditor ne1 = new JSpinner.NumberEditor(spinnerUnassignedLimit);
    ne1.getTextField().setFont(Common.font_std);
    spinnerUnassignedLimit.setEditor(ne1);
    spinnerUnassignedLimit.setBounds(701, 264, 114, 20);
    spinnerUnassignedLimit.setValue(1000);
    desktopPane.add(spinnerUnassignedLimit);

    final JButton4j closeButton = new JButton4j(Common.icon_close);

    closeButton.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        dispose();
      }
    });
    closeButton.setText(lang.get("btn_Close"));
    closeButton.setMnemonic(lang.getMnemonicChar());
    closeButton.setBounds(710, 388, 116, 30);
    desktopPane.add(closeButton);

    jButtonHelp.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
      }
    });
    jButtonHelp.setText(lang.get("btn_Help"));
    jButtonHelp.setBounds(592, 388, 116, 30);
    desktopPane.add(jButtonHelp);

    //
    final JHelp help = new JHelp();
    help.enableHelpOnButton(jButtonHelp, JUtility.getHelpSetIDforModule("FRM_ADMIN_DESPATCH"));

    confirmButton.setText(lang.get("btn_Confirm"));
    confirmButton.setEnabled(false);
    confirmButton.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        if (list_despatch.getModel().getSize() > 0)
        {
          if (list_despatch.getSelectedIndex() >= 0)
          {
            JDBDespatch d = (JDBDespatch) list_despatch.getSelectedValue();

            int n = JOptionPane.showConfirmDialog(Common.mainForm, lang.get("dlg_Despatch_Confirm") + " " + d.getDespatchNo() + " ?", lang.get("dlg_Confirm"), JOptionPane.YES_NO_OPTION, 0, Common.icon_confirm);

            if (n == 0)
            {
              d.getDespatchProperties();
              if (d.confirm())
              {
                populateDespatchList("");
                setConfirmButtonStatus();
              }
              else
              {
                JUtility.errorBeep();
                JOptionPane.showMessageDialog(Common.mainForm, d.getErrorMessage(), lang.get("dlg_Error"), JOptionPane.ERROR_MESSAGE,Common.icon_confirm);
                populateDespatchList("");
              }
            }
          }
        }
      }
    });

    confirmButton.setBounds(356, 388, 116, 30);
    desktopPane.add(confirmButton);

    final JLabel4j_title despatchesLabel = new JLabel4j_title();
    despatchesLabel.setText(lang.get("lbl_Despatches"));
    despatchesLabel.setBounds(10, 10, 75, 16);
    desktopPane.add(despatchesLabel);

    final JLabel4j_title unassignedLabel = new JLabel4j_title();
    unassignedLabel.setText(lang.get("lbl_Unassigned"));
    unassignedLabel.setBounds(510, 10, 150, 16);
    desktopPane.add(unassignedLabel);

    final JLabel4j_title assignedLabel = new JLabel4j_title();
    assignedLabel.setText(lang.get("lbl_Assigned"));
    assignedLabel.setBounds(310, 10, 150, 16);
    desktopPane.add(assignedLabel);

    final JLabel4j_title palletFilterCriteriaLabel = new JLabel4j_title();
    palletFilterCriteriaLabel.setText(lang.get("lbl_Unassigned_Filter"));
    palletFilterCriteriaLabel.setBounds(672, 15, 125, 16);
    desktopPane.add(palletFilterCriteriaLabel);

    final JButton4j refreshButton = new JButton4j(Common.icon_refresh);
    refreshButton.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        refresh();
      }
    });
    refreshButton.setText(lang.get("btn_Refresh"));
    refreshButton.setBounds(120, 388, 116, 30);
    desktopPane.add(refreshButton);

    SpinnerNumberModel jSpinnerIntModel = new SpinnerNumberModel();
    jSpinnerIntModel.setMinimum(1);
    jSpinnerIntModel.setMaximum(50000);
    jSpinnerIntModel.setStepSize(1);
    JSpinner.NumberEditor ne2 = new JSpinner.NumberEditor(spinnerDespatchLimit);
    ne2.getTextField().setFont(Common.font_std);
    spinnerDespatchLimit.setEditor(ne2);
    spinnerDespatchLimit.setModel(jSpinnerIntModel);
    spinnerDespatchLimit.setBounds(100, 303, 60, 20);
    spinnerDespatchLimit.setValue(50);
    desktopPane.add(spinnerDespatchLimit);

    jLabel10_1 = new JLabel4j_std();
    jLabel10_1.setHorizontalAlignment(SwingConstants.TRAILING);
    jLabel10_1.setText(lang.get("lbl_Limit"));
    jLabel10_1.setBounds(15, 302, 70, 21);
    desktopPane.add(jLabel10_1);

    textFieldDespatchLocationFrom = new JTextField4j();
    textFieldDespatchLocationFrom.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        if (JUtility.isNullORBlank(textFieldDespatchLocationFrom.getText()) == true)
        {
          findButton.setEnabled(false);
        }
        else
        {
          findButton.setEnabled(true);
        }
      }
    });
    textFieldDespatchLocationFrom.setEditable(false);
    textFieldDespatchLocationFrom.setBounds(172, 51, 105, 20);
    desktopPane.add(textFieldDespatchLocationFrom);

    final JLabel4j_std locationLabel_1 = new JLabel4j_std();
    locationLabel_1.setText(lang.get("lbl_From_Location"));
    locationLabel_1.setBounds(172, 32, 100, 16);
    desktopPane.add(locationLabel_1);

    final JLabel4j_std palletStatusLabel_1 = new JLabel4j_std();
    palletStatusLabel_1.setText(lang.get("lbl_Despatch_Status"));
    palletStatusLabel_1.setBounds(170, 240, 105, 20);
    desktopPane.add(palletStatusLabel_1);

    textFieldDespatchStatus = new JTextField4j();
    textFieldDespatchStatus.setEditable(false);
    textFieldDespatchStatus.setBounds(170, 261, 128, 20);
    desktopPane.add(textFieldDespatchStatus);

    textFieldDespatchLocationTo = new JTextField4j();
    textFieldDespatchLocationTo.setEditable(false);
    textFieldDespatchLocationTo.setBounds(172, 91, 105, 20);
    desktopPane.add(textFieldDespatchLocationTo);

    final JLabel4j_std locationLabel_1_1 = new JLabel4j_std();
    locationLabel_1_1.setText(lang.get("lbl_To_Location"));
    locationLabel_1_1.setBounds(172, 75, 100, 16);
    desktopPane.add(locationLabel_1_1);

    final JLabel4j_std palletStatusLabel_1_1 = new JLabel4j_std();
    palletStatusLabel_1_1.setText(lang.get("lbl_Despatch_Date"));
    palletStatusLabel_1_1.setBounds(172, 285, 90, 20);
    desktopPane.add(palletStatusLabel_1_1);

    final JLabel4j_std palletStatusLabel_1_1_1 = new JLabel4j_std();
    palletStatusLabel_1_1_1.setText(lang.get("lbl_No_Of_Pallets"));
    palletStatusLabel_1_1_1.setBounds(172, 332, 120, 20);
    desktopPane.add(palletStatusLabel_1_1_1);

    textFieldNoOfPallets = new JTextField4j();
    textFieldNoOfPallets.setEditable(false);
    textFieldNoOfPallets.setBounds(172, 352, 60, 20);
    desktopPane.add(textFieldNoOfPallets);

    jTextFieldDespatchDate = new JTextField4j();
    jTextFieldDespatchDate.setEditable(false);
    jTextFieldDespatchDate.setBounds(172, 303, 125, 20);
    desktopPane.add(jTextFieldDespatchDate);

    jButtonLookupLocationFrom = new JButton4j(Common.icon_lookup);
    jButtonLookupLocationFrom.setEnabled(false);
    jButtonLookupLocationFrom.setBounds(277, 50, 21, 21);
    jButtonLookupLocationFrom.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent evt)
      {
        JLaunchLookup.dlgAutoExec = true;
        JLaunchLookup.dlgCriteriaDefault = "Y";

        if (JLaunchLookup.locations())
        {
          textFieldDespatchLocationFrom.setText(JLaunchLookup.dlgResult);

          JDBDespatch d = (JDBDespatch) list_despatch.getSelectedValue();
          d.setLocationIDFrom(JLaunchLookup.dlgResult);
          updateDespatch(d);
        }
      }
    });
    desktopPane.add(jButtonLookupLocationFrom);

    jButtonLookupLocationTo = new JButton4j(Common.icon_lookup);
    jButtonLookupLocationTo.setEnabled(false);
    jButtonLookupLocationTo.setBounds(277, 90, 21, 21);
    jButtonLookupLocationTo.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent evt)
      {
        JLaunchLookup.dlgAutoExec = true;
        JLaunchLookup.dlgCriteriaDefault = "Y";

        if (JLaunchLookup.locations())
        {
          textFieldDespatchLocationTo.setText(JLaunchLookup.dlgResult);

          JDBDespatch d = (JDBDespatch) list_despatch.getSelectedValue();
          d.setLocationIDTo(JLaunchLookup.dlgResult);
          updateDespatch(d);
        }
      }
    });
    desktopPane.add(jButtonLookupLocationTo);

    jButtonLookupMaterial = new JButton4j(Common.icon_lookup);
    jButtonLookupMaterial.setBounds(795, 90, 21, 21);
    jButtonLookupMaterial.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent evt)
      {
        JLaunchLookup.dlgAutoExec = false;
        JLaunchLookup.dlgCriteriaDefault = "";

        if (JLaunchLookup.materials())
        {
          textFieldMaterial.setText(JLaunchLookup.dlgResult);
        }
      }
    });
    desktopPane.add(jButtonLookupMaterial);

    jButtonLookupBatch = new JButton4j(Common.icon_lookup);
    jButtonLookupBatch.setBounds(795, 175, 21, 21);
    jButtonLookupBatch.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent evt)
      {
        JLaunchLookup.dlgCriteriaDefault = textFieldMaterial.getText();
        JLaunchLookup.dlgAutoExec = true;

        if (JLaunchLookup.materialBatches())
        {
          textFieldBatch.setText(JLaunchLookup.dlgResult);
        }
      }
    });
    desktopPane.add(jButtonLookupBatch);

    confirmedRadioButton.setBackground(Color.WHITE);
    confirmedRadioButton.setText(lang.get("lbl_Confirmed"));
    confirmedRadioButton.setBounds(10, 327, 129, 24);
    confirmedRadioButton.setFont(Common.font_std);
    confirmedRadioButton.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        com.commander4j.util.JWait.milliSec(100);
        populateDespatchList("");
        refresh();
      }
    });

    desktopPane.add(confirmedRadioButton);

    unconfirmedRadioButton.setBackground(Color.WHITE);
    unconfirmedRadioButton.setText(lang.get("lbl_Unconfirmed"));
    unconfirmedRadioButton.setBounds(10, 352, 129, 24);
    unconfirmedRadioButton.setSelected(true);
    unconfirmedRadioButton.setFont(Common.font_std);
    unconfirmedRadioButton.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        com.commander4j.util.JWait.milliSec(100);
        populateDespatchList("");
        refresh();
        newButton.setEnabled(true);
      }
    });
    desktopPane.add(unconfirmedRadioButton);

    buttonGroup_1.add(unconfirmedRadioButton);
    buttonGroup_1.add(confirmedRadioButton);

    final JLabel4j_std palletStatusLabel_1_2 = new JLabel4j_std();
    palletStatusLabel_1_2.setText(lang.get("lbl_Trailer"));
    palletStatusLabel_1_2.setBounds(172, 115, 105, 20);
    desktopPane.add(palletStatusLabel_1_2);

    textFieldTrailer = new JTextField4j();
    textFieldTrailer.setEditable(false);
    textFieldTrailer.setBounds(172, 136, 105, 20);

    desktopPane.add(textFieldTrailer);

    final JLabel4j_std palletStatusLabel_1_2_1 = new JLabel4j_std();
    palletStatusLabel_1_2_1.setText(lang.get("lbl_Haulier"));
    palletStatusLabel_1_2_1.setBounds(172, 158, 105, 20);
    desktopPane.add(palletStatusLabel_1_2_1);

    textFieldHaulier = new JTextField4j();
    textFieldHaulier.setEditable(false);
    textFieldHaulier.setBounds(172, 176, 105, 20);
    desktopPane.add(textFieldHaulier);

    jButtonLookupTrailer = new JButton4j();
    jButtonLookupTrailer.setEnabled(false);
    jButtonLookupTrailer.setText("...");
    jButtonLookupTrailer.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        String trailer;
        trailer = JOptionPane.showInputDialog(Common.mainForm, "Enter Trailer Reference");

        if (trailer != null)
        {
          JDBDespatch d = (JDBDespatch) list_despatch.getSelectedValue();
          d.setTrailer(trailer.toUpperCase());
          textFieldTrailer.setText(trailer.toUpperCase());
          updateDespatch(d);
        }
      }
    });
    jButtonLookupTrailer.setBounds(277, 135, 21, 21);
    desktopPane.add(jButtonLookupTrailer);

    jButtonLookupHaulier = new JButton4j();
    jButtonLookupHaulier.setEnabled(false);
    jButtonLookupHaulier.setText("...");
    jButtonLookupHaulier.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        String haulier;
        haulier = JOptionPane.showInputDialog(Common.mainForm, "Enter Haulier Reference");

        if (haulier != null)
        {
          JDBDespatch d = (JDBDespatch) list_despatch.getSelectedValue();
          d.setHaulier(haulier.toUpperCase());
          textFieldHaulier.setText(haulier.toUpperCase());
          updateDespatch(d);
        }
      }
    });
    jButtonLookupHaulier.setBounds(277, 175, 21, 21);
    desktopPane.add(jButtonLookupHaulier);

    jStatusText = new JLabel4j_std("");
    jStatusText.setBounds(0, 428, 830, 21);
    jStatusText.setForeground(new java.awt.Color(255, 0, 0));
    jStatusText.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
    desktopPane.add(jStatusText);

    JLabel4j_std lblLoadNo = new JLabel4j_std();
    lblLoadNo.setText(lang.get("lbl_Load_No"));
    lblLoadNo.setBounds(172, 196, 105, 20);
    desktopPane.add(lblLoadNo);

    textFieldLoadNo = new JTextField4j();
    textFieldLoadNo.setText("");
    textFieldLoadNo.setEditable(false);
    textFieldLoadNo.setBounds(172, 216, 105, 20);
    desktopPane.add(textFieldLoadNo);

    jButtonLookupLoadNo = new JButton4j();
    jButtonLookupLoadNo.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent arg0)
      {
        String load;
        load = JOptionPane.showInputDialog(Common.mainForm, "Enter Load Number");

        if (load != null)
        {
          JDBDespatch d = (JDBDespatch) list_despatch.getSelectedValue();
          d.setLoadNo(load.toUpperCase());
          textFieldLoadNo.setText(load.toUpperCase());
          updateDespatch(d);

        }

      }
    });
    jButtonLookupLoadNo.setText("...");
    jButtonLookupLoadNo.setEnabled(false);
    jButtonLookupLoadNo.setBounds(277, 215, 21, 21);
    desktopPane.add(jButtonLookupLoadNo);

    JLabel4j_std label = new JLabel4j_std();
    label.setText(lang.get("lbl_User_ID"));
    label.setBounds(672, 338, 128, 16);
    desktopPane.add(label);

    textFieldUserID = new JTextField4j();
    textFieldUserID.setText("");
    textFieldUserID.setEditable(false);
    textFieldUserID.setBounds(672, 356, 122, 20);
    desktopPane.add(textFieldUserID);

    buttonSetUserID = new JButton4j((Icon) null);
    buttonSetUserID.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        JLaunchLookup.dlgAutoExec = true;
View Full Code Here

        jDesktopPane1.setBackground(Color.WHITE);
        this.getContentPane().add(jDesktopPane1, BorderLayout.CENTER);
        jDesktopPane1.setPreferredSize(new java.awt.Dimension(390, 208));
        jDesktopPane1.setLayout(null);
        {
          jButtonUpdate = new JButton4j(Common.icon_update);
          jDesktopPane1.add(jButtonUpdate);
          jButtonUpdate.setEnabled(false);
          jButtonUpdate.setText(lang.get("btn_Save"));
          jButtonUpdate.setMnemonic(lang.getMnemonicChar());
          jButtonUpdate.setPreferredSize(new java.awt.Dimension(90, 30));
          jButtonUpdate.setBounds(15, 164, 110, 30);
          jButtonUpdate.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {

              boolean result = true;

              materialuom.setMaterial(lmaterial);
              materialuom.setUom(luom);
              materialuom.setEan(jTextFieldEAN.getText());
              jTextFieldEAN.setText(materialuom.getEan());
              materialuom.setVariant(jTextFieldVariant.getText());
              jTextFieldVariant.setText(materialuom.getVariant());
              materialuom.setNumerator((Integer) jSpinnerNumerator.getValue());
              materialuom.setDenominator((Integer) jSpinnerDenominator.getValue());

              if (materialuom.isValidMaterialUom() == false)
              {
                result = materialuom.create();
              }
              else
              {
                result = materialuom.update();
              }
             
              if (result == false)
              {
                JOptionPane.showMessageDialog(Common.mainForm, materialuom.getErrorMessage(), "Error", JOptionPane.ERROR_MESSAGE);
              }
              else
              {
                jButtonUpdate.setEnabled(false);
              }


            }
          });
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setMnemonic(lang.getMnemonicChar());
          jButtonHelp.setBounds(129, 164, 110, 30);
        }
        {
          jButtonCancel = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonCancel);
          jButtonCancel.setText(lang.get("btn_Close"));
          jButtonCancel.setMnemonic(lang.getMnemonicChar());
          jButtonCancel.setPreferredSize(new java.awt.Dimension(90, 30));
          jButtonCancel.setBounds(242, 164, 110, 30);
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.