Examples of JTextField4j


Examples of com.commander4j.gui.JTextField4j

        this.getContentPane().add(jDesktopPane1, BorderLayout.CENTER);

        jDesktopPane1.setPreferredSize(new java.awt.Dimension(361, 104));
        jDesktopPane1.setLayout(null);
        {
          jTextFieldResourceKey = new JTextField4j();
          jTextFieldResourceKey.setBounds(130, 10, 355, 21);
          jDesktopPane1.add(jTextFieldResourceKey);
          jTextFieldResourceKey.setPreferredSize(new java.awt.Dimension(100, 20));
          jTextFieldResourceKey.setHorizontalAlignment(SwingConstants.LEFT);
          jTextFieldResourceKey.setEditable(false);
          jTextFieldResourceKey.setEnabled(false);
        }
        {
          jLabel1 = new JLabel4j_std();
          jLabel1.setBounds(8, 43, 115, 21);
          jDesktopPane1.add(jLabel1);
          jLabel1.setText(lang.get("lbl_Resource_Key"));
          jLabel1.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabel1.setHorizontalTextPosition(SwingConstants.RIGHT);
        }
        {
          jLabel1 = new JLabel4j_std();
          jLabel1.setBounds(8, 10, 115, 21);
          jDesktopPane1.add(jLabel1);
          jLabel1.setText(lang.get("lbl_Language_ID"));
          jLabel1.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabel1.setHorizontalTextPosition(SwingConstants.RIGHT);
        }
        {
          jLabel2 = new JLabel4j_std();
          jLabel2.setBounds(8, 76, 115, 21);
          jDesktopPane1.add(jLabel2);
          jLabel2.setText(lang.get("lbl_Text"));
          jLabel2.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabel2.setHorizontalTextPosition(SwingConstants.RIGHT);
        }
        {
          jLabel2 = new JLabel4j_std();
          jLabel2.setBounds(8, 109, 115, 21);
          jDesktopPane1.add(jLabel2);
          jLabel2.setText(lang.get("lbl_Mnemonic"));
          jLabel2.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabel2.setHorizontalTextPosition(SwingConstants.RIGHT);
        }
        {

          jButtonUpdate = new JButton4j(Common.icon_update);
          jButtonUpdate.setBounds(153, 142, 132, 32);
          jDesktopPane1.add(jButtonUpdate);
          jButtonUpdate.setText(lang.get("btn_Save"));
          jButtonUpdate.setHorizontalTextPosition(SwingConstants.RIGHT);
          jButtonUpdate.setMnemonic(lang.getMnemonicChar());
          jButtonUpdate.setEnabled(false);
          jButtonUpdate.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              language.setText(jTextFieldText.getText());
              language.setMnemonic(JTextFieldMnemonic.getText());
              language.update();
              jButtonUpdate.setEnabled(false);
            }
          });
        }
        {

          jButtonClose = new JButton4j(Common.icon_close);
          jButtonClose.setBounds(424, 142, 132, 32);
          jDesktopPane1.add(jButtonClose);
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setMnemonic(lang.getMnemonicChar());
          jButtonClose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              dispose();
            }
          });
        }
        {
          jTextFieldText = new JTextField4j();
          jTextFieldText.setBounds(130, 76, 561, 21);
          jDesktopPane1.add(jTextFieldText);
          AbstractDocument doc = (AbstractDocument) jTextFieldText.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBLanguage.field_Text_size));
          jTextFieldText.setPreferredSize(new java.awt.Dimension(40, 20));
          jTextFieldText.setFocusCycleRoot(true);
          jTextFieldText.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonUpdate.setEnabled(true);
            }
          });
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jButtonHelp.setBounds(288, 142, 132, 32);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setMnemonic(lang.getMnemonicChar());
        }
        {
          jTextFieldText.requestFocus();
          jTextFieldText.setCaretPosition(jTextFieldText.getText().length());

          JTextFieldLanguage = new JTextField4j();
          JTextFieldLanguage.setBounds(130, 43, 91, 21);
          JTextFieldLanguage.setPreferredSize(new Dimension(100, 20));
          JTextFieldLanguage.setHorizontalAlignment(SwingConstants.LEFT);
          JTextFieldLanguage.setEnabled(false);
          JTextFieldLanguage.setEditable(false);
          jDesktopPane1.add(JTextFieldLanguage);

          JTextFieldMnemonic = new JTextField4j();
          JTextFieldMnemonic.setBounds(130, 109, 28, 21);
          JTextFieldMnemonic.setPreferredSize(new Dimension(40, 20));
          JTextFieldMnemonic.setFocusCycleRoot(true);
          JTextFieldMnemonic.setCaretPosition(0);
          jDesktopPane1.add(JTextFieldMnemonic);
View Full Code Here

Examples of com.commander4j.gui.JTextField4j

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

Examples of com.commander4j.gui.JTextField4j

      jDesktopPane1.setBackground(Common.color_app_window);
      jLabel2 = new JLabel4j_std();
      jLabel3 = new JLabel4j_std();
      jLabel1 = new JLabel4j_std();
      jLabel4 = new JLabel4j_std();
      jTextFieldUserID = new JTextField4j();
      jTextFieldComment = new JTextField4j();
      jPasswordField1 = new JPasswordField();
      jPasswordField2 = new JPasswordField();
      jComboBoxLanguage = new JComboBox4j<String>();
      jComboBoxLanguage.setModel(new DefaultComboBoxModel<String>(Common.languages));
      jTextFieldLastLogon = new JTextField4j();
      jTextFieldLastPasswordChange = new JTextField4j();
      jLabel5 = new JLabel4j_std();
      jLabel6 = new JLabel4j_std();
      jLabel7 = new JLabel4j_std();
      jLabel8 = new JLabel4j_std();
      jLabel9 = new JLabel4j_std();
      jLabel10 = new JLabel4j_std();
      jTextFieldBadPasswords = new JTextField4j();
      jLabel11 = new JLabel4j_std();
      jCheckBoxAccountLocked = new JCheckBox4j();
      jCheckBoxPasswordExpires = new JCheckBox4j();
      jCheckBoxPasswordChangeAllowed = new JCheckBox4j();

      jButtonSave = new JButton4j(Common.icon_update);
      jButtonCancel = new JButton4j(Common.icon_close);

      BorderLayout thisLayout = new BorderLayout();
      this.getContentPane().setLayout(thisLayout);
      thisLayout.setHgap(0);
      thisLayout.setVgap(0);

      this.setClosable(true);
      this.setVisible(true);
      this.setPreferredSize(new java.awt.Dimension(417, 432));
      this.setBounds(0, 0, 430, 488);
      this.setIconifiable(true);

      jDesktopPane1.setPreferredSize(new java.awt.Dimension(364, 329));
      jDesktopPane1.setOpaque(true);
      this.getContentPane().add(jDesktopPane1, BorderLayout.CENTER);
      jDesktopPane1.setLayout(null);

      jLabel2.setText(lang.get("lbl_Description"));
      jDesktopPane1.add(jLabel2);
      jLabel2.setBounds(0, 35, 158, 20);
      jLabel2.setHorizontalAlignment(SwingConstants.TRAILING);

      jLabel3.setText(lang.get("lbl_User_Account_Password"));
      jDesktopPane1.add(jLabel3);
      jLabel3.setBounds(0, 62, 158, 20);
      jLabel3.setHorizontalAlignment(SwingConstants.TRAILING);

      jLabel1.setText(lang.get("lbl_User_ID"));

      jDesktopPane1.add(jLabel1);
      jLabel1.setFocusTraversalKeysEnabled(false);
      jLabel1.setBounds(0, 7, 158, 20);
      jLabel1.setHorizontalAlignment(SwingConstants.TRAILING);

      jLabel4.setText(lang.get("lbl_User_Account_Password_Verify"));
      jDesktopPane1.add(jLabel4);
      jLabel4.setBounds(0, 89, 158, 20);
      jLabel4.setHorizontalAlignment(SwingConstants.TRAILING);

      jTextFieldUserID.setEditable(false);
      jTextFieldUserID.setEnabled(false);
      jTextFieldUserID.setPreferredSize(new java.awt.Dimension(100, 20));
      jTextFieldUserID.setDisabledTextColor(Common.color_textdisabled);
      jDesktopPane1.add(jTextFieldUserID);
      jTextFieldUserID.setBounds(172, 7, 100, 20);

      AbstractDocument doc = (AbstractDocument) jTextFieldComment.getDocument();
      doc.setDocumentFilter(new JFixedSizeFilter(JDBUser.field_comment));
      jDesktopPane1.add(jTextFieldComment);
      jTextFieldComment.setBounds(172, 34, 217, 21);
      jTextFieldComment.addKeyListener(new KeyAdapter() {
        public void keyTyped(KeyEvent evt) {
          jTextFieldCommentKeyTyped(evt);
        }
      });

      jPasswordField1.setPreferredSize(new java.awt.Dimension(100, 20));
      AbstractDocument doc1 = (AbstractDocument) jPasswordField1.getDocument();
      doc1.setDocumentFilter(new JFixedSizeFilter(JDBUser.field_password));
      jDesktopPane1.add(jPasswordField1);
      jPasswordField1.setBounds(172, 62, 100, 20);
      jPasswordField1.addKeyListener(new KeyAdapter() {
        public void keyTyped(KeyEvent evt) {
          jPasswordField1KeyTyped(evt);
        }
      });

      jPasswordField2.setPreferredSize(new java.awt.Dimension(100, 20));
      AbstractDocument doc2 = (AbstractDocument) jPasswordField2.getDocument();
      doc2.setDocumentFilter(new JFixedSizeFilter(JDBUser.field_password));
      jDesktopPane1.add(jPasswordField2);
      jPasswordField2.setBounds(172, 89, 100, 20);
      jPasswordField2.addKeyListener(new KeyAdapter() {
        public void keyTyped(KeyEvent evt) {
          jPasswordField2KeyTyped(evt);
        }
      });

      jComboBoxLanguage.setEnabled(true);
      jComboBoxLanguage.setEditable(false);
      jComboBoxLanguage.setLightWeightPopupEnabled(true);
      jComboBoxLanguage.setPreferredSize(new java.awt.Dimension(45, 21));
      jComboBoxLanguage.setIgnoreRepaint(false);
      jDesktopPane1.add(jComboBoxLanguage);
      jComboBoxLanguage.setBounds(172, 116, 69, 21);
      jComboBoxLanguage.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
          jComboBoxLanguageActionPerformed(evt);
        }
      });

      jTextFieldLastLogon.setEditable(false);
      jTextFieldLastLogon.setPreferredSize(new java.awt.Dimension(150, 20));
      jDesktopPane1.add(jTextFieldLastLogon);
      jTextFieldLastLogon.setBounds(172, 144, 150, 20);
      jTextFieldLastLogon.setEnabled(false);
      jTextFieldLastLogon.setDisabledTextColor(Common.color_textdisabled);

      jTextFieldLastPasswordChange.setEditable(false);
      jTextFieldLastPasswordChange.setPreferredSize(new java.awt.Dimension(150, 20));
      jDesktopPane1.add(jTextFieldLastPasswordChange);
      jTextFieldLastPasswordChange.setBounds(172, 171, 150, 20);
      jTextFieldLastPasswordChange.setEnabled(false);
      jTextFieldLastPasswordChange.setDisabledTextColor(Common.color_textdisabled);

      jLabel5.setText(lang.get("lbl_Language"));
      jDesktopPane1.add(jLabel5);
      jLabel5.setBounds(0, 117, 158, 20);
      jLabel5.setHorizontalAlignment(SwingConstants.TRAILING);

      jLabel6.setText(lang.get("lbl_User_Account_Last_Logon"));
      jDesktopPane1.add(jLabel6);
      jLabel6.setBounds(0, 144, 158, 20);
      jLabel6.setHorizontalAlignment(SwingConstants.TRAILING);

      jLabel7.setText(lang.get("lbl_User_Account_Last_Password_Change"));
      jDesktopPane1.add(jLabel7);
      jLabel7.setBounds(0, 171, 158, 20);
      jLabel7.setHorizontalAlignment(SwingConstants.TRAILING);

      jLabel8.setText(lang.get("lbl_User_Account_Locked"));
      jDesktopPane1.add(jLabel8);
      jLabel8.setBounds(0, 199, 158, 20);
      jLabel8.setHorizontalAlignment(SwingConstants.TRAILING);

      jLabel9.setText(lang.get("lbl_User_Account_Password_Expires"));
      jDesktopPane1.add(jLabel9);
      jLabel9.setBounds(0, 227, 158, 20);
      jLabel9.setHorizontalAlignment(SwingConstants.TRAILING);

      jLabel10.setText(lang.get("lbl_User_Account_Bad_Passwords"));
      jDesktopPane1.add(jLabel10);
      jLabel10.setFocusTraversalKeysEnabled(false);
      jLabel10.setBounds(0, 282, 158, 20);
      jLabel10.setHorizontalAlignment(SwingConstants.TRAILING);

      jTextFieldBadPasswords.setEditable(false);
      jTextFieldBadPasswords.setPreferredSize(new java.awt.Dimension(20, 20));
      jDesktopPane1.add(jTextFieldBadPasswords);
      jTextFieldBadPasswords.setBounds(172, 282, 20, 20);
      jTextFieldBadPasswords.setEnabled(false);
      jTextFieldBadPasswords.setDisabledTextColor(Common.color_textdisabled);

      jLabel11.setText(lang.get("lbl_User_Account_Password_Change_Allowed"));
      jDesktopPane1.add(jLabel11);
      jLabel11.setBounds(0, 255, 158, 20);
      jLabel11.setHorizontalAlignment(SwingConstants.TRAILING);

      jDesktopPane1.add(jCheckBoxAccountLocked);
      jCheckBoxAccountLocked.setBounds(170, 198, 21, 21);
      jCheckBoxAccountLocked.setBackground(new java.awt.Color(255, 255, 255));
      jCheckBoxAccountLocked.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
          jCheckBoxAccountLockedActionPerformed(evt);
        }
      });

      jDesktopPane1.add(jCheckBoxPasswordExpires);
      jCheckBoxPasswordExpires.setBounds(169, 226, 21, 21);
      jCheckBoxPasswordExpires.setFont(Common.font_std);
      jCheckBoxPasswordExpires.setBackground(new java.awt.Color(255, 255, 255));
      jCheckBoxPasswordExpires.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
          jCheckBoxPasswordExpiresActionPerformed(evt);
        }
      });

      jDesktopPane1.add(jCheckBoxPasswordChangeAllowed);
      jCheckBoxPasswordChangeAllowed.setBounds(169, 254, 21, 21);
      jCheckBoxPasswordChangeAllowed.setBackground(new java.awt.Color(255, 255, 255));
      jCheckBoxPasswordChangeAllowed.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
          jCheckBoxPasswordChangeAllowedActionPerformed(evt);
        }
      });

      jButtonSave.setEnabled(false);
      jButtonSave.setText(lang.get("btn_Save"));
      jButtonSave.setMnemonic(lang.getMnemonicChar());
      jDesktopPane1.add(jButtonSave);
      jButtonSave.setBounds(17, 394, 112, 32);
      jButtonSave.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
          jButtonUpdateActionPerformed(evt);
        }
      });

      jButtonCancel.setText(lang.get("btn_Close"));
      jButtonCancel.setMnemonic(lang.getMnemonicChar());
      jDesktopPane1.add(jButtonCancel);
      jButtonCancel.setBounds(275, 394, 112, 32);
      {
        jButtonHelp = new JButton4j(Common.icon_help);
        jDesktopPane1.add(jButtonHelp);
        jButtonHelp.setText(lang.get("btn_Help"));
        jButtonHelp.setBounds(146, 394, 112, 32);
        jButtonHelp.setMnemonic(lang.getMnemonicChar());
      }
      {
        jCheckBoxAccountExpires = new JCheckBox4j();
        jDesktopPane1.add(jCheckBoxAccountExpires);
        jCheckBoxAccountExpires.setBounds(169, 309, 22, 21);
        jCheckBoxAccountExpires.setBackground(new java.awt.Color(255, 255, 255));
        jCheckBoxAccountExpires.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            jCheckBoxAccountExpiresActionPerformed(evt);
          }
        });
      }
      {
        jLabelAccountExpires = new JLabel4j_std();
        jDesktopPane1.add(jLabelAccountExpires);
        jLabelAccountExpires.setText(lang.get("lbl_User_Account_Expires"));
        jLabelAccountExpires.setBounds(0, 310, 158, 20);
        jLabelAccountExpires.setHorizontalAlignment(SwingConstants.TRAILING);
      }
      {
        jLabelAccountExpiryDate = new JLabel4j_std();
        jDesktopPane1.add(jLabelAccountExpiryDate);
        jLabelAccountExpiryDate.setText(lang.get("lbl_User_Account_Expiry_Date"));
        jLabelAccountExpiryDate.setBounds(0, 339, 158, 20);
        jLabelAccountExpiryDate.setHorizontalAlignment(SwingConstants.TRAILING);
      }
      jButtonCancel.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
          jButtonCancelActionPerformed(evt);
        }
      });

      accountExpiryDate.getEditor().addKeyListener(new KeyAdapter() {
        public void keyPressed(KeyEvent e) {
          userUpdated = true;
          jButtonSave.setEnabled(true);
        }
      });
      accountExpiryDate.addChangeListener(new ChangeListener() {
        public void stateChanged(final ChangeEvent e)

        {
          userUpdated = true;
          jButtonSave.setEnabled(true);
        }
      });

      accountExpiryDate.setBounds(172, 334, 125, 25);
      jDesktopPane1.add(accountExpiryDate);

      jTextFieldEmailAddress = new JTextField4j();
      jTextFieldEmailAddress.addKeyListener(new KeyAdapter() {
        public void keyTyped(final KeyEvent e) {
          userUpdated = true;
          jButtonSave.setEnabled(true);
        }
View Full Code Here

Examples of com.commander4j.gui.JTextField4j

        jDesktopPane1 = new JDesktopPane();
        jDesktopPane1.setBackground(Common.color_app_window);
        this.getContentPane().add(jDesktopPane1, BorderLayout.CENTER);
        jDesktopPane1.setPreferredSize(new java.awt.Dimension(462, 497));
        {
          jTextFieldSSCC = new JTextField4j();
          jTextFieldSSCC.addKeyListener(new KeyAdapter() {
            public void keyReleased(final KeyEvent e) {
              lsscc = jTextFieldSSCC.getText();
              lsscc = JUtility.replaceNullStringwithBlank(lsscc);
              if (lsscc.length() == 18)
              {
                refresh();
              }
              else
              {
                blankfields();
              }
            }
          });
          AbstractDocument doc = (AbstractDocument) jTextFieldSSCC.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBPallet.field_sscc));
          jDesktopPane1.setLayout(null);
          jDesktopPane1.add(jTextFieldSSCC);
          jTextFieldSSCC.setEditable(true);
          jTextFieldSSCC.setEnabled(true);
          jTextFieldSSCC.setBounds(147, 14, 147, 21);
        }
        {
          jButtonSave = new JButton4j(Common.icon_scanner);
          jDesktopPane1.add(jButtonSave);
          jButtonSave.setEnabled(true);
          jButtonSave.setText(lang.get("btn_Confirm"));
          jButtonSave.setMnemonic(lang.getMnemonicChar());
          jButtonSave.setBounds(63, 450, 100, 32);
          jButtonSave.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              boolean result = true;

              if (pallet.isConfirmed() == false)
              {
                pallet.setDateOfManufacture(JUtility.getSQLDateTime());
                pallet.setTransactionRef(0);
                result = pallet.confirm();
                if (result == true)
                {
                  checkBoxConfirmed.setSelected(true);
                  jStatusText.setText("SSCC " + pallet.getSSCC() + " confirmed.");
                }
                else
                {
                  jStatusText.setText(pallet.getErrorMessage());
                }
              }
              else
              {
                jStatusText.setText("SSCC " + pallet.getSSCC() + " already confirmed.");
                // already confirmed
              }

              if (result == false)
              {
                JOptionPane.showMessageDialog(Common.mainForm, pallet.getErrorMessage(), lang.get("err_Error"), JOptionPane.ERROR_MESSAGE,Common.icon_confirm);
              }
              else
              {
                jFormattedTextFieldBaseQuantity.setText(pallet.getBaseQuantity().toString());
                jButtonSave.setEnabled(false);
              }
            }
          });
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setMnemonic(lang.getMnemonicChar());
          jButtonHelp.setBounds(169, 450, 100, 32);
        }
        {
          jButtonCancel = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonCancel);
          jButtonCancel.setText(lang.get("btn_Close"));
          jButtonCancel.setMnemonic(lang.getMnemonicChar());
          jButtonCancel.setBounds(275, 450, 100, 32);
          jButtonCancel.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              dispose();
            }
          });
        }

        {
          jLabel1 = new JLabel4j_std();
          jDesktopPane1.add(jLabel1);
          jLabel1.setText(lang.get("lbl_Pallet_SSCC"));
          jLabel1.setBounds(7, 14, 133, 21);
          jLabel1.setHorizontalAlignment(SwingConstants.TRAILING);
        }
        {
          jLabel5 = new JLabel4j_std();
          jDesktopPane1.add(jLabel5);
          jLabel5.setBounds(7, 275, 133, 21);
          jLabel5.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel5.setText(lang.get("lbl_Material_UOM"));
        }

        {
          jLabel2 = new JLabel4j_std();
          jDesktopPane1.add(jLabel2);
          jLabel2.setText(lang.get("lbl_Material"));
          jLabel2.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel2.setBounds(7, 98, 133, 21);
        }
        {
          jTextFieldMaterial = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldMaterial.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBMaterial.field_material));
          jDesktopPane1.add(jTextFieldMaterial);
          jTextFieldMaterial.setBounds(147, 98, 119, 21);
          jTextFieldMaterial.setEnabled(false);
        }
        {
          jLabel3 = new JLabel4j_std();
          jDesktopPane1.add(jLabel3);
          jLabel3.setText(lang.get("lbl_Material_Batch"));
          jLabel3.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel3.setBounds(7, 185, 133, 21);
        }
        {
          jTextFieldBatch = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldBatch.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBMaterialBatch.field_batch_number));
          jDesktopPane1.add(jTextFieldBatch);
          jTextFieldBatch.setBounds(147, 185, 119, 21);
          jTextFieldBatch.setEnabled(false);
        }

        {
          jLabelProcessOrder = new JLabel4j_std();
          jDesktopPane1.add(jLabelProcessOrder);
          jLabelProcessOrder.setText(lang.get("lbl_Process_Order"));
          jLabelProcessOrder.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabelProcessOrder.setBounds(7, 42, 133, 21);
        }
        {
          jTextFieldProcessOrder = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldProcessOrder.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBProcessOrder.field_process_order));
          jDesktopPane1.add(jTextFieldProcessOrder);
          jTextFieldProcessOrder.setBounds(147, 42, 119, 21);
          jTextFieldProcessOrder.setEnabled(false);

        }
        {
          jLabel6 = new JLabel4j_std();
          jDesktopPane1.add(jLabel6);
          jLabel6.setText(lang.get("lbl_Material_UOM_EAN"));
          jLabel6.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabel6.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabel6.setBounds(7, 356, 133, 21);
        }
        {
          jTextFieldEAN = new JTextField4j();
          jDesktopPane1.add(jTextFieldEAN);
          jTextFieldEAN.setBounds(147, 356, 119, 21);
          jTextFieldEAN.setFocusCycleRoot(true);
          jTextFieldEAN.setEnabled(false);
        }
        {
          jLabel7 = new JLabel4j_std();
          jDesktopPane1.add(jLabel7);
          jLabel7.setText(lang.get("lbl_Material_UOM_Variant"));
          jLabel7.setHorizontalAlignment(SwingConstants.RIGHT);
          jLabel7.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabel7.setBounds(7, 384, 133, 21);
        }
        {
          jTextFieldVariant = new JTextField4j();
          jDesktopPane1.add(jTextFieldVariant);
          jTextFieldVariant.setBounds(147, 384, 29, 21);
          jTextFieldVariant.setFocusCycleRoot(true);
          jTextFieldVariant.setEnabled(false);
        }
        {
          jLabelQuantity = new JLabel4j_std();
          jDesktopPane1.add(jLabelQuantity);
          jLabelQuantity.setText(lang.get("lbl_Pallet_Quantity"));
          jLabelQuantity.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabelQuantity.setBounds(7, 245, 133, 21);
        }
        {
          jFormattedTextFieldQuantity = new JQuantityInput(new BigDecimal("0"));
          jDesktopPane1.add(jFormattedTextFieldQuantity);
          jFormattedTextFieldQuantity.setFont(Common.font_std);
          jFormattedTextFieldQuantity.setHorizontalAlignment(SwingConstants.TRAILING);
          jFormattedTextFieldQuantity.setBounds(147, 245, 91, 21);
          jFormattedTextFieldQuantity.setEnabled(false);

        }

        {
          jTextFieldProcessOrderDescription = new JTextField4j();
          jDesktopPane1.add(jTextFieldProcessOrderDescription);
          jTextFieldProcessOrderDescription.setBounds(147, 70, 287, 21);
          jTextFieldProcessOrderDescription.setEnabled(false);
        }
        {
          jLabel8 = new JLabel4j_std();
          jDesktopPane1.add(jLabel8);
          jLabel8.setText(lang.get("lbl_Description"));
          jLabel8.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel8.setBounds(7, 70, 133, 21);
        }
        {
          jLabel9 = new JLabel4j_std();
          jDesktopPane1.add(jLabel9);
          jLabel9.setText(lang.get("lbl_Description"));
          jLabel9.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel9.setBounds(7, 126, 133, 21);
        }
        {
          jTextFieldMaterialDescription = new JTextField4j();
          jDesktopPane1.add(jTextFieldMaterialDescription);
          jTextFieldMaterialDescription.setBounds(147, 126, 287, 21);
          jTextFieldMaterialDescription.setEnabled(false);

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

        {
          jLabelQuantity_1 = new JLabel4j_std();
          jLabelQuantity_1.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabelQuantity_1.setText(lang.get("lbl_Pallet_Base_Quantity"));
          jLabelQuantity_1.setBounds(7, 302, 133, 21);
          jDesktopPane1.add(jLabelQuantity_1);
        }

        {
          jFormattedTextFieldBaseQuantity = new JQuantityInput(new BigDecimal("0"));
          jFormattedTextFieldBaseQuantity.setFocusable(false);
          jFormattedTextFieldBaseQuantity.setEnabled(false);
          jFormattedTextFieldBaseQuantity.setHorizontalAlignment(SwingConstants.TRAILING);
          jFormattedTextFieldBaseQuantity.setFont(Common.font_std);
          jFormattedTextFieldBaseQuantity.setBounds(147, 302, 91, 21);
          jDesktopPane1.add(jFormattedTextFieldBaseQuantity);
        }

        {
          jTextFieldBaseUom = new JTextField4j();
          jTextFieldBaseUom.setEnabled(false);
          jTextFieldBaseUom.setFocusCycleRoot(true);
          jTextFieldBaseUom.setBounds(147, 329, 119, 21);
          jDesktopPane1.add(jTextFieldBaseUom);
        }

        {
          jLabelQuantity_2 = new JLabel4j_std();
          jLabelQuantity_2.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabelQuantity_2.setText(lang.get("lbl_Pallet_Base_UOM"));
          jLabelQuantity_2.setBounds(7, 329, 133, 21);
          jDesktopPane1.add(jLabelQuantity_2);
        }

        {
          jLabelProductionDate_1 = new JLabel4j_std();
          jLabelProductionDate_1.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabelProductionDate_1.setText(lang.get("lbl_Confirmed"));
          jLabelProductionDate_1.setBounds(7, 410, 133, 21);
          jDesktopPane1.add(jLabelProductionDate_1);
        }

        {
          checkBoxConfirmed.setBackground(Color.WHITE);
          checkBoxConfirmed.setText("");
          checkBoxConfirmed.setBounds(144, 410, 32, 24);
          checkBoxConfirmed.setEnabled(false);
          jDesktopPane1.add(checkBoxConfirmed);
        }

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

        {
          jTextFieldLocation = new JTextField4j();
          jTextFieldLocation.setBounds(147, 153, 119, 21);
          jTextFieldLocation.setEnabled(false);
          jDesktopPane1.add(jTextFieldLocation);
        }

        {
          jLabel10 = new JLabel4j_std();
          jLabel10.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel10.setText(lang.get("lbl_Material_Batch_Status"));
          jLabel10.setBounds(7, 215, 133, 21);
          jDesktopPane1.add(jLabel10);
        }

        {
          jTextFieldBatchStatus = new JTextField4j();
          jTextFieldBatchStatus.setEnabled(false);
          jTextFieldBatchStatus.setBounds(147, 215, 119, 21);
          jDesktopPane1.add(jTextFieldBatchStatus);
        }

        {
          jTextFieldUom = new JTextField4j();
          jTextFieldUom.setBounds(147, 275, 119, 21);
          jTextFieldUom.setEnabled(false);
          jDesktopPane1.add(jTextFieldUom);
        }
      }
View Full Code Here

Examples of com.commander4j.gui.JTextField4j

  public JDialogChangePassword(Frame parent, String DefaultUserName, String DefaultPassword)
  {
    super(parent, "Change Password", true);
    setTitle("Change Password (" + Common.hostList.getHost(Common.selectedHostID).getSiteDescription() + ")");

    fld_userName = new JTextField4j(20);
    fld_userName.setEnabled(false);
    fld_userName.setSize(128, 22);
    fld_userName.setLocation(137, 12);
    fld_userName.setDisabledTextColor(Common.color_textdisabled);
    fld_password = new JPasswordField(10);
View Full Code Here

Examples of com.commander4j.gui.JTextField4j

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

Examples of com.commander4j.gui.JTextField4j

    JLabel4j_std lblInspectionID = new JLabel4j_std(lang.get("lbl_Test_ID"));
    lblInspectionID.setBounds(8, 27, 92, 16);
    desktopPane.add(lblInspectionID);
    lblInspectionID.setHorizontalAlignment(SwingConstants.TRAILING);
   
    textFieldITestD = new JTextField4j();
    textFieldITestD.addKeyListener(new KeyAdapter() {
      @Override
      public void keyReleased(KeyEvent e) {
        enableSave();
      }
    });
    textFieldITestD.setEnabled(false);
    textFieldITestD.setBounds(112, 22, 231, 28);
    desktopPane.add(textFieldITestD);
    textFieldITestD.setColumns(10);
   
   
    textFieldDescription = new JTextField4j();
    textFieldDescription.addKeyListener(new KeyAdapter() {
      @Override
      public void keyReleased(KeyEvent e) {
        enableSave();
      }
    });
    textFieldDescription.setBounds(112, 55, 463, 28);
    desktopPane.add(textFieldDescription);
    textFieldDescription.setColumns(10);
   

   
    btnSave = new JButton4j(lang.get("btn_Save"));
    btnSave.setEnabled(false);
    btnSave.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        save();
      }
    });
    btnSave.setIcon(Common.icon_save);
    btnSave.setBounds(175, 263, 117, 29);
    desktopPane.add(btnSave);
   
    btnClose = new JButton4j(lang.get("btn_Close"));
    btnClose.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        dispose();
      }
    });
    btnClose.setIcon(Common.icon_close);
    btnClose.setBounds(304, 263, 117, 29);
    desktopPane.add(btnClose);
   
    JLabel4j_std lblDescription = new JLabel4j_std(lang.get("lbl_Description"));
    lblDescription.setHorizontalAlignment(SwingConstants.TRAILING);
    lblDescription.setBounds(8, 60, 92, 16);
    desktopPane.add(lblDescription);
   
    JLabel4j_std lblDataType = new JLabel4j_std(lang.get("lbl_DataType"));
    lblDataType.setHorizontalAlignment(SwingConstants.TRAILING);
    lblDataType.setBounds(8, 97, 92, 16);
    desktopPane.add(lblDataType);
   
    ComboBoxModel jComboBox1Model = new DefaultComboBoxModel(Common.dataTypes);
    comboBoxDataType = new JComboBox4j();
    comboBoxDataType.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        enableSave();
      }
    });
    comboBoxDataType.setModel(jComboBox1Model);
    comboBoxDataType.setBounds(111, 94, 153, 27);
    desktopPane.add(comboBoxDataType);
 
    comboBoxSelectList = new JComboBox4j();
    comboBoxSelectList.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        enableSave();
      }
    });
    comboBoxSelectList.addItem("");
    LinkedList<String> items = new LinkedList<String>();
    items = slist.getSelectListSummary();
   
    if (dict.getSelectListID().equals("")==false)
    {
      if (items.contains(dict.getSelectListID())==false)
      {
        items.addFirst(dict.getSelectListID());
      }
    }
   
    for (int x=0;x<items.size();x++)
    {
      comboBoxSelectList.addItem(items.get(x));
    }

    comboBoxSelectList.setBounds(112, 133, 153, 27);
    desktopPane.add(comboBoxSelectList);
   
    JLabel4j_std lblSelectListID = new JLabel4j_std(lang.get("lbl_List_ID"));
    lblSelectListID.setHorizontalAlignment(SwingConstants.TRAILING);
    lblSelectListID.setBounds(8, 138, 92, 16);
    desktopPane.add(lblSelectListID);
   
    chckbxVisible = new JCheckBox("");
    chckbxVisible.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        enableSave();
      }
    });
    chckbxVisible.setSelected(true);
    chckbxVisible.setBounds(112, 172, 28, 23);
    desktopPane.add(chckbxVisible);
   
    JLabel4j_std lblVisible = new JLabel4j_std(lang.get("lbl_Visible"));
    lblVisible.setHorizontalAlignment(SwingConstants.TRAILING);
    lblVisible.setBounds(8, 179, 92, 16);
    desktopPane.add(lblVisible);
   
    JLabel4j_std lblUOM = new JLabel4j_std(lang.get("lbl_Material_UOM"));
    lblUOM.setHorizontalAlignment(SwingConstants.TRAILING);
    lblUOM.setBounds(8, 213, 92, 16);
    desktopPane.add(lblUOM);
   
    textFieldUOM = new JTextField4j();
    textFieldUOM.addKeyListener(new KeyAdapter() {
      @Override
      public void keyReleased(KeyEvent arg0) {
        enableSave();
      }
View Full Code Here

Examples of com.commander4j.gui.JTextField4j

        jDesktopPane1.setBackground(Color.WHITE);
        this.getContentPane().add(jDesktopPane1, BorderLayout.CENTER);
        jDesktopPane1.setPreferredSize(new java.awt.Dimension(462, 497));
        jDesktopPane1.setLayout(null);

        jTextFieldSSCC = new JTextField4j();
        AbstractDocument doc = (AbstractDocument) jTextFieldSSCC.getDocument();
        doc.setDocumentFilter(new JFixedSizeFilter(JDBPallet.field_sscc));
        jTextFieldSSCC.addKeyListener(new KeyAdapter()
        {
          @Override
          public void keyReleased(KeyEvent arg0)
          {
            refresh();
          }
        });
        jTextFieldSSCC.addActionListener(new ActionListener()
        {
          public void actionPerformed(ActionEvent e)
          {
            refresh();
          }
        });
        jDesktopPane1.add(jTextFieldSSCC);
        jTextFieldSSCC.setBounds(121, 24, 134, 21);

        jTextFieldNewSSCC = new JTextField4j();
        jDesktopPane1.add(jTextFieldNewSSCC);
        jTextFieldNewSSCC.setEditable(false);
        jTextFieldNewSSCC.setEnabled(false);
        jTextFieldNewSSCC.setBounds(121, 53, 134, 21);
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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                {
                  filterByMenu.addSeparator();
                }

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