Package com.commander4j.gui

Examples of com.commander4j.gui.JButton4j


              }
            }
          }
        }
        {
          jButtonSearch = new JButton4j(Common.icon_search);
          jDesktopPane1.add(jButtonSearch);
          jButtonSearch.setText(lang.get("btn_Search"));
          jButtonSearch.setMnemonic(java.awt.event.KeyEvent.VK_S);
          jButtonSearch.setBounds(293, 10, 126, 32);
          jButtonSearch.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              search();

            }
          });
        }
        {
          jButtonEdit = new JButton4j(Common.icon_edit);
          jDesktopPane1.add(jButtonEdit);
          jButtonEdit.setText(lang.get("btn_Edit"));
          jButtonEdit.setMnemonic(java.awt.event.KeyEvent.VK_E);
          jButtonEdit.setBounds(293, 68, 126, 32);
          jButtonEdit.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MATERIAL_BATCH_EDIT"));
          jButtonEdit.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              editRecord();
            }
          });
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setMnemonic(java.awt.event.KeyEvent.VK_H);
          jButtonHelp.setBounds(293, 126, 126, 32);
        }
        {
          jButtonClose = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonClose);
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setMnemonic(java.awt.event.KeyEvent.VK_C);
          jButtonClose.setBounds(293, 155, 126, 32);
          jButtonClose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              JDBQuery.closeStatement(listStatement);
              dispose();
            }
          });
        }
        {
          jLabel1 = new JLabel4j_std();
          jDesktopPane1.add(jLabel1);
          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();
          jDesktopPane1.add(jLabel10);
          jLabel10.setText(lang.get("lbl_Sort_By"));
          jLabel10.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel10.setBounds(0, 178, 91, 21);
        }
        {
          ComboBoxModel<String> jComboBoxSortByModel = new DefaultComboBoxModel<String>(new String[] { "MATERIAL", "BATCH_NUMBER", "STATUS", "EXPIRY_DATE" });
          jComboBoxSortBy = new JComboBox4j<String>();
          jDesktopPane1.add(jComboBoxSortBy);
          jComboBoxSortBy.setModel(jComboBoxSortByModel);
          jComboBoxSortBy.setBounds(99, 176, 141, 23);
        }
        {
          jLabel5 = new JLabel4j_std();
          jDesktopPane1.add(jLabel5);
          jLabel5.setText(lang.get("lbl_Material_Batch_Status"));
          jLabel5.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel5.setBounds(0, 79, 91, 21);
        }
        {
          ComboBoxModel<String> jComboBoxStatusModel = new DefaultComboBoxModel<String>(Common.batchStatusIncBlank);
          jComboBoxStatus = new JComboBox4j<String>();
          jDesktopPane1.add(jComboBoxStatus);
          jComboBoxStatus.setModel(jComboBoxStatusModel);
          jComboBoxStatus.setBounds(99, 77, 141, 23);
        }
        {
          jToggleButtonSequence = new JToggleButton();
          jDesktopPane1.add(jToggleButtonSequence);
          jToggleButtonSequence.setBounds(246, 178, 21, 21);
          jToggleButtonSequence.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              setSequence(jToggleButtonSequence.isSelected());
            }
          });
        }

        {
          jButtonLookupMaterial = new JButton4j();
          jButtonLookupMaterial.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              JLaunchLookup.dlgAutoExec = false;
              JLaunchLookup.dlgCriteriaDefault = "";
              if (JLaunchLookup.materials())
              {
                jTextFieldMaterial.setText(JLaunchLookup.dlgResult);
              }
            }
          });
          jButtonLookupMaterial.setBounds(246, 11, 21, 21);
          jDesktopPane1.add(jButtonLookupMaterial);
        }

        {
          jButtonLookupBatch = new JButton4j();
          jButtonLookupBatch.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              JLaunchLookup.dlgCriteriaDefault = jTextFieldMaterial.getText();
              JLaunchLookup.dlgAutoExec = true;
              if (JLaunchLookup.materialBatches())
              {
                jTextFieldBatch.setText(JLaunchLookup.dlgResult);
              }

            }
          });
          jButtonLookupBatch.setBounds(246, 44, 21, 21);
          jDesktopPane1.add(jButtonLookupBatch);
        }

        {
          expiryFrom.setBounds(120, 110, 125, 25);
          expiryFrom.setEnabled(false);
          jDesktopPane1.add(expiryFrom);
        }

        {
          expiryTo.setBounds(120, 143, 125, 25);
          expiryTo.setEnabled(false);
          jDesktopPane1.add(expiryTo);
        }

        {
          jLabel5_1 = new JLabel4j_std();
          jLabel5_1.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel5_1.setText(lang.get("lbl_Material_Batch_Expiry_From"));
          jLabel5_1.setBounds(0, 110, 91, 21);
          jDesktopPane1.add(jLabel5_1);
        }

        {
          jLabel5_2 = new JLabel4j_std();
          jLabel5_2.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel5_2.setText(lang.get("lbl_Material_Batch_Expiry_To"));
          jLabel5_2.setBounds(0, 147, 91, 21);
          jDesktopPane1.add(jLabel5_2);
        }

        {
          jCheckBoxFrom = new JCheckBox4j();
          jCheckBoxFrom.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              if (jCheckBoxFrom.isSelected())
              {
                expiryFrom.setEnabled(true);
                calendarButtonexpiryFrom.setEnabled(true);
              }
              else
              {
                expiryFrom.setEnabled(false);
                calendarButtonexpiryFrom.setEnabled(false);
              }
            }
          });
          jCheckBoxFrom.setBackground(new Color(255, 255, 255));
          jCheckBoxFrom.setBounds(99, 110, 21, 21);
          jDesktopPane1.add(jCheckBoxFrom);
        }

        {
          jCheckBoxTo = new JCheckBox4j();
          jCheckBoxTo.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              if (jCheckBoxTo.isSelected())
              {
                expiryTo.setEnabled(true);
                calendarButtonexpiryTo.setEnabled(true);
              }
              else
              {
                expiryTo.setEnabled(false);
                calendarButtonexpiryTo.setEnabled(false);
              }
            }
          });
          jCheckBoxTo.setBackground(new Color(255, 255, 255));
          jCheckBoxTo.setBounds(99, 143, 21, 21);
          jDesktopPane1.add(jCheckBoxTo);
        }

        {
          jButtonAdd = new JButton4j(Common.icon_add);
          jButtonAdd.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MATERIAL_BATCH_ADD"));
          jButtonAdd.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent e) {
              addRecord();
            }
          });
          jButtonAdd.setText(lang.get("btn_Add"));
          jButtonAdd.setMnemonic(lang.getMnemonicChar());
          jButtonAdd.setBounds(293, 39, 126, 32);
          jDesktopPane1.add(jButtonAdd);
        }

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

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


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

              }
            }
          }
        }
        {
          jButtonAdd = new JButton4j(Common.icon_add);
          jDesktopPane1.add(jButtonAdd);
          jButtonAdd.setText(lang.get("btn_Add"));
          jButtonAdd.setMnemonic(lang.getMnemonicChar());
          jButtonAdd.setBounds(307, 9, 125, 30);
          jButtonAdd.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_UOM_ADD"));
          jButtonAdd.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              add();

            }
          });
        }
        {
          jButtonDelete = new JButton4j(Common.icon_delete);
          jDesktopPane1.add(jButtonDelete);
          jButtonDelete.setText(lang.get("btn_Delete"));
          jButtonDelete.setMnemonic(lang.getMnemonicChar());
          jButtonDelete.setBounds(307, 40, 125, 30);
          jButtonDelete.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_UOM_DELETE"));
          jButtonDelete.setFocusTraversalKeysEnabled(false);
          jButtonDelete.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              delete();

            }
          });
        }
        {
          jButtonEdit = new JButton4j(Common.icon_edit);
          jDesktopPane1.add(jButtonEdit);
          jButtonEdit.setText(lang.get("btn_Edit"));
          jButtonEdit.setMnemonic(lang.getMnemonicChar());
          jButtonEdit.setBounds(307, 71, 125, 30);
          jButtonEdit.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_UOM_EDIT"));
          jButtonEdit.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              editRecord();
            }
          });
        }
        {
          jButtonRename = new JButton4j(Common.icon_rename);
          jDesktopPane1.add(jButtonRename);
          jButtonRename.setText(lang.get("btn_Rename"));
          jButtonRename.setMnemonic(lang.getMnemonicChar());
          jButtonRename.setBounds(307, 102, 125, 30);
          jButtonRename.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_UOM_RENAME"));
          jButtonRename.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              rename();

            }
          });
        }
        {
          jButtonPrint = new JButton4j(Common.icon_print);
          jDesktopPane1.add(jButtonPrint);
          jButtonPrint.setText(lang.get("btn_Print"));
          jButtonPrint.setMnemonic(lang.getMnemonicChar());
          jButtonPrint.setBounds(307, 133, 125, 30);
          jButtonPrint.setEnabled(true);
          jButtonPrint.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              print();
            }
          });
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setMnemonic(lang.getMnemonicChar());
          jButtonHelp.setBounds(307, 226, 125, 30);
        }
        {
          jButtonRefresh = new JButton4j(Common.icon_refresh);
          jDesktopPane1.add(jButtonRefresh);
          jButtonRefresh.setText(lang.get("btn_Refresh"));
          jButtonRefresh.setMnemonic(lang.getMnemonicChar());
          jButtonRefresh.setBounds(307, 195, 125, 30);
          jButtonRefresh.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              populateList("");
            }
          });
        }
        {
          jButtonClose = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonClose);
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setMnemonic(lang.getMnemonicChar());
          jButtonClose.setBounds(307, 257, 125, 30);
          jButtonClose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              dispose();
            }
          });
        }

        {
          jButtonExcel = new JButton4j(Common.icon_XLS);
          jButtonExcel.setText(lang.get("btn_Excel"));
          jButtonExcel.setMnemonic(lang.getMnemonicChar());
          jButtonExcel.setBounds(307, 164, 125, 30);
          jButtonExcel.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
View Full Code Here

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

          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() {
View Full Code Here

          jDesktopPane1.setBounds(0, 0, 356, 242);
          this.getContentPane().add(jDesktopPane1);
          jDesktopPane1.setPreferredSize(new java.awt.Dimension(350, 231));
          jDesktopPane1.setLayout(null);
          {
            jButtonOk = new JButton4j(Common.icon_ok);
            jDesktopPane1.add(jButtonOk);
            jButtonOk.setText(lang.get("btn_Ok"));
            jButtonOk.setMnemonic(lang.getMnemonicChar());
            jButtonOk.setBounds(126, 196, 91, 28);
            jButtonOk.addActionListener(new ActionListener() {
View Full Code Here

    JLabel4j_std lblNewLabel_3 = new JLabel4j_std(lang.get("lbl_Activity_ID"));
    lblNewLabel_3.setBounds(6, 98, 111, 16);
    lblNewLabel_3.setHorizontalAlignment(SwingConstants.TRAILING);
    desktopPane.add(lblNewLabel_3);
   
    btnClose = new JButton4j(lang.get("btn_Close"));
    btnClose.setBounds(877, 92, 117, 29);
    btnClose.setIcon(Common.icon_close);
    btnClose.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        dispose();
      }
    });
    desktopPane.add(btnClose);
   
    btnEdit = new JButton4j(lang.get("btn_Edit"));
    btnEdit.setBounds(748, 92, 117, 29);
    btnEdit.setIcon(Common.icon_edit);
    btnEdit.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        editRecord();
      }
    });
    desktopPane.add(btnEdit);
   
    JButton4j btnRefresh = new JButton4j(lang.get("btn_Refresh"));
    btnRefresh.setBounds(619, 92, 117, 29);
    btnRefresh.setIcon(Common.icon_refresh);
    btnRefresh.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        populateTable();
      }
    });
    desktopPane.add(btnRefresh);
View Full Code Here

            jListAssigned.setCellRenderer(Common.renderer_list_assigned);
            jListAssigned.setBackground(Common.color_list_assigned);
          }
        }
        {
          jButtonAssign = new JButton4j(Common.icon_arrow_left);
          jDesktopPane1.add(jButtonAssign);
          jButtonAssign.setBounds(524, 160, 25, 25);
          jButtonAssign.setEnabled(false);
          jButtonAssign.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              if (jListUnAssigned.getSelectedIndex() > -1)
              {
                for (int j = jListUnAssigned.getMaxSelectionIndex(); j >= jListUnAssigned.getMinSelectionIndex(); j--)
                {
                  if (jListUnAssigned.isSelectedIndex(j))
                  {
                    JDBListData item = (JDBListData) jListUnAssigned.getModel().getElementAt(j);

                    addToList(assignedList, item, false);
                  }
                }

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

                    removeFromList(unassignedList, item);
                  }
                }

                refreshJList(jListAssigned, assignedModel, assignedList);
                refreshJList(jListUnAssigned, unassignedModel, unassignedList);

                setButtonState();
              }

            }
          });
        }
        {
          jButtonUnAssign = new JButton4j(Common.icon_arrow_right);
          jDesktopPane1.add(jButtonUnAssign);
          jButtonUnAssign.setBounds(524, 189, 25, 25);
          jButtonUnAssign.setEnabled(false);
          jButtonUnAssign.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              if (jListAssigned.getSelectedIndex() > -1)
              {
                for (int j = jListAssigned.getMaxSelectionIndex(); j >= jListAssigned.getMinSelectionIndex(); j--)
                {
                  if (jListAssigned.isSelectedIndex(j))
                  {
                    JDBListData item = (JDBListData) jListAssigned.getModel().getElementAt(j);

                    addToList(unassignedList, item, true);
                  }
                }

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

                    removeFromList(assignedList, item);
                  }
                }
                refreshJList(jListUnAssigned, unassignedModel, unassignedList);
                refreshJList(jListAssigned, assignedModel, assignedList);

                setButtonState();
              }
            }
          });
        }
        {
          jButtonUp = new JButton4j(Common.icon_arrow_up);
          jDesktopPane1.add(jButtonUp);
          jButtonUp.setBounds(524, 130, 25, 25);
          jButtonUp.setEnabled(false);
          jButtonUp.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              int j = jListAssigned.getSelectedIndex();
              JDBListData element = (JDBListData) jListAssigned.getModel().getElementAt(j);
              assignedList = JDBModule.moveElementUp(assignedList, element);
              refreshJList(jListAssigned, assignedModel, assignedList);
              jListAssigned.setSelectedIndex(assignedList.indexOf(element));
              jButtonSave.setEnabled(true);
              jButtonUndo.setEnabled(true);
            }
          });
        }
        {
          jButtonDown = new JButton4j(Common.icon_arrow_down);
          jDesktopPane1.add(jButtonDown);
          jButtonDown.setBounds(524, 220, 25, 25);
          jButtonDown.setEnabled(false);
          jButtonDown.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              int j = jListAssigned.getSelectedIndex();
              JDBListData element = (JDBListData) jListAssigned.getModel().getElementAt(j);
              assignedList = JDBModule.moveElementDown(assignedList, element);
              refreshJList(jListAssigned, assignedModel, assignedList);
              jListAssigned.setSelectedIndex(assignedList.indexOf(element));
              jButtonSave.setEnabled(true);
              jButtonUndo.setEnabled(true);
            }
          });
        }
        {
          jButtonClose = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonClose);
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setBounds(504, 377, 116, 32);
          jButtonClose.setMnemonic(lang.getMnemonicChar());
          jButtonClose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              dispose();
            }
          });
        }
        {
          jLabel1 = new JLabel4j_title();
          jDesktopPane1.add(jLabel1);
          jLabel1.setText("Menu");
          jLabel1.setBounds(12, 7, 60, 16);
        }
        {
          jLabel2 = new JLabel4j_title();
          jDesktopPane1.add(jLabel2);
          jLabel2.setText("Unassigned");
          jLabel2.setBounds(561, 5, 136, 21);
        }
        {
          jLabel3 = new JLabel4j_title();
          jDesktopPane1.add(jLabel3);
          jLabel3.setText("Assigned");
          jLabel3.setBounds(267, 5, 71, 18);
        }
        {
          jButtonSave = new JButton4j(Common.icon_update);
          jDesktopPane1.add(jButtonSave);
          jButtonSave.setText(lang.get("btn_Save"));
          jButtonSave.setBounds(150, 377, 116, 32);
          jButtonSave.setMnemonic(lang.getMnemonicChar());
          jButtonSave.setEnabled(false);
          jButtonSave.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              JDBMenus m = new JDBMenus(Common.selectedHostID, Common.sessionID);

              int j = jListMenus.getSelectedIndex();
              JDBListData menu = (JDBListData) jListMenus.getModel().getElementAt(j);
              m.rewriteMenu(menu.toString(), assignedList);
              jButtonSave.setEnabled(false);
              jButtonUndo.setEnabled(false);
            }
          });
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setBounds(386, 377, 116, 32);
          jButtonHelp.setMnemonic(lang.getMnemonicChar());
        }
        {
          jButtonUndo = new JButton4j(Common.icon_undo);
          jDesktopPane1.add(jButtonUndo);
          jButtonUndo.setText(lang.get("btn_Undo"));
          jButtonUndo.setBounds(268, 377, 116, 32);
          jButtonUndo.setEnabled(false);
          jButtonUndo.setMnemonic(lang.getMnemonicChar());
View Full Code Here

      fld_password.setText(DefaultPassword);
      fld_password.setEnabled(false);
    }

    /* Create button objects */
    btn_change = new JButton4j("Change", Common.icon_ok);
    btn_change.setSize(111, 32);
    btn_change.setLocation(18, 148);
    btn_change.setMnemonic('L');
    btn_change.setToolTipText("Confirm password change.");
    btn_cancel = new JButton4j("Cancel", Common.icon_cancel);
    btn_cancel.setLocation(147, 148);
    btn_cancel.setSize(111, 32);
    btn_cancel.setMnemonic('C');
    btn_cancel.setToolTipText("Cancel password change.");

View Full Code Here

              }
            }
          }
        }
        {
          jButtonSearch = new JButton4j(Common.icon_search);
          jDesktopPane1.add(jButtonSearch);
          jButtonSearch.setText(lang.get("btn_Search"));
          jButtonSearch.setMnemonic(java.awt.event.KeyEvent.VK_S);
          jButtonSearch.setBounds(10, 125, 126, 28);
          jButtonSearch.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              search();

            }
          });
        }
        {
          jButtonEdit = new JButton4j(Common.icon_edit);
          jDesktopPane1.add(jButtonEdit);
          jButtonEdit.setText(lang.get("btn_Edit"));
          jButtonEdit.setMnemonic(java.awt.event.KeyEvent.VK_E);
          jButtonEdit.setBounds(266, 125, 126, 28);
          jButtonEdit.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MATERIAL_LOCATION_EDIT"));
          jButtonEdit.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              editRecord();
            }
          });
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setMnemonic(java.awt.event.KeyEvent.VK_H);
          jButtonHelp.setBounds(138, 155, 126, 28);
        }
        {
          jButtonClose = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonClose);
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setMnemonic(java.awt.event.KeyEvent.VK_C);
          jButtonClose.setBounds(266, 154, 126, 28);
          jButtonClose.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              JDBQuery.closeStatement(listStatement);
              dispose();
            }
          });
        }
        {
          jLabel1 = new JLabel4j_std();
          jDesktopPane1.add(jLabel1);
          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();
          jDesktopPane1.add(jLabel10);
          jLabel10.setText(lang.get("lbl_Sort_By"));
          jLabel10.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel10.setBounds(0, 92, 91, 21);
        }
        {
          ComboBoxModel jComboBoxSortByModel = new DefaultComboBoxModel(new String[] { "MATERIAL", "LOCATION_ID", "STATUS" });
          jComboBoxSortBy = new JComboBox4j();
          jDesktopPane1.add(jComboBoxSortBy);
          jComboBoxSortBy.setModel(jComboBoxSortByModel);
          jComboBoxSortBy.setBounds(99, 92, 141, 23);
        }
        {
          jLabel5 = new JLabel4j_std();
          jDesktopPane1.add(jLabel5);
          jLabel5.setText(lang.get("lbl_Material_Location_Status"));
          jLabel5.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel5.setBounds(0, 65, 91, 21);
        }
        {
          ComboBoxModel jComboBoxStatusModel = new DefaultComboBoxModel(Common.locationStatusIncBlank);
          jComboBoxStatus = new JComboBox4j();
          jDesktopPane1.add(jComboBoxStatus);
          jComboBoxStatus.setModel(jComboBoxStatusModel);
          jComboBoxStatus.setBounds(99, 65, 141, 23);
        }
        {
          jToggleButtonSequence = new JToggleButton();
          jDesktopPane1.add(jToggleButtonSequence);
          jToggleButtonSequence.setBounds(246, 92, 21, 21);
          jToggleButtonSequence.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent evt)
            {
              setSequence(jToggleButtonSequence.isSelected());
            }
          });
        }

        {
          jButtonLookupMaterial = new JButton4j();
          jButtonLookupMaterial.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent e)
            {
              JLaunchLookup.dlgAutoExec = false;
              JLaunchLookup.dlgCriteriaDefault = "";
              if (JLaunchLookup.materials())
              {
                jTextFieldMaterial.setText(JLaunchLookup.dlgResult);
              }
            }
          });
          jButtonLookupMaterial.setBounds(246, 10, 21, 21);
          jDesktopPane1.add(jButtonLookupMaterial);
        }

        {
          jButtonLookupLocation = new JButton4j();
          jButtonLookupLocation.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent e)
            {
              JLaunchLookup.dlgCriteriaDefault = "Y";
              JLaunchLookup.dlgAutoExec = true;
              if (JLaunchLookup.locations())
              {
                jTextFieldLocation.setText(JLaunchLookup.dlgResult);
              }

            }
          });
          jButtonLookupLocation.setBounds(246, 37, 21, 21);
          jDesktopPane1.add(jButtonLookupLocation);
        }

        {
          jButtonAdd = new JButton4j(Common.icon_add);
          jButtonAdd.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MATERIAL_LOCATION_ADD"));
          jButtonAdd.addActionListener(new ActionListener()
          {
            public void actionPerformed(final ActionEvent e)
            {
              addRecord();
            }
          });
          jButtonAdd.setText(lang.get("btn_Add"));
          jButtonAdd.setMnemonic(lang.getMnemonicChar());
          jButtonAdd.setBounds(138, 125, 126, 28);
          jDesktopPane1.add(jButtonAdd);
        }

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

        {
          jButtonExcel = new JButton4j(Common.icon_XLS);
          jButtonExcel.addActionListener(new ActionListener()
          {
            public void actionPerformed(final ActionEvent e)
            {
              excel();
View Full Code Here

TOP

Related Classes of com.commander4j.gui.JButton4j

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