{
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);