use of com.moneychanger.ui.custom.PaymentInboxRightClickListener in project otapij by FellowTraveler.
the class MainPage method jTable8MouseClicked.
//GEN-LAST:event_jTable8MouseEntered
private void jTable8MouseClicked(java.awt.event.MouseEvent evt) {
//GEN-FIRST:event_jTable8MouseClicked
System.out.println("Count:" + evt.getClickCount());
if (evt.getButton() == java.awt.event.MouseEvent.BUTTON3) {
System.out.println("Right Click");
int r = jTable8.rowAtPoint(evt.getPoint());
if (r >= 0 && r < jTable8.getRowCount()) {
jTable8.setRowSelectionInterval(r, r);
} else {
jTable8.clearSelection();
}
if (jTable8.getSelectedRow() > -1) {
JPopupMenu popupMenu = new JPopupMenu();
PaymentInboxRightClickListener menuListener = new PaymentInboxRightClickListener();
JMenuItem menuItem = new JMenuItem("Test");
popupMenu.add(menuItem);
menuItem.addActionListener(menuListener);
menuItem = new JMenuItem("Test1");
popupMenu.add(menuItem);
menuItem.addActionListener(menuListener);
popupMenu.show(evt.getComponent(), evt.getX(), evt.getY());
}
}
if (evt.getClickCount() == 2) {
String key = (String) jTable8.getModel().getValueAt(jTable8.getSelectedRow(), 3);
String subject = (String) jTable8.getModel().getValueAt(jTable8.getSelectedRow(), 0);
System.out.println("In NYMBOX double clcik, key:" + key);
String[] row = (String[]) nymBox.get(key);
if (row != null) {
NymBoxDetailsDialog nymDialog = new NymBoxDetailsDialog(this, true, row[7] == "true" ? "Verified" : "Not Verified", row[6], subject);
nymDialog.setVisible(true);
}
}
}
use of com.moneychanger.ui.custom.PaymentInboxRightClickListener in project otapij by FellowTraveler.
the class MainPage method jTable20MouseClicked.
//GEN-LAST:event_jTable6MouseClicked
private void jTable20MouseClicked(java.awt.event.MouseEvent evt) {
if (evt.getButton() == java.awt.event.MouseEvent.BUTTON3) {
System.out.println("Right Click");
int r = jTable20.rowAtPoint(evt.getPoint());
if (r >= 0 && r < jTable20.getRowCount()) {
jTable20.setRowSelectionInterval(r, r);
} else {
jTable20.clearSelection();
}
if (jTable20.getSelectedRow() > -1) {
JPopupMenu popupMenu = new JPopupMenu();
PaymentInboxRightClickListener menuListener = new PaymentInboxRightClickListener();
JMenuItem menuItem = new JMenuItem("Deposit");
popupMenu.add(menuItem);
menuItem.addActionListener(menuListener);
menuItem = new JMenuItem("Reject");
popupMenu.add(menuItem);
menuItem.addActionListener(menuListener);
popupMenu.show(evt.getComponent(), evt.getX(), evt.getY());
}
}
}
Aggregations