public void mousePressed(MouseEvent e) {
   if (e.isConsumed()) {
     selectedOnPress = false;
     return;
   }
   selectedOnPress = true;
   adjustFocusAndSelection(e);
 }
    public void mousePressed(MouseEvent e) {
      if (e == null || e.isConsumed()) {
        return;
      }

      if (!this.isEnabled()) {
        return;
      }

      if (e.getButton() == MouseEvent.BUTTON1) {
        this.handleSelect();
      }
    }
Beispiel #3
0
    // {{{ mousePressed() method
    @Override
    public void mousePressed(MouseEvent evt) {
      if (evt.isConsumed()) return;

      TreePath path1 = resultTree.getPathForLocation(evt.getX(), evt.getY());
      if (path1 == null) return;

      resultTree.setSelectionPath(path1);
      if (GUIUtilities.isPopupTrigger(evt)) showPopupMenu(evt);
      else {
        goToSelectedNode(M_OPEN);
      }
    } // }}}
 private boolean shouldIgnore(MouseEvent e) {
   return e.isConsumed() || (!(SwingUtilities.isLeftMouseButton(e) && grid.isEnabled()));
 }