Search in sources :

Example 1 with NymBoxDetailsDialog

use of com.moneychanger.ui.dialogs.NymBoxDetailsDialog in project otapij by FellowTraveler.

the class MainPage method jTable10MouseClicked.

//GEN-LAST:event_jTable8MouseClicked
private void jTable10MouseClicked(java.awt.event.MouseEvent evt) {
    //GEN-FIRST:event_jTable10MouseClicked
    System.out.println("Count:" + evt.getClickCount());
    if (evt.getClickCount() == 2) {
        String key = (String) jTable10.getModel().getValueAt(jTable10.getSelectedRow(), 3);
        String subject = (String) jTable10.getModel().getValueAt(jTable10.getSelectedRow(), 0);
        System.out.println("In NYM out BOX double clcik, key:" + key);
        String[] row = (String[]) nymOutBox.get(key);
        System.out.println("nymOutBox:" + nymOutBox.entrySet());
        System.out.println("row:" + row);
        if (row != null) {
            NymBoxDetailsDialog nymDialog = new NymBoxDetailsDialog(this, true, row[7] == "true" ? "Verified" : "Not Verified", row[6], subject);
            nymDialog.setVisible(true);
        }
    }
}
Also used : NymBoxDetailsDialog(com.moneychanger.ui.dialogs.NymBoxDetailsDialog)

Example 2 with NymBoxDetailsDialog

use of com.moneychanger.ui.dialogs.NymBoxDetailsDialog 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);
        }
    }
}
Also used : NymBoxDetailsDialog(com.moneychanger.ui.dialogs.NymBoxDetailsDialog) JMenuItem(javax.swing.JMenuItem) PaymentInboxRightClickListener(com.moneychanger.ui.custom.PaymentInboxRightClickListener) Point(java.awt.Point) JPopupMenu(javax.swing.JPopupMenu)

Aggregations

NymBoxDetailsDialog (com.moneychanger.ui.dialogs.NymBoxDetailsDialog)2 PaymentInboxRightClickListener (com.moneychanger.ui.custom.PaymentInboxRightClickListener)1 Point (java.awt.Point)1 JMenuItem (javax.swing.JMenuItem)1 JPopupMenu (javax.swing.JPopupMenu)1