/** * Returns whether the alt key is currently down. * * @return true if alt key is down */ public boolean isAltDown() { if (!isFocusEvent()) { return inputEvent.isAltDown(); } throw new IllegalStateException("Can't get altdown from focus event"); }
public static void setInputEvent(InputEvent e) { altDown = e.isAltDown(); shiftDown = e.isShiftDown(); }
public static void setInputEvent(InputEvent e) { altDown = e.isAltDown(); shiftDown = e.isShiftDown(); }
public void mouseDragged(MouseEvent e) { if(e.isControlDown() || e.isAltDown()) return; if(!inDrag) { inDrag = true; storeUndoData(SpreadControl.this); } int x = e.getX(); if(x < x1) x = x1; if(x > x2) x = x2; int xd = (x - x1); update(xd * max / (x2 - x1), false); } }
private static DropAction getUserDropAction(InputEvent event) { DropAction userDropAction; if ((event.isControlDown() && event.isShiftDown()) || (event.isAltDown() && event.isMetaDown())) { userDropAction = DropAction.LINK; } else if (event.isControlDown() || (event.isAltDown())) { userDropAction = DropAction.COPY; } else if (event.isShiftDown()){ userDropAction = DropAction.MOVE; } else { userDropAction = null; } return userDropAction; }
private static DropAction getUserDropAction(InputEvent event) { DropAction userDropAction; if ((event.isControlDown() && event.isShiftDown()) || (event.isAltDown() && event.isMetaDown())) { userDropAction = DropAction.LINK; } else if (event.isControlDown() || (event.isAltDown())) { userDropAction = DropAction.COPY; } else if (event.isShiftDown()){ userDropAction = DropAction.MOVE; } else { userDropAction = null; } return userDropAction; }
/** * Returns a string containing symbolic modifier names set in the * specified event. * * @param evt The event * * @since jEdit 4.2pre3 */ public static String getModifierString(InputEvent evt) { StringBuilder buf = new StringBuilder(); if(evt.isControlDown()) buf.append(getSymbolicModifierName(InputEvent.CTRL_MASK)); if(evt.isAltDown()) buf.append(getSymbolicModifierName(InputEvent.ALT_MASK)); if(evt.isMetaDown()) buf.append(getSymbolicModifierName(InputEvent.META_MASK)); if(evt.isShiftDown()) buf.append(getSymbolicModifierName(InputEvent.SHIFT_MASK)); return buf.length() == 0 ? null : buf.toString(); } //}}}
/** * Returns a string containing symbolic modifier names set in the specified * event. * * @param evt * The event * @since jEdit 4.2pre3 */ public static String getModifierString(final InputEvent evt) { final StringBuilder buf = new StringBuilder(); if (evt.isControlDown()) { buf.append(KeyEventTranslator.getSymbolicModifierName(InputEvent.CTRL_MASK)); } if (evt.isAltDown()) { buf.append(KeyEventTranslator.getSymbolicModifierName(InputEvent.ALT_MASK)); } if (evt.isMetaDown()) { buf.append(KeyEventTranslator.getSymbolicModifierName(InputEvent.META_MASK)); } if (evt.isShiftDown()) { buf.append(KeyEventTranslator.getSymbolicModifierName(InputEvent.SHIFT_MASK)); } return (buf.length() == 0 ? null : buf.toString()); }
public void majControleDesc(final InputEvent _e){ if (_e.isShiftDown()) { if (xor_ && _e.isControlDown()) { controleDesc_ = " (xor)"; modificateur_ = EbliSelectionState.ACTION_XOR; } else { controleDesc_ = " (+)"; modificateur_ = EbliSelectionState.ACTION_ADD; } } else if (_e.isControlDown()) { if (special_ && (_e.isAltDown())) { controleDesc_ = " (special)"; modificateur_ = EbliSelectionState.ACTION_SPECIAL; } else { controleDesc_ = " (-)"; modificateur_ = EbliSelectionState.ACTION_DEL; } } else { controleDesc_ = null; modificateur_ = EbliSelectionState.ACTION_REPLACE; } }
} else if (e.isAltDown()) {
if (e.isShiftDown()) { sb.append("[SHIFT]"); } else if (e.isAltDown()) { sb.append("[ALT]"); } else if (e.isControlDown()) {
@Override public void mouseClicked(MouseEvent evt) { if (!evt.isAltDown()) return; int row = table.rowAtPoint(evt.getPoint());
else if(e.isAltDown()) { if(selected) { selection.remove(SpreadControl.this);
static boolean modifiersMatch(@Nonnull InputEvent e, int modifiers) { if (e.isAltDown() != isAltDown(modifiers)) { return false; } if (e.isAltGraphDown() != isAltGraphDown(modifiers)) { return false; } if (e.isControlDown() != isControlDown(modifiers)) { return false; } if (e.isMetaDown() != isMetaDown(modifiers)) { return false; } if (e.isShiftDown() != isShiftDown(modifiers)) { return false; } return true; }
if (e.isAltDown()) { if (radius >= 6) { this.radius -= 5 * numClicks;
if (ie.isAltDown()) { for (final Polygon pol : pols) { for (int i=0; i<pol.npoints; i++) {
else if(e.isAltDown()) { if(selected) { cp.selection.remove(SBControl.this);
else if(e.isAltDown()) { if(selected) { selection.remove(HSBControl.this);