Package com.commander4j.gui

Examples of com.commander4j.gui.JMenuItem4j


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

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

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

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

            {
              final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_rename);
              newItemMenuItem.addActionListener(new ActionListener() {
                public void actionPerformed(final ActionEvent e) {
                  rename();
                }
              });
              newItemMenuItem.setText(lang.get("btn_Rename"));
              newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MATERIAL_TYPE_RENAME"));
              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"));
              newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_TYPES"));
              popupMenu.add(newItemMenuItem);
            }

            {
              final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_refresh);
              newItemMenuItem.addActionListener(new ActionListener() {
                public void actionPerformed(final ActionEvent e) {
                  populateList("");
                }
              });
              newItemMenuItem.setText(lang.get("btn_Refresh"));
              popupMenu.add(newItemMenuItem);
            }
          }
        }
      }
View Full Code Here


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

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

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

              {
                final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_delete);
                newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MHN_DELETE"));
                newItemMenuItem.addActionListener(new ActionListener()
                {
                  public void actionPerformed(final ActionEvent e)
                  {
                    deleteRecord();
                  }
                });
                newItemMenuItem.setText(lang.get("btn_Delete"));
                popupMenu.add(newItemMenuItem);
              }
              {
                menu = new JMenu4j(lang.get("btn_Decision_Assign"));
                popupMenu.add(menu);
                {
                  for (int x = 0; x < decisionList.size(); x++)
                  {
                    final int xx = x;
                    menuItem = new JMenuItem4j(decisionList.get(x).getDecision());
                    menuItem.addActionListener(new ActionListener()
                    {
                      public void actionPerformed(ActionEvent e)
                      {

                        int rowCount = jTable1.getSelectedRowCount();

                        if (rowCount >= 0)
                        {
                          int[] rows = jTable1.getSelectedRows();

                          JDBPallet temp = new JDBPallet(Common.selectedHostID, Common.sessionID);

                          int n = JOptionPane.showConfirmDialog(Common.mainForm, "Update Decision  of " + String.valueOf(rowCount) + " SSCC(s) from Master Hold Notice "
                              + jTextFieldMHN.getText() + " to " + decisionList.get(xx).getDescription() + " ?", "Confirm", JOptionPane.YES_NO_OPTION);
                          if (n == 0)
                          {
                            save();
                            for (int l = 0; l < rows.length; l++)
                            {
                              String sscc = jTable1.getValueAt(rows[l], JDBMHNPalletTableModelProperties.SSCC_Col).toString();
                              temp.getPalletProperties(sscc);
                              temp.updateMHNDecision(decisionList.get(xx).getDecision());
                              if (decisionList.get(xx).getStatus().equals("")==false)
                              {
                                temp.updateStatus(decisionList.get(xx).getStatus());

                                jStatusText.setText("SSCC "+sscc+" updated to  "+decisionList.get(xx).getStatus());
                                Rectangle progressRect = jStatusText.getBounds()
                                progressRect.x = 0
                                progressRect.y = 0
                                jStatusText.paintImmediately( progressRect );
                              }
                            }
                            buildSQL();
                            populateList();

                          }
                        }
                      }
                    });
                    menu.add(menuItem);
                  }
                }

              }

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

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

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

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

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

              }
View Full Code Here

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

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

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

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

            {
              final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_permissions);
              newItemMenuItem.addActionListener(new ActionListener() {
                public void actionPerformed(final ActionEvent e) {
                  permissions();
                }
              });
              newItemMenuItem.setText(lang.get("btn_Permissions"));
              newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_GROUP_PERM"));
              popupMenu.add(newItemMenuItem);
            }

            {
              final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_rename);
              newItemMenuItem.addActionListener(new ActionListener() {
                public void actionPerformed(final ActionEvent e) {
                  rename();
                }
              });
              newItemMenuItem.setText(lang.get("btn_Rename"));
              newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_GROUP_RENAME"));
              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"));
              newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_GROUPS"));
              popupMenu.add(newItemMenuItem);
            }

            {
              final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_refresh);
              newItemMenuItem.addActionListener(new ActionListener() {
                public void actionPerformed(final ActionEvent e) {
                  populateList("");
                }
              });
              newItemMenuItem.setText(lang.get("btn_Refresh"));
              popupMenu.add(newItemMenuItem);
            }
          }
        }
        {
View Full Code Here

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

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

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

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

              {
                final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_rename);
                newItemMenuItem.addActionListener(new ActionListener() {
                  public void actionPerformed(final ActionEvent e) {
                    rename();
                  }
                });
                newItemMenuItem.setText(lang.get("btn_Rename"));
                newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_CUSTOMER_RENAME"));
                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"));
                newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_CUSTOMERS"));
                popupMenu.add(newItemMenuItem);
              }

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

              {
                final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_refresh);
                newItemMenuItem.addActionListener(new ActionListener() {
                  public void actionPerformed(final ActionEvent e) {
                    populateList("");
                  }
                });
                newItemMenuItem.setText(lang.get("btn_Refresh"));
                popupMenu.add(newItemMenuItem);
              }
            }
          }
        }
View Full Code Here

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

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

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

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

            {
              final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_rename);
              newItemMenuItem.addActionListener(new ActionListener() {
                public void actionPerformed(final ActionEvent e) {
                  rename();
                }
              });
              newItemMenuItem.setText(lang.get("btn_Rename"));
              newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MHN_REASON_RENAME"));
              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"));
              newItemMenuItem.setEnabled(true);
              popupMenu.add(newItemMenuItem);
            }

            {
              final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_refresh);
              newItemMenuItem.addActionListener(new ActionListener() {
                public void actionPerformed(final ActionEvent e) {
                  populateList("");
                }
              });
              newItemMenuItem.setText(lang.get("btn_Refresh"));
              popupMenu.add(newItemMenuItem);
            }
          }
        }
      }
View Full Code Here

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

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

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

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

              {
                final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_refresh);
                newItemMenuItem.addActionListener(new ActionListener() {
                  public void actionPerformed(final ActionEvent e) {
                    populateList("","");
                  }
                });
                newItemMenuItem.setText(lang.get("btn_Refresh"));
                popupMenu.add(newItemMenuItem);
              }
            }
          }
        }
View Full Code Here

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

              JMenuItem4j menuItem = new JMenuItem4j(lang.get("lbl_Assign_to_MHN"));
              menuItem.addActionListener(new ActionListener()
              {
                public void actionPerformed(ActionEvent e)
                {
                  assign();
                }
              });
              popupMenu.add(menuItem);

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

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

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

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

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

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

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

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

                {
                  filterByMenu.addSeparator();
                }

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

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

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

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

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

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

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

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

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

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

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

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

                {
                  final JMenu4j orderMenu = new JMenu4j();
View Full Code Here

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

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

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

              {
                final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_delete);
                newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MHN_DELETE"));
                newItemMenuItem.addActionListener(new ActionListener()
                {
                  public void actionPerformed(final ActionEvent e)
                  {
                    deleteRecord();
                  }
                });
                newItemMenuItem.setText(lang.get("btn_Delete"));
                popupMenu.add(newItemMenuItem);
              }
              {
                menu = new JMenu4j(lang.get("btn_Decision_Assign"));
                popupMenu.add(menu);
                {
                  for (int x = 0; x < decisionList.size(); x++)
                  {
                    final int xx = x;
                    menuItem = new JMenuItem4j(decisionList.get(x).getDecision());
                    menuItem.addActionListener(new ActionListener()
                    {
                      public void actionPerformed(ActionEvent e)
                      {

                        int rowCount = jTable1.getSelectedRowCount();

                        if (rowCount >= 0)
                        {
                          int[] rows = jTable1.getSelectedRows();

                          JDBPallet temp = new JDBPallet(Common.selectedHostID, Common.sessionID);

                          int n = JOptionPane.showConfirmDialog(Common.mainForm, "Update Decision  of " + String.valueOf(rowCount) + " SSCC(s) from Master Hold Notice "
                              + jTextFieldMHN.getText() + " to " + decisionList.get(xx).getDescription() + " ?", "Confirm", JOptionPane.YES_NO_OPTION, 0, Common.icon_confirm);
                          if (n == 0)
                          {
                            save();
                            for (int l = 0; l < rows.length; l++)
                            {
                              String sscc = jTable1.getValueAt(rows[l], JDBMHNPalletTableModelProperties.SSCC_Col).toString();
                              temp.getPalletProperties(sscc);
                              temp.updateMHNDecision(decisionList.get(xx).getDecision());
                              if (decisionList.get(xx).getStatus().equals("")==false)
                              {
                                temp.updateStatus(decisionList.get(xx).getStatus());

                                jStatusText.setText("SSCC "+sscc+" updated to  "+decisionList.get(xx).getStatus());
                                Rectangle progressRect = jStatusText.getBounds()
                                progressRect.x = 0
                                progressRect.y = 0
                                jStatusText.paintImmediately( progressRect );
                              }
                            }
                            buildSQL();
                            populateList();

                          }
                        }
                      }
                    });
                    menu.add(menuItem);
                  }
                }

              }

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

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

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

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

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

              }
View Full Code Here

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

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

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

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

            {
              final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_rename);
              newItemMenuItem.addActionListener(new ActionListener() {
                public void actionPerformed(final ActionEvent e) {
                  rename();
                }
              });
              newItemMenuItem.setText(lang.get("btn_Rename"));
              newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MHN_REASON_RENAME"));
              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"));
              newItemMenuItem.setEnabled(true);
              popupMenu.add(newItemMenuItem);
            }

            {
              final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_refresh);
              newItemMenuItem.addActionListener(new ActionListener() {
                public void actionPerformed(final ActionEvent e) {
                  populateList("");
                }
              });
              newItemMenuItem.setText(lang.get("btn_Refresh"));
              popupMenu.add(newItemMenuItem);
            }
          }
        }
      }
View Full Code Here

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

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

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

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

              {
                final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_rename);
                newItemMenuItem.addActionListener(new ActionListener() {
                  public void actionPerformed(final ActionEvent e) {
                    rename();
                  }
                });
                newItemMenuItem.setText(lang.get("btn_Rename"));
                newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_UOM_RENAME"));
                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"));
                newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_UNITS"));
                popupMenu.add(newItemMenuItem);
              }

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

              {
                final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_refresh);
                newItemMenuItem.addActionListener(new ActionListener() {
                  public void actionPerformed(final ActionEvent e) {
                    populateList("");
                  }
                });
                newItemMenuItem.setText(lang.get("btn_Refresh"));
                popupMenu.add(newItemMenuItem);
              }
            }
          }
        }
View Full Code Here

TOP

Related Classes of com.commander4j.gui.JMenuItem4j

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.