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