private final void actionPerformed0(ActionEvent e) throws Exception { // Select Instance if (e.getSource() == bSelectExistingASI) { cmd_select(); return; } // New/Edit else if (e.getSource() == cbNewEdit) { cmd_newEdit(); } // Select Lot from existing else if (e.getSource() == fieldLot) { final KeyNamePair pp = fieldLot.getSelectedItem(); if (pp != null && pp.getKey() != -1) { fieldLotString.setText(pp.getName()); fieldLotString.setEditable(false); asiTemplate.setM_Lot_ID(pp.getKey()); } else { fieldLotString.setEditable(true); asiTemplate.setM_Lot_ID(0); } } // Create New Lot else if (e.getSource() == bLot) { KeyNamePair pp = asiTemplate.createLot(m_M_Product_ID); if (pp != null) { fieldLot.addItem(pp); fieldLot.setSelectedItem(pp); } } // Create New SerNo else if (e.getSource() == bSerNo) { fieldSerNo.setText(asiTemplate.getSerNo(true)); } // OK else if (e.getActionCommand().equals(ConfirmPanel.A_OK)) { final MAttributeSetInstance asi = saveSelection(); final int M_Locator_ID = -1; // N/A setResultAndDispose(asi, M_Locator_ID); return; } // Cancel else if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL)) { final int M_Locator_ID = -1; // N/A setResultAndDispose(null, M_Locator_ID); } // Zoom M_Lot else if (e.getSource() == mZoom) { cmd_zoom(); } else { log.log(Level.SEVERE, "Unknown event: {0}", e); } } // actionPerformed