Search in sources :

Example 1 with RightClickMenu

use of org.jabref.gui.menus.RightClickMenu in project jabref by JabRef.

the class MainTableSelectionListener method processPopupTrigger.

/**
     * Process general right-click events on the table. Show the table context menu at
     * the position where the user right-clicked.
     * @param e The mouse event defining the popup trigger.
     * @param row The row where the event occurred.
     */
private void processPopupTrigger(MouseEvent e, int row) {
    int selRow = table.getSelectedRow();
    if ((selRow == -1) || !table.isRowSelected(table.rowAtPoint(e.getPoint()))) {
        table.setRowSelectionInterval(row, row);
    }
    RightClickMenu rightClickMenu = new RightClickMenu(JabRefGUI.getMainFrame(), panel);
    rightClickMenu.show(table, e.getX(), e.getY());
}
Also used : RightClickMenu(org.jabref.gui.menus.RightClickMenu)

Aggregations

RightClickMenu (org.jabref.gui.menus.RightClickMenu)1