Package com.commander4j.gui

Examples of com.commander4j.gui.JTextField4j


          jLabel1.setText(lang.get("lbl_Material"));
          jLabel1.setBounds(0, 11, 91, 21);
          jLabel1.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jTextFieldMaterial = new JTextField4j();
          jDesktopPane1.add(jTextFieldMaterial);
          jTextFieldMaterial.setBounds(99, 11, 141, 21);
        }
        {
          jLabel3 = new JLabel4j_std();
          jDesktopPane1.add(jLabel3);
          jLabel3.setText(lang.get("lbl_Material_Batch"));
          jLabel3.setBounds(0, 44, 91, 21);
          jLabel3.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jTextFieldBatch = new JTextField4j();
          jDesktopPane1.add(jTextFieldBatch);
          jTextFieldBatch.setBounds(99, 44, 141, 21);
        }
        {
          jLabel10 = new JLabel4j_std();
View Full Code Here


    label.setText(lang.get("lbl_Process_Order_Required_Resource"));
    label.setHorizontalAlignment(SwingConstants.TRAILING);
    label.setBounds(10, 110, 131, 21);
    jDesktopPane1.add(label);

    jTextFieldRequiredResource = new JTextField4j();
    jTextFieldRequiredResource.setBounds(148, 110, 117, 21);
    jDesktopPane1.add(jTextFieldRequiredResource);
   
    calendarButtondueDateFrom = new JCalendarButton(dueDateFrom);
    calendarButtondueDateFrom.setEnabled(false);
    calendarButtondueDateFrom.setBounds(300, 79, 21, 21);
    jDesktopPane1.add(calendarButtondueDateFrom);
   
    calendarButtondueDateTo = new JCalendarButton(dueDateTo);
    calendarButtondueDateTo.setEnabled(false);
    calendarButtondueDateTo.setBounds(510, 79, 21, 21);
    jDesktopPane1.add(calendarButtondueDateTo);
   
    jTextFieldCustomerID = new JTextField4j();
    jTextFieldCustomerID.setBounds(383, 110, 117, 21);
    jDesktopPane1.add(jTextFieldCustomerID);
   
    Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
    Rectangle window = getBounds();
View Full Code Here

          jDesktopPane1.add(jLabel3);
          jLabel3.setText(lang.get("lbl_Description"));
          jLabel3.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jTextFieldDescription = new JTextField4j();
          jTextFieldDescription.setBounds(629, 11, 354, 22);
          jDesktopPane1.add(jTextFieldDescription);
        }
        {
          jTextFieldMaterial = new JTextField4j();
          jTextFieldMaterial.setBounds(383, 45, 98, 22);
          jDesktopPane1.add(jTextFieldMaterial);
        }
        {
          jTextFieldCustomer = new JTextField4j();
          jTextFieldCustomer.setBounds(383, 11, 98, 22);
          jDesktopPane1.add(jTextFieldCustomer);
       
        {
          JLabel4j_std label4j_std = new JLabel4j_std();
          label4j_std.setText(lang.get("lbl_Customer_ID"));
          label4j_std.setHorizontalAlignment(SwingConstants.TRAILING);
          label4j_std.setBounds(275, 110, 98, 21);
          jDesktopPane1.add(label4j_std);
        }
        {
          jLabel2 = new JLabel4j_std();
          jLabel2.setBounds(758, 45, 89, 22);
          jDesktopPane1.add(jLabel2);
          jLabel2.setText(lang.get("lbl_Location_ID"));
          jLabel2.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jTextFieldProcessOrder = new JTextField4j();
          jTextFieldProcessOrder.setBounds(148, 11, 105, 22);
          jDesktopPane1.add(jTextFieldProcessOrder);
        }
        {
          jLabel4 = new JLabel4j_std();
          jLabel4.setBounds(7, 11, 132, 22);
          jDesktopPane1.add(jLabel4);
          jLabel4.setText(lang.get("lbl_Process_Order"));
          jLabel4.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jLabel5 = new JLabel4j_std();
          jLabel5.setBounds(7, 45, 132, 22);
          jDesktopPane1.add(jLabel5);
          jLabel5.setText(lang.get("lbl_Process_Order_Status"));
          jLabel5.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jTextFieldLocation = new JTextField4j();
          jTextFieldLocation.setBounds(857, 45, 105, 22);
          jDesktopPane1.add(jTextFieldLocation);
        }
        {
          jTextFieldRecipe = new JTextField4j();
          jTextFieldRecipe.setBounds(629, 45, 125, 22);
          jDesktopPane1.add(jTextFieldRecipe);
        }
        {
          jLabel6 = new JLabel4j_std();
View Full Code Here

          lblPermitBatchStatus.setText(lang.get("lbl_Storage_Location_Permit_Batch_Status"));
          lblPermitBatchStatus.setBounds(243, 424, 163, 21);
          jDesktopPane1.add(lblPermitBatchStatus);
        }
        {
          jTextFieldLocationID = new JTextField4j();
          jDesktopPane1.add(jTextFieldLocationID);
          jTextFieldLocationID.setText(llocation);
          jTextFieldLocationID.setEditable(false);
          jTextFieldLocationID.setEnabled(false);
          jTextFieldLocationID.setBounds(158, 7, 140, 21);
        }
        {
          jLabel3 = new JLabel4j_std();
          jDesktopPane1.add(jLabel3);
          jLabel3.setText(lang.get("lbl_Storage_Warehouse"));
          jLabel3.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel3.setBounds(60, 63, 91, 21);
        }
        {
          jTextFieldWarehouse = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldWarehouse.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBLocation.field_warehouse));
          jDesktopPane1.add(jTextFieldWarehouse);
          jTextFieldWarehouse.setBounds(158, 63, 105, 21);
          jTextFieldWarehouse.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonSave.setEnabled(true);
            }
          });
        }
        {
          jTextFieldGLN = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldGLN.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBLocation.field_gln));
          jDesktopPane1.add(jTextFieldGLN);
          jTextFieldGLN.setBounds(158, 91, 140, 21);
          jTextFieldGLN.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonSave.setEnabled(true);
            }
          });
        }
        {
          jLabel2 = new JLabel4j_std();
          jDesktopPane1.add(jLabel2);
          jLabel2.setText(lang.get("lbl_Description"));
          jLabel2.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel2.setBounds(60, 119, 91, 21);
        }
        {
          jTextFieldPlant = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldPlant.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBLocation.field_plant));
          jDesktopPane1.add(jTextFieldPlant);
          jTextFieldPlant.setBounds(158, 35, 105, 21);
          jTextFieldPlant.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonSave.setEnabled(true);
            }
          });
        }
        {
          jLabel4 = new JLabel4j_std();
          jDesktopPane1.add(jLabel4);
          jLabel4.setText(lang.get("lbl_Storage_Plant"));
          jLabel4.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel4.setBounds(60, 35, 91, 21);
        }
        {
          jTextFieldDescription = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldDescription.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBLocation.field_description));
          jDesktopPane1.add(jTextFieldDescription);
          jTextFieldDescription.setBounds(158, 119, 308, 21);
          jTextFieldDescription.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonSave.setEnabled(true);
            }
          });
        }
        {
          jLabel5 = new JLabel4j_std();
          jDesktopPane1.add(jLabel5);
          jLabel5.setText(lang.get("lbl_Storage_GLN"));
          jLabel5.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel5.setBounds(60, 91, 91, 21);
        }
        {
          jLabel6 = new JLabel4j_std();
          jDesktopPane1.add(jLabel6);
          jLabel6.setText(lang.get("lbl_Storage_Location"));
          jLabel6.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel6.setBounds(53, 147, 98, 21);
        }
        {
          jTextFieldStorageLocation = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldStorageLocation.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBLocation.field_storage_location));
          jDesktopPane1.add(jTextFieldStorageLocation);
          jTextFieldStorageLocation.setBounds(158, 147, 105, 21);
          jTextFieldStorageLocation.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonSave.setEnabled(true);
            }
          });
        }
        {
          jLabel7 = new JLabel4j_std();
          jDesktopPane1.add(jLabel7);
          jLabel7.setText(lang.get("lbl_Storage_Type"));
          jLabel7.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel7.setBounds(60, 175, 91, 21);
        }
        {
          jTextFieldStorageType = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldStorageType.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBLocation.field_storage_type));
          jDesktopPane1.add(jTextFieldStorageType);
          jTextFieldStorageType.setBounds(158, 175, 105, 21);
          jTextFieldStorageType.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonSave.setEnabled(true);
            }
          });
        }
        {
          jLabel8 = new JLabel4j_std();
          jDesktopPane1.add(jLabel8);
          jLabel8.setText(lang.get("lbl_Storage_Section"));
          jLabel8.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel8.setBounds(60, 203, 91, 21);
        }
        {
          jTextFieldStorageSection = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldStorageSection.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBLocation.field_storage_section));
          jDesktopPane1.add(jTextFieldStorageSection);
          jTextFieldStorageSection.setBounds(158, 203, 105, 21);
          jTextFieldStorageSection.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonSave.setEnabled(true);
            }
          });
        }
        {
          jLabel9 = new JLabel4j_std();
          jDesktopPane1.add(jLabel9);
          jLabel9.setText(lang.get("lbl_Storage_Bin"));
          jLabel9.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel9.setBounds(60, 231, 91, 21);
        }
        {
          jTextFieldStorageBin = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldStorageBin.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBLocation.field_storage_bin));
          jDesktopPane1.add(jTextFieldStorageBin);
          jTextFieldStorageBin.setBounds(158, 231, 105, 21);
          jTextFieldStorageBin.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonSave.setEnabled(true);
            }
          });
        }
        {
          lblMsgDespatchConfirm = new JLabel4j_std();
          lblMsgDespatchConfirm.setText("Msg Despatch Confirm");
          lblMsgDespatchConfirm.setHorizontalAlignment(SwingConstants.TRAILING);
          lblMsgDespatchConfirm.setBounds(47, 299, 139, 21);
          jDesktopPane1.add(lblMsgDespatchConfirm);
        }
        {
          lblMsgPreAdvice = new JLabel4j_std();
          lblMsgPreAdvice.setText("Msg Despatch Pre Advice");
          lblMsgPreAdvice.setHorizontalAlignment(SwingConstants.TRAILING);
          lblMsgPreAdvice.setBounds(47, 332, 139, 21);
          jDesktopPane1.add(lblMsgPreAdvice);
        }
        {
          lblMsgPreAdvice = new JLabel4j_std();
          lblMsgPreAdvice.setText("Msg SSCC Status Change");
          lblMsgPreAdvice.setHorizontalAlignment(SwingConstants.TRAILING);
          lblMsgPreAdvice.setBounds(47, 365, 139, 21);
          jDesktopPane1.add(lblMsgPreAdvice);
        }
        {
          lblMsgPalletSplit = new JLabel4j_std();
          lblMsgPalletSplit.setText("Msg SSCC Split");
          lblMsgPalletSplit.setHorizontalAlignment(SwingConstants.TRAILING);
          lblMsgPalletSplit.setBounds(228, 365, 139, 21);
          jDesktopPane1.add(lblMsgPalletSplit);
        }
        {
          lblMsgEquipmentTracking = new JLabel4j_std();
          lblMsgEquipmentTracking.setText("Msg Equipment Tracking");
          lblMsgEquipmentTracking.setHorizontalAlignment(SwingConstants.TRAILING);
          lblMsgEquipmentTracking.setBounds(228, 298, 139, 21);
          jDesktopPane1.add(lblMsgEquipmentTracking);
        }
        {
          lblMsgProductionConfirmation = new JLabel4j_std();
          lblMsgProductionConfirmation.setText("Msg Production Confirm");
          lblMsgProductionConfirmation.setHorizontalAlignment(SwingConstants.TRAILING);
          lblMsgProductionConfirmation.setBounds(228, 331, 139, 21);
          jDesktopPane1.add(lblMsgProductionConfirmation);
        }
        {
          checkBox_DespatchConfirm = new JCheckBox4j("");
          checkBox_DespatchConfirm.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
              jButtonSave.setEnabled(true);
            }
          });
          checkBox_DespatchConfirm.setBounds(193, 295, 31, 24);
          jDesktopPane1.add(checkBox_DespatchConfirm);
        }
        {
          checkBox_PreAdvice = new JCheckBox4j("");
          checkBox_PreAdvice.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
              jButtonSave.setEnabled(true);
            }
          });
          checkBox_PreAdvice.setBounds(193, 329, 31, 24);
          jDesktopPane1.add(checkBox_PreAdvice);
        }
        {
          checkBox_StatusChange = new JCheckBox4j("");
          checkBox_StatusChange.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
              jButtonSave.setEnabled(true);
            }
          });
          checkBox_StatusChange.setBounds(193, 362, 31, 24);
          jDesktopPane1.add(checkBox_StatusChange);
       
        {
          checkBox_PalletSplit = new JCheckBox4j("");
          checkBox_PalletSplit.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
              jButtonSave.setEnabled(true);
            }
          });
          checkBox_PalletSplit.setBounds(374, 362, 31, 24);
          jDesktopPane1.add(checkBox_PalletSplit);
       
       
        {
          checkBox_Equipment_Tracking = new JCheckBox4j("");
          checkBox_Equipment_Tracking.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
              jButtonSave.setEnabled(true);
            }
          });
          checkBox_Equipment_Tracking.setBounds(374, 295, 31, 24);
          jDesktopPane1.add(checkBox_Equipment_Tracking);
        }
        {
          checkBox_Production_Confirmation = new JCheckBox4j("");
          checkBox_Production_Confirmation.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
              jButtonSave.setEnabled(true);
            }
          });
          checkBox_Production_Confirmation.setBounds(374, 328, 31, 24);
          jDesktopPane1.add(checkBox_Production_Confirmation);
        }
        {
          jButtonSave = new JButton4j(Common.icon_update);
          jDesktopPane1.add(jButtonSave);
          jButtonSave.setEnabled(false);
          jButtonSave.setText("Save");
          jButtonSave.setMnemonic(83);
          jButtonSave.setBounds(53, 543, 112, 28);
          jButtonSave.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              boolean result = true;

              location.setLocationID(jTextFieldLocationID.getText());
              location.setPlant(jTextFieldPlant.getText());
              location.setWarehouse(jTextFieldWarehouse.getText());
              location.setGLN(jTextFieldGLN.getText());
              location.setDescription(jTextFieldDescription.getText());
              location.setStorageLocation(jTextFieldStorageLocation.getText());
              location.setStorageType(jTextFieldStorageType.getText());
              location.setStorageSection(jTextFieldStorageSection.getText());
              location.setStorageBin(jTextFieldStorageBin.getText());
              location.setEquipmentTrackingID(jTextFieldEquipmentTrackingID.getText());
              location.setMsgDespatchConfirm(checkBox_DespatchConfirm.isSelected());
              location.setMsgDespatchEquipTrack(checkBox_Equipment_Tracking.isSelected());
              location.setMsgDespatchPreadvice(checkBox_PreAdvice.isSelected());
              location.setMsgStatusChange(checkBox_StatusChange.isSelected());
              location.setMsgProdConfirm(checkBox_Production_Confirmation.isSelected());
              location.setMsgPalletSplit(checkBox_PalletSplit.isSelected());
              location.setMsgDelete(checkBox_PalletDelete.isSelected());
              location.setEnabled(chckbxEnabled.isSelected());

              String palletStatusSelected = "^";
              if (palletStatusList.isSelectionEmpty() == false)
              {
                List<String> temp = palletStatusList.getSelectedValuesList();

                for (int x = 0; x < temp.size(); x++)
                {
                  palletStatusSelected = palletStatusSelected + temp.get(x) + "^";
                }
              }
              location.setPermittedPalletStatus(palletStatusSelected);

              String batchStatusSelected = "^";
              if (batchStatusList.isSelectionEmpty() == false)
              {
                List<String> temp = batchStatusList.getSelectedValuesList();


                for (int x = 0; x < temp.size(); x++)
                {
                  batchStatusSelected = batchStatusSelected + temp.get(x) + "^";
                }
              }
              location.setPermittedBatchStatus(batchStatusSelected);

              if (location.isValidLocation() == false)
              {
                result = location.create();
              }
              else
              {
                result = location.update();
              }
              if (result == false)
              {
                JOptionPane.showMessageDialog(Common.mainForm, location.getErrorMessage(), lang.get("err_Error"), JOptionPane.ERROR_MESSAGE,Common.icon_confirm);
              }
              else
              {
                jButtonSave.setEnabled(false);
              }

            }
          });
        }
      }
      {
        jButtonHelp = new JButton4j(Common.icon_help);
        jDesktopPane1.add(jButtonHelp);
        jButtonHelp.setText("Help");
        jButtonHelp.setMnemonic(java.awt.event.KeyEvent.VK_H);
        jButtonHelp.setBounds(172, 543, 112, 28);
      }
      {
        jButtonCancel = new JButton4j(Common.icon_close);
        jDesktopPane1.add(jButtonCancel);
        jButtonCancel.setText("Close");
        jButtonCancel.setMnemonic(67);
        jButtonCancel.setBounds(291, 543, 112, 28);
        jButtonCancel.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            dispose();
          }
        });
      }
      {
        jTextFieldEquipmentTrackingID = new JTextField4j();
        jTextFieldEquipmentTrackingID.addKeyListener(new KeyAdapter() {
          @Override
          public void keyTyped(KeyEvent e) {
            jButtonSave.setEnabled(true);
          }
View Full Code Here

      jDesktopPane1.add(jPanelProcessOrder);
      jPanelProcessOrder.setBounds(7, 7, 748, 112);
      jPanelProcessOrder.setBorder(BorderFactory.createTitledBorder(lang.get("lbl_Process_Order")));
      jPanelProcessOrder.setLayout(null);
      jPanelProcessOrder.setBackground(new java.awt.Color(255, 255, 255));
      jTextFieldProcessOrder = new JTextField4j();
      jPanelProcessOrder.add(jTextFieldProcessOrder);
      AbstractDocument doc = (AbstractDocument) jTextFieldProcessOrder.getDocument();
      doc.setDocumentFilter(new JFixedSizeFilter(JDBProcessOrder.field_process_order));
      jTextFieldProcessOrder.setBounds(161, 21, 119, 21);
      jTextFieldProcessOrder.addKeyListener(new KeyAdapter() {
        public void keyReleased(KeyEvent evt)
        {
          processOrderChanged(jTextFieldProcessOrder.getText());
        }
      });

      jLabelProcessOrder = new JLabel4j_std();
      jPanelProcessOrder.add(jLabelProcessOrder);
      jLabelProcessOrder.setText(lang.get("lbl_Process_Order"));
      jLabelProcessOrder.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelProcessOrder.setBounds(12, 21, 142, 21);
      jTextFieldProcessOrderDescription = new JTextField4j();
      jPanelProcessOrder.add(jTextFieldProcessOrderDescription);
      jTextFieldProcessOrderDescription.setBounds(449, 21, 287, 21);
      jTextFieldProcessOrderDescription.setEditable(false);
      jTextFieldProcessOrderDescription.setEnabled(false);
      jLabelOrderDescription = new JLabel4j_std();
      jPanelProcessOrder.add(jLabelOrderDescription);
      jLabelOrderDescription.setText(lang.get("lbl_Description"));
      jLabelOrderDescription.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelOrderDescription.setBounds(306, 21, 136, 21);
      jLabelOrderStatus = new JLabel4j_std();
      jPanelProcessOrder.add(jLabelOrderStatus);
      jLabelOrderStatus.setText(lang.get("lbl_Process_Order_Status"));
      jLabelOrderStatus.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelOrderStatus.setBounds(290, 49, 152, 21);
      jSpinnerDueDate = new JDateControl();
      jPanelProcessOrder.add(jSpinnerDueDate);
      jSpinnerDueDate.setEnabled(false);
      jSpinnerDueDate.setBounds(161, 49, 137, 21);
      jSpinnerDueDate.getEditor().setOpaque(true);
      jSpinnerDueDate.setForeground(new java.awt.Color(238, 238, 238));
      jLabelDueDate = new JLabel4j_std();
      jPanelProcessOrder.add(jLabelDueDate);
      jLabelDueDate.setText(lang.get("lbl_Process_Order_Due_Date"));
      jLabelDueDate.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelDueDate.setBounds(12, 49, 142, 21);
      jTextFieldProcessOrderStatus = new JTextField4j();
      jPanelProcessOrder.add(jTextFieldProcessOrderStatus);
      jTextFieldProcessOrderStatus.setBounds(449, 49, 126, 21);
      jTextFieldProcessOrderStatus.setEditable(false);
      jTextFieldProcessOrderStatus.setEnabled(false);
      jTextFieldRecipe = new JTextField4j();
      jPanelProcessOrder.add(jTextFieldRecipe);
      jTextFieldRecipe.setBounds(161, 77, 139, 21);
      jTextFieldRecipe.setEditable(false);
      jTextFieldRecipe.setEnabled(false);
      jLabelRecipe = new JLabel4j_std();
      jPanelProcessOrder.add(jLabelRecipe);
      jLabelRecipe.setText(lang.get("lbl_Process_Order_Recipe"));
      jLabelRecipe.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelRecipe.setBounds(12, 77, 142, 21);
      jTextFieldLocation = new JTextField4j();
      jPanelProcessOrder.add(jTextFieldLocation);
      jTextFieldLocation.setBounds(449, 77, 126, 21);
      jTextFieldLocation.setEditable(false);
      jTextFieldLocation.setEnabled(false);
      jLabelLocation = new JLabel4j_std();
      jPanelProcessOrder.add(jLabelLocation);
      jLabelLocation.setText(lang.get("lbl_Location_ID"));
      jLabelLocation.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelLocation.setBounds(290, 77, 152, 21);
      jButtonPOLookup = new JButton4j(Common.icon_lookup);
      jPanelProcessOrder.add(jButtonPOLookup);
      jButtonPOLookup.setBounds(280, 21, 20, 20);
      jButtonPOLookup.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt)
        {
          JLaunchLookup.dlgCriteriaDefault = "Ready";
          JLaunchLookup.dlgAutoExec = true;

          if (JLaunchLookup.processOrders())
          {
            String po = JLaunchLookup.dlgResult;
            processOrderChanged(po);
          }
        }
      });

      jPanelMaterial = new JPanel();
      jDesktopPane1.add(jPanelMaterial);
      jPanelMaterial.setBounds(7, 119, 748, 112);
      jPanelMaterial.setBorder(BorderFactory.createTitledBorder(lang.get("lbl_Material")));
      jPanelMaterial.setLayout(null);
      jPanelMaterial.setFont(Common.font_title);
      jPanelMaterial.setBackground(new java.awt.Color(255, 255, 255));
      jTextFieldMaterial = new JTextField4j();
      jPanelMaterial.add(jTextFieldMaterial);
      jTextFieldMaterial.setBounds(161, 21, 128, 21);
      jTextFieldMaterial.setEditable(false);
      jTextFieldMaterial.setEnabled(false);
      jLabelMaterial = new JLabel4j_std();
      jPanelMaterial.add(jLabelMaterial);
      jLabelMaterial.setText(lang.get("lbl_Material"));
      jLabelMaterial.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelMaterial.setBounds(12, 21, 142, 21);
      jTextFieldMaterialDescription = new JTextField4j();
      jPanelMaterial.add(jTextFieldMaterialDescription);
      jTextFieldMaterialDescription.setBounds(449, 21, 287, 21);
      jTextFieldMaterialDescription.setEditable(false);
      jTextFieldMaterialDescription.setEnabled(false);
      jLabelDescription = new JLabel4j_std();
      jPanelMaterial.add(jLabelDescription);
      jLabelDescription.setText(lang.get("lbl_Description"));
      jLabelDescription.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelDescription.setBounds(291, 21, 151, 21);
      jSpinnerShelfLife = new JSpinner();
      jPanelMaterial.add(jSpinnerShelfLife);
      jSpinnerShelfLife.setModel(shelflifenumbermodel);
      JSpinner.NumberEditor nec = new JSpinner.NumberEditor(jSpinnerShelfLife);
      nec.getTextField().setFont(Common.font_std);
      jSpinnerShelfLife.setEditor(nec);
      jSpinnerShelfLife.setBounds(161, 49, 63, 21);
      jSpinnerShelfLife.setEnabled(false);
      jTextFieldShelfLifeRoundingRule = new JTextField4j();
      jPanelMaterial.add(jTextFieldShelfLifeRoundingRule);
      jTextFieldShelfLifeRoundingRule.setBounds(638, 49, 98, 21);
      jTextFieldShelfLifeRoundingRule.setEditable(false);
      jTextFieldShelfLifeRoundingRule.setEnabled(false);
      jLabelRounding = new JLabel4j_std();
      jPanelMaterial.add(jLabelRounding);
      jLabelRounding.setText(lang.get("lbl_Material_Shelf_Life_Rounding_Rule"));
      jLabelRounding.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelRounding.setBounds(546, 49, 85, 21);
      jTextFieldShelfLifeUOM = new JTextField4j();
      jPanelMaterial.add(jTextFieldShelfLifeUOM);
      jTextFieldShelfLifeUOM.setBounds(449, 49, 91, 21);
      jTextFieldShelfLifeUOM.setEditable(false);
      jTextFieldShelfLifeUOM.setEnabled(false);
      jLabel1ShelfLifeUOM = new JLabel4j_std();
      jPanelMaterial.add(jLabel1ShelfLifeUOM);
      jLabel1ShelfLifeUOM.setText(lang.get("lbl_Material_Shelf_Life_UOM"));
      jLabel1ShelfLifeUOM.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabel1ShelfLifeUOM.setBounds(281, 49, 161, 21);
      jLabelShelfLife = new JLabel4j_std();
      jPanelMaterial.add(jLabelShelfLife);
      jLabelShelfLife.setText(lang.get("lbl_Material_Shelf_Life"));
      jLabelShelfLife.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelShelfLife.setBounds(12, 49, 142, 21);
      jTextFieldLegacyCode = new JTextField4j();
      jPanelMaterial.add(jTextFieldLegacyCode);
      jTextFieldLegacyCode.setBounds(161, 77, 128, 21);
      jTextFieldLegacyCode.setEditable(false);
      jTextFieldLegacyCode.setEnabled(false);
      jLabelLegacyCode = new JLabel4j_std();
      jPanelMaterial.add(jLabelLegacyCode);
      jLabelLegacyCode.setText(lang.get("lbl_Material_Legacy_Code"));
      jLabelLegacyCode.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelLegacyCode.setBounds(12, 77, 142, 21);
      jPanelLabel = new JPanel();
      jDesktopPane1.add(jPanelLabel);
      jPanelLabel.setBounds(7, 231, 748, 136);
      jPanelLabel.setBorder(BorderFactory.createTitledBorder(null, lang.get("btn_Label"), TitledBorder.LEADING, TitledBorder.TOP));
      jPanelLabel.setLayout(null);
      jPanelLabel.setFont(Common.font_std);
      jPanelLabel.setBackground(new java.awt.Color(255, 255, 255));
      comboBoxPrintQueue = new JComboBox4j();
      comboBoxPrintQueue.setBounds(115, 436, 621, 23);
      jDesktopPane1.add(comboBoxPrintQueue);
      jSpinnerProductionDate = new JDateControl();
      jPanelLabel.add(jSpinnerProductionDate);
      jSpinnerProductionDate.setFont(new java.awt.Font("Dialog", 0, 12));
      jSpinnerProductionDate.setBounds(176, 21, 136, 21);
      jSpinnerProductionDate.getEditor().addKeyListener(new KeyAdapter() {
        public void keyPressed(KeyEvent e)
        {
          calcBBEBatch();
        }
      });

      jSpinnerProductionDate.addChangeListener(new ChangeListener() {
        public void stateChanged(final ChangeEvent e)
        {
          calcBBEBatch();
        }
      });

      try
      {
        jSpinnerProductionDate.setDate(JUtility.getSQLDate());
        jSpinnerProductionDate.setEnabled(false);
      } catch (Exception e)
      {
      }

      jLabelProductionDate = new JLabel4j_std();
      jPanelLabel.add(jLabelProductionDate);
      jLabelProductionDate.setText(lang.get("lbl_Pallet_DOM"));
      jLabelProductionDate.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelProductionDate.setBounds(46, 21, 108, 21);

      jFormattedTextFieldBaseUOMQuantity = new JQuantityInput(new BigDecimal("0"));
      jFormattedTextFieldBaseUOMQuantity.setEditable(false);
      jPanelLabel.add(jFormattedTextFieldBaseUOMQuantity);
      jFormattedTextFieldBaseUOMQuantity.setFont(Common.font_std);
      jFormattedTextFieldBaseUOMQuantity.setBounds(349, 85, 94, 21);
      jFormattedTextFieldBaseUOMQuantity.setValue(0);
      jFormattedTextFieldBaseUOMQuantity.setEnabled(false);
      jFormattedTextFieldBaseUOMQuantity.setHorizontalAlignment(SwingConstants.TRAILING);

      jFormattedTextFieldRequiredUOMQuantity = new JQuantityInput(new BigDecimal("0"));
      jFormattedTextFieldRequiredUOMQuantity.setEditable(false);
      jFormattedTextFieldRequiredUOMQuantity.addPropertyChangeListener(new PropertyChangeListener() {
        public void propertyChange(PropertyChangeEvent arg0)
        {
          Color background = Color.WHITE;

          try
          {
            if (jTextFieldProcessOrder.getText().equals("") == false)
            {
              BigDecimal newval = new BigDecimal(jFormattedTextFieldRequiredUOMQuantity.getValue().toString());
              int res = newval.compareTo(new BigDecimal(0));
              if (res == 0)
              {
                background = Color.YELLOW;
              }
            }
          } catch (Exception e)
          {
            background = Color.YELLOW;
          }
          jFormattedTextFieldRequiredUOMQuantity.setBackground(background);
        }
      });

      jPanelLabel.add(jFormattedTextFieldRequiredUOMQuantity);
      jFormattedTextFieldRequiredUOMQuantity.setFont(Common.font_std);
      jFormattedTextFieldRequiredUOMQuantity.setBounds(349, 52, 94, 21);
      jFormattedTextFieldRequiredUOMQuantity.setValue(0);
      jFormattedTextFieldRequiredUOMQuantity.setEnabled(false);
      jFormattedTextFieldRequiredUOMQuantity.setHorizontalAlignment(SwingConstants.TRAILING);
      jFormattedTextFieldRequiredUOMQuantity.addKeyListener(new KeyAdapter() {
        public void keyReleased(KeyEvent evt)
        {
          pallet.setUom(jTextFieldRequiredUom.getText());
          pallet.setQuantity(JUtility.stringToBigDecimal(jFormattedTextFieldRequiredUOMQuantity.getText().toString()));
        }
      });

      jTextFieldRequiredUom = new JTextField4j();
      jTextFieldRequiredUom.setHorizontalAlignment(SwingConstants.CENTER);
      jPanelLabel.add(jTextFieldRequiredUom);
      jTextFieldRequiredUom.setBounds(462, 85, 56, 21);
      jTextFieldRequiredUom.setEditable(false);
      jTextFieldRequiredUom.setEnabled(false);

      jTextFieldBaseUom = new JTextField4j();
      jTextFieldBaseUom.setHorizontalAlignment(SwingConstants.CENTER);
      jPanelLabel.add(jTextFieldBaseUom);
      jTextFieldBaseUom.setBounds(462, 52, 56, 21);
      jTextFieldBaseUom.setEditable(false);
      jTextFieldBaseUom.setEnabled(false);

      jCheckBoxDOMOverride = new JCheckBox4j();
      jPanelLabel.add(jCheckBoxDOMOverride);
      jCheckBoxDOMOverride.setBackground(new java.awt.Color(255, 255, 255));
      jCheckBoxDOMOverride.setBounds(153, 21, 21, 21);
      jCheckBoxDOMOverride.setEnabled(false);
      jCheckBoxDOMOverride.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt)
        {
          enableField(jSpinnerProductionDate, jCheckBoxDOMOverride.isSelected());
          enableField(calendarButtonjSpinnerProductionDate, jCheckBoxDOMOverride.isSelected());
        }
      });

      calendarButtonjSpinnerProductionDate = new JCalendarButton(jSpinnerProductionDate);
      calendarButtonjSpinnerProductionDate.setEnabled(false);
      calendarButtonjSpinnerProductionDate.setBounds(308, 21, 21, 21);
      jPanelLabel.add(calendarButtonjSpinnerProductionDate);
      jLabelBatch = new JLabel4j_std();
      jPanelLabel.add(jLabelBatch);
      jLabelBatch.setText(lang.get("lbl_Material_Batch"));
      jLabelBatch.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelBatch.setBounds(46, 85, 108, 21);
      jTextFieldBatchPrefix = new JTextField4j();
      jPanelLabel.add(jTextFieldBatchPrefix);
      AbstractDocument doc2 = (AbstractDocument) jTextFieldBatchPrefix.getDocument();
      doc2.setDocumentFilter(new JFixedSizeFilter(JDBMaterialBatch.field_batch_number));
      jTextFieldBatchPrefix.setBounds(176, 85, 108, 21);
      jTextFieldBatchPrefix.setEnabled(false);
      jSpinnerExpiryDate = new JDateControl();
      jSpinnerExpiryDate.addFocusListener(new FocusAdapter() {
        @Override
        public void focusLost(FocusEvent arg0)
        {
          jSpinnerExpiryDate.setDate(material.getRoundedExpiryDate(jSpinnerExpiryDate.getDate()));
        }
      });

      jPanelLabel.add(jSpinnerExpiryDate);
      jSpinnerExpiryDate.setFont(Common.font_std);
      jSpinnerExpiryDate.setBounds(176, 52, 135, 25);
      jSpinnerExpiryDate.getEditor().setPreferredSize(new java.awt.Dimension(87, 19));
      jSpinnerExpiryDate.getEditor().setSize(87, 21);
      jSpinnerExpiryDate.setEnabled(false);
      jLabelBatchExpiry = new JLabel4j_std();
      jPanelLabel.add(jLabelBatchExpiry);
      jLabelBatchExpiry.setText(lang.get("lbl_Material_Batch_Expiry_Date"));
      jLabelBatchExpiry.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelBatchExpiry.setBounds(46, 56, 108, 21);
      jCheckBoxExpiryOverride = new JCheckBox4j();
      jPanelLabel.add(jCheckBoxExpiryOverride);
      jCheckBoxExpiryOverride.setBounds(153, 53, 21, 21);
      jCheckBoxExpiryOverride.setBackground(new java.awt.Color(255, 255, 255));
      jCheckBoxExpiryOverride.setEnabled(false);
      jCheckBoxExpiryOverride.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt)
        {
          enableField(jSpinnerExpiryDate, jCheckBoxExpiryOverride.isSelected());
          enableField(calendarButtonjSpinnerExpiryDate, jCheckBoxExpiryOverride.isSelected());
          calcBBEBatch();
        }
      });

      jCheckBoxBatchPrefixOverride = new JCheckBox4j();
      jPanelLabel.add(jCheckBoxBatchPrefixOverride);
      jCheckBoxBatchPrefixOverride.setEnabled(false);
      jCheckBoxBatchPrefixOverride.setBackground(new java.awt.Color(255, 255, 255));
      jCheckBoxBatchPrefixOverride.setBounds(153, 85, 21, 21);
      jCheckBoxBatchPrefixOverride.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt)
        {
          enableField(jTextFieldBatchPrefix, jCheckBoxBatchPrefixOverride.isSelected());
          calcBBEBatch();
        }
      });

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

      final JPanel panel = new JPanel();
      panel.setBorder(new TitledBorder(null, lang.get("lbl_Options"), TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));
      panel.setBackground(Color.WHITE);
      panel.setFont(Common.font_title);
      panel.setLayout(null);
      panel.setBounds(7, 379, 748, 45);
      jDesktopPane1.add(panel);
      jLabelPrintLabel_1 = new JLabel4j_std();
      jLabelPrintLabel_1.setBounds(66, 15, 138, 21);
      panel.add(jLabelPrintLabel_1);
      jLabelPrintLabel_1.setHorizontalTextPosition(SwingConstants.CENTER);
      jLabelPrintLabel_1.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelPrintLabel_1.setText(lang.get("lbl_Preview"));
      jCheckBoxAutoPreview = new JCheckBox4j();
      jCheckBoxAutoPreview.setBounds(208, 15, 21, 21);
      panel.add(jCheckBoxAutoPreview);
      jCheckBoxAutoPreview.setToolTipText("Auto SSCC");
      jCheckBoxAutoPreview.setSelected(true);
      jCheckBoxAutoPreview.setBackground(new Color(255, 255, 255));
      jCheckBoxAutoPreview.setText("New JCheckBox");
      jCheckBoxAutoPreview.setEnabled(true);
      jLabelPrintLabel_2 = new JLabel4j_std();
      jLabelPrintLabel_2.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelPrintLabel_2.setText(lang.get("lbl_Label_Header_Text"));
      jLabelPrintLabel_2.setBounds(315, 15, 138, 21);
      panel.add(jLabelPrintLabel_2);
      jLabelQuantity_1 = new JLabel4j_std();
      jLabelQuantity_1.setBounds(528, 15, 154, 21);
      panel.add(jLabelQuantity_1);
      jLabelQuantity_1.setHorizontalAlignment(SwingConstants.RIGHT);
      jLabelQuantity_1.setText(lang.get("lbl_No_Of_Labels"));
      jSpinnerQuantity = new JSpinner();
      jSpinnerQuantity.addChangeListener(new ChangeListener() {
        public void stateChanged(final ChangeEvent e)
        {
          int t = Integer.valueOf(jSpinnerQuantity.getValue().toString());

          if (t <= 0)
          {
            jSpinnerQuantity.setValue(1);
          }

          if (t > 50)
          {
            jSpinnerQuantity.setValue(50);
          }
        }
      });

      jSpinnerQuantity.setBounds(687, 15, 49, 21);
      jSpinnerQuantity.setInputVerifier(null);
      jSpinnerQuantity.setModel(quantitynumbermodel);
      jSpinnerQuantity.setValue(1);
      JSpinner.NumberEditor ne = new JSpinner.NumberEditor(jSpinnerQuantity);
      ne.getTextField().setFont(Common.font_std);
      jSpinnerQuantity.setEditor(ne);
      panel.add(jSpinnerQuantity);

      checkBoxIncHeaderText = new JCheckBox4j();
      checkBoxIncHeaderText.setSelected(true);
      checkBoxIncHeaderText.setText("New JCheckBox");
      checkBoxIncHeaderText.setBackground(Color.WHITE);
      checkBoxIncHeaderText.setBounds(453, 15, 21, 21);
      panel.add(checkBoxIncHeaderText);

      jTextFieldBatchSuffix = new JTextField4j();
      jTextFieldBatchSuffix.setText("");
      jTextFieldBatchSuffix.setBounds(285, 85, 39, 21);
      jPanelLabel.add(jTextFieldBatchSuffix);

      calendarButtonjSpinnerExpiryDate = new JCalendarButton(jSpinnerExpiryDate);
      calendarButtonjSpinnerExpiryDate.setEnabled(false);
      calendarButtonjSpinnerExpiryDate.setBounds(308, 52, 21, 21);
      jPanelLabel.add(calendarButtonjSpinnerExpiryDate);

      lblPrintQueueFor = new JLabel4j_std(lang.get("lbl_Print_Queue"));
      lblPrintQueueFor.setHorizontalAlignment(SwingConstants.TRAILING);
      lblPrintQueueFor.setBounds(6, 442, 102, 16);
      jDesktopPane1.add(lblPrintQueueFor);

      jTextFieldBatchPrefix.setText("");
      jTextFieldBatchSuffix.setText("");
      jTextFieldRequiredEAN = new JTextField4j();
      jTextFieldRequiredEAN.addPropertyChangeListener(new PropertyChangeListener() {
        public void propertyChange(PropertyChangeEvent evt)
        {
          checkFieldColours();
        }
      });
      jTextFieldRequiredEAN.setHorizontalAlignment(SwingConstants.CENTER);
      jTextFieldRequiredEAN.setBounds(535, 85, 126, 21);
      jPanelLabel.add(jTextFieldRequiredEAN);
      jTextFieldRequiredEAN.setFocusCycleRoot(true);
      jTextFieldRequiredEAN.setEditable(false);
      jTextFieldRequiredEAN.setEnabled(false);

      jTextFieldBaseEAN = new JTextField4j();
      jTextFieldBaseEAN.addPropertyChangeListener(new PropertyChangeListener() {
        public void propertyChange(PropertyChangeEvent arg0)
        {
          checkFieldColours();

        }
      });
      jTextFieldBaseEAN.setHorizontalAlignment(SwingConstants.CENTER);
      jTextFieldBaseEAN.setBounds(535, 52, 126, 21);
      jPanelLabel.add(jTextFieldBaseEAN);
      jTextFieldBaseEAN.setFocusCycleRoot(true);
      jTextFieldBaseEAN.setEditable(false);
      jTextFieldBaseEAN.setEnabled(false);

      jTextFieldRequiredVariant = new JTextField4j();
      jTextFieldRequiredVariant.setHorizontalAlignment(SwingConstants.CENTER);
      jTextFieldRequiredVariant.setBounds(681, 85, 39, 21);
      jPanelLabel.add(jTextFieldRequiredVariant);
      jTextFieldRequiredVariant.setFocusCycleRoot(true);
      jTextFieldRequiredVariant.setEditable(false);
      jTextFieldRequiredVariant.setEnabled(false);

      jTextFieldBaseVariant = new JTextField4j();
      jTextFieldBaseVariant.setHorizontalAlignment(SwingConstants.CENTER);
      jTextFieldBaseVariant.setBounds(681, 52, 39, 21);
      jPanelLabel.add(jTextFieldBaseVariant);
      jTextFieldBaseVariant.setFocusCycleRoot(true);
      jTextFieldBaseVariant.setEditable(false);
View Full Code Here

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                {
                  filterByMenu.addSeparator();
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      clearFilter();
                    }
                  });
                  newItemMenuItem.setText(lang.get("btn_Clear_Filter"));
                  filterByMenu.add(newItemMenuItem);
                }
              }
            }
          }
        }
        {
          jLabel2 = new JLabel4j_std();
          jDesktopPane1.add(jLabel2);
          jLabel2.setText(lang.get("lbl_Storage_Warehouse"));
          jLabel2.setBounds(472, 11, 103, 21);
          jLabel2.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jTextFieldWarehouse = new JTextField4j();
          jDesktopPane1.add(jTextFieldWarehouse);
          jTextFieldWarehouse.setBounds(583, 11, 80, 21);
        }
        {
          jLabel4 = new JLabel4j_std();
          jDesktopPane1.add(jLabel4);
          jLabel4.setText(lang.get("lbl_Storage_Bin"));
          jLabel4.setBounds(681, 44, 113, 21);
          jLabel4.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jTextFieldStorageBin = new JTextField4j();
          jDesktopPane1.add(jTextFieldStorageBin);
          jTextFieldStorageBin.setBounds(801, 44, 80, 21);
        }
        {
          jTextFieldLocationID = new JTextField4j();
          jDesktopPane1.add(jTextFieldLocationID);
          jTextFieldLocationID.setBounds(112, 11, 126, 21);
        }
        {
          jLabel5 = new JLabel4j_std();
          jDesktopPane1.add(jLabel5);
          jLabel5.setText(lang.get("lbl_Storage_Location"));
          jLabel5.setBounds(12, 11, 93, 21);
          jLabel5.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jLabel6 = new JLabel4j_std();
          jDesktopPane1.add(jLabel6);
          jLabel6.setText(lang.get("lbl_Storage_GLN"));
          jLabel6.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel6.setBounds(681, 11, 114, 21);
        }
        {
          jTextFieldGLN = new JTextField4j();
          jDesktopPane1.add(jTextFieldGLN);
          jTextFieldGLN.setBounds(802, 11, 126, 21);
        }
        {
          jLabel7 = new JLabel4j_std();
          jDesktopPane1.add(jLabel7);
          jLabel7.setText(lang.get("lbl_Storage_Section"));
          jLabel7.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel7.setBounds(472, 44, 103, 21);
        }
        {
          jTextFieldStorageSection = new JTextField4j();
          jDesktopPane1.add(jTextFieldStorageSection);
          jTextFieldStorageSection.setBounds(583, 44, 80, 21);
        }
        {
          jLabel8 = new JLabel4j_std();
          jDesktopPane1.add(jLabel8);
          jLabel8.setText(lang.get("lbl_Storage_Location"));
          jLabel8.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel8.setBounds(0, 44, 105, 21);
        }
        {
          jTextFieldStorageLocation = new JTextField4j();
          jDesktopPane1.add(jTextFieldStorageLocation);
          jTextFieldStorageLocation.setBounds(112, 44, 105, 21);
        }
        {
          jLabel9 = new JLabel4j_std();
          jDesktopPane1.add(jLabel9);
          jLabel9.setText(lang.get("lbl_Storage_Type"));
          jLabel9.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel9.setBounds(235, 44, 149, 21);
        }
        {
          jTextFieldStorageType = new JTextField4j();
          jDesktopPane1.add(jTextFieldStorageType);
          jTextFieldStorageType.setBounds(391, 44, 80, 21);
        }
        {
          jLabel10 = new JLabel4j_std();
View Full Code Here

      lbl_WorkstationID.setText(lang.get("lbl_Workstation"));
      lbl_WorkstationID.setHorizontalAlignment(SwingConstants.RIGHT);
      lbl_WorkstationID.setBounds(306, 229, 125, 21);
      jDesktopPane1.add(lbl_WorkstationID);

      JTextField4j textField4j_ProcessOrder = new JTextField4j();
      textField4j_ProcessOrder.setEnabled(false);
      textField4j_ProcessOrder.setBounds(154, 10, 139, 21);
      textField4j_ProcessOrder.setText(labdat.getProcessOrder());
      jDesktopPane1.add(textField4j_ProcessOrder);

      JTextField4j textField4j_Material = new JTextField4j();
      textField4j_Material.setEnabled(false);
      textField4j_Material.setBounds(154, 38, 139, 21);
      textField4j_Material.setText(labdat.getMaterial());
      jDesktopPane1.add(textField4j_Material);

      JTextField4j textField4j_BatchNumber = new JTextField4j();
      textField4j_BatchNumber.setEnabled(false);
      textField4j_BatchNumber.setBounds(154, 68, 139, 21);
      textField4j_BatchNumber.setText(labdat.getBatchNumber());
      jDesktopPane1.add(textField4j_BatchNumber);

      JTextField4j textField4j_User_ID = new JTextField4j();
      textField4j_User_ID.setEnabled(false);
      textField4j_User_ID.setBounds(154, 227, 152, 21);
      textField4j_User_ID.setText(labdat.getUserID());
      jDesktopPane1.add(textField4j_User_ID);

      JTextField4j textField4j_WorkstationID = new JTextField4j();
      textField4j_WorkstationID.setEditable(false);
      textField4j_WorkstationID.setEnabled(false);
      textField4j_WorkstationID.setBounds(448, 227, 208, 21);
      textField4j_WorkstationID.setText(labdat.getWorkstationID());
      jDesktopPane1.add(textField4j_WorkstationID);

      JDateControl dateControl_DateofManufacture = new JDateControl();
      dateControl_DateofManufacture.setFont(new Font("Arial", Font.PLAIN, 11));
      dateControl_DateofManufacture.setEnabled(false);
      dateControl_DateofManufacture.setBounds(154, 98, 128, 25);
      dateControl_DateofManufacture.setDate(labdat.getDateofManufacture());
      jDesktopPane1.add(dateControl_DateofManufacture);

      JDateControl dateControl_ExpiryDate = new JDateControl();
      dateControl_ExpiryDate.setFont(new Font("Arial", Font.PLAIN, 11));
      dateControl_ExpiryDate.setEnabled(false);
      dateControl_ExpiryDate.setBounds(448, 98, 128, 25);
      dateControl_ExpiryDate.setDate(labdat.getExpirtDate());
      jDesktopPane1.add(dateControl_ExpiryDate);

      JTextField4j textField4j_Description = new JTextField4j();
      textField4j_Description.setEnabled(false);
      textField4j_Description.setBounds(305, 38, 351, 21);
      if (mat.getMaterialProperties(labdat.getMaterial()))
      {
        textField4j_Description.setText(mat.getDescription());
      }
      jDesktopPane1.add(textField4j_Description);

      JLabel4j_std lbl_ResourceID = new JLabel4j_std();
      lbl_ResourceID.setText(lang.get("lbl_Resource_Key"));
      lbl_ResourceID.setHorizontalAlignment(SwingConstants.RIGHT);
      lbl_ResourceID.setBounds(306, 70, 125, 21);
      jDesktopPane1.add(lbl_ResourceID);

      JTextField4j textField4j_Resource = new JTextField4j();
      textField4j_Resource.setEnabled(false);
      textField4j_Resource.setBounds(448, 68, 208, 21);
      textField4j_Resource.setText(labdat.getRequiredResource());
      jDesktopPane1.add(textField4j_Resource);

      JLabel4j_std lbl_Status = new JLabel4j_std();
      lbl_Status.setText(lang.get("lbl_Status"));
      lbl_Status.setHorizontalAlignment(SwingConstants.RIGHT);
      lbl_Status.setBounds(353, 10, 152, 21);
      jDesktopPane1.add(lbl_Status);

      JQuantityInput jFormattedTextFieldQuantity = new JQuantityInput(new BigDecimal("0"));
      jDesktopPane1.add(jFormattedTextFieldQuantity);
      jFormattedTextFieldQuantity.setFont(Common.font_std);
      jFormattedTextFieldQuantity.setHorizontalAlignment(SwingConstants.TRAILING);
      jFormattedTextFieldQuantity.setBounds(154, 198, 74, 21);
      jFormattedTextFieldQuantity.setEnabled(false);

      JTextField4j textField4j_Status = new JTextField4j();
      textField4j_Status.setEnabled(false);
      textField4j_Status.setBounds(517, 10, 139, 21);
      if (po.getProcessOrderProperties(labdat.getProcessOrder()))
      {
        textField4j_Status.setText(po.getStatus());
        jFormattedTextFieldQuantity.setText(po.getFullPalletQuantity());
      }
      jDesktopPane1.add(textField4j_Status);

      JScrollPane scrollPane = new JScrollPane();
      scrollPane.setBounds(154, 262, 429, 113);
      jDesktopPane1.add(scrollPane);

      list = new JList();
      list.addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent arg0)
        {
          enableButtons();
        }
      });
      list.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
      scrollPane.setViewportView(list);

      JButton4j JButtonRefresh = new JButton4j(Common.icon_refresh);
      JButtonRefresh.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0)
        {
          populateList("");
        }
      });
      JButtonRefresh.setText(lang.get("btn_Refresh"));
      JButtonRefresh.setMnemonic('0');
      JButtonRefresh.setBounds(222, 387, 130, 30);
      jDesktopPane1.add(JButtonRefresh);

      JLabel4j_std label4j_Production_UOM = new JLabel4j_std((String) null);
      label4j_Production_UOM.setHorizontalAlignment(SwingConstants.TRAILING);
      label4j_Production_UOM.setBounds(12, 165, 125, 21);
      label4j_Production_UOM.setText(lang.get("lbl_Production_UOM"));
      jDesktopPane1.add(label4j_Production_UOM);

      JLabel4j_std label4j_std_Base_UOM = new JLabel4j_std((String) null);
      label4j_std_Base_UOM.setHorizontalAlignment(SwingConstants.TRAILING);
      label4j_std_Base_UOM.setBounds(12, 132, 125, 21);
      label4j_std_Base_UOM.setText(lang.get("lbl_Base_UOM"));
      jDesktopPane1.add(label4j_std_Base_UOM);

      JTextField4j textField4j_Prod_EAN = new JTextField4j();
      textField4j_Prod_EAN.setHorizontalAlignment(SwingConstants.CENTER);
      textField4j_Prod_EAN.setEnabled(false);
      textField4j_Prod_EAN.setText(labdat.getProdEAN());
      textField4j_Prod_EAN.setBounds(315, 165, 139, 21);
      jDesktopPane1.add(textField4j_Prod_EAN);

      JTextField4j textField4j_Base_EAN = new JTextField4j();
      textField4j_Base_EAN.setHorizontalAlignment(SwingConstants.CENTER);
      textField4j_Base_EAN.setEnabled(false);
      textField4j_Base_EAN.setText(labdat.getBaseEAN());
      textField4j_Base_EAN.setBounds(315, 132, 139, 21);
      jDesktopPane1.add(textField4j_Base_EAN);

      JTextField4j textField4j_Prod_UOM = new JTextField4j();
      textField4j_Prod_UOM.setHorizontalAlignment(SwingConstants.CENTER);
      textField4j_Prod_UOM.setEnabled(false);
      textField4j_Prod_UOM.setText(labdat.getProdUom());
      textField4j_Prod_UOM.setBounds(258, 165, 51, 21);
      jDesktopPane1.add(textField4j_Prod_UOM);

      JTextField4j textField4j_Prod_Variant = new JTextField4j();
      textField4j_Prod_Variant.setHorizontalAlignment(SwingConstants.CENTER);
      textField4j_Prod_Variant.setEnabled(false);
      textField4j_Prod_Variant.setText(labdat.getProdVariant());
      textField4j_Prod_Variant.setBounds(472, 165, 51, 21);
      jDesktopPane1.add(textField4j_Prod_Variant);

      JTextField4j textField4j_Base_Variant = new JTextField4j();
      textField4j_Base_Variant.setHorizontalAlignment(SwingConstants.CENTER);
      textField4j_Base_Variant.setEnabled(false);
      textField4j_Base_Variant.setText(labdat.getBaseVariant());
      textField4j_Base_Variant.setBounds(472, 132, 51, 21);
      jDesktopPane1.add(textField4j_Base_Variant);

      JTextField4j textField4j_Base_UOM = new JTextField4j();
      textField4j_Base_UOM.setHorizontalAlignment(SwingConstants.CENTER);
      textField4j_Base_UOM.setEnabled(false);
      textField4j_Base_UOM.setText(labdat.getBaseUom());
      textField4j_Base_UOM.setBounds(258, 132, 51, 21);
      jDesktopPane1.add(textField4j_Base_UOM);

      JLabel4j_std label4j_std_Pallet_Quantity = new JLabel4j_std((String) null);
      label4j_std_Pallet_Quantity.setText(lang.get("lbl_Pallet_Quantity"));
      label4j_std_Pallet_Quantity.setHorizontalAlignment(SwingConstants.TRAILING);
      label4j_std_Pallet_Quantity.setBounds(12, 198, 125, 21);
      jDesktopPane1.add(label4j_std_Pallet_Quantity);

      JLabel4j_std label4j_std_1 = new JLabel4j_std((String) null);
      label4j_std_1.setText("x");
      label4j_std_1.setHorizontalAlignment(SwingConstants.CENTER);
      label4j_std_1.setBounds(232, 165, 22, 21);
      jDesktopPane1.add(label4j_std_1);

      JLabel4j_std label4j_std_2 = new JLabel4j_std((String) null);
      label4j_std_2.setText("x");
      label4j_std_2.setHorizontalAlignment(SwingConstants.CENTER);
      label4j_std_2.setBounds(232, 132, 22, 21);
      jDesktopPane1.add(label4j_std_2);

      JLabel4j_std label4j_std_3 = new JLabel4j_std((String) null);
      label4j_std_3.setText("/");
      label4j_std_3.setHorizontalAlignment(SwingConstants.CENTER);
      label4j_std_3.setBounds(453, 165, 22, 21);
      jDesktopPane1.add(label4j_std_3);

      JLabel4j_std label4j_std_4 = new JLabel4j_std((String) null);
      label4j_std_4.setText("/");
      label4j_std_4.setHorizontalAlignment(SwingConstants.CENTER);
      label4j_std_4.setBounds(453, 132, 22, 21);
      jDesktopPane1.add(label4j_std_4);

      JTextField4j textField4j_Prod_Quantity = new JTextField4j();
      textField4j_Prod_Quantity.setEnabled(false);
      textField4j_Prod_Quantity.setHorizontalAlignment(SwingConstants.TRAILING);
      textField4j_Prod_Quantity.setBounds(154, 132, 74, 21);
      textField4j_Prod_Quantity.setText(labdat.getProdQuantity().toString());
      jDesktopPane1.add(textField4j_Prod_Quantity);

      JTextField4j textField4j_Base_Quantity = new JTextField4j();
      textField4j_Base_Quantity.setEnabled(false);
      textField4j_Base_Quantity.setHorizontalAlignment(SwingConstants.TRAILING);
      textField4j_Base_Quantity.setBounds(154, 165, 74, 21);
      textField4j_Base_Quantity.setText(labdat.getBaseQuantity().toString());
      jDesktopPane1.add(textField4j_Base_Quantity);

      JTextField4j textField4j_Pallet_UOM = new JTextField4j();
      textField4j_Pallet_UOM.setEnabled(false);
      textField4j_Pallet_UOM.setHorizontalAlignment(SwingConstants.CENTER);
      textField4j_Pallet_UOM.setBounds(258, 198, 51, 21);
      textField4j_Pallet_UOM.setText(labdat.getProdUom());
      jDesktopPane1.add(textField4j_Pallet_UOM);

      JLabel4j_std label4j_std = new JLabel4j_std((String) null);
      label4j_std.setText("x");
      label4j_std.setHorizontalAlignment(SwingConstants.CENTER);
      label4j_std.setBounds(232, 198, 22, 21);
      jDesktopPane1.add(label4j_std);

      JLabel4j_std lbl_ReportID = new JLabel4j_std((String) null);
      lbl_ReportID.setText(lang.get("lbl_Report_ID"));
      lbl_ReportID.setHorizontalAlignment(SwingConstants.TRAILING);
      lbl_ReportID.setBounds(306, 198, 125, 21);
      jDesktopPane1.add(lbl_ReportID);

      JTextField4j textField4j_Report_ID = new JTextField4j();
      textField4j_Report_ID.setEditable(false);
      textField4j_Report_ID.setText(labdat.getModuleID());
      textField4j_Report_ID.setBounds(448, 196, 208, 21);
      jDesktopPane1.add(textField4j_Report_ID);

    } catch (Exception e)
    {
      e.printStackTrace();
View Full Code Here

          jLabel4.setText(lang.get("lbl_Process_Order"));
          jLabel4.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel4.setBounds(12, 12, 144, 21);
        }
        {
          jTextFieldProcessOrder = new JTextField4j();
          jDesktopPane1.add(jTextFieldProcessOrder);
          jTextFieldProcessOrder.setEditable(false);
          jTextFieldProcessOrder.setEnabled(false);
          jTextFieldProcessOrder.setBounds(163, 12, 126, 21);
        }
        {
          jLabel1 = new JLabel4j_std();
          jDesktopPane1.add(jLabel1);
          jLabel1.setText(lang.get("lbl_Material"));
          jLabel1.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel1.setBounds(12, 75, 144, 21);
        }
        {
          jTextFieldMaterial = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldMaterial.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBMaterial.field_material));
          jDesktopPane1.add(jTextFieldMaterial);
          jTextFieldMaterial.setEnabled(true);
          jTextFieldMaterial.setBounds(163, 75, 126, 21);
          jTextFieldMaterial.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonSave.setEnabled(true);
            }
          });
          jTextFieldMaterial.addKeyListener(new KeyAdapter() {
            public void keyReleased(KeyEvent evt) {
              materialChanged();
            }
          });
        }
        {
          jLabel3 = new JLabel4j_std();
          jDesktopPane1.add(jLabel3);
          jLabel3.setText(lang.get("lbl_Description"));
          jLabel3.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel3.setBounds(12, 45, 144, 21);
        }
        {
          jTextFieldDescription = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldDescription.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBProcessOrder.field_description));
          jDesktopPane1.add(jTextFieldDescription);
          jTextFieldDescription.setBounds(163, 45, 301, 21);
          jTextFieldDescription.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonSave.setEnabled(true);
            }
          });
        }
        {
          jLabel12 = new JLabel4j_std();
          jDesktopPane1.add(jLabel12);
          jLabel12.setText(lang.get("lbl_Process_Order_Recipe"));
          jLabel12.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel12.setBounds(12, 136, 144, 21);
        }
        {
          lblInspectionID = new JLabel4j_std();
          lblInspectionID.setText(lang.get("lbl_Inspection_ID"));
          lblInspectionID.setHorizontalAlignment(SwingConstants.TRAILING);
          lblInspectionID.setBounds(12, 419, 144, 21);
          jDesktopPane1.add(lblInspectionID);
        }
        {
          jTextFieldRecipeID = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldRecipeID.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBProcessOrder.field_recipe_id));
          jDesktopPane1.add(jTextFieldRecipeID);
          jTextFieldRecipeID.setBounds(163, 136, 126, 21);
          jTextFieldRecipeID.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonSave.setEnabled(true);
            }
          });
        }
        {
          jTextFieldRequiredResource = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldRequiredResource.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBProcessOrder.field_required_resource));
          jDesktopPane1.add(jTextFieldRequiredResource);
          jTextFieldRequiredResource.setBounds(163, 353, 301, 21);
          jTextFieldRequiredResource.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonSave.setEnabled(true);
            }
          });
        }
        {
          jTextFieldInspectionID = new JTextField4j();
          jTextFieldInspectionID.setBounds(163, 417, 126, 21);
          jTextFieldInspectionID.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonSave.setEnabled(true);
            }
          });
          jDesktopPane1.add(jTextFieldInspectionID);
        }
        {
          jLabel7 = new JLabel4j_std();
          jDesktopPane1.add(jLabel7);
          jLabel7.setText(lang.get("lbl_Process_Order_Due_Date"));
          jLabel7.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel7.setBounds(12, 229, 144, 21);
        }
        {
          jSpinnerDueDate = new JDateControl();
          jDesktopPane1.add(jSpinnerDueDate);
          jSpinnerDueDate.setBounds(163, 225, 125, 25);
          jSpinnerDueDate.getEditor().setPreferredSize(new java.awt.Dimension(86, 32));
          jSpinnerDueDate.getEditor().addKeyListener(new KeyAdapter() {
            public void keyPressed(KeyEvent e) {
              jButtonSave.setEnabled(true);
            }
          });
          jSpinnerDueDate.addChangeListener(new ChangeListener() {
            public void stateChanged(final ChangeEvent e)

            {
              jButtonSave.setEnabled(true);
            }
          });
        }
        {
          jLabel2 = new JLabel4j_std();
          jDesktopPane1.add(jLabel2);
          jLabel2.setText(lang.get("lbl_Location_ID"));
          jLabel2.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel2.setBounds(12, 258, 144, 21);
        }
        {
          jTextFieldLocation = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldLocation.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBLocation.field_location_id));
          jDesktopPane1.add(jTextFieldLocation);
          jTextFieldLocation.setBounds(163, 258, 126, 21);
          jTextFieldLocation.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonSave.setEnabled(true);
            }
          });
        }
        {
          jTextFieldCustomer = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldCustomer.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBCustomer.field_customer_id));
          jDesktopPane1.add(jTextFieldCustomer);
          jTextFieldCustomer.setBounds(163, 386, 126, 21);
          jTextFieldCustomer.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonSave.setEnabled(true);
            }
          });
        }
        {
          jButton3 = new JButton4j(Common.icon_lookup);
          jDesktopPane1.add(jButton3);
          jButton3.setBounds(287, 386, 21, 21);
          jButton3.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              JLaunchLookup.dlgAutoExec = true;
              JLaunchLookup.dlgCriteriaDefault = "";
              if (JLaunchLookup.customers())
              {
                jTextFieldCustomer.setText(JLaunchLookup.dlgResult);
                jButtonSave.setEnabled(true);
              }
            }
          });
        }
        {
          jComboBoxRequiredUOM.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
              jButtonSave.setEnabled(true);
            }
          });

          jComboBoxRequiredUOM.setBounds(163, 195, 301, 23);
          jDesktopPane1.add(jComboBoxRequiredUOM);
        }
        {
          jLabel14 = new JLabel4j_std();
          jDesktopPane1.add(jLabel14);
          jLabel14.setText(lang.get("lbl_Process_Order_Status"));
          jLabel14.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel14.setBounds(12, 286, 144, 21);
        }
        {
          ComboBoxModel<String> jComboBoxStatusModel = new DefaultComboBoxModel<String>(Common.processOrderStatus);
          jComboBoxStatus = new JComboBox4j<String>();
          jDesktopPane1.add(jComboBoxStatus);
          jComboBoxStatus.setModel(jComboBoxStatusModel);
          jComboBoxStatus.setBounds(163, 286, 150, 21);
          jComboBoxStatus.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              jButtonSave.setEnabled(true);
            }
          });
        }
        {
          jButtonSave = new JButton4j(Common.image_update);
          jDesktopPane1.add(jButtonSave);
          jButtonSave.setText(lang.get("btn_Save"));
          jButtonSave.setBounds(62, 450, 112, 32);
          jButtonSave.setEnabled(false);
          jButtonSave.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              processorder.setDescription(jTextFieldDescription.getText());
              processorder.setRecipe(jTextFieldRecipeID.getText());
              processorder.setLocation(jTextFieldLocation.getText());
              processorder.setCustomerID(jTextFieldCustomer.getText());
              processorder.setInspectionID(jTextFieldInspectionID.getText());
              processorder.setMaterial(jTextFieldMaterial.getText());
              processorder.setRequiredQuantity(JUtility.stringToBigDecimal(jFormattedTextFieldRequiredQuantity.getText().toString()));
              processorder.setRequiredUom(((JDBUom) jComboBoxRequiredUOM.getSelectedItem()).getInternalUom());
              processorder.setRequiredResource(jTextFieldRequiredResource.getText());
              try
              {
                processorder.setStatus((String) jComboBoxStatus.getSelectedItem());
              }
              catch (Exception e)
              {
                processorder.setStatus("");
              }

              try
              {
                processorder.setDefaultPalletStatus((String) jComboBoxPalletStatus.getSelectedItem());
              }
              catch (Exception e)
              {
                processorder.setDefaultPalletStatus("");
              }

              Date d = jSpinnerDueDate.getDate();
              processorder.setDueDate(JUtility.getTimestampFromDate(d));
              if (processorder.isValidProcessOrder() == false)
              {
                processorder.create();
              }
              if (processorder.update())
              {
                jButtonSave.setEnabled(false);
              }
              else
              {
                JUtility.errorBeep();
                JOptionPane.showMessageDialog(Common.mainForm, processorder.getErrorMessage(), lang.get("dlg_Error"), JOptionPane.ERROR_MESSAGE,Common.icon_confirm);
              }

              jComboBoxPalletStatus.setSelectedItem(processorder.getDefaultPalletStatus());

            }
          });
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setBounds(181, 450, 112, 32);
        }
        {
          jButtonClose = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonClose);
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setBounds(300, 450, 112, 32);
          jButtonClose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              dispose();
            }
          });
        }
        {
          jButton1 = new JButton4j(Common.icon_lookup);
          jDesktopPane1.add(jButton1);
          jButton1.setBounds(287, 75, 20, 20);
          jButton1.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              JLaunchLookup.dlgAutoExec = false;
              JLaunchLookup.dlgCriteriaDefault = "";
              if (JLaunchLookup.materials())
              {
                jTextFieldMaterial.setText(JLaunchLookup.dlgResult);
                materialChanged();
                jButtonSave.setEnabled(true);
              }
            }
          });
        }
        {
          jButton3 = new JButton4j(Common.icon_lookup);
          jDesktopPane1.add(jButton3);
          jButton3.setBounds(287, 258, 21, 21);
          jButton3.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              JLaunchLookup.dlgAutoExec = true;
              JLaunchLookup.dlgCriteriaDefault = "Y";
              if (JLaunchLookup.locations())
              {
                jTextFieldLocation.setText(JLaunchLookup.dlgResult);
                jButtonSave.setEnabled(true);
              }
            }
          });
        }

        {
          jLabel6 = new JLabel4j_std();
          jLabel6.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel6.setText(lang.get("lbl_Process_Order_Required_UOM"));
          jLabel6.setBounds(12, 197, 144, 21);
          jDesktopPane1.add(jLabel6);
        }

        {
          jFormattedTextFieldRequiredQuantity = new JQuantityInput(new BigDecimal("0"));
          jFormattedTextFieldRequiredQuantity.setHorizontalAlignment(SwingConstants.TRAILING);
          jFormattedTextFieldRequiredQuantity.setFont(Common.font_std);
          jFormattedTextFieldRequiredQuantity.setBounds(163, 165, 91, 21);
          jFormattedTextFieldRequiredQuantity.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonSave.setEnabled(true);
            }
          });
          jDesktopPane1.add(jFormattedTextFieldRequiredQuantity);
        }

        {
          jLabelQuantity = new JLabel4j_std();
          jLabelQuantity.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabelQuantity.setText(lang.get("lbl_Process_Order_Required_Quantity"));
          jLabelQuantity.setBounds(12, 165, 144, 21);
          jDesktopPane1.add(jLabelQuantity);
        }

        {
          jLabel3_1 = new JLabel4j_std();
          jLabel3_1.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel3_1.setText(lang.get("lbl_Description"));
          jLabel3_1.setBounds(12, 105, 144, 21);
          jDesktopPane1.add(jLabel3_1);
        }

        {
          jTextFieldMaterialDescription = new JTextField4j();
          jTextFieldMaterialDescription.setBounds(163, 105, 301, 21);
          jTextFieldMaterialDescription.setEnabled(false);
          jDesktopPane1.add(jTextFieldMaterialDescription);
        }
      }
View Full Code Here

        this.getContentPane().add(jDesktopPane1, BorderLayout.CENTER);
        jDesktopPane1.setPreferredSize(new java.awt.Dimension(361, 104));

        jDesktopPane1.setLayout(null);
        {
          jTextFieldGroupId = new JTextField4j();
          jDesktopPane1.add(jTextFieldGroupId, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
          jTextFieldGroupId.setPreferredSize(new java.awt.Dimension(100, 20));
          jTextFieldGroupId.setHorizontalAlignment(SwingConstants.LEFT);
          jTextFieldGroupId.setBounds(101, 10, 91, 21);
          jTextFieldGroupId.setEditable(false);
          jTextFieldGroupId.setEnabled(false);
          jTextFieldGroupId.setDisabledTextColor(Common.color_textdisabled);

        }
        {
          jLabel1 = new JLabel4j_std();
          jDesktopPane1.add(jLabel1, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
          jLabel1.setText(lang.get("lbl_Group_ID"));
          jLabel1.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabel1.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabel1.setBounds(5, 10, 83, 21);
        }
        {
          jLabel2 = new JLabel4j_std();
          jDesktopPane1.add(jLabel2, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
          jLabel2.setText(lang.get("lbl_Description"));
          jLabel2.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabel2.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabel2.setBounds(5, 37, 86, 21);
        }
        {

          jButtonUpdate = new JButton4j(Common.icon_update);
          jDesktopPane1.add(jButtonUpdate, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
          jButtonUpdate.setText(lang.get("btn_Save"));
          jButtonUpdate.setHorizontalTextPosition(SwingConstants.RIGHT);
          jButtonUpdate.setMnemonic(lang.getMnemonicChar());
          jButtonUpdate.setBounds(5, 70, 110, 32);
          jButtonUpdate.setEnabled(false);
          jButtonUpdate.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              group.setDescription(jTextFieldDescription.getText());
              group.update();
              jButtonUpdate.setEnabled(false);
            }
          });
        }
        {

          jButtonClose = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonClose, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setMnemonic(lang.getMnemonicChar());
          jButtonClose.setBounds(239, 70, 110, 32);
          jButtonClose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              dispose();
            }
          });
        }
        {
          jTextFieldDescription = new JTextField4j();
          jDesktopPane1.add(jTextFieldDescription, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
          AbstractDocument doc = (AbstractDocument) jTextFieldDescription.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBGroup.field_description));
          jTextFieldDescription.setPreferredSize(new java.awt.Dimension(40, 20));
          jTextFieldDescription.setBounds(101, 37, 237, 21);
View Full Code Here

    jLabelAuthorisor.setText(lang.get("lbl_Authorisor"));
    jLabelAuthorisor.setHorizontalAlignment(SwingConstants.TRAILING);
    jLabelAuthorisor.setBounds(785, 7, 79, 21);
    jDesktopPane1.add(jLabelAuthorisor);

    jTextFieldAuthorisor = new JTextField4j();
    jTextFieldAuthorisor.setEditable(false);
    jTextFieldAuthorisor.setBounds(875, 7, 89, 21);
    jDesktopPane1.add(jTextFieldAuthorisor);

    JLabel4j_std label_1 = new JLabel4j_std();
View Full Code Here

TOP

Related Classes of com.commander4j.gui.JTextField4j

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