Package com.commander4j.gui

Examples of com.commander4j.gui.JMenuItem4j


        final JPopupMenu popupMenu = new JPopupMenu();
        popupMenu.setFont(Common.font_std);
        addPopup(jTable1, popupMenu);

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

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

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

        {
          final JMenuItem4j menuItemPrint = new JMenuItem4j(Common.icon_print);
          menuItemPrint.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_PALLETS"));
          menuItemPrint.addActionListener(new ActionListener()
          {
            public void actionPerformed(final ActionEvent e)
            {
              printRecords("selected");
            }
          });
          menuItemPrint.setText(lang.get("btn_Print"));
          popupMenu.add(menuItemPrint);
        }

        {
          final JMenuItem4j menuItemLabel = new JMenuItem4j(Common.icon_report);
          menuItemLabel.addActionListener(new ActionListener()
          {
            public void actionPerformed(final ActionEvent e)
            {
              printLabels();
            }
          });
          menuItemLabel.setText(lang.get("btn_Label"));
          popupMenu.add(menuItemLabel);
        }

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

        {
          final JMenuItem4j menuItemConfirm = new JMenuItem4j(Common.icon_ok);
          menuItemConfirm.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_PAL_PROD_CONFIRM"));
          menuItemConfirm.addActionListener(new ActionListener()
          {
            public void actionPerformed(final ActionEvent e)
            {
              confirmRecord();
            }
          });

          menuItemConfirm.setText(lang.get("btn_Confirm"));
          popupMenu.add(menuItemConfirm);
        }
        {
          menuItemSummary = new JMenuItem4j(Common.icon_report);
          menuItemSummary.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent e)
            {
              print_summary();
            }
          });
          menuItemSummary.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_PAL_SUMMARY"));
          menuItemSummary.setText(lang.get("btn_Print_Summary"));
          popupMenu.add(menuItemSummary);
        }
        {
          final JMenuItem4j menuItemSplit = new JMenuItem4j(Common.icon_split);
          menuItemSplit.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_PAL_SPLIT"));
          menuItemSplit.addActionListener(new ActionListener()
          {
            public void actionPerformed(final ActionEvent e)
            {
              splitRecord();
            }
          });
          menuItemSplit.setText(lang.get("mod_FRM_PAL_SPLIT"));
          popupMenu.add(menuItemSplit);
        }
        {
          mnReferenceData = new JMenu4j(lang.get("lbl_Referenced_Data"));
          popupMenu.add(mnReferenceData);
          {
            mntmEditBatch = new JMenuItem4j(lang.get("btn_Edit_Batch"));
            mntmEditBatch.addActionListener(new ActionListener()
            {
              public void actionPerformed(ActionEvent arg0)
              {
                int row = jTable1.getSelectedRow();
                if (row >= 0)
                {
                  String lmaterial = jTable1.getValueAt(row, 1).toString();
                  String lbatch = jTable1.getValueAt(row, 2).toString();
                  JLaunchMenu.runForm("FRM_ADMIN_MATERIAL_BATCH_EDIT", lmaterial, lbatch);
                }
              }
            });
            mnReferenceData.add(mntmEditBatch);
            mntmEditBatch.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MATERIAL_BATCH_EDIT"));
            mntmEditBatch.setIcon(Common.icon_batch);
          }
          {
            mntmEditLocation = new JMenuItem4j(lang.get("btn_Edit_Location"));
            mntmEditLocation.addActionListener(new ActionListener()
            {
              public void actionPerformed(ActionEvent arg0)
              {
                int row = jTable1.getSelectedRow();
                if (row >= 0)
                {
                  String llocation = jTable1.getValueAt(row, 8).toString();
                  JLaunchMenu.runForm("FRM_ADMIN_LOCATION_EDIT", llocation);
                }
              }
            });
            mnReferenceData.add(mntmEditLocation);
            mntmEditLocation.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_LOCATION_EDIT"));
            mntmEditLocation.setIcon(Common.icon_location);
          }
          {
            mntmEditMaterial = new JMenuItem4j(lang.get("btn_Edit_Material"));
            mntmEditMaterial.addActionListener(new ActionListener()
            {
              public void actionPerformed(ActionEvent arg0)
              {
                int row = jTable1.getSelectedRow();
                if (row >= 0)
                {
                  String lmaterial = jTable1.getValueAt(row, 1).toString();
                  JLaunchMenu.runForm("FRM_ADMIN_MATERIAL_EDIT", lmaterial);
                }
              }
            });
            mnReferenceData.add(mntmEditMaterial);
            mntmEditMaterial.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MATERIAL_EDIT"));
            mntmEditMaterial.setIcon(Common.icon_material);
          }
          {
            mntmEditProcessOrder = new JMenuItem4j(lang.get("btn_Edit_Process_Order"));
            mntmEditProcessOrder.addActionListener(new ActionListener()
            {
              public void actionPerformed(ActionEvent arg0)
              {
                int row = jTable1.getSelectedRow();
                if (row >= 0)
                {
                  String lprocessorder = jTable1.getValueAt(row, 3).toString();
                  JLaunchMenu.runForm("FRM_ADMIN_PROCESS_ORDER_EDIT", lprocessorder);
                }
              }
            });
            mnReferenceData.add(mntmEditProcessOrder);
            mntmEditProcessOrder.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_PROCESS_ORDER_EDIT"));
            mntmEditProcessOrder.setIcon(Common.icon_process_order);
          }
          {
            mntmEditMHN = new JMenuItem4j(lang.get("btn_Edit_MHN"));
            mntmEditMHN.addActionListener(new ActionListener()
            {
              public void actionPerformed(ActionEvent arg0)
              {
                int row = jTable1.getSelectedRow();
                if (row >= 0)
                {
                  String lmhn = jTable1.getValueAt(row, JDBPalletTableModel.MHN_Number_Col).toString();
                  if (lmhn.equals("") == false)
                  {
                    JLaunchMenu.runForm("FRM_ADMIN_MHN_EDIT", lmhn);
                  }
                }
              }
            });
            mnReferenceData.add(mntmEditMHN);
            mntmEditMHN.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MHN_EDIT"));
            mntmEditMHN.setIcon(Common.icon_mhn);
          }
        }

        {
          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(jListDecisions, 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_DECISION_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_DECISION_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_DECISION_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_DECISION_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

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

            {
              final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_report);
              newItemMenuItem.addActionListener(new ActionListener() {
                public void actionPerformed(final ActionEvent e) {
                  JLaunchReport.runReport("RPT_LANGUAGE",null,"",null,"");
                }
              });
              newItemMenuItem.setText(lang.get("btn_Print"));
              popupMenu.add(newItemMenuItem);
            }

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

            {
              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_LANGUAGE_ADD"));
              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_LANGUAGE_EDIT"));
              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_LANGUAGE_DELETE"));
              popupMenu.add(newItemMenuItem);
            }

            jScrollPane1.setViewportView(jTable1);
            jTable1.setModel(jTable1Model);
View Full Code Here

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

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

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

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

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

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

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

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener()
                  {
                    public void actionPerformed(final ActionEvent e)
                    {
                      sortBy("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);
                }


              }

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

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

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

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

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


                {
                  filterByMenu.addSeparator();
                }

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

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

              {
                final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_report);
                newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("RPT_PALLETS"));
                newItemMenuItem.addActionListener(new ActionListener() {
                  public void actionPerformed(final ActionEvent e) {
                    print();
                  }
                });
                newItemMenuItem.setText(lang.get("btn_Print"));
                popupMenu.add(newItemMenuItem);
              }

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

              {
                mnReferenceData = new JMenu4j(lang.get("lbl_Referenced_Data"));
                popupMenu.add(mnReferenceData);
                {
                  mntmEditBatch = new JMenuItem4j(lang.get("btn_Edit_Batch"));
                  mntmEditBatch.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent arg0) {
                      int row = jTable1.getSelectedRow();
                      if (row >= 0)
                      {
                        String lmaterial = jTable1.getValueAt(row, 5).toString();
                        String lbatch = jTable1.getValueAt(row, 6).toString();
                        JLaunchMenu.runForm("FRM_ADMIN_MATERIAL_BATCH_EDIT", lmaterial, lbatch);
                      }
                    }
                  });
                  mnReferenceData.add(mntmEditBatch);
                  mntmEditBatch.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MATERIAL_BATCH_EDIT"));
                  mntmEditBatch.setIcon(Common.icon_batch);
                }
                {
                  mntmEditLocation = new JMenuItem4j(lang.get("btn_Edit_Location"));
                  mntmEditLocation.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent arg0) {
                      int row = jTable1.getSelectedRow();
                      if (row >= 0)
                      {
                        String llocation = jTable1.getValueAt(row, 12).toString();
                        JLaunchMenu.runForm("FRM_ADMIN_LOCATION_EDIT", llocation);
                      }
                    }
                  });
                  mnReferenceData.add(mntmEditLocation);
                  mntmEditLocation.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_LOCATION_EDIT"));
                  mntmEditLocation.setIcon(Common.icon_location);
                }
                {
                  mntmEditMaterial = new JMenuItem4j(lang.get("btn_Edit_Material"));
                  mntmEditMaterial.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent arg0) {
                      int row = jTable1.getSelectedRow();
                      if (row >= 0)
                      {
                        String lmaterial = jTable1.getValueAt(row, 5).toString();
                        JLaunchMenu.runForm("FRM_ADMIN_MATERIAL_EDIT", lmaterial);
                      }
                    }
                  });
                  mnReferenceData.add(mntmEditMaterial);
                  mntmEditMaterial.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_MATERIAL_EDIT"));
                  mntmEditMaterial.setIcon(Common.icon_material);
                }
                {
                  mntmEditPallet = new JMenuItem4j(lang.get("btn_Edit_Pallet"));
                  mntmEditPallet.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent arg0) {
                      int row = jTable1.getSelectedRow();
                      if (row >= 0)
                      {
                        String lpallet = jTable1.getValueAt(row, 4).toString();
                        JLaunchMenu.runForm("FRM_ADMIN_PALLET_EDIT", lpallet);
                      }
                    }
                  });
                  mnReferenceData.add(mntmEditPallet);
                  mntmEditPallet.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_PALLET_EDIT"));
                  mntmEditPallet.setIcon(Common.icon_pallet);
                }
                {
                  mntmEditProcessOrder = new JMenuItem4j(lang.get("btn_Edit_Process_Order"));
                  mntmEditProcessOrder.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent arg0) {
                      int row = jTable1.getSelectedRow();
                      if (row >= 0)
                      {
                        String lprocessorder = jTable1.getValueAt(row, 7).toString();
                        JLaunchMenu.runForm("FRM_ADMIN_PROCESS_ORDER_EDIT", lprocessorder);
                      }
                    }
                  });
                  mnReferenceData.add(mntmEditProcessOrder);
                  mntmEditProcessOrder.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_PROCESS_ORDER_EDIT"));
                  mntmEditProcessOrder.setIcon(Common.icon_process_order);
                }
              }

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

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      filterBy("Transaction Type");
                    }

                  });
                  newItemMenuItem.setText(lang.get("lbl_Transaction_Type"));
                  filterByMenu.add(newItemMenuItem);
                }

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

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

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

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

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

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

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

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

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

                {
                  filterByMenu.addSeparator();
                }

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

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

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

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

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

                {
                  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("MATERIAL");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Material"));
                  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("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("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_MANUFACTURER");
                    }
                  });
                  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("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);
                }
                {
                  jStatusText = new JLabel4j_std();
                  jStatusText.setBounds(10, 540, 985, 21);
View Full Code Here

            {
              final JPopupMenu popupMenu = new JPopupMenu();
              addPopup(jListUsers, 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_USER_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_USER_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_USER_EDIT"));
                popupMenu.add(newItemMenuItem);
              }

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

              {
                final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_rename);
                newItemMenuItem.addActionListener(new ActionListener() {
                  public void actionPerformed(final ActionEvent e) {
                    rename();
                  }
                });
                newItemMenuItem.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_ADMIN_USER_RENAME"));
                newItemMenuItem.setText(lang.get("btn_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_USERS"));
                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 JMenu4j accountMenu = new JMenu4j();
                accountMenu.setText(lang.get("lbl_User_Account"));
                accountMenu.setIcon(Common.icon_user);
                popupMenu.add(accountMenu);

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      lock();
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_User_Account_Lock"));
                  accountMenu.add(newItemMenuItem);
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      unlock();
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_User_Account_Unlock"));
                  accountMenu.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(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(jTable1, popupMenu);

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

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

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

              {
                final JMenuItem4j newItemMenuItem = new JMenuItem4j(Common.icon_XLS);
                newItemMenuItem.addActionListener(new ActionListener() {
                  public void actionPerformed(final ActionEvent e) {
                    excel();
                  }
                });
                newItemMenuItem.setText(lang.get("btn_Excel"));
                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("MATERIAL");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Material"));
                  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("STATUS");
                    }
                  });
                  newItemMenuItem.setText(lang.get("lbl_Material_Batch_Status"));
                  sortByMenu.add(newItemMenuItem);
                }

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

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

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

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

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

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

                {
                  filterByMenu.addSeparator();
                }

                {
                  final JMenuItem4j newItemMenuItem = new JMenuItem4j();
                  newItemMenuItem.addActionListener(new ActionListener() {
                    public void actionPerformed(final ActionEvent e) {
                      clearFilter();
                    }
                  });
                  newItemMenuItem.setText(lang.get("btn_Clear_Filter"));
                  filterByMenu.add(newItemMenuItem);
                }
              }
            }
          }
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) {
                    add();
                  }
                });
                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.