@Override public MouseEvent mouseClicked(MouseEvent e) { // Check if left click + alt if (e.getButton() == MouseEvent.BUTTON1 && e.isAltDown()) { final MenuEntry[] menuEntries = client.getMenuEntries(); for (final MenuEntry menuEntry : menuEntries) { if (menuEntry.getOption().equals(SEARCH_GRAND_EXCHANGE)) { search(Text.removeTags(menuEntry.getTarget())); e.consume(); break; } } } return super.mouseClicked(e); }
@Override public void mousePressed(MouseEvent e) { if ((e.getClickCount() & 1) == 0 && (e.getClickCount() > 0) && !e.isConsumed()) { // double clicks and repeated double clicks e.consume(); if (e.isAltDown()) { jButtonAddToSideboardActionPerformed(null); } else { jButtonAddToMainActionPerformed(null); } } } });
@Override public void mousePressed(MouseEvent e) { if ((e.getClickCount() & 1) == 0 && (e.getClickCount() > 0) && !e.isConsumed()) { // double clicks and repeated double clicks e.consume(); if (e.isAltDown()) { handleAltDoubleClick(); } else { handleDoubleClick(); } } } });
@Override public void mouseClicked(MouseEvent e) { if ((e.getClickCount() & 1) == 0 && (e.getClickCount() > 0) && !e.isConsumed()) { // double clicks and repeated double clicks e.consume(); Object obj = e.getSource(); if (obj instanceof Card) { if (e.isAltDown()) { cardEventSource.fireEvent(((Card) obj).getOriginal(), ClientEventType.ALT_DOUBLE_CLICK); } else { cardEventSource.fireEvent(((Card) obj).getOriginal(), ClientEventType.DOUBLE_CLICK); } } else if (obj instanceof MageCard) { if (e.isAltDown()) { cardEventSource.fireEvent(((MageCard) obj).getOriginal(), ClientEventType.ALT_DOUBLE_CLICK); } else { cardEventSource.fireEvent(((MageCard) obj).getOriginal(), ClientEventType.DOUBLE_CLICK); } } } }
@Override public void mouseClicked(MouseEvent e) { if (SwingUtilities.isRightMouseButton(e)) { // Select if not selected if (!card.isSelected()) { selectCard(card); } // Show menu showCardRightClickMenu(card, e); } else if (SwingUtilities.isLeftMouseButton(e)) { if (e.getClickCount() == 1) { cardClicked(card, e); } else if (e.isAltDown()) { eventSource.fireEvent(card, ClientEventType.ALT_DOUBLE_CLICK); } else { eventSource.fireEvent(card, ClientEventType.DOUBLE_CLICK); } } } });
@Override public void mousePressed(MouseEvent e) { if (e.getClickCount() >= 1 && !e.isConsumed()) { Object obj = e.getSource(); if ((e.getClickCount() & 1) == 0 && (e.getClickCount() > 0)) { // double clicks and repeated double clicks e.consume(); if (obj instanceof Card) { if (e.isAltDown()) { cardEventSource.fireEvent(((Card) obj).getOriginal(), ClientEventType.ALT_DOUBLE_CLICK); } else { cardEventSource.fireEvent(((Card) obj).getOriginal(), ClientEventType.DOUBLE_CLICK); } } else if (obj instanceof MageCard) { if (e.isAltDown()) { cardEventSource.fireEvent(((MageCard) obj).getOriginal(), ClientEventType.ALT_DOUBLE_CLICK); } else { cardEventSource.fireEvent(((MageCard) obj).getOriginal(),ClientEventType.DOUBLE_CLICK); } } } if (obj instanceof MageCard) { checkMenu(e, ((MageCard) obj).getOriginal()); } else { checkMenu(e, null); } } }
@Override public void mousePressed(MouseEvent e) { if (e.getClickCount() >= 1 && !e.isConsumed()) { Object obj = e.getSource(); if ((e.getClickCount() & 1) == 0 && (e.getClickCount() > 0)) { // double clicks and repeated double clicks e.consume(); if (obj instanceof Card) { if (e.isAltDown()) { cardEventSource.fireEvent(((Card) obj).getOriginal(), ClientEventType.ALT_DOUBLE_CLICK); } else { cardEventSource.fireEvent(((Card) obj).getOriginal(), ClientEventType.DOUBLE_CLICK); } } else if (obj instanceof MageCard) { if (e.isAltDown()) { cardEventSource.fireEvent(((MageCard) obj).getOriginal(), ClientEventType.ALT_DOUBLE_CLICK); } else { cardEventSource.fireEvent(((MageCard) obj).getOriginal(), ClientEventType.DOUBLE_CLICK); } } } if (obj instanceof MageCard) { checkMenu(e, ((MageCard) obj).getOriginal()); } else { checkMenu(e, null); } } }
/** * @see MouseEvent */ public boolean isAltDown() { return event.isAltDown(); }
/** * Note: This is not used during drag and drop operations due to limitations * of the underlying API. To enable this for move operations set dragEnabled * to false. * * @param event * @return Returns true if the given event is constrained. */ public boolean isForceMarqueeEvent(MouseEvent event) { return (event != null) ? event.isAltDown() : false; }
/** * Note: This is not used during drag and drop operations due to limitations * of the underlying API. To enable this for move operations set dragEnabled * to false. * * @param event * @return Returns true if the given event is constrained. */ public boolean isForceMarqueeEvent(MouseEvent event) { return (event != null) ? event.isAltDown() : false; }
public void mousePressed(MouseEvent e) { if (e.isPopupTrigger()) { showPopupMenu(e); } if (e.isAltDown()) { expandDescendantsOfRowAt(e.getX(), e.getY()); } } });
public void mousePressed(MouseEvent e) { if (e.isPopupTrigger()) { showPopupMenu(e); } if (e.isAltDown()) { expandDescendantsOfRowAt(e.getX(), e.getY()); } } });
@Override public void mousePressed(MouseEvent e) { if (e.isAltDown()) { pressClick = new Point2dImpl(e.getX(), e.getY()); } }
@Override public void mouseClicked(MouseEvent e) { super.mouseClicked(e); if (((e.getModifiers() & InputEvent.BUTTON1_MASK) != InputEvent.BUTTON1_MASK) || e.isAltDown()) { popupCopyRangeMenu(e.getX(), e.getY()); } } });
private boolean keyPressed(MouseEvent e) { if (e.isShiftDown() || e.isControlDown() || e.isAltDown()) return true; return false; }
/** * Checks whether no modified key is pressed. * * @param e the event * @return true if no modifier key pressed */ public static boolean hasNoModifierKey(MouseEvent e) { return (!e.isAltDown() && !e.isShiftDown() && !e.isControlDown()); } }
/** * Checks whether no modified key is pressed. * * @param e the event * @return true if no modifier key pressed */ public static boolean hasNoModifierKey(MouseEvent e) { return (!e.isAltDown() && !e.isShiftDown() && !e.isControlDown()); }
public void mouseDragged(ImagePlus imp, MouseEvent e) { if (imp == null || ic == null) return; roi = imp.getRoi(); if (roi == null) return; isImageRoi = roi instanceof ImageRoi; if (isImageRoi) ((ImageRoi)roi).setZeroTransparent(true); if ( e.isAltDown() || e.isShiftDown() ) moveRoi(e.getX(), e.getY()); else rotateRoi(e.getX(), e.getY()); }
@Override public void mouseClicked(MouseEvent e) { TableColumnModel columnModel = fTable.getColumnModel(); int viewColumn = columnModel.getColumnIndexAtX(e.getX()); int column = fTable.convertColumnIndexToModel(viewColumn); if (MouseUtils.isLeftClick(e) && !e.isAltDown() && !e.isControlDown() && (column != -1)) fModel.sort(column, !e.isShiftDown()); } };
@Override public void mouseReleased(final MouseEvent me, final Layer la, final int x_p, final int y_p, final int x_d, final int y_d, final int x_r, final int y_r) { if (null == getActive()) return; if (me.isShiftDown() && me.isAltDown() && !Utils.isControlDown(me)) { updateViewData(getActive()); return; } super.mouseReleased(me, la, x_p, y_p, x_d, y_d, x_r, y_r); }