Examples of JTextField4j


Examples of com.commander4j.gui.JTextField4j

              populateList();
            }
          });
        }
        {
          jTextFieldMaterial = new JTextField4j();
          jTextFieldMaterial.setBounds(345, 11, 98, 21);
          AbstractDocument doc = (AbstractDocument) jTextFieldMaterial.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBMaterial.field_material));
        }
        {
          jTextFieldLocation = new JTextField4j();
          jTextFieldLocation.setBounds(571, 11, 98, 21);
          AbstractDocument doc = (AbstractDocument) jTextFieldLocation.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBLocation.field_location_id));
        }
        {
          jTextFieldCustomer = new JTextField4j();
          jTextFieldCustomer.setBounds(346, 105, 98, 21);
          AbstractDocument doc = (AbstractDocument) jTextFieldCustomer.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBCustomer.field_customer_id));
        }
        {
          jLabel1 = new JLabel4j_std();
          jLabel1.setBounds(251, 11, 88, 21);
          jLabel1.setText(lang.get("lbl_Material"));
          jLabel1.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jLabel3 = new JLabel4j_std();
          jLabel3.setBounds(490, 11, 74, 21);
          jLabel3.setText(lang.get("lbl_Location_ID"));
        }
        {
          jLabel23 = new JLabel4j_std();
          jLabel23.setBounds(265, 105, 74, 21);
          jLabel23.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel23.setText(lang.get("lbl_Customer_ID"));
        }
        {
          ComboBoxModel<JDBUom> jComboBox2Model = new DefaultComboBoxModel<JDBUom>(uomList);
          jComboBoxUOM = new JComboBox4j<JDBUom>();
          jComboBoxUOM.setBounds(571, 75, 119, 23);
          jComboBoxUOM.setModel(jComboBox2Model);
          jComboBoxUOM.setMaximumRowCount(12);
        }
        {
          jLabel4 = new JLabel4j_std();
          jLabel4.setBounds(487, 75, 77, 21);
          jLabel3.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel4.setText(lang.get("lbl_Material_UOM"));
          jLabel4.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jButtonClose = new JButton4j(Common.icon_close);
          jButtonClose.setBounds(366, 138, 120, 32);
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setMnemonic(lang.getMnemonicChar());
          jButtonClose.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              JDBQuery.closeStatement(listStatement);
              dispose();
            }
          });
        }
        {
          jLabel10 = new JLabel4j_std();
          jLabel10.setBounds(744, 136, 126, 21);
          jLabel10.setText(lang.get("lbl_Limit"));
          jLabel10.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          ComboBoxModel<String> jComboBoxSortByModel = new DefaultComboBoxModel<String>(new String[] { "DATE_OF_MANUFACTURE", "SSCC", "MATERIAL", "PROCESS_ORDER", "BATCH_NUMBER", "DATE_OF_MANUFACTURE",
              "STATUS", "LOCATION_ID" });
          jComboBoxSortBy = new JComboBox4j<String>();
          jComboBoxSortBy.setBounds(571, 138, 195, 23);
          jComboBoxSortBy.setModel(jComboBoxSortByModel);
        }
        {
          ComboBoxModel<String> jComboBoxDefaultPalletStatusModel = new DefaultComboBoxModel<String>(Common.palletStatusIncBlank);
          jComboBoxPalletStatus = new JComboBox4j<String>();
          jComboBoxPalletStatus.setBounds(803, 44, 155, 23);
          jComboBoxPalletStatus.setModel(jComboBoxDefaultPalletStatusModel);
        }
        {
          jLabel15 = new JLabel4j_std();
          jLabel15.setBounds(702, 44, 97, 21);
          jLabel15.setText(lang.get("lbl_Pallet_Status"));
          jLabel15.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jToggleButtonSequence = new JToggleButton();
          jToggleButtonSequence.setBounds(778, 138, 21, 21);
          jToggleButtonSequence.setSelected(true);
          jToggleButtonSequence.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              setSequence(jToggleButtonSequence.isSelected());
            }
          });
        }
        {
          jLabelQuantity = new JLabel4j_std();
          jLabelQuantity.setBounds(476, 105, 88, 21);
          jLabelQuantity.setText(lang.get("lbl_Pallet_Quantity"));
          jLabelQuantity.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {

          jFormattedTextFieldQuantity = new JQuantityInput(new BigDecimal("0"));
          jFormattedTextFieldQuantity.setBounds(599, 105, 91, 21);
          jFormattedTextFieldQuantity.setFont(Common.font_std);
          jFormattedTextFieldQuantity.setHorizontalAlignment(SwingConstants.TRAILING);
          jFormattedTextFieldQuantity.setVerifyInputWhenFocusTarget(false);
          jFormattedTextFieldQuantity.setEnabled(false);
        }
        {
          jLabel2 = new JLabel4j_std();
          jLabel2.setBounds(710, 11, 89, 21);
          jLabel2.setText(lang.get("lbl_Material_Batch"));
          jLabel2.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jTextFieldBatch = new JTextField4j();
          jTextFieldBatch.setBounds(803, 11, 134, 21);
          AbstractDocument doc = (AbstractDocument) jTextFieldBatch.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBMaterialBatch.field_batch_number));
        }
        {
          jLabelProcessOrder = new JLabel4j_std();
          jLabelProcessOrder.setBounds(475, 44, 89, 21);
          jLabelProcessOrder.setText(lang.get("lbl_Process_Order"));
          jLabelProcessOrder.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jTextFieldProcessOrder = new JTextField4j();
          jTextFieldProcessOrder.setBounds(571, 44, 98, 21);
          AbstractDocument doc = (AbstractDocument) jTextFieldProcessOrder.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBProcessOrder.field_process_order));
        }
        {
          jLabelProductionDate = new JLabel4j_std();
          jLabelProductionDate.setBounds(2, 42, 119, 25);
          jLabelProductionDate.setText(lang.get("lbl_Pallet_DOM"));
          jLabelProductionDate.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jTextFieldEAN = new JTextField4j();
          jTextFieldEAN.setBounds(803, 105, 119, 21);
          AbstractDocument doc = (AbstractDocument) jTextFieldEAN.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBMaterialUom.field_ean));
          jTextFieldEAN.setFocusCycleRoot(true);
        }
        {
          jLabel5 = new JLabel4j_std();
          jLabel5.setBounds(702, 105, 97, 21);
          jLabel5.setText(lang.get("lbl_Material_UOM_EAN"));
          jLabel5.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabel5.setHorizontalTextPosition(SwingConstants.RIGHT);
        }
        {
          jLabel6 = new JLabel4j_std();
          jLabel6.setBounds(922, 105, 15, 21);
          jLabel6.setText("/");
          jLabel6.setHorizontalAlignment(SwingConstants.CENTER);
          jLabel6.setHorizontalTextPosition(SwingConstants.RIGHT);
        }
        {
          jTextFieldVariant = new JTextField4j();
          jTextFieldVariant.setBounds(937, 105, 21, 21);
          jTextFieldVariant.setHorizontalAlignment(SwingConstants.CENTER);
          AbstractDocument doc = (AbstractDocument) jTextFieldVariant.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBMaterialUom.field_variant));
          jTextFieldVariant.setFocusCycleRoot(true);
        }
        {
          jCheckBoxQuantity = new JCheckBox4j();
          jCheckBoxQuantity.setBounds(571, 105, 21, 21);
          jCheckBoxQuantity.setBackground(new java.awt.Color(255, 255, 255));
          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);
              }
            }
          });
        }
        {
          domDateFrom = new JDateControl();
          domDateFrom.setBounds(148, 40, 120, 25);
          domDateFrom.setEnabled(false);

        }
        {
          jCheckBoxDOMTo = new JCheckBox4j();
          jCheckBoxDOMTo.setBounds(319, 40, 21, 25);
          jCheckBoxDOMTo.setBackground(new java.awt.Color(255, 255, 255));
          jCheckBoxDOMTo.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              if (jCheckBoxDOMTo.isSelected())
              {
                button_CalendardomDateTo.setEnabled(true);
                domDateTo.setEnabled(true);
              }
              else
              {
                domDateTo.setEnabled(false);
                button_CalendardomDateTo.setEnabled(false);
              }
            }
          });
        }
        {
          domDateTo = new JDateControl();
          domDateTo.setBounds(345, 40, 120, 25);
          domDateTo.setEnabled(false);
        }
        {
          jLabel7 = new JLabel4j_std();
          jLabel7.setBounds(466, 138, 98, 21);
          jLabel7.setText(lang.get("lbl_Sort_By"));
          jLabel7.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          SpinnerNumberModel jSpinnerIntModel = new SpinnerNumberModel();
          jSpinnerIntModel.setMinimum(1);
          jSpinnerIntModel.setMaximum(5000);
          jSpinnerIntModel.setStepSize(1);
          jSpinnerLimit = new JSpinner();
          JSpinner.NumberEditor ne = new JSpinner.NumberEditor(jSpinnerLimit);
          ne.getTextField().setFont(Common.font_std);
          jSpinnerLimit.setEditor(ne);
          jSpinnerLimit.setBounds(902, 136, 71, 21);
          jSpinnerLimit.setFont(Common.font_std);
          jSpinnerLimit.setModel(jSpinnerIntModel);
          jSpinnerLimit.setValue(1000);
          jSpinnerLimit.getEditor().setSize(45, 21);
        }
        {
          jCheckBoxLimit = new JCheckBox4j();
          jCheckBoxLimit.setBounds(877, 136, 21, 21);
          jCheckBoxLimit.setBackground(new java.awt.Color(255, 255, 255));
          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);
          jButtonLookupProcessOrder.setBounds(669, 44, 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);
          jButtonLookupBatch.setBounds(937, 11, 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);
          jButtonLookupMaterial.setBounds(444, 11, 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);
          jButtonLookupLocation.setBounds(669, 11, 21, 21);
          jButtonLookupLocation.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              JLaunchLookup.dlgAutoExec = true;
              JLaunchLookup.dlgCriteriaDefault = "Y";
              if (JLaunchLookup.locations())
              {
                jTextFieldLocation.setText(JLaunchLookup.dlgResult);
              }
            }
          });
        }
        {
          jButtonLookupCustomer = new JButton4j(Common.icon_lookup);
          jButtonLookupCustomer.setBounds(444, 105, 21, 21);
          jButtonLookupCustomer.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              JLaunchLookup.dlgAutoExec = true;
              JLaunchLookup.dlgCriteriaDefault = "";
              if (JLaunchLookup.customers())
              {
                jTextFieldCustomer.setText(JLaunchLookup.dlgResult);
              }
            }
          });
        }
        {
          jCheckBoxDOMFrom = new JCheckBox4j();
          jCheckBoxDOMFrom.setBounds(126, 40, 21, 25);
          jCheckBoxDOMFrom.setBackground(new java.awt.Color(255, 255, 255));
          jCheckBoxDOMFrom.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              if (jCheckBoxDOMFrom.isSelected())
              {
                domDateFrom.setEnabled(true);
                button_CalendardomDateFrom.setEnabled(true);
              }
              else
              {
                domDateFrom.setEnabled(false);
                button_CalendardomDateFrom.setEnabled(false);
              }
            }
          });
        }
        {
          jTextFieldSSCC = new JTextField4j();
          jTextFieldSSCC.setBounds(135, 105, 133, 21);
          AbstractDocument doc = (AbstractDocument) jTextFieldSSCC.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBPallet.field_sscc));
        }
        {
          jLabelSCC = new JLabel4j_std();
          jLabelSCC.setBounds(2, 105, 119, 21);
          jLabelSCC.setText(lang.get("lbl_Pallet_SSCC"));
          jLabelSCC.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          expiryDateFrom = new JDateControl();
          expiryDateFrom.setBounds(148, 71, 120, 25);
          expiryDateFrom.setEnabled(false);
        }
        {
          expiryDateTo = new JDateControl();
          expiryDateTo.setBounds(345, 71, 120, 25);
          expiryDateTo.setEnabled(false);
        }
        {
          jLabel8 = new JLabel4j_std();
          jLabel8.setBounds(2, 71, 119, 25);
          jLabel8.setText(lang.get("lbl_Material_Batch_Expiry_Date"));
          jLabel8.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jCheckBoxExpiryFrom = new JCheckBox4j();
          jCheckBoxExpiryFrom.setBounds(126, 72, 21, 25);
          jCheckBoxExpiryFrom.setBackground(new java.awt.Color(255, 255, 255));
          jCheckBoxExpiryFrom.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              if (jCheckBoxExpiryFrom.isSelected())
              {
                expiryDateFrom.setEnabled(true);
                calendarButtonexpiryDateFrom.setEnabled(true);
              }
              else
              {
                expiryDateFrom.setEnabled(false);
                calendarButtonexpiryDateFrom.setEnabled(false);
              }
            }
          });
        }
        {
          jCheckBoxExpiryTo = new JCheckBox4j();
          jCheckBoxExpiryTo.setBounds(319, 71, 21, 25);
          jCheckBoxExpiryTo.setBackground(new java.awt.Color(255, 255, 255));
          jCheckBoxExpiryTo.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              if (jCheckBoxExpiryTo.isSelected())
              {
                expiryDateTo.setEnabled(true);
                calendarButtonexpiryDateTo.setEnabled(true);
              }
              else
              {
                expiryDateTo.setEnabled(false);
                calendarButtonexpiryDateTo.setEnabled(false);
              }
            }
          });
        }

        {
          jLabel8_1 = new JLabel4j_std();
          jLabel8_1.setBounds(702, 75, 97, 21);
          jLabel8_1.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel8_1.setText(lang.get("lbl_Despatch_No"));
        }

        {
          jTextFieldDespatch_No = new JTextField4j();
          jTextFieldDespatch_No.setBounds(803, 75, 119, 21);
          AbstractDocument doc = (AbstractDocument) jTextFieldDespatch_No.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBDespatch.field_despatch_no));
          jTextFieldDespatch_No.setFocusCycleRoot(true);
        }

        {
          jStatusText = new JLabel4j_std();
          jStatusText.setBounds(2, 527, 971, 21);
          jStatusText.setBackground(Color.GRAY);
          jStatusText.setForeground(new Color(255, 0, 0));
        }

        {
          jButtonClear = new JButton4j(Common.icon_clear);
          jButtonClear.setBounds(124, 138, 120, 32);
          jButtonClear.addActionListener(new ActionListener()
          {
            public void actionPerformed(final ActionEvent e)
            {
              clearFilter();

            }
          });
          jButtonClear.setText(lang.get("btn_Clear_Filter"));
        }

        button_CalendardomDateFrom = new JCalendarButton(domDateFrom);
        button_CalendardomDateFrom.setBounds(273, 42, 21, 21);
        button_CalendardomDateFrom.setEnabled(false);

        button_CalendardomDateTo = new JCalendarButton(domDateTo);
        button_CalendardomDateTo.setBounds(470, 42, 21, 21);
        button_CalendardomDateTo.setEnabled(false);

        calendarButtonexpiryDateFrom = new JCalendarButton(expiryDateFrom);
        calendarButtonexpiryDateFrom.setBounds(273, 74, 21, 21);
        calendarButtonexpiryDateFrom.setEnabled(false);

        calendarButtonexpiryDateTo = new JCalendarButton(expiryDateTo);
        calendarButtonexpiryDateTo.setBounds(470, 74, 21, 21);
        calendarButtonexpiryDateTo.setEnabled(false);

        jTextFieldMHN = new JTextField4j();
        jTextFieldMHN.setForeground(Color.RED);
        jTextFieldMHN.setBounds(148, 11, 120, 21);
        jTextFieldMHN.setEditable(false);
        jDesktopPane1.setLayout(null);
View Full Code Here

Examples of com.commander4j.gui.JTextField4j

    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"));
View Full Code Here

Examples of com.commander4j.gui.JTextField4j

              dispose();
            }
          });
        }
        {
          jTextFieldArchiveID = new JTextField4j();
          jTextFieldArchiveID.setFocusable(false);
          jDesktopPane1.add(jTextFieldArchiveID);
          jTextFieldArchiveID.setHorizontalAlignment(SwingConstants.LEFT);
          jTextFieldArchiveID.setEditable(false);
          jTextFieldArchiveID.setPreferredSize(new java.awt.Dimension(100, 20));
          jTextFieldArchiveID.setBounds(202, 15, 151, 21);
          jTextFieldArchiveID.setEnabled(false);
        }
        {
          jTextFieldDescription = new JTextField4j();
          jDesktopPane1.add(jTextFieldDescription);
          AbstractDocument doc = (AbstractDocument) jTextFieldDescription.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBControl.field_key_value));
          jTextFieldDescription.setPreferredSize(new java.awt.Dimension(40, 20));
          jTextFieldDescription.setFocusCycleRoot(true);
          jTextFieldDescription.setBounds(202, 49, 260, 21);
          jTextFieldDescription.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonUpdate.setEnabled(true);
            }
          });

        }
        {
          jTextFieldSQLTable = new JTextField4j();
          jDesktopPane1.add(jTextFieldSQLTable);
          AbstractDocument doc = (AbstractDocument) jTextFieldSQLTable.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBControl.field_description));
          jTextFieldSQLTable.setPreferredSize(new java.awt.Dimension(40, 20));
          jTextFieldSQLTable.setFocusCycleRoot(true);
View Full Code Here

Examples of com.commander4j.gui.JTextField4j

              populateList();
            }
          });
        }
        {
          jTextFieldMaterial = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldMaterial.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBMaterial.field_material));
          jDesktopPane1.add(jTextFieldMaterial);
          jTextFieldMaterial.setBounds(122, 11, 120, 21);
        }
        {
          jTextFieldLocation = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldLocation.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBLocation.field_location_id));
          jDesktopPane1.add(jTextFieldLocation);
          jTextFieldLocation.setBounds(340, 11, 103, 21);
        }
        {
          jTextFieldCustomer = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldCustomer.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBCustomer.field_customer_id));
          jDesktopPane1.add(jTextFieldCustomer);
          jTextFieldCustomer.setBounds(340, 105, 103, 21);
        }
        {
          jLabel1 = new JLabel4j_std();
          jDesktopPane1.add(jLabel1);
          jLabel1.setText(lang.get("lbl_Material"));
          jLabel1.setBounds(2, 11, 108, 21);
          jLabel1.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jLabel3 = new JLabel4j_std();
          jDesktopPane1.add(jLabel3);
          jLabel3.setText(lang.get("lbl_Location_ID"));
          jLabel3.setBounds(260, 11, 74, 21);
        }
        {
          jLabel23 = new JLabel4j_std();
          jLabel23.setHorizontalAlignment(SwingConstants.TRAILING);
          jDesktopPane1.add(jLabel23);
          jLabel23.setText(lang.get("lbl_Customer_ID"));
          jLabel23.setBounds(243, 105, 91, 21);
        }
        {
          ComboBoxModel<JDBUom> jComboBox2Model = new DefaultComboBoxModel<JDBUom>(uomList);
          jComboBoxUOM = new JComboBox4j<JDBUom>();
          jDesktopPane1.add(jComboBoxUOM);
          jComboBoxUOM.setModel(jComboBox2Model);
          jComboBoxUOM.setBounds(580, 75, 125, 23);
          jComboBoxUOM.setMaximumRowCount(12);
        }
        {
          jLabel4 = new JLabel4j_std();
          jDesktopPane1.add(jLabel4);
          jLabel3.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel4.setText(lang.get("lbl_Material_UOM"));
          jLabel4.setBounds(490, 75, 88, 21);
          jLabel4.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jButtonAdd = new JButton4j(Common.icon_add);
          jDesktopPane1.add(jButtonAdd);
          jButtonAdd.setText(lang.get("btn_Add"));
          jButtonAdd.setBounds(196, 226, 98, 32);
          jButtonAdd.setMnemonic(lang.getMnemonicChar());
          jButtonAdd.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_PALLET_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(294, 226, 98, 32);
          jButtonEdit.setMnemonic(lang.getMnemonicChar());
          jButtonEdit.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_PALLET_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(392, 226, 98, 32);
          jButtonDelete.setMnemonic(lang.getMnemonicChar());
          jButtonDelete.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_PALLET_DELETE"));
          jButtonDelete.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              deleteRecord();
            }
          });
        }
        {
          jButtonSummary = new JButton4j(Common.icon_report);
          jButtonSummary.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent e)
            {
              print_summary();
            }
          });
          jDesktopPane1.add(jButtonSummary);
          jButtonSummary.setText(lang.get("btn_Print_Summary"));
          jButtonSummary.setBounds(686, 226, 98, 32);
          jButtonSummary.setMnemonic(lang.getMnemonicChar());
          jButtonSummary.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_PAL_SUMMARY"));
        }
        {
          jButtonClose = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonClose);
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setBounds(882, 226, 98, 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(490, 226, 98, 32);
          jButtonPrint.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_PALLETS"));
          jButtonPrint.setMnemonic(lang.getMnemonicChar());
          jButtonPrint.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              printRecords("multi");

            }
          });
        }
        {
          jLabel10 = new JLabel4j_std();
          jDesktopPane1.add(jLabel10);
          jLabel10.setText(lang.get("lbl_Limit"));
          jLabel10.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel10.setBounds(702, 200, 97, 21);
        }
        {
          ComboBoxModel<String> jComboBoxSortByModel = new DefaultComboBoxModel<String>(new String[]
          { "DATE_OF_MANUFACTURE", "DATE_CREATED","DATE_UPDATED","SSCC", "MATERIAL,BATCH_NUMBER", "MATERIAL,PROCESS_ORDER", "BATCH_NUMBER,MATERIAL", "PROCESS_ORDER,DATE_OF_MANUFACTURE", "QUANTITY", "STATUS", "LOCATION_ID", "UOM", "EAN", "VARIANT" });
          jComboBoxSortBy = new JComboBox4j<String>();
          jDesktopPane1.add(jComboBoxSortBy);
          jComboBoxSortBy.setModel(jComboBoxSortByModel);
          jComboBoxSortBy.setBounds(318, 198, 355, 23);
        }
        {
          ComboBoxModel<String> jComboBoxDefaultPalletStatusModel = new DefaultComboBoxModel<String>(Common.palletStatusIncBlank);
          jComboBoxPalletStatus = new JComboBox4j<String>();
          jDesktopPane1.add(jComboBoxPalletStatus);
          jComboBoxPalletStatus.setModel(jComboBoxDefaultPalletStatusModel);
          jComboBoxPalletStatus.setBounds(805, 11, 169, 23);
        }
        {
          jLabel15 = new JLabel4j_std();
          jDesktopPane1.add(jLabel15);
          jLabel15.setText(lang.get("lbl_Pallet_Status"));
          jLabel15.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel15.setBounds(702, 11, 97, 21);
        }
        {
          jToggleButtonSequence = new JToggleButton();
          jToggleButtonSequence.setSelected(true);
          jDesktopPane1.add(jToggleButtonSequence);
          jToggleButtonSequence.setBounds(680, 198, 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(490, 105, 88, 21);
        }
        {

          jFormattedTextFieldQuantity = new JQuantityInput(new BigDecimal("0"));
          jDesktopPane1.add(jFormattedTextFieldQuantity);
          jFormattedTextFieldQuantity.setFont(Common.font_std);
          jFormattedTextFieldQuantity.setHorizontalAlignment(SwingConstants.TRAILING);
          jFormattedTextFieldQuantity.setBounds(604, 105, 97, 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(490, 11, 88, 21);
        }
        {
          jTextFieldBatch = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldBatch.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBMaterialBatch.field_batch_number));
          jDesktopPane1.add(jTextFieldBatch);
          jTextFieldBatch.setBounds(582, 11, 98, 21);
        }
        {
          jLabelProcessOrder = new JLabel4j_std();
          jDesktopPane1.add(jLabelProcessOrder);
          jLabelProcessOrder.setText(lang.get("lbl_Process_Order"));
          jLabelProcessOrder.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabelProcessOrder.setBounds(490, 44, 88, 21);
        }
        {
          jTextFieldProcessOrder = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldProcessOrder.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBProcessOrder.field_process_order));
          jDesktopPane1.add(jTextFieldProcessOrder);
          jTextFieldProcessOrder.setBounds(582, 44, 98, 21);
        }
        {
          jLabelProductionDate = new JLabel4j_std();
          jDesktopPane1.add(jLabelProductionDate);
          jLabelProductionDate.setText(lang.get("lbl_Pallet_DOM"));
          jLabelProductionDate.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabelProductionDate.setBounds(2, 42, 108, 25);
        }
        {
          jTextFieldEAN = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldEAN.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBMaterialUom.field_ean));
          jDesktopPane1.add(jTextFieldEAN);
          jTextFieldEAN.setBounds(805, 75, 117, 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(702, 75, 97, 21);
        }
        {
          jLabel6 = new JLabel4j_std();
          jDesktopPane1.add(jLabel6);
          jLabel6.setText("/");
          jLabel6.setHorizontalAlignment(SwingConstants.CENTER);
          jLabel6.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabel6.setBounds(922, 75, 15, 21);
        }
        {
          jTextFieldVariant = new JTextField4j();
          jTextFieldVariant.setHorizontalAlignment(SwingConstants.CENTER);
          AbstractDocument doc = (AbstractDocument) jTextFieldVariant.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBMaterialUom.field_variant));
          jDesktopPane1.add(jTextFieldVariant);
          jTextFieldVariant.setBounds(937, 75, 21, 21);
          jTextFieldVariant.setFocusCycleRoot(true);
        }
        {
          jCheckBoxQuantity = new JCheckBox4j();
          jDesktopPane1.add(jCheckBoxQuantity);
          jCheckBoxQuantity.setBackground(new java.awt.Color(255, 255, 255));
          jCheckBoxQuantity.setBounds(582, 105, 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);
              }
            }
          });
        }
        {
          domDateFrom = new JDateControl();
          jDesktopPane1.add(domDateFrom);
          domDateFrom.setEnabled(false);
          domDateFrom.setFont(Common.font_std);
          domDateFrom.setBounds(144, 40, 120, 25);

        }
        {
          jCheckBoxDOMTo = new JCheckBox4j();
          jDesktopPane1.add(jCheckBoxDOMTo);
          jCheckBoxDOMTo.setBackground(new java.awt.Color(255, 255, 255));
          jCheckBoxDOMTo.setBounds(313, 40, 21, 25);
          jCheckBoxDOMTo.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              if (jCheckBoxDOMTo.isSelected())
              {
                button_CalendardomDateTo.setEnabled(true);
                domDateTo.setEnabled(true);
              } else
              {
                domDateTo.setEnabled(false);
                button_CalendardomDateTo.setEnabled(false);
              }
            }
          });
        }
        {
          domDateTo = new JDateControl();
          jDesktopPane1.add(domDateTo);
          domDateTo.setEnabled(false);
          domDateTo.setFont(Common.font_std);
          domDateTo.setBounds(340, 40, 120, 25);
        }
        {
          jLabel7 = new JLabel4j_std();
          jDesktopPane1.add(jLabel7);
          jLabel7.setText(lang.get("lbl_Sort_By"));
          jLabel7.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel7.setBounds(243, 198, 69, 21);
        }
        {
          SpinnerNumberModel jSpinnerIntModel = new SpinnerNumberModel();
          jSpinnerIntModel.setMinimum(1);
          jSpinnerIntModel.setMaximum(5000);
          jSpinnerIntModel.setStepSize(1);
          jSpinnerLimit = new JSpinner();
          JSpinner.NumberEditor ne = new JSpinner.NumberEditor(jSpinnerLimit);
          ne.getTextField().setFont(Common.font_std);
          jSpinnerLimit.setEditor(ne);
          jSpinnerLimit.setModel(jSpinnerIntModel);
          jSpinnerLimit.setBounds(824, 200, 68, 21);
          jSpinnerLimit.setValue(1000);
          jSpinnerLimit.getEditor().setSize(45, 21);
          jDesktopPane1.add(jSpinnerLimit);
        }
        {
          jCheckBoxLimit = new JCheckBox4j();
          jDesktopPane1.add(jCheckBoxLimit);
          jCheckBoxLimit.setBackground(new java.awt.Color(255, 255, 255));
          jCheckBoxLimit.setBounds(801, 200, 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(680, 44, 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(680, 11, 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.setFont(new java.awt.Font("Dialog", 1, 7));
          jButtonLookupMaterial.setBounds(243, 11, 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(444, 11, 21, 21);
          jButtonLookupLocation.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              JLaunchLookup.dlgAutoExec = true;
              JLaunchLookup.dlgCriteriaDefault = "Y";
              if (JLaunchLookup.locations())
              {
                jTextFieldLocation.setText(JLaunchLookup.dlgResult);
              }
            }
          });
        }
        {
          jButtonLookupCustomer = new JButton4j(Common.icon_lookup);
          jDesktopPane1.add(jButtonLookupCustomer);
          jButtonLookupCustomer.setBounds(444, 105, 21, 21);
          jButtonLookupCustomer.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              JLaunchLookup.dlgAutoExec = true;
              JLaunchLookup.dlgCriteriaDefault = "";
              if (JLaunchLookup.customers())
              {
                jTextFieldCustomer.setText(JLaunchLookup.dlgResult);
              }
            }
          });
        }
        {
          jCheckBoxDOMFrom = new JCheckBox4j();
          jDesktopPane1.add(jCheckBoxDOMFrom);
          jCheckBoxDOMFrom.setBackground(new java.awt.Color(255, 255, 255));
          jCheckBoxDOMFrom.setBounds(120, 40, 21, 25);
          jCheckBoxDOMFrom.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              if (jCheckBoxDOMFrom.isSelected())
              {
                domDateFrom.setEnabled(true);
                button_CalendardomDateFrom.setEnabled(true);
              } else
              {
                domDateFrom.setEnabled(false);
                button_CalendardomDateFrom.setEnabled(false);
              }
            }
          });
        }
        {
          jTextFieldSSCC = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldSSCC.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBPallet.field_sscc));
          jDesktopPane1.add(jTextFieldSSCC);
          jTextFieldSSCC.setBounds(122, 105, 120, 21);
        }
        {
          jLabelSCC = new JLabel4j_std();
          jDesktopPane1.add(jLabelSCC);
          jLabelSCC.setText(lang.get("lbl_Pallet_SSCC"));
          jLabelSCC.setBounds(2, 105, 108, 21);
          jLabelSCC.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          expiryDateFrom = new JDateControl();
          jDesktopPane1.add(expiryDateFrom);
          expiryDateFrom.setEnabled(false);
          expiryDateFrom.setFont(Common.font_std);
          expiryDateFrom.setBounds(144, 71, 120, 25);
        }
        {
          expiryDateTo = new JDateControl();
          jDesktopPane1.add(expiryDateTo);
          expiryDateTo.setEnabled(false);
          expiryDateTo.setFont(Common.font_std);
          expiryDateTo.setBounds(340, 71, 120, 25);
        }
        {
          jLabel8 = new JLabel4j_std();
          jDesktopPane1.add(jLabel8);
          jLabel8.setText(lang.get("lbl_Material_Batch_Expiry_Date"));
          jLabel8.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel8.setBounds(2, 71, 108, 25);
        }
        {
          jCheckBoxExpiryFrom = new JCheckBox4j();
          jDesktopPane1.add(jCheckBoxExpiryFrom);
          jCheckBoxExpiryFrom.setBackground(new java.awt.Color(255, 255, 255));
          jCheckBoxExpiryFrom.setBounds(120, 71, 21, 25);
          jCheckBoxExpiryFrom.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              if (jCheckBoxExpiryFrom.isSelected())
              {
                expiryDateFrom.setEnabled(true);
                calendarButtonexpiryDateFrom.setEnabled(true);
              } else
              {
                expiryDateFrom.setEnabled(false);
                calendarButtonexpiryDateFrom.setEnabled(false);
              }
            }
          });
        }
        {
          jCheckBoxExpiryTo = new JCheckBox4j();
          jDesktopPane1.add(jCheckBoxExpiryTo);
          jCheckBoxExpiryTo.setBackground(new java.awt.Color(255, 255, 255));
          jCheckBoxExpiryTo.setBounds(313, 71, 21, 25);
          jCheckBoxExpiryTo.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              if (jCheckBoxExpiryTo.isSelected())
              {
                expiryDateTo.setEnabled(true);
                calendarButtonexpiryDateTo.setEnabled(true);
              } else
              {
                expiryDateTo.setEnabled(false);
                calendarButtonexpiryDateTo.setEnabled(false);
              }
            }
          });
        }
        {
          jButtonLabel = new JButton4j(Common.icon_report);
          jButtonLabel.setToolTipText("Print labels for all returned rows below");
          jDesktopPane1.add(jButtonLabel);
          jButtonLabel.setText(lang.get("btn_Label"));
          jButtonLabel.setMnemonic(java.awt.event.KeyEvent.VK_L);
          jButtonLabel.setBounds(588, 226, 98, 32);
          jButtonLabel.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              printLabels();
            }
          });
        }

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

        {
          jTextFieldDespatch_No = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldDespatch_No.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBDespatch.field_despatch_no));
          jTextFieldDespatch_No.setFocusCycleRoot(true);
          jTextFieldDespatch_No.setBounds(805, 44, 117, 21);
          jDesktopPane1.add(jTextFieldDespatch_No);
        }

        {
          final JButton4j exportXlsButton = new JButton4j(Common.icon_XLS);
          exportXlsButton.setToolTipText("Export all rows below to spreadsheet.");
          exportXlsButton.addActionListener(new ActionListener()
          {
            public void actionPerformed(final ActionEvent e)
            {
              exportExcel("multi");
            }
          });
          exportXlsButton.setText(lang.get("btn_Excel"));
          exportXlsButton.setBounds(784, 226, 98, 32);
          jDesktopPane1.add(exportXlsButton);
        }

        {
          jLabel5_1 = new JLabel4j_std();
          jLabel5_1.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabel5_1.setText(lang.get("lbl_Confirmed"));
          jLabel5_1.setBounds(702, 167, 97, 21);
          jDesktopPane1.add(jLabel5_1);
        }

        {
          jCheckBoxConfirmed = new JCheckBox4j();
          jCheckBoxConfirmed.setSelected(true);
          jCheckBoxConfirmed.setBackground(Color.WHITE);
          jCheckBoxConfirmed.setBounds(801, 167, 21, 21);
          jDesktopPane1.add(jCheckBoxConfirmed);
        }

        {
          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.setBounds(98, 226, 98, 32);
          jDesktopPane1.add(jButtonClear);
        }

        button_CalendardomDateFrom = new JCalendarButton(domDateFrom);
        button_CalendardomDateFrom.setSize(21, 21);
        button_CalendardomDateFrom.setEnabled(false);
        button_CalendardomDateFrom.setLocation(274, 42);
        jDesktopPane1.add(button_CalendardomDateFrom);

        button_CalendardomDateTo = new JCalendarButton(domDateTo);
        button_CalendardomDateTo.setSize(21, 21);
        button_CalendardomDateTo.setEnabled(false);
        button_CalendardomDateTo.setLocation(470, 42);
        jDesktopPane1.add(button_CalendardomDateTo);

        calendarButtonexpiryDateFrom = new JCalendarButton(expiryDateFrom);
        calendarButtonexpiryDateFrom.setSize(21, 21);
        calendarButtonexpiryDateFrom.setEnabled(false);
        calendarButtonexpiryDateFrom.setLocation(274, 75);
        jDesktopPane1.add(calendarButtonexpiryDateFrom);

        calendarButtonexpiryDateTo = new JCalendarButton(expiryDateTo);
        calendarButtonexpiryDateTo.setSize(21, 21);
        calendarButtonexpiryDateTo.setEnabled(false);
        calendarButtonexpiryDateTo.setLocation(470, 74);
        jDesktopPane1.add(calendarButtonexpiryDateTo);

        JLabel4j_std label = new JLabel4j_std();
        label.setText(lang.get("lbl_MHN_Number"));
        label.setHorizontalAlignment(SwingConstants.TRAILING);
        label.setBounds(702, 105, 97, 21);
        jDesktopPane1.add(label);

        textFieldMHN = new JTextField4j();
        textFieldMHN.setBounds(805, 105, 117, 21);
        jDesktopPane1.add(textFieldMHN);

        JLabel4j_std label_1 = new JLabel4j_std();
        label_1.setText(lang.get("lbl_Decision"));
        label_1.setHorizontalAlignment(SwingConstants.TRAILING);
        label_1.setBounds(702, 134, 97, 21);
        jDesktopPane1.add(label_1);

        ComboBoxModel<JDBMHNDecisions> jComboBox3Model = new DefaultComboBoxModel<JDBMHNDecisions>(decisionList);
        comboBoxDecisions.setModel(jComboBox3Model);
        comboBoxDecisions.setMaximumRowCount(12);
        comboBoxDecisions.setFont(new Font("Monospaced", Font.PLAIN, 11));
        comboBoxDecisions.setBounds(805, 134, 169, 23);
        jDesktopPane1.add(comboBoxDecisions);
      }

      {
        jStatusText = new JLabel4j_std();
        jStatusText.setBounds(10, 545, 974, 21);
        jDesktopPane1.add(jStatusText);
        jStatusText.setBackground(Color.GRAY);
        jStatusText.setForeground(new Color(255, 0, 0));
      }
      jScrollPane1 = new JScrollPane();
      jScrollPane1.setBounds(0, 262, 984, 284);
      jDesktopPane1.add(jScrollPane1);
      jScrollPane1.getViewport().setBackground(Common.color_tablebackground);
      jTable1 = new JTable();
      jTable1.setDefaultRenderer(Object.class, Common.renderer_table);
      jScrollPane1.setViewportView(jTable1);
      jTable1.setModel(jTable1Model);
      jTable1.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
      jTable1.getTableHeader().setFont(Common.font_table_header);
      jTable1.getTableHeader().setForeground(Common.color_tableHeaderFont);
      jTable1.addMouseListener(new MouseAdapter()
      {
        public void mouseClicked(MouseEvent evt)
        {
          if (evt.getClickCount() == 2)
          {
            if (Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MATERIAL_EDIT") == true)
            {
              editRecord();
            }
          }
        }
      });

      {
        final JPopupMenu popupMenu = new JPopupMenu();
        popupMenu.setFont(Common.font_std);
        addPopup(jTable1, popupMenu);

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

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

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

        {
          final JMenuItem4j menuItemPrint = new JMenuItem4j(Common.icon_print);
          menuItemPrint.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_PALLETS"));
          menuItemPrint.addActionListener(new ActionListener()
          {
            public void actionPerformed(final ActionEvent e)
            {
              printRecords("selected");
            }
          });
          menuItemPrint.setText(lang.get("btn_Print"));
          popupMenu.add(menuItemPrint);
        }

        {
          final JMenuItem4j menuItemLabel = new JMenuItem4j(Common.icon_report);
          menuItemLabel.addActionListener(new ActionListener()
          {
            public void actionPerformed(final ActionEvent e)
            {
              printLabels();
            }
          });
          menuItemLabel.setText(lang.get("btn_Label"));
          popupMenu.add(menuItemLabel);
        }

        {
          final JMenuItem4j menuItemExcel = new JMenuItem4j(Common.icon_XLS);
          menuItemExcel.addActionListener(new ActionListener()
          {
            public void actionPerformed(final ActionEvent e)
            {
              exportExcel("selected");
            }
          });
          menuItemExcel.setText(lang.get("btn_Excel"));
          popupMenu.add(menuItemExcel);
        }

        {
          final JMenuItem4j menuItemConfirm = new JMenuItem4j(Common.icon_ok);
          menuItemConfirm.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_PAL_PROD_CONFIRM"));
          menuItemConfirm.addActionListener(new ActionListener()
          {
            public void actionPerformed(final ActionEvent e)
            {
              confirmRecord();
            }
          });

          menuItemConfirm.setText(lang.get("btn_Confirm"));
          popupMenu.add(menuItemConfirm);
        }
        {
          menuItemSummary = new JMenuItem4j(Common.icon_report);
          menuItemSummary.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent e)
            {
              print_summary();
            }
          });
          menuItemSummary.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_PAL_SUMMARY"));
          menuItemSummary.setText(lang.get("btn_Print_Summary"));
          popupMenu.add(menuItemSummary);
        }
        {
          final JMenuItem4j menuItemSplit = new JMenuItem4j(Common.icon_split);
          menuItemSplit.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_PAL_SPLIT"));
          menuItemSplit.addActionListener(new ActionListener()
          {
            public void actionPerformed(final ActionEvent e)
            {
              splitRecord();
            }
          });
          menuItemSplit.setText(lang.get("mod_FRM_PAL_SPLIT"));
          popupMenu.add(menuItemSplit);
        }
        {
          mnReferenceData = new JMenu4j(lang.get("lbl_Referenced_Data"));
          popupMenu.add(mnReferenceData);
          {
            mntmEditBatch = new JMenuItem4j(lang.get("btn_Edit_Batch"));
            mntmEditBatch.addActionListener(new ActionListener()
            {
              public void actionPerformed(ActionEvent arg0)
              {
                int row = jTable1.getSelectedRow();
                if (row >= 0)
                {
                  String lmaterial = jTable1.getValueAt(row, 1).toString();
                  String lbatch = jTable1.getValueAt(row, 2).toString();
                  JLaunchMenu.runForm("FRM_ADMIN_MATERIAL_BATCH_EDIT", lmaterial, lbatch);
                }
              }
            });
            mnReferenceData.add(mntmEditBatch);
            mntmEditBatch.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MATERIAL_BATCH_EDIT"));
            mntmEditBatch.setIcon(Common.icon_batch);
          }
          {
            mntmEditLocation = new JMenuItem4j(lang.get("btn_Edit_Location"));
            mntmEditLocation.addActionListener(new ActionListener()
            {
              public void actionPerformed(ActionEvent arg0)
              {
                int row = jTable1.getSelectedRow();
                if (row >= 0)
                {
                  String llocation = jTable1.getValueAt(row, 8).toString();
                  JLaunchMenu.runForm("FRM_ADMIN_LOCATION_EDIT", llocation);
                }
              }
            });
            mnReferenceData.add(mntmEditLocation);
            mntmEditLocation.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_LOCATION_EDIT"));
            mntmEditLocation.setIcon(Common.icon_location);
          }
          {
            mntmEditMaterial = new JMenuItem4j(lang.get("btn_Edit_Material"));
            mntmEditMaterial.addActionListener(new ActionListener()
            {
              public void actionPerformed(ActionEvent arg0)
              {
                int row = jTable1.getSelectedRow();
                if (row >= 0)
                {
                  String lmaterial = jTable1.getValueAt(row, 1).toString();
                  JLaunchMenu.runForm("FRM_ADMIN_MATERIAL_EDIT", lmaterial);
                }
              }
            });
            mnReferenceData.add(mntmEditMaterial);
            mntmEditMaterial.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MATERIAL_EDIT"));
            mntmEditMaterial.setIcon(Common.icon_material);
          }
          {
            mntmEditProcessOrder = new JMenuItem4j(lang.get("btn_Edit_Process_Order"));
            mntmEditProcessOrder.addActionListener(new ActionListener()
            {
              public void actionPerformed(ActionEvent arg0)
              {
                int row = jTable1.getSelectedRow();
                if (row >= 0)
                {
                  String lprocessorder = jTable1.getValueAt(row, 3).toString();
                  JLaunchMenu.runForm("FRM_ADMIN_PROCESS_ORDER_EDIT", lprocessorder);
                }
              }
            });
            mnReferenceData.add(mntmEditProcessOrder);
            mntmEditProcessOrder.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_PROCESS_ORDER_EDIT"));
            mntmEditProcessOrder.setIcon(Common.icon_process_order);
          }
          {
            mntmEditMHN = new JMenuItem4j(lang.get("btn_Edit_MHN"));
            mntmEditMHN.addActionListener(new ActionListener()
            {
              public void actionPerformed(ActionEvent arg0)
              {
                int row = jTable1.getSelectedRow();
                if (row >= 0)
                {
                  String lmhn = jTable1.getValueAt(row, JDBPalletTableModel.MHN_Number_Col).toString();
                  if (lmhn.equals("") == false)
                  {
                    JLaunchMenu.runForm("FRM_ADMIN_MHN_EDIT", lmhn);
                  }
                }
              }
            });
            mnReferenceData.add(mntmEditMHN);
            mntmEditMHN.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MHN_EDIT"));
            mntmEditMHN.setIcon(Common.icon_mhn);
          }
        }

        {
          final JMenu4j filterByMenu = new JMenu4j();
          filterByMenu.setText(lang.get("lbl_Filter_By"));
          popupMenu.add(filterByMenu);

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

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

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

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

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

          {
            final JMenuItem4j menuItemFilterByPalletStatus = new JMenuItem4j();
            menuItemFilterByPalletStatus.addActionListener(new ActionListener()
            {
              public void actionPerformed(final ActionEvent e)
              {
                filterBy("Pallet Status");
              }
            });
            menuItemFilterByPalletStatus.setText(lang.get("lbl_Pallet_Status"));
            filterByMenu.add(menuItemFilterByPalletStatus);
          }

          {
            final JMenuItem4j menuItemFilterByProcessOrder = new JMenuItem4j();
            menuItemFilterByProcessOrder.addActionListener(new ActionListener()
            {
              public void actionPerformed(final ActionEvent e)
              {
                filterBy("Process Order");
              }
            });
            menuItemFilterByProcessOrder.setText(lang.get("lbl_Process_Order"));
            filterByMenu.add(menuItemFilterByProcessOrder);
          }

          {
            filterByMenu.addSeparator();
          }

          {
            final JMenuItem4j menuItemResetFilter = new JMenuItem4j();
            menuItemResetFilter.addActionListener(new ActionListener()
            {
              public void actionPerformed(final ActionEvent e)
              {
                clearFilter();
              }
            });
            menuItemResetFilter.setText(lang.get("btn_Clear_Filter"));
            filterByMenu.add(menuItemResetFilter);
          }
        }

        {
          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("SSCC");
              }
            });
            newItemMenuItem.setText(lang.get("lbl_Pallet_SSCC"));
            sortByMenu.add(newItemMenuItem);
          }

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

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

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

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

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

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

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

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

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

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

            {

              rbascending.addActionListener(new ActionListener()
              {
                public void actionPerformed(final ActionEvent e)
                {
                  setSequence(false);
                }
              });
              buttonGroup.add(rbascending);
              rbascending.setSelected(true);
              rbascending.setText("Ascending");
              rbascending.setFont(Common.font_popup);
              orderMenu.add(rbascending);
            }

            {

              rbdescending.addActionListener(new ActionListener()
              {
                public void actionPerformed(final ActionEvent e)
                {
                  setSequence(true);
                }
              });
              buttonGroup.add(rbdescending);
              rbdescending.setText("Descending");
              rbdescending.setFont(Common.font_popup);
              orderMenu.add(rbdescending);
            }
          }
        }
      }
     
      JLabel4j_std jLabelCreatedDate = new JLabel4j_std();
      jLabelCreatedDate.setText(lang.get("lbl_Date_Created"));
      jLabelCreatedDate.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelCreatedDate.setBounds(2, 134, 108, 21);
      jDesktopPane1.add(jLabelCreatedDate);
     
      JLabel4j_std jLabelUpdatedDate = new JLabel4j_std();
      jLabelUpdatedDate.setText(lang.get("lbl_Date_Updated"));
      jLabelUpdatedDate.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelUpdatedDate.setBounds(2, 163, 108, 25);
      jDesktopPane1.add(jLabelUpdatedDate);
     
      jCheckBoxCreatedFrom = new JCheckBox4j();
      jCheckBoxCreatedFrom.setBackground(Color.WHITE);
      jCheckBoxCreatedFrom.setBounds(120, 134, 21, 25);
      jDesktopPane1.add(jCheckBoxCreatedFrom);
      jCheckBoxCreatedFrom.addActionListener(new ActionListener()
      {
        public void actionPerformed(ActionEvent evt)
        {
          if (jCheckBoxCreatedFrom.isSelected())
          {
            createdDateFrom.setEnabled(true);
            button_CalendarCreatedDateFrom.setEnabled(true);
          } else
          {
            createdDateFrom.setEnabled(false);
            button_CalendarCreatedDateFrom.setEnabled(false);
          }
        }
      });
     
      jCheckBoxUpdatedFrom = new JCheckBox4j();
      jCheckBoxUpdatedFrom.setBackground(Color.WHITE);
      jCheckBoxUpdatedFrom.setBounds(120, 163, 21, 25);
      jDesktopPane1.add(jCheckBoxUpdatedFrom);
      jCheckBoxUpdatedFrom.addActionListener(new ActionListener()
      {
        public void actionPerformed(ActionEvent evt)
        {
          if (jCheckBoxUpdatedFrom.isSelected())
          {
            updatedDateFrom.setEnabled(true);
            button_CalendarUpdatedDateFrom.setEnabled(true);
          } else
          {
            updatedDateFrom.setEnabled(false);
            button_CalendarUpdatedDateFrom.setEnabled(false);
          }
        }
      });
     
      createdDateFrom = new JDateControl();
      createdDateFrom.setFont(new Font("Arial", Font.PLAIN, 11));
      createdDateFrom.setEnabled(false);
      createdDateFrom.setBounds(144, 134, 128, 25);
      jDesktopPane1.add(createdDateFrom);
     
      updatedDateFrom = new JDateControl();
      updatedDateFrom.setFont(new Font("Arial", Font.PLAIN, 11));
      updatedDateFrom.setEnabled(false);
      updatedDateFrom.setBounds(144, 163, 128, 25);
      jDesktopPane1.add(updatedDateFrom);
     
      jCheckBoxCreatedTo = new JCheckBox4j();
      jCheckBoxCreatedTo.setBackground(Color.WHITE);
      jCheckBoxCreatedTo.setBounds(313, 134, 21, 25);
      jDesktopPane1.add(jCheckBoxCreatedTo);
      jCheckBoxCreatedTo.addActionListener(new ActionListener()
      {
        public void actionPerformed(ActionEvent evt)
        {
          if (jCheckBoxCreatedTo.isSelected())
          {
            createdDateTo.setEnabled(true);
            button_CalendarCreatedDateTo.setEnabled(true);
          } else
          {
            createdDateTo.setEnabled(false);
            button_CalendarCreatedDateTo.setEnabled(false);
          }
        }
      });
     
      jCheckBoxUpdatedTo = new JCheckBox4j();
      jCheckBoxUpdatedTo.setBackground(Color.WHITE);
      jCheckBoxUpdatedTo.setBounds(313, 163, 21, 25);
      jDesktopPane1.add(jCheckBoxUpdatedTo);
      jCheckBoxUpdatedTo.addActionListener(new ActionListener()
      {
        public void actionPerformed(ActionEvent evt)
        {
          if (jCheckBoxUpdatedTo.isSelected())
          {
            updatedDateTo.setEnabled(true);
            button_CalendarUpdatedDateTo.setEnabled(true);
          } else
          {
            createdDateTo.setEnabled(false);
            button_CalendarUpdatedDateTo.setEnabled(false);
          }
        }
      });
     
      createdDateTo = new JDateControl();
      createdDateTo.setFont(new Font("Arial", Font.PLAIN, 11));
      createdDateTo.setEnabled(false);
      createdDateTo.setBounds(340, 134, 128, 25);
      jDesktopPane1.add(createdDateTo);
     
      updatedDateTo = new JDateControl();
      updatedDateTo.setFont(new Font("Arial", Font.PLAIN, 11));
      updatedDateTo.setEnabled(false);
      updatedDateTo.setBounds(340, 163, 128, 25);
      jDesktopPane1.add(updatedDateTo);
     
      JLabel4j_std label4j_std_2 = new JLabel4j_std();
      label4j_std_2.setText((String) null);
      label4j_std_2.setHorizontalAlignment(SwingConstants.TRAILING);
      label4j_std_2.setBounds(2, 138, 108, 25);
      jDesktopPane1.add(label4j_std_2);
     
      JLabel4j_std label4j_std_3 = new JLabel4j_std();
      label4j_std_3.setText((String) null);
      label4j_std_3.setHorizontalAlignment(SwingConstants.TRAILING);
      label4j_std_3.setBounds(2, 167, 108, 25);
      jDesktopPane1.add(label4j_std_3);
     
      JLabel4j_std jLabelCreatedUser = new JLabel4j_std();
      jLabelCreatedUser.setText(lang.get("lbl_Created_By"));
      jLabelCreatedUser.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelCreatedUser.setBounds(501, 134, 77, 21);
      jDesktopPane1.add(jLabelCreatedUser);
     
      textFieldUserCreated = new JTextField4j();
      textFieldUserCreated.setBounds(582, 134, 98, 21);
      jDesktopPane1.add(textFieldUserCreated);
     
      JButton4j jButtonLookupUserCreated = new JButton4j(Common.icon_lookup);
      jButtonLookupUserCreated.setBounds(680, 134, 21, 21);
      jDesktopPane1.add(jButtonLookupUserCreated);
      jButtonLookupUserCreated.addActionListener(new ActionListener()
      {
        public void actionPerformed(ActionEvent e)
        {
          JLaunchLookup.dlgAutoExec = true;
          JLaunchLookup.dlgCriteriaDefault = "";

          if (JLaunchLookup.users())
          {
            textFieldUserCreated.setText(JLaunchLookup.dlgResult);
          }
        }
      });
     
      JLabel4j_std jLabelUpdatedUser = new JLabel4j_std();
      jLabelUpdatedUser.setText(lang.get("lbl_Updated_By"));
      jLabelUpdatedUser.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelUpdatedUser.setBounds(501, 167, 77, 21);
      jDesktopPane1.add(jLabelUpdatedUser);
     
      textFieldUserUpdated = new JTextField4j();
      textFieldUserUpdated.setBounds(582, 167, 98, 21);
      jDesktopPane1.add(textFieldUserUpdated);
     
      JButton4j jButtonLookupUserUpdated = new JButton4j(Common.icon_lookup);
      jButtonLookupUserUpdated.setBounds(680, 167, 21, 21);
View Full Code Here

Examples of com.commander4j.gui.JTextField4j

              dispose();
            }
          });
        }
        {
          jTextFieldSystemKey = new JTextField4j();
          jTextFieldSystemKey.setFocusable(false);
          jDesktopPane1.add(jTextFieldSystemKey);
          jTextFieldSystemKey.setHorizontalAlignment(SwingConstants.LEFT);
          jTextFieldSystemKey.setEditable(false);
          jTextFieldSystemKey.setPreferredSize(new java.awt.Dimension(100, 20));
          jTextFieldSystemKey.setBounds(106, 13, 252, 21);
          jTextFieldSystemKey.setEnabled(false);
        }
        {
          jTextFieldKeyValue = new JTextField4j();
          jDesktopPane1.add(jTextFieldKeyValue);
          AbstractDocument doc = (AbstractDocument) jTextFieldKeyValue.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBControl.field_key_value));
          jTextFieldKeyValue.setPreferredSize(new java.awt.Dimension(40, 20));
          jTextFieldKeyValue.setFocusCycleRoot(true);
          jTextFieldKeyValue.setBounds(106, 39, 252, 21);
          jTextFieldKeyValue.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonUpdate.setEnabled(true);
            }
          });

        }
        {
          jTextFieldDescription = new JTextField4j();
          jDesktopPane1.add(jTextFieldDescription);
          AbstractDocument doc = (AbstractDocument) jTextFieldDescription.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBControl.field_description));
          jTextFieldDescription.setPreferredSize(new java.awt.Dimension(40, 20));
          jTextFieldDescription.setFocusCycleRoot(true);
View Full Code Here

Examples of com.commander4j.gui.JTextField4j

        jDesktopPane1.setBackground(Common.color_edit_properties);
        this.getContentPane().add(jDesktopPane1, BorderLayout.CENTER);
        jDesktopPane1.setPreferredSize(new java.awt.Dimension(462, 497));
        jDesktopPane1.setLayout(null);
        {
          jTextFieldProcessOrder = new JTextField4j();
          jDesktopPane1.add(jTextFieldProcessOrder);
          jTextFieldProcessOrder.setEditable(false);
          jTextFieldProcessOrder.setEnabled(false);
          jTextFieldProcessOrder.setBounds(155, 10, 147, 21);
        }
View Full Code Here

Examples of com.commander4j.gui.JTextField4j

              }
            }
          });
        }
        {
          jTextFieldDescription = new JTextField4j();
          desktopPane.add(jTextFieldDescription);
          jTextFieldDescription.setFocusCycleRoot(true);
          jTextFieldDescription.setBounds(425, 40, 325, 21);
          jTextFieldDescription.addKeyListener(new KeyAdapter()
          {
            public void keyTyped(KeyEvent evt)
            {
              jTextFieldKeyTyped();
            }
          });
        }
        {
          jTextFieldURL = new JTextField4j();
          desktopPane.add(jTextFieldURL);
          jTextFieldURL.setFocusCycleRoot(true);
          jTextFieldURL.setBounds(425, 65, 325, 21);
          jTextFieldURL.addKeyListener(new KeyAdapter()
          {
            public void keyTyped(KeyEvent evt)
            {
              jTextFieldKeyTyped();
            }
          });
        }
        {
          jLabelDatabaseType = new JLabel4j_std();
          desktopPane.add(jLabelDatabaseType);
          jLabelDatabaseType.setText("Database Type");
          jLabelDatabaseType.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabelDatabaseType.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabelDatabaseType.setBounds(291, 91, 127, 21);

        }
        {

          ComboBoxModel<String> jComboBoxjdbcDriverModel = new DefaultComboBoxModel<String>(new String[] { "", "mySQL", "Oracle", "SQL Server", "Web URL" });
          jComboBoxjdbcDriver = new JComboBox4j<String>();
          desktopPane.add(jComboBoxjdbcDriver);
          jComboBoxjdbcDriver.setModel(jComboBoxjdbcDriverModel);
          jComboBoxjdbcDriver.setBounds(425, 90, 164, 21);
          jComboBoxjdbcDriver.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              if (jComboBoxjdbcDriver.getSelectedItem().toString().equals("Oracle"))
              {
                jTextFieldDriver.setText("oracle.jdbc.driver.OracleDriver");
                jTextFieldConnect.setText("jdbc:oracle:thin:@jdbcServer:jdbcPort:jdbcSID");
                jTextFieldDateTime.setText("sysdate");
                jTextFieldSelectLimit.setText("rownum");
                jTextFieldServer.setText("localhost");
                jTextFieldPort.setText("1521");
              }
              if (jComboBoxjdbcDriver.getSelectedItem().toString().equals("mySQL"))
              {
                jTextFieldDriver.setText("com.mysql.jdbc.Driver");
                jTextFieldConnect.setText("jdbc:mysql://jdbcServer/jdbcDatabase");
                jTextFieldDateTime.setText("sysdate");
                jTextFieldSelectLimit.setText("limit");
                jTextFieldServer.setText("localhost");
                jTextFieldPort.setText("3306");
              }
              if (jComboBoxjdbcDriver.getSelectedItem().toString().equals("SQL Server"))
              {
                jTextFieldDriver.setText("com.microsoft.sqlserver.jdbc.SQLServerDriver");
                jTextFieldConnect.setText("jdbc:sqlserver://jdbcServer\\jdbcSID");
                jTextFieldDateTime.setText("sysdate");
                jTextFieldSelectLimit.setText("top");
                jTextFieldServer.setText("localhost");
                jTextFieldPort.setText("1433");
              }
              if (jComboBoxjdbcDriver.getSelectedItem().toString().equals("Web URL"))
              {
                jTextFieldDriver.setText("http");
                jTextFieldConnect.setText("");
                jTextFieldDateTime.setText("");
                jTextFieldSelectLimit.setText("");
                jTextFieldServer.setText("");
                jTextFieldPort.setText("");
              }
              jTextFieldKeyTyped();
            }
          });
        }
        {
          jTextFieldConnect = new JTextField4j();
          desktopPane.add(jTextFieldConnect);
          jTextFieldConnect.setFocusCycleRoot(true);
          jTextFieldConnect.setBounds(425, 145, 325, 21);
          jTextFieldConnect.setEditable(false);
          jTextFieldConnect.setEnabled(false);
          jTextFieldConnect.setDisabledTextColor(Common.color_textdisabled);
          jTextFieldConnect.addKeyListener(new KeyAdapter()
          {
            public void keyTyped(KeyEvent evt)
            {
              jTextFieldKeyTyped();
            }
          });
        }
        {
          jLabelDriver = new JLabel4j_std();
          desktopPane.add(jLabelDriver);
          jLabelDriver.setText("Driver");
          jLabelDriver.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabelDriver.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabelDriver.setBounds(291, 116, 127, 21);

        }
        {
          jLabelDatabase = new JLabel4j_std();
          desktopPane.add(jLabelDatabase);
          jLabelDatabase.setText("Database");
          jLabelDatabase.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabelDatabase.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabelDatabase.setBounds(320, 196, 98, 21);

        }
        {
          jLabelDBDateTime = new JLabel4j_std();
          desktopPane.add(jLabelDBDateTime);
          jLabelDBDateTime.setText("DB Date Time");
          jLabelDBDateTime.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabelDBDateTime.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabelDBDateTime.setBounds(291, 321, 127, 21);

        }
        {
          jLabelPassword = new JLabel4j_std();
          desktopPane.add(jLabelPassword);
          jLabelPassword.setText("Password");
          jLabelPassword.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabelPassword.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabelPassword.setBounds(291, 296, 127, 21);

        }
        {
          jLabelDescription = new JLabel4j_std();
          desktopPane.add(jLabelDescription);
          jLabelDescription.setText("Description");
          jLabelDescription.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabelDescription.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabelDescription.setBounds(291, 41, 127, 21);
        }
        {
          jLabelSiteNo = new JLabel4j_std();
          desktopPane.add(jLabelSiteNo);
          jLabelSiteNo.setText("Site No");
          jLabelSiteNo.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabelSiteNo.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabelSiteNo.setBounds(291, 15, 127, 21);

        }
        {
          jLabelUsername = new JLabel4j_std();
          desktopPane.add(jLabelUsername);
          jLabelUsername.setText("Username");
          jLabelUsername.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabelUsername.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabelUsername.setBounds(291, 271, 127, 21);

        }
        {
          jLabelPort = new JLabel4j_std();
          desktopPane.add(jLabelPort);
          jLabelPort.setText("Port");
          jLabelPort.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabelPort.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabelPort.setBounds(320, 221, 98, 21);

        }
        {
          jTextFieldDateTime = new JTextField4j();
          desktopPane.add(jTextFieldDateTime);
          jTextFieldDateTime.setFocusCycleRoot(true);
          jTextFieldDateTime.setBounds(425, 320, 325, 21);
          jTextFieldDateTime.addKeyListener(new KeyAdapter()
          {
            public void keyTyped(KeyEvent evt)
            {
              jTextFieldKeyTyped();
            }
          });
        }
        {
          jTextFieldUsername = new JTextField4j();
          desktopPane.add(jTextFieldUsername);
          jTextFieldUsername.setFocusCycleRoot(true);
          jTextFieldUsername.setBounds(425, 270, 325, 21);
          jTextFieldUsername.addKeyListener(new KeyAdapter()
          {
            public void keyTyped(KeyEvent evt)
            {
              jTextFieldKeyTyped();
            }
          });
        }
        {
          jTextFieldPassword = new JPasswordField(10);
          desktopPane.add(jTextFieldPassword);
          jTextFieldPassword.setFocusCycleRoot(true);
          jTextFieldPassword.setBounds(425, 295, 325, 21);
          jTextFieldPassword.addKeyListener(new KeyAdapter()
          {
            public void keyTyped(KeyEvent evt)
            {
              jTextFieldKeyTyped();
            }
          });
        }
        {
          jTextFieldPort = new JTextField4j();
          desktopPane.add(jTextFieldPort);
          jTextFieldPort.setFocusCycleRoot(true);
          jTextFieldPort.setBounds(425, 220, 325, 21);
          jTextFieldPort.addKeyListener(new KeyAdapter()
          {
            public void keyTyped(KeyEvent evt)
            {
              jTextFieldKeyTyped();
            }
          });
        }
        {
          jTextFieldSID = new JTextField4j();
          desktopPane.add(jTextFieldSID);
          jTextFieldSID.setFocusCycleRoot(true);
          jTextFieldSID.setBounds(425, 245, 325, 21);
          jTextFieldSID.addKeyListener(new KeyAdapter()
          {
            public void keyTyped(KeyEvent evt)
            {
              jTextFieldKeyTyped();
            }
          });
        }
        {
          jTextFieldSiteNo = new JTextField4j();
          desktopPane.add(jTextFieldSiteNo);
          jTextFieldSiteNo.setFocusCycleRoot(true);
          jTextFieldSiteNo.setBounds(425, 14, 28, 21);
          jTextFieldSiteNo.setHorizontalAlignment(SwingConstants.CENTER);
          jTextFieldSiteNo.setEnabled(false);
          jTextFieldSiteNo.addKeyListener(new KeyAdapter()
          {
            public void keyTyped(KeyEvent evt)
            {
              jTextFieldKeyTyped();
            }
          });
        }
        {
          jTextFieldDriver = new JTextField4j();
          desktopPane.add(jTextFieldDriver);
          jTextFieldDriver.setFocusCycleRoot(true);
          jTextFieldDriver.setBounds(425, 117, 325, 21);
          jTextFieldDriver.setEditable(false);
          jTextFieldDriver.setEnabled(false);
          jTextFieldDriver.setDisabledTextColor(Common.color_textdisabled);
          jTextFieldDriver.addKeyListener(new KeyAdapter()
          {
            public void keyTyped(KeyEvent evt)
            {
              jTextFieldKeyTyped();
            }
          });
        }
        {
          jCheckBoxEnabled = new JCheckBox4j();
          jCheckBoxEnabled.setFont(Common.font_std);
          desktopPane.add(jCheckBoxEnabled);
          jCheckBoxEnabled.setText("Enabled");
          jCheckBoxEnabled.setBounds(467, 14, 91, 21);
          jCheckBoxEnabled.setBackground(new java.awt.Color(255, 255, 255));
          jCheckBoxEnabled.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              jTextFieldKeyTyped();
            }
          });
        }
        {
          jCheckBoxSplash = new JCheckBox4j();
          jCheckBoxSplash.setSelected(true);
          jCheckBoxSplash.setFont(Common.font_std);
          desktopPane.add(jCheckBoxSplash);
          jCheckBoxSplash.setText("Enable Splash Screen");
          jCheckBoxSplash.setBounds(687, 445, 150, 21);
          jCheckBoxSplash.setBackground(new java.awt.Color(255, 255, 255));
          jCheckBoxSplash.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              jTextFieldKeyTyped();
            }
          });
        }
        {
          jLabelSID = new JLabel4j_std();
          desktopPane.add(jLabelSID);
          jLabelSID.setText("SID");
          jLabelSID.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabelSID.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabelSID.setBounds(320, 246, 98, 21);
        }
        {
          jButtonCancel = new JButton4j(Common.icon_cancel);
          desktopPane.add(jButtonCancel);
          jButtonCancel.setText("Cancel");
          jButtonCancel.setBounds(762, 345, 160, 36);
          jButtonCancel.setEnabled(false);
          jButtonCancel.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              getHostData();
            }
          });
        }
        {
          jTextFieldServer = new JTextField4j();
          desktopPane.add(jTextFieldServer);
          jTextFieldServer.setFocusCycleRoot(true);
          jTextFieldServer.setBounds(425, 170, 325, 21);
          jTextFieldServer.setEnabled(false);
          jTextFieldServer.addKeyListener(new KeyAdapter()
          {
            public void keyTyped(KeyEvent evt)
            {
              jTextFieldKeyTyped();
            }
          });
        }
        {
          jLabelConnectionString = new JLabel4j_std();
          desktopPane.add(jLabelConnectionString);
          jLabelConnectionString.setText("Connect String");
          jLabelConnectionString.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabelConnectionString.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabelConnectionString.setBounds(291, 141, 127, 21);
        }
        {
          jTextFieldDatabase = new JTextField4j();
          desktopPane.add(jTextFieldDatabase);
          jTextFieldDatabase.setEnabled(false);
          jTextFieldDatabase.setFocusCycleRoot(true);
          jTextFieldDatabase.setBounds(425, 195, 325, 21);
          jTextFieldDatabase.addKeyListener(new KeyAdapter()
          {
            public void keyTyped(KeyEvent evt)
            {
              jTextFieldKeyTyped();
            }
          });
        }
        {
          jLabelServer = new JLabel4j_std();
          desktopPane.add(jLabelServer);
          jLabelServer.setText("Server");
          jLabelServer.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabelServer.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabelServer.setBounds(320, 171, 98, 21);
        }
        {
          jButtonTest = new JButton4j(Common.icon_connect);
          desktopPane.add(jButtonTest);
          jButtonTest.setText("Connect to DB");
          jButtonTest.setBounds(762, 86, 160, 36);
          jButtonTest.setToolTipText("Connect to selected Host Database");
          jButtonTest.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {

              writeBackHosts(hostList);

              int j = jListHosts.getSelectedIndex();
              JHost hst = (JHost) jListHosts.getModel().getElementAt(j);
              Common.selectedHostID = hst.getSiteNumber();
              if (Common.hostList.getHost(Common.selectedHostID).connect(Common.sessionID, Common.selectedHostID))
              {
                btnSchema.setEnabled(true);
                jButtonUpdate.setEnabled(true);
                Common.hostList.getHost(Common.selectedHostID).disconnect(Common.sessionID);
              } else
              {
                jButtonUpdate.setEnabled(false);
                btnSchema.setEnabled(false);
              }
            }
          });
        }
        {
          jButtonUpdate = new JButton4j(Common.icon_update);
          desktopPane.add(jButtonUpdate);
          jButtonUpdate.setText("Create/Update Tables");
          jButtonUpdate.setBounds(762, 123, 160, 36);
          jButtonUpdate.setEnabled(false);
          jButtonUpdate.setToolTipText("Create or Upgrade Application Database Schema");
          jButtonUpdate.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {

              writeBackHosts(hostList);

              int j = jListHosts.getSelectedIndex();
              JHost hst = (JHost) jListHosts.getModel().getElementAt(j);
              Common.selectedHostID = hst.getSiteNumber();

              if (Common.hostList.getHost(Common.selectedHostID).connect(Common.sessionID, Common.selectedHostID))
              {
                JDBSchema schema = new JDBSchema(Common.sessionID, Common.hostList.getHost(Common.selectedHostID));
                JDBUpdateRequest updrst = new JDBUpdateRequest();
                updrst = schema.validate(false);

                if (updrst.schema_updateRequired)
                {
                  int continueUpdate = JOptionPane.showConfirmDialog(me, "Current Schema Version is " + String.valueOf(updrst.schema_currentVersion) + ", required version is " + String.valueOf(updrst.schema_requiredVersion)
                      + ". Upgrade ?", "Connection to (" + hst.getSiteDescription() + ")", JOptionPane.YES_NO_OPTION, 0, Common.icon_confirm);

                  if (continueUpdate == 0)
                  {

                    LinkedList<JDBDDL> cmds = new LinkedList<JDBDDL>();
                    cmds.clear();
                    cmds = JXMLSchema.loadDDLStatements(jTextFieldDriver.getText(), "xml/schema/" + Common.hostList.getHost(Common.selectedHostID).getDatabaseParameters().getjdbcDriver() + "/");
                    boolean updateCtrl = false;
                    if (cmds.size() > 0)
                    {
                      if (schema.executeDDL(cmds, progressBar, labelCommand) == true)
                      {
                        updateCtrl = true;

                      } else
                      {
                        JUtility.errorBeep();
                        JDialogDMLErrors dmlerrs = new JDialogDMLErrors(me, cmds);
                        dmlerrs.setModal(true);
                        int ignoreDDLErrors = JOptionPane.showConfirmDialog(me, "Ignore Errors and set SCHEMA version to " + String.valueOf(updrst.schema_requiredVersion) + " ?", "Connection to (" + hst.getSiteDescription()
                            + ")", JOptionPane.YES_NO_OPTION, 0, Common.icon_confirm);

                        if (ignoreDDLErrors == 0)
                        {
                          updateCtrl = true;
                        }
                      }
                    } else
                    {
                      JOptionPane.showMessageDialog(me, "No DDL Commands found", "Connection to (" + hst.getSiteDescription() + ")", JOptionPane.WARNING_MESSAGE);

                    }

                    if (updateCtrl)
                    {
                      JDBControl ctrl = new JDBControl(Common.selectedHostID, Common.sessionID);
                      if (ctrl.getProperties("SCHEMA VERSION"))
                      {
                        ctrl.setKeyValue(String.valueOf(updrst.schema_requiredVersion));
                        ctrl.update();
                      } else
                      {
                        ctrl.create("SCHEMA VERSION", String.valueOf(updrst.schema_requiredVersion), "Schema Version");
                      }
                      JOptionPane.showMessageDialog(me, "Schema Version now set to " + String.valueOf(JVersion.getSchemaVersion()), "Control Table", JOptionPane.INFORMATION_MESSAGE);

                    }

                  }
                } else
                {
                  JOptionPane.showMessageDialog(me, "No Schema update Required", "Connection to (" + hst.getSiteDescription() + ")", JOptionPane.INFORMATION_MESSAGE);
                }

                if (updrst.program_updateRequired)
                {
                  JDBControl ctrl = new JDBControl(Common.selectedHostID, Common.sessionID);

                  if (ctrl.getProperties("PROGRAM VERSION"))
                  {
                    ctrl.setKeyValue(JVersion.getProgramVersion());
                    ctrl.update();
                  } else
                  {
                    ctrl.create("PROGRAM VERSION", JVersion.getProgramVersion(), "Program Version");
                  }
                  JOptionPane.showMessageDialog(me, "Program Version now set to " + JVersion.getProgramVersion(), "Control Table", JOptionPane.INFORMATION_MESSAGE);

                }
                Common.hostList.getHost(Common.selectedHostID).disconnect(Common.sessionID);
              }
            }
          });
        }
        {
          jTextFieldSelectLimit = new JTextField4j();
          desktopPane.add(jTextFieldSelectLimit);
          jTextFieldSelectLimit.setBounds(425, 345, 325, 21);
          jTextFieldSelectLimit.addKeyListener(new KeyAdapter()
          {
            public void keyTyped(KeyEvent evt)
            {
              jTextFieldKeyTyped();
            }
          });
          jTextFieldSelectLimit.setFocusCycleRoot(true);
          jTextFieldSelectLimit.setEnabled(false);
        }
        {
          jLabelSelectTime = new JLabel4j_std();
          desktopPane.add(jLabelSelectTime);
          jLabelSelectTime.setText("DB Select Limit");
          jLabelSelectTime.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabelSelectTime.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabelSelectTime.setBounds(291, 346, 127, 21);

        }
        {
          jLabelSchema = new JLabel4j_std();
          desktopPane.add(jLabelSchema);
          jLabelSchema.setText("DB Schema");
          jLabelSchema.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabelSchema.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabelSchema.setBounds(291, 370, 127, 21);
        }
        {
          jTextFieldSchema = new JTextField4j();
          desktopPane.add(jTextFieldSchema);
          jTextFieldSchema.setEnabled(false);
          jTextFieldSchema.setBounds(425, 370, 325, 21);
          jTextFieldSchema.addKeyListener(new KeyAdapter()
          {
            public void keyTyped(KeyEvent evt)
            {
              jTextFieldKeyTyped();
            }
          });
          jTextFieldSchema.setFocusCycleRoot(true);
        }

        {
          jLabelMenuURL = new JLabel4j_std();
          jLabelMenuURL.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabelMenuURL.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabelMenuURL.setText("URL");
          jLabelMenuURL.setBounds(291, 66, 127, 21);
          desktopPane.add(jLabelMenuURL);
        }

        {
          jTextFieldUniqueID = new JTextField4j();
          jTextFieldUniqueID.addKeyListener(new KeyAdapter()
          {
            @Override
            public void keyTyped(KeyEvent e)
            {
              jTextFieldKeyTyped();
            }
          });
          jTextFieldUniqueID.setEditable(true);
          jTextFieldUniqueID.setBounds(425, 395, 325, 21);
          desktopPane.add(jTextFieldUniqueID);
        }

        {
          jLabelUniqueID = new JLabel4j_std();
          jLabelUniqueID.setText("Unique ID");
          jLabelUniqueID.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabelUniqueID.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabelUniqueID.setBounds(291, 396, 127, 21);
          desktopPane.add(jLabelUniqueID);
        }
        {
          btnSchema = new JButton4j(Common.icon_report);
          btnSchema.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent e)
            {

              writeBackHosts(hostList);

              int j = jListHosts.getSelectedIndex();
              JHost hst = (JHost) jListHosts.getModel().getElementAt(j);
              Common.selectedHostID = hst.getSiteNumber();
              if (Common.hostList.getHost(Common.selectedHostID).connect(Common.sessionID, Common.selectedHostID))
              {
                btnSchema.setEnabled(true);
                jButtonUpdate.setEnabled(true);
                JDBStructure struct = new JDBStructure(Common.selectedHostID, Common.sessionID);
                struct.exportSchema();
                struct.saveAs("SCHEMA " + Common.hostList.getHost(Common.selectedHostID).getSiteDescription() + ".txt", Common.mainForm);
                Common.hostList.getHost(Common.selectedHostID).disconnect(Common.sessionID);

              } else
              {
                jButtonUpdate.setEnabled(false);
                btnSchema.setEnabled(false);
              }
            }
          });
          btnSchema.setText("DB Schema Report");
          btnSchema.setEnabled(false);
          btnSchema.setBounds(762, 308, 160, 36);
          desktopPane.add(btnSchema);
        }
      }

      progressBar.setBounds(10, 521, 912, 28);
      progressBar.setBackground(Color.WHITE);
      progressBar.setForeground(Color.BLUE);
      desktopPane.add(progressBar);

      labelCommand.setBounds(10, 548, 912, 23);
      labelCommand.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
      desktopPane.add(labelCommand);

      JButton4j btnService = new JButton4j(Common.icon_interface);
      btnService.addActionListener(new ActionListener()
      {
        public void actionPerformed(ActionEvent e)
        {
         
          if (jListHosts.getSelectedIndex() > -1)
          {
            int j = jListHosts.getSelectedIndex();
            String desc = hostList.get(j).getSiteDescription();
           
            for (int x = 0; x < hostList.size(); x++)
            {
              if (x==j)
              {
                hostList.get(x).setUniqueID("service");
              }
              else
              {
                hostList.get(x).setUniqueID("");
              }

            }
           
            populateList(desc);


            getHostData();
            setSaveButtonState(true);
          }

        }
      });
      btnService.setToolTipText("Connect to selected Host Database");
      btnService.setText("Assign to Service");
      btnService.setBounds(762, 234, 160, 36);
      desktopPane.add(btnService);

      JLabel4j_std label4j_std = new JLabel4j_std();
      label4j_std.setFont(new Font("Arial", Font.BOLD, 11));
      label4j_std.setText("Database Connections");
      label4j_std.setHorizontalTextPosition(SwingConstants.LEFT);
      label4j_std.setHorizontalAlignment(SwingConstants.LEFT);
      label4j_std.setBounds(14, 15, 127, 21);
      desktopPane.add(label4j_std);

      JLabel4j_std JLabelUpdateHostURL = new JLabel4j_std();
      JLabelUpdateHostURL.setText("URL for Update");
      JLabelUpdateHostURL.setHorizontalTextPosition(SwingConstants.RIGHT);
      JLabelUpdateHostURL.setHorizontalAlignment(SwingConstants.RIGHT);
      JLabelUpdateHostURL.setBounds(291, 470, 127, 21);
      desktopPane.add(JLabelUpdateHostURL);

      JTextFieldUpdateURL = new JTextField4j();
      JTextFieldUpdateURL.addKeyListener(new KeyAdapter()
      {
        @Override
        public void keyTyped(KeyEvent arg0)
        {
View Full Code Here

Examples of com.commander4j.gui.JTextField4j

    JLabel4j_std lblDescription = new JLabel4j_std(lang.get("lbl_Description"));
    lblDescription.setHorizontalAlignment(SwingConstants.TRAILING);
    lblDescription.setBounds(6, 43, 111, 16);
    desktopPane.add(lblDescription);

    textFieldProcessOrder = new JTextField4j();
    textFieldProcessOrder.addKeyListener(new KeyAdapter()
    {
      public void keyReleased(KeyEvent evt)
      {
        processOrderChanged(textFieldProcessOrder.getText());
      }
    });
    textFieldProcessOrder.setBounds(125, 10, 138, 22);
    desktopPane.add(textFieldProcessOrder);
    textFieldProcessOrder.setColumns(10);

    textFieldDescription = new JTextField4j();
    textFieldDescription.setEditable(false);
    textFieldDescription.setBounds(125, 38, 420, 22);
    desktopPane.add(textFieldDescription);
    textFieldDescription.setColumns(10);

    textFieldInspectionID = new JTextField4j();
    textFieldInspectionID.setEditable(false);
    textFieldInspectionID.setBounds(125, 69, 134, 22);
    desktopPane.add(textFieldInspectionID);
    textFieldInspectionID.setColumns(10);

    JLabel4j_std lblInspectionID = new JLabel4j_std(lang.get("lbl_Inspection_ID"));
    lblInspectionID.setHorizontalAlignment(SwingConstants.TRAILING);
    lblInspectionID.setBounds(6, 74, 111, 16);
    desktopPane.add(lblInspectionID);

    JLabel4j_std lblNewLabel_3 = new JLabel4j_std(lang.get("lbl_Activity_ID"));
    lblNewLabel_3.setBounds(30, 199, 111, 16);
    desktopPane.add(lblNewLabel_3);

    btnPrint = new JButton4j(lang.get("btn_Print"));
    btnPrint.setEnabled(false);
    btnPrint.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        Long sampleID = sample.generateSampleID();
        String activityID = ((JDBQMActivity) listActivities.getSelectedValue()).getActivityID();
        Timestamp ts = JUtility.getTimestampFromDate(sampleDateTime.getDate());
        sample.create(sampleID, po.getInspectionID(), activityID, po.getProcessOrder(), po.getMaterial(), textFieldUserData1.getText(), textFieldUserData2.getText(), ts);
        String pq = comboBoxPrintQueue.getSelectedItem().toString();
        buildSQL1Record(sampleID);
        String dpi = getDefaultDPI();
        if (dpi.equals("")==false)
        {
          dpi = "_" + dpi;
        }
        JLaunchReport.runReport("RPT_SAMPLE_LABEL"+dpi, listStatement, false, pq, Integer.valueOf(spinnerCopies.getValue().toString()), false);
        lblStatusBar.setText(Integer.valueOf(spinnerCopies.getValue().toString()) + " labels printed. " + sample.getSampleDate().toString());
      }
    });

    btnPrint.setIcon(Common.icon_print);
    btnPrint.setBounds(185, 535, 117, 32);
    desktopPane.add(btnPrint);

    btnClose = new JButton4j(lang.get("btn_Close"));
    btnClose.setIcon(Common.icon_close);
    btnClose.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        dispose();
      }
    });
    btnClose.setBounds(314, 535, 117, 32);
    desktopPane.add(btnClose);

    comboBoxPrintQueue.setBounds(145, 468, 388, 27);
    desktopPane.add(comboBoxPrintQueue);

    JLabel4j_std lblNewLabel_4 = new JLabel4j_std(lang.get("lbl_Print_Queue"));
    lblNewLabel_4.setHorizontalAlignment(SwingConstants.TRAILING);
    lblNewLabel_4.setBounds(6, 472, 138, 16);
    desktopPane.add(lblNewLabel_4);

    JLabel4j_std lblNewLabel_5 = new JLabel4j_std(lang.get("lbl_Number_Of_Labels"));
    lblNewLabel_5.setHorizontalAlignment(SwingConstants.TRAILING);
    lblNewLabel_5.setBounds(6, 442, 138, 16);
    desktopPane.add(lblNewLabel_5);

    spinnerCopies = new JSpinner();
    spinnerCopies.setBounds(149, 432, 37, 28);
    JSpinner.NumberEditor ne = new JSpinner.NumberEditor(spinnerCopies);
    ne.getTextField().setFont(Common.font_std);
    spinnerCopies.setEditor(ne);
    desktopPane.add(spinnerCopies);

    JButton btnProcessOrderLookup = new JButton();
    btnProcessOrderLookup.setIcon(Common.icon_lookup);
    btnProcessOrderLookup.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent evt)
      {
        JLaunchLookup.dlgCriteriaDefault = "Ready";
        JLaunchLookup.dlgAutoExec = true;
        if (JLaunchLookup.processOrders())
        {
          textFieldProcessOrder.setText(JLaunchLookup.dlgResult);
          processOrderChanged(JLaunchLookup.dlgResult);
        }
      }
    });
    btnProcessOrderLookup.setBounds(261, 10, 21, 22);
    desktopPane.add(btnProcessOrderLookup);

    populatePrinterList(JPrint.getDefaultPrinterQueueName());
    String numberOfLabels = ctrl.getKeyValueWithDefault("QM SAMPLE LABELS", "4", "Number of Labels per Sample");
    spinnerCopies.setValue(Integer.valueOf(numberOfLabels));

    JLabel4j_std lblMaterial = new JLabel4j_std(lang.get("lbl_Material"));
    lblMaterial.setHorizontalAlignment(SwingConstants.TRAILING);
    lblMaterial.setBounds(6, 105, 111, 16);
    desktopPane.add(lblMaterial);

    textFieldMaterial = new JTextField4j();
    textFieldMaterial.setEditable(false);
    textFieldMaterial.setColumns(10);
    textFieldMaterial.setBounds(125, 100, 134, 22);
    desktopPane.add(textFieldMaterial);

    JLabel4j_std lblStatus = new JLabel4j_std(lang.get("lbl_Process_Order_Status"));
    lblStatus.setHorizontalAlignment(SwingConstants.TRAILING);
    lblStatus.setBounds(6, 136, 111, 16);
    desktopPane.add(lblStatus);

    textFieldStatus = new JTextField4j();
    textFieldStatus.setEditable(false);
    textFieldStatus.setColumns(10);
    textFieldStatus.setBounds(125, 131, 134, 22);
    desktopPane.add(textFieldStatus);

    JScrollPane scrollPane = new JScrollPane();
    scrollPane.setBounds(30, 215, 515, 206);
    desktopPane.add(scrollPane);

    listActivities = new JList4j<JDBQMActivity>();
    listActivities.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

    listActivities.addListSelectionListener(new ListSelectionListener()
    {
      public void valueChanged(ListSelectionEvent arg0)
      {
        printEnable();
      }
    });
    scrollPane.setViewportView(listActivities);

    JLabel4j_std lblResource = new JLabel4j_std(lang.get("lbl_Process_Order_Required_Resource"));
    lblResource.setHorizontalAlignment(SwingConstants.TRAILING);
    lblResource.setBounds(261, 74, 138, 16);
    desktopPane.add(lblResource);

    textFieldResource = new JTextField4j();
    textFieldResource.setEditable(false);
    textFieldResource.setColumns(10);
    textFieldResource.setBounds(411, 69, 134, 22);
    desktopPane.add(textFieldResource);

    dueDate = new JDateControl();
    dueDate.setEnabled(false);
    dueDate.setBounds(411, 103, 134, 28);
    dueDate.getEditor().setPreferredSize(new java.awt.Dimension(87, 19));
    dueDate.getEditor().setSize(87, 21);
    desktopPane.add(dueDate);

    JLabel4j_std lblDueDate = new JLabel4j_std(lang.get("lbl_Process_Order_Due_Date"));
    lblDueDate.setHorizontalAlignment(SwingConstants.TRAILING);
    lblDueDate.setBounds(261, 105, 138, 16);
    desktopPane.add(lblDueDate);

    lblUserData1 = new JLabel4j_std(lang.get("lbl_User_Data1"));
    lblUserData1.setHorizontalAlignment(SwingConstants.TRAILING);
    lblUserData1.setBounds(6, 167, 111, 16);
    desktopPane.add(lblUserData1);

    lblUserData2 = new JLabel4j_std(lang.get("lbl_User_Data2"));
    lblUserData2.setHorizontalAlignment(SwingConstants.TRAILING);
    lblUserData2.setBounds(288, 167, 111, 16);
    desktopPane.add(lblUserData2);

    DocumentFilter filter = new UppercaseDocumentFilter();
    textFieldUserData1 = new JTextField4j();
    textFieldUserData1.addKeyListener(new KeyAdapter()
    {

      @Override
      public void keyReleased(KeyEvent e)
      {
        printEnable();
      }
    });

    ((AbstractDocument) textFieldUserData1.getDocument()).setDocumentFilter(filter);
    textFieldUserData1.setColumns(20);
    textFieldUserData1.setBounds(125, 162, 134, 22);
    desktopPane.add(textFieldUserData1);

    textFieldUserData2 = new JTextField4j();
    textFieldUserData2.addKeyListener(new KeyAdapter()
    {
      @Override
      public void keyReleased(KeyEvent e)
      {
View Full Code Here

Examples of com.commander4j.gui.JTextField4j

    ComboBoxModel jComboBoxDefaultPalletStatusModel = new DefaultComboBoxModel(Common.palletStatusIncBlank);
    comboBoxPalletStatus.setModel(jComboBoxDefaultPalletStatusModel);
    comboBoxPalletStatus.setSelectedIndex(0);
    desktopPane.add(comboBoxPalletStatus);

    textFieldSSCC = new JTextField4j();
    textFieldSSCC.setBounds(672, 50, 143, 21);
    desktopPane.add(textFieldSSCC);

    final JLabel4j_std palletStatusLabel = new JLabel4j_std();
    palletStatusLabel.setText(lang.get("lbl_Pallet_Status"));
    palletStatusLabel.setBounds(672, 115, 128, 20);
    desktopPane.add(palletStatusLabel);

    final JLabel4j_std ssccLabel = new JLabel4j_std();
    ssccLabel.setText(lang.get("lbl_Pallet_SSCC"));
    ssccLabel.setBounds(672, 35, 128, 16);
    desktopPane.add(ssccLabel);

    textFieldMaterial = new JTextField4j();
    textFieldMaterial.setBounds(672, 90, 124, 21);
    desktopPane.add(textFieldMaterial);

    final JLabel4j_std materialLabel = new JLabel4j_std();
    materialLabel.setText(lang.get("lbl_Material"));
    materialLabel.setBounds(672, 75, 128, 16);
    desktopPane.add(materialLabel);

    textFieldBatch = new JTextField4j();
    textFieldBatch.setBounds(672, 175, 124, 21);
    desktopPane.add(textFieldBatch);

    final JLabel4j_std batchLabel = new JLabel4j_std();
    batchLabel.setText(lang.get("lbl_Batch"));
    batchLabel.setBounds(672, 160, 128, 16);
    desktopPane.add(batchLabel);
    buttonAssign.setEnabled(false);

    buttonAssign.setBounds(470, 150, 25, 25);
    buttonAssign.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        if (textFieldDespatchLocationTo.getText().equals(""))
        {
          jStatusText.setText("Please define Destination Location");
        }
        else
        {
          jStatusText.setText("");
          if (list_unassigned.getSelectedIndex() > -1)
          {
            String item = "";
            JDBDespatch d = (JDBDespatch) list_despatch.getSelectedValue();

            for (int j = list_unassigned.getMaxSelectionIndex(); j >= list_unassigned.getMinSelectionIndex(); j--)
            {
              if (list_unassigned.isSelectedIndex(j))
              {
                item = (String) list_unassigned.getModel().getElementAt(j);

                if (d.assignSSCC(item))
                {
                  addtoList(assignedList, item);
                  removefromList(unassignedList, item);
                  jStatusText.setText("");
                }
                else
                {
                  jStatusText.setText(d.getErrorMessage());
                }
              }
            }

            list_assigned.setModel(addListtoModel(assignedList));
            list_unassigned.setModel(addListtoModel(unassignedList));
            textFieldNoOfPallets.setText(String.valueOf(assignedList.size()));

            d.setTotalPallets(assignedList.size());
            updateDespatch(d);
          }
        }
      }
    });
    desktopPane.add(buttonAssign);
    buttonUnAssign.setEnabled(false);

    buttonUnAssign.setBounds(470, 185, 25, 25);
    buttonUnAssign.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        if (list_assigned.getSelectedIndex() > -1)
        {
          String item = "";
          JDBDespatch d = (JDBDespatch) list_despatch.getSelectedValue();

          for (int j = list_assigned.getMaxSelectionIndex(); j >= list_assigned.getMinSelectionIndex(); j--)
          {
            if (list_assigned.isSelectedIndex(j))
            {
              item = (String) list_assigned.getModel().getElementAt(j);

              if (d.unassignSSCC(item))
              {
                removefromList(assignedList, item);
                addtoList(unassignedList, item);
              }
            }
          }

          list_assigned.setModel(addListtoModel(assignedList));
          list_unassigned.setModel(addListtoModel(unassignedList));
          textFieldNoOfPallets.setText(String.valueOf(assignedList.size()));

          d.setTotalPallets(assignedList.size());
          updateDespatch(d);
        }
      }
    });
    desktopPane.add(buttonUnAssign);

    newButton.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        int question = JOptionPane.showConfirmDialog(Common.mainForm, lang.get("dlg_Despatch_Create"), lang.get("dlg_Confirm"), JOptionPane.YES_NO_OPTION);

        if (question == 0)
        {
          JDBDespatch d = new JDBDespatch(Common.selectedHostID, Common.sessionID);
          String number = "";
          number = d.generateNewDespatchNo();

          if (number.equals("") == false)
          {

            if (d.create())
            {
              d.updateUserID(number, Common.userList.getUser(Common.sessionID).getUserId());
              populateDespatchList(number);
              setConfirmButtonStatus();
            }
            else
            {
              JUtility.errorBeep();
              JOptionPane.showMessageDialog(Common.mainForm, d.getErrorMessage(), lang.get("dlg_Error"), JOptionPane.ERROR_MESSAGE);
            }
          }
          else
          {
            JUtility.errorBeep();
            JOptionPane.showMessageDialog(Common.mainForm, d.getErrorMessage(), lang.get("dlg_Error"), JOptionPane.ERROR_MESSAGE);
          }
        }
      }
    });
    newButton.setText(lang.get("btn_New"));
    newButton.setBounds(2, 388, 116, 30);
    desktopPane.add(newButton);

    deleteButton.setText(lang.get("btn_Delete"));
    deleteButton.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 question = JOptionPane.showConfirmDialog(Common.mainForm, lang.get("dlg_Despatch_Delete") + " " + d.getDespatchNo() + " ?", lang.get("dlg_Confirm"), JOptionPane.YES_NO_OPTION);

            if (question == 0)
            {
              d.delete();
              populateDespatchList("");
              setConfirmButtonStatus();
            }
          }
        }
      }
    });
    deleteButton.setBounds(238, 388, 116, 30);
    desktopPane.add(deleteButton);

    findButton.setText(lang.get("btn_Find"));
    findButton.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        buildUnassignedSQL();
        populateUnassignedList(listStatement, "");
      }
    });
    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 JCheckBox();
    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);

            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);
                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;
        JLaunchLookup.dlgCriteriaDefault = "";

        if (JLaunchLookup.users())
        {
          textFieldUserID.setText(JLaunchLookup.dlgResult);

          JDBDespatch d = (JDBDespatch) list_despatch.getSelectedValue();
          d.updateUserID(d.getDespatchNo(), JLaunchLookup.dlgResult);

        }
      }
    });
    buttonSetUserID.setEnabled(false);
    buttonSetUserID.setBounds(795, 355, 21, 21);
    desktopPane.add(buttonSetUserID);

    textFieldDespatchNo = new JTextField4j();
    textFieldDespatchNo.setBounds(672, 215, 143, 21);
    desktopPane.add(textFieldDespatchNo);

    JLabel4j_std despatchNolabel = new JLabel4j_std();
    despatchNolabel.setText(lang.get("lbl_Despatch_No"));
View Full Code Here

Examples of com.commander4j.gui.JTextField4j

          jLabel1.setText(lang.get("lbl_Material"));
          jLabel1.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel1.setBounds(49, 13, 70, 21);
        }
        {
          jTextFieldMaterial = new JTextField4j();
          jDesktopPane1.add(jTextFieldMaterial);
          jTextFieldMaterial.setText(lmaterial);
          jTextFieldMaterial.setBounds(126, 13, 126, 21);
          jTextFieldMaterial.setEnabled(false);
          jTextFieldMaterial.setEditable(false);
        }
        {
          jLabel3 = new JLabel4j_std();
          jDesktopPane1.add(jLabel3);
          jLabel3.setText(lang.get("lbl_Location_ID"));
          jLabel3.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel3.setBounds(49, 41, 70, 21);
        }
        {
          jTextFieldLocation = new JTextField4j();
          jDesktopPane1.add(jTextFieldLocation);
          jTextFieldLocation.setText(llocation);
          jTextFieldLocation.setBounds(126, 41, 126, 21);
          jTextFieldLocation.setEnabled(false);
          jTextFieldLocation.setEditable(false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.