Package com.commander4j.gui

Examples of com.commander4j.gui.JButton4j


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

          jButtonDelete = new JButton4j(Common.icon_delete);
          jDesktopPane1.add(jButtonDelete);
          jButtonDelete.setText(lang.get("btn_Delete"));
          jButtonDelete.setBounds(209, 41, 125, 32);
          jButtonDelete.setMnemonic(lang.getMnemonicChar());
          jButtonDelete.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_USER_DELETE"));
          jButtonDelete.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              delete();

            }
          });
        }
        {
          jButtonUpdate = new JButton4j(Common.icon_edit);
          jDesktopPane1.add(jButtonUpdate);
          jButtonUpdate.setText(lang.get("btn_Edit"));
          jButtonUpdate.setBounds(209, 72, 125, 32);
          jButtonUpdate.setMnemonic(lang.getMnemonicChar());
          jButtonUpdate.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_USER_EDIT"));
          jButtonUpdate.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              editRecord();
            }
          });
        }
        {
          jButtonClose = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonClose);
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setBounds(209, 289, 125, 32);
          jButtonClose.setMnemonic(lang.getMnemonicChar());
          jButtonClose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              dispose();
            }
          });
        }
        {
          jButtonPermissions = new JButton4j(Common.icon_permissions);
          jDesktopPane1.add(jButtonPermissions);
          jButtonPermissions.setText(lang.get("btn_Permissions"));
          jButtonPermissions.setBounds(209, 103, 125, 32);
          jButtonPermissions.setMnemonic(lang.getMnemonicChar());
          jButtonPermissions.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_USER_PERM"));
          jButtonPermissions.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              permissions();
            }
          });
        }
        {

          jButtonPrint = new JButton4j(Common.icon_report);
          jDesktopPane1.add(jButtonPrint);
          jButtonPrint.setText(lang.get("btn_Print"));
          jButtonPrint.setBounds(209, 165, 125, 32);
          jButtonPrint.setMnemonic(lang.getMnemonicChar());
          jButtonPrint.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_USERS"));
          jButtonPrint.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              print();
            }
          });
        }
        {
          jButtonRename = new JButton4j(Common.icon_rename);
          jDesktopPane1.add(jButtonRename);
          jButtonRename.setText(lang.get("btn_Rename"));
          jButtonRename.setMnemonic(lang.getMnemonicChar());
          jButtonRename.setBounds(209, 134, 125, 32);
          jButtonRename.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_USER_RENAME"));
          jButtonRename.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              rename();
            }
          });
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setBounds(209, 258, 125, 32);
          jButtonHelp.setMnemonic(lang.getMnemonicChar());
        }
        {
          jButtonRefresh = new JButton4j(Common.icon_refresh);
          jDesktopPane1.add(jButtonRefresh);
          jButtonRefresh.setText(lang.get("btn_Refresh"));
          jButtonRefresh.setBounds(209, 196, 125, 32);
          jButtonRefresh.setMnemonic(lang.getMnemonicChar());
          jButtonRefresh.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              populateList("");
            }
          });
        }

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

            }
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(380, 10, 125, 30);
          jButtonAdd.setEnabled(true);
          jButtonAdd.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              addRecord();

            }
          });
        }
        {
          jButtonDelete = new JButton4j(Common.icon_delete);
          jDesktopPane1.add(jButtonDelete);
          jButtonDelete.setText(lang.get("btn_Delete"));
          jButtonDelete.setMnemonic(lang.getMnemonicChar());
          jButtonDelete.setBounds(380, 41, 125, 30);
          jButtonDelete.setEnabled(true);
          jButtonDelete.setFocusTraversalKeysEnabled(false);
          jButtonDelete.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              deleteRecord();

            }
          });
        }
        {
          jButtonEdit = new JButton4j(Common.icon_edit);
          jDesktopPane1.add(jButtonEdit);
          jButtonEdit.setText(lang.get("btn_Edit"));
          jButtonEdit.setMnemonic(lang.getMnemonicChar());
          jButtonEdit.setBounds(380, 72, 125, 30);
          jButtonEdit.setEnabled(true);
          jButtonEdit.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              editRecord();
            }
          });
        }

        {
          jButtonRefresh = new JButton4j(Common.icon_refresh);
          jDesktopPane1.add(jButtonRefresh);
          jButtonRefresh.setText(lang.get("btn_Refresh"));
          jButtonRefresh.setMnemonic(lang.getMnemonicChar());
          jButtonRefresh.setBounds(380, 102, 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(380, 162, 125, 30);
          jButtonClose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              dispose();
            }
          });
         
          JButton4j btnExcel = new JButton4j(Common.icon_XLS);
          btnExcel.setText(lang.get("btn_Excel"));
          btnExcel.setBounds(380, 132, 125, 30);
          btnExcel.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              excel();
            }
          });
          jDesktopPane1.add(btnExcel);
View Full Code Here

        jDesktopPane1.setBackground(Color.WHITE);
        getContentPane().add(jDesktopPane1, BorderLayout.CENTER);
        jDesktopPane1.setPreferredSize(new java.awt.Dimension(350, 182));
        jDesktopPane1.setLayout(null);
        {
          jButtonUpdate = new JButton4j(Common.image_update);
          jDesktopPane1.add(jButtonUpdate);
          jButtonUpdate.setEnabled(false);
          jButtonUpdate.setText(lang.get("btn_Save"));
          jButtonUpdate.setMnemonic(lang.getMnemonicChar());
          jButtonUpdate.setBounds(6, 100, 112, 32);
          jButtonUpdate.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {

              try
              {
                materiallocation.setStatus((String) jComboBoxStatus.getSelectedItem());
              }
              catch (Exception e)
              {
                materiallocation.setStatus("");
              }

              if (materiallocation.isValidMaterialLocation())
              {
                materiallocation.update();
              }
              else
              {
                materiallocation.create(jTextFieldMaterial.getText(),jTextFieldLocation.getText());
                materiallocation.update();
              }
              jButtonUpdate.setEnabled(false);
            }
          });
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setMnemonic(lang.getMnemonicChar());
          jButtonHelp.setBounds(118, 100, 112, 32);
        }
        {
          jButtonCancel = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonCancel);
          jButtonCancel.setText(lang.get("btn_Close"));
          jButtonCancel.setMnemonic(lang.getMnemonicChar());
          jButtonCancel.setBounds(230, 100, 112, 32);
          jButtonCancel.addActionListener(new ActionListener() {
View Full Code Here

          jLabelType.setHorizontalTextPosition(SwingConstants.RIGHT);
          jLabelType.setBounds(9, 81, 157, 19);
        }
        {

          jButtonUpdate = new JButton4j(Common.icon_update);
          jDesktopPane1.add(jButtonUpdate);
          jButtonUpdate.setText(lang.get("btn_Save"));
          jButtonUpdate.setBounds(152, 372, 110, 32);
          jButtonUpdate.setMnemonic(java.awt.event.KeyEvent.VK_S);
          jButtonUpdate.setEnabled(false);
          jButtonUpdate.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              printers.setDescription(jTextFieldDescription.getText());
              printers.setPrinterType(comboBoxPrinterType.getSelectedItem().toString());
              printers.setLanguage(JUtility.replaceNullStringwithBlank(comboBoxLanguage.getSelectedItem().toString()));
              printers.setIPAddress(jTextFieldIPAddress.getText());
              printers.setPort(jTextFieldPort.getText());
              printers.setGroupID(comboBox4jGroup.getSelectedItem().toString());
              printers.setDPI(comboBoxDPI.getSelectedItem().toString());

              printers.setPrinterEnabled(chckbxEnabled.isSelected());
              printers.setExportPath(jTextFieldExportPath.getText());
              printers.setEnableExport(chckbxEnableExport.isSelected());
              printers.setEnableDirectPrint(chckbxEnableDirectPrint.isSelected());
              printers.setExportFormat(JUtility.replaceNullStringwithBlank(comboBox4ExportFormat.getSelectedItem().toString()));

              printers.update();
              jButtonUpdate.setEnabled(false);
            }
          });
        }
        {
          jButtonClose = new JButton4j(Common.icon_close);
          jDesktopPane1.add(jButtonClose);
          jButtonClose.setText(lang.get("btn_Close"));
          jButtonClose.setBounds(388, 372, 110, 32);
          jButtonClose.setMnemonic(java.awt.event.KeyEvent.VK_C);
          jButtonClose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              dispose();
            }
          });
        }
        {
          jTextFieldPrinterID = new JTextField4j();
          jTextFieldPrinterID.setFocusable(false);
          jDesktopPane1.add(jTextFieldPrinterID);
          jTextFieldPrinterID.setHorizontalAlignment(SwingConstants.LEFT);
          jTextFieldPrinterID.setEditable(false);
          jTextFieldPrinterID.setPreferredSize(new java.awt.Dimension(100, 20));
          jTextFieldPrinterID.setBounds(178, 13, 252, 21);
          jTextFieldPrinterID.setEnabled(false);
        }
        {
          comboBoxPrinterType = new JComboBox4j<String>();
          comboBoxPrinterType.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              jButtonUpdate.setEnabled(true);
            }
          });
          comboBoxPrinterType.setModel(new DefaultComboBoxModel<String>(Common.printerTypes));
          jDesktopPane1.add(comboBoxPrinterType);
          comboBoxPrinterType.setPreferredSize(new java.awt.Dimension(40, 20));
          comboBoxPrinterType.setFocusCycleRoot(true);
          comboBoxPrinterType.setBounds(178, 79, 167, 21);

        }
        {
          jTextFieldDescription = new JTextField4j();
          jDesktopPane1.add(jTextFieldDescription);
          AbstractDocument doc = (AbstractDocument) jTextFieldDescription.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBControl.field_description));
          jTextFieldDescription.setPreferredSize(new java.awt.Dimension(40, 20));
          jTextFieldDescription.setFocusCycleRoot(true);
          jTextFieldDescription.setBounds(180, 173, 337, 21);
          jTextFieldDescription.addKeyListener(new KeyAdapter() {
            public void keyTyped(KeyEvent evt) {
              jButtonUpdate.setEnabled(true);
            }
          });
        }
        {
          jButtonHelp = new JButton4j(Common.icon_help);
          jDesktopPane1.add(jButtonHelp);
          jButtonHelp.setText(lang.get("btn_Help"));
          jButtonHelp.setBounds(276, 372, 100, 32);
          jButtonHelp.setMnemonic(java.awt.event.KeyEvent.VK_H);
        }
View Full Code Here

    desktopPane.add(textFieldInspectionDescription);
    textFieldInspectionDescription.setColumns(10);
   

   
    btnSave = new JButton4j(lang.get("btn_Save"));
    btnSave.setEnabled(false);
    btnSave.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        save();
      }
    });
    btnSave.setIcon(Common.icon_update);
    btnSave.setBounds(319, 154, 117, 29);
    desktopPane.add(btnSave);
   
    btnClose = new JButton4j(lang.get("btn_Close"));
    btnClose.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        dispose();
      }
    });
View Full Code Here

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

            }
          });
        }
        {
          jButtonDelete = new JButton4j(Common.icon_delete);
          jDesktopPane1.add(jButtonDelete);
          jButtonDelete.setText(lang.get("btn_Delete"));
          jButtonDelete.setMnemonic(lang.getMnemonicChar());
          jButtonDelete.setBounds(398, 41, 125, 30);
          jButtonDelete.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_CUSTOMER_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(398, 72, 125, 30);
          jButtonEdit.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_CUSTOMER_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(398, 103, 125, 30);
          jButtonRename.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_CUSTOMER_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(398, 134, 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(398, 227, 125, 30);
        }
        {
          jButtonRefresh = new JButton4j(Common.icon_refresh);
          jDesktopPane1.add(jButtonRefresh);
          jButtonRefresh.setText(lang.get("btn_Refresh"));
          jButtonRefresh.setMnemonic(lang.getMnemonicChar());
          jButtonRefresh.setBounds(398, 196, 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(398, 258, 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(398, 165, 125, 30);
          jButtonExcel.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
View Full Code Here

    doc1.setDocumentFilter(new JFixedSizeFilter(JDBUser.field_user_id));

    fld_userName.setFont(Common.font_std);
    fld_userName.setText(System.getProperty("user.name"));
    fld_userName.setCaretPosition(fld_userName.getText().length());
    btn_close = new JButton4j("Close", Common.icon_cancel);
    btn_close.setBounds(142, 101, 104, 32);
    getContentPane().add(btn_close);
    btn_close.setMnemonic('C');
    btn_close.setToolTipText("Click to cancel logon.");
    btn_login = new JButton4j("Login", Common.icon_ok);
    btn_login.setBounds(19, 101, 104, 32);
    getContentPane().add(btn_login);
    btn_login.setMnemonic('L');
    btn_login.setToolTipText("Click to validate logon.");
    btn_login.addActionListener(buttonhandler);
View Full Code Here

  private void initGUI()
  {
    try
    {

      jButtonAssign = new JButton4j(Common.icon_print);
      jButtonAssign.addActionListener(new ActionListener()
      {
        public void actionPerformed(ActionEvent e)
        {
          assign();
        }
      });
      jButtonAssign.setEnabled(false);
      jDesktopPane1.add(jButtonAssign);
      jButtonAssign.setText(lang.get("btn_Assign"));
      jButtonAssign.setMnemonic(lang.getMnemonicChar());
      jButtonAssign.setBounds(80, 387, 130, 30);

      jButtonHelp = new JButton4j(Common.icon_help);
      jDesktopPane1.add(jButtonHelp);
      jButtonHelp.setText(lang.get("btn_Help"));
      jButtonHelp.setMnemonic(lang.getMnemonicChar());
      jButtonHelp.setBounds(364, 387, 130, 30);

      jButtonCancel = new JButton4j(Common.icon_close);
      jDesktopPane1.add(jButtonCancel);
      jButtonCancel.setText(lang.get("btn_Close"));
      jButtonCancel.setMnemonic(lang.getMnemonicChar());
      jButtonCancel.setBounds(504, 387, 130, 30);
      jButtonCancel.addActionListener(new ActionListener()
      {
        public void actionPerformed(ActionEvent evt)
        {
          dispose();
        }
      });

      lbl_ProcessOrder = new JLabel4j_std();
      jDesktopPane1.add(lbl_ProcessOrder);
      lbl_ProcessOrder.setText(lang.get("lbl_Process_Order"));
      lbl_ProcessOrder.setBounds(12, 10, 125, 21);
      lbl_ProcessOrder.setHorizontalAlignment(SwingConstants.TRAILING);

      JLabel4j_std lbl_Material = new JLabel4j_std();
      lbl_Material.setHorizontalAlignment(SwingConstants.TRAILING);
      lbl_Material.setText(lang.get("lbl_Material"));
      lbl_Material.setBounds(12, 40, 125, 21);
      jDesktopPane1.add(lbl_Material);

      JLabel4j_std lbl_ExpiryDate = new JLabel4j_std();
      lbl_ExpiryDate.setBounds(306, 100, 125, 21);
      lbl_ExpiryDate.setHorizontalAlignment(SwingConstants.RIGHT);
      lbl_ExpiryDate.setText(lang.get("lbl_Material_Batch_Expiry_Date"));
      jDesktopPane1.add(lbl_ExpiryDate);

      JLabel4j_std lbl_User_ID = new JLabel4j_std();
      lbl_User_ID.setHorizontalAlignment(SwingConstants.RIGHT);
      lbl_User_ID.setBounds(12, 227, 125, 21);
      lbl_User_ID.setText(lang.get("lbl_User_ID"));
      jDesktopPane1.add(lbl_User_ID);

      JLabel4j_std lbl_Production_Date = new JLabel4j_std(lang.get("lbl_Pallet_DOM"));
      lbl_Production_Date.setHorizontalAlignment(SwingConstants.TRAILING);
      lbl_Production_Date.setBounds(12, 100, 125, 21);
      jDesktopPane1.add(lbl_Production_Date);

      lbl_BatchNumber = new JLabel4j_std();
      lbl_BatchNumber.setBounds(12, 70, 125, 21);
      lbl_BatchNumber.setHorizontalTextPosition(SwingConstants.CENTER);
      lbl_BatchNumber.setHorizontalAlignment(SwingConstants.TRAILING);
      lbl_BatchNumber.setText(lang.get("lbl_Batch"));
      jDesktopPane1.add(lbl_BatchNumber);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      list = new JList4j<JDBListData>();
      list.addListSelectionListener(new ListSelectionListener()
      {
        public void valueChanged(ListSelectionEvent arg0)
        {
          enableButtons();
        }
      });
      list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
      scrollPane.setViewportView(list);

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

      JLabel4j_std label4j_Production_UOM = new JLabel4j_std((String) null);
      label4j_Production_UOM.setHorizontalAlignment(SwingConstants.TRAILING);
      label4j_Production_UOM.setBounds(12, 165, 125, 21);
View Full Code Here

        }

      }
      {
        jButtonEdit = new JButton4j(Common.icon_edit);
        this.getContentPane().add(jButtonEdit);
        jButtonEdit.setText(lang.get("btn_Edit"));
        jButtonEdit.setBounds(149, 328, 128, 32);
        jButtonEdit.setMnemonic(lang.getMnemonicChar());
        jButtonEdit.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_PRINTER_EDIT"));
        jButtonEdit.addActionListener(new ActionListener()
        {
          public void actionPerformed(ActionEvent evt)
          {
            editRecord();
          }
        });
      }
      {
        jButtonClose = new JButton4j(Common.icon_close);
        this.getContentPane().add(jButtonClose);
        jButtonClose.setText(lang.get("btn_Close"));
        jButtonClose.setBounds(844, 328, 128, 32);
        jButtonClose.setMnemonic(lang.getMnemonicChar());
        jButtonClose.addActionListener(new ActionListener()
        {
          public void actionPerformed(ActionEvent evt)
          {
            jButtonCloseActionPerformed(evt);
          }
        });
      }
      {

        jButtonAdd = new JButton4j(Common.icon_add);
        this.getContentPane().add(jButtonAdd);
        jButtonAdd.setText(lang.get("btn_Add"));
        jButtonAdd.setBounds(10, 328, 128, 32);
        jButtonAdd.setMnemonic(lang.getMnemonicChar());
        jButtonAdd.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_PRINTER_ADD"));
        jButtonAdd.addActionListener(new ActionListener()
        {
          public void actionPerformed(ActionEvent evt)
          {
            JDBPrinters prn = new JDBPrinters(Common.selectedHostID, Common.sessionID);

            printerID = JOptionPane.showInputDialog(Common.mainForm, lang.get("dlg_Printer_Create"));
            if (printerID != null)
            {
              if (printerID.equals("") == false)
              {
                Object[] printerGroups = Common.printerGroup;
                String groupId = (String) JOptionPane.showInputDialog(Common.mainForm, lang.get("lbl_Group_ID"), lang.get("lbl_Group_ID"), JOptionPane.PLAIN_MESSAGE, Common.icon_confirm, printerGroups, "Pack");

                // If a string was returned, say so.
                if ((groupId != null) && (groupId.length() > 0))
                {

                  printerID = printerID.toUpperCase();
                  if (prn.create(printerID, groupId) == false)
                  {
                    JUtility.errorBeep();
                    JOptionPane.showMessageDialog(Common.mainForm, prn.getErrorMessage(), lang.get("err_Error"), JOptionPane.ERROR_MESSAGE);
                  } else
                  {

                    populateList("", "");
                    JLaunchMenu.runDialog("FRM_ADMIN_PRINTER_EDIT", printerID, groupId);
                    populateList("", "");
                  }
                }
              }
            }

          }
        });
      }
      {
        jButtonDelete = new JButton4j(Common.icon_delete);
        this.getContentPane().add(jButtonDelete);
        jButtonDelete.setText(lang.get("btn_Delete"));
        jButtonDelete.setBounds(288, 328, 128, 32);
        jButtonDelete.setMnemonic(lang.getMnemonicChar());
        jButtonDelete.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_PRINTER_DELETE"));
        jButtonDelete.addActionListener(new ActionListener()
        {
          public void actionPerformed(ActionEvent evt)
          {
            int row = jTable1.getSelectedRow();
            if (row >= 0)
            {
              printerID = jTable1.getValueAt(row, JDBPrintersTableModel.PrinterID_Col).toString();
              groupID = jTable1.getValueAt(row, JDBPrintersTableModel.Group_Col).toString();

              int n = JOptionPane.showConfirmDialog(Common.mainForm, lang.get("dlg_Printer_Delete") + " " + printerID + " ?", lang.get("dlg_Confirm"), JOptionPane.YES_NO_OPTION, 0, Common.icon_confirm);
              if (n == 0)
              {
                JDBPrinters c = new JDBPrinters(Common.selectedHostID, Common.sessionID);
                c.setPrinterID(printerID);
                c.setGroupID(groupID);
                if (c.delete())
                {
                  JDBPrinterLineMembership plm = new JDBPrinterLineMembership(Common.selectedHostID, Common.sessionID);
                  plm.removePrinterfromAllLines(printerID,groupID);
                }

                populateList("", "");
              }
            }
          }
        });
      }
      {
        jButtonPrint = new JButton4j(Common.icon_report);
        this.getContentPane().add(jButtonPrint);
        jButtonPrint.setText(lang.get("btn_Print"));
        jButtonPrint.setBounds(566, 328, 128, 32);
        jButtonPrint.setMnemonic(lang.getMnemonicChar());
        jButtonPrint.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_PRINTERS"));
        jButtonPrint.addActionListener(new ActionListener()
        {
          public void actionPerformed(ActionEvent evt)
          {
            JLaunchReport.runReport("RPT_PRINTERS", null, "", null, "");
          }
        });
      }
      {
        jButtonHelp = new JButton4j(Common.icon_help);
        this.getContentPane().add(jButtonHelp);
        jButtonHelp.setText(lang.get("btn_Help"));
        jButtonHelp.setBounds(705, 328, 128, 32);
        jButtonHelp.setMnemonic(lang.getMnemonicChar());

      }

      {
        jButtonExcel = new JButton4j(Common.icon_XLS);
        jButtonExcel.addActionListener(new ActionListener()
        {
          public void actionPerformed(final ActionEvent e)
          {
            JDBPrinters printers = new JDBPrinters(Common.selectedHostID, Common.sessionID);
View Full Code Here

    panelShiftButtons.setBackground(Color.WHITE);
    panelShiftButtons.setBounds(12, 475, 112, 27);
    desktopPane.add(panelShiftButtons);
    panelShiftButtons.setLayout(null);

    JButton4j button4jShiftAdd = new JButton4j(Common.icon_add);
    button4jShiftAdd.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0)
      {
        addShift();
      }
    });
    button4jShiftAdd.setBounds(0, 0, 25, 25);
    panelShiftButtons.add(button4jShiftAdd);
    button4jShiftAdd.setFont(Common.font_std);
    button4jShiftAdd.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_SHIFT_ADD"));
    button4jShiftAdd.setMnemonic('0');

    JButton4j button4jShiftDelete = new JButton4j(Common.icon_delete);
    button4jShiftDelete.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        deleteShift();
      }
    });
    button4jShiftDelete.setBounds(57, 0, 25, 25);
    panelShiftButtons.add(button4jShiftDelete);
    button4jShiftDelete.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_SHIFT_DELETE"));
    button4jShiftDelete.setMnemonic('0');
    button4jShiftDelete.setFont(Common.font_std);

    JButton4j button4jShiftEdit = new JButton4j(Common.icon_edit);
    button4jShiftEdit.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e)
      {
        editShift();
      }
    });
    button4jShiftEdit.setBounds(29, 0, 25, 25);
    panelShiftButtons.add(button4jShiftEdit);
    button4jShiftEdit.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_SHIFT_EDIT"));
    button4jShiftEdit.setMnemonic('0');
    button4jShiftEdit.setFont(Common.font_std);

    JButton4j button4jShiftRefresh = new JButton4j(Common.icon_refresh);
    button4jShiftRefresh.setBounds(85, 0, 25, 25);
    panelShiftButtons.add(button4jShiftRefresh);
    button4jShiftRefresh.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0)
      {
        populateListUserShifts("");
      }
    });
    button4jShiftRefresh.setMnemonic('0');
    button4jShiftRefresh.setFont(Common.font_std);

    populateListUserReports("");
    populateListUserShifts("");
    setButtonState();
   
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.