Java Code Examples for java.awt.event.MouseEvent#isAltGraphDown()
The following examples show how to use
java.awt.event.MouseEvent#isAltGraphDown() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: marathonv5 File: RComponent.java License: Apache License 2.0 | 5 votes |
protected void mousePressed(MouseEvent me) { if (me.getButton() == MouseEvent.BUTTON1 && me.getClickCount() == 1 && !me.isAltDown() && !me.isMetaDown() && !me.isAltGraphDown() && !me.isControlDown()) { mouseButton1Pressed(me); } else { recorder.recordClick2(this, me, true); } }
Example 2
Source Project: netbeans File: ProfilerTableContainer.java License: Apache License 2.0 | 4 votes |
private static boolean onlyShift(MouseEvent e) { return e.isShiftDown() && !(e.isAltDown() || e.isAltGraphDown() || e.isControlDown() || e.isMetaDown()); }
Example 3
Source Project: netbeans File: JTreeTablePanel.java License: Apache License 2.0 | 4 votes |
private static boolean onlyShift(MouseEvent e) { return e.isShiftDown() && !(e.isAltDown() || e.isAltGraphDown() || e.isControlDown() || e.isMetaDown()); }
Example 4
Source Project: visualvm File: ProfilerTableContainer.java License: GNU General Public License v2.0 | 4 votes |
private static boolean onlyShift(MouseEvent e) { return e.isShiftDown() && !(e.isAltDown() || e.isAltGraphDown() || e.isControlDown() || e.isMetaDown()); }
Example 5
Source Project: visualvm File: JTreeTablePanel.java License: GNU General Public License v2.0 | 4 votes |
private static boolean onlyShift(MouseEvent e) { return e.isShiftDown() && !(e.isAltDown() || e.isAltGraphDown() || e.isControlDown() || e.isMetaDown()); }
Example 6
Source Project: WorldPainter File: MouseOrTabletOperation.java License: GNU General Public License v3.0 | 4 votes |
@Override public void mousePressed(MouseEvent me) { if ((me.getButton() != BUTTON1) && (me.getButton() != BUTTON3)) { // Only interested in left and right mouse buttons // TODO: the right mouse button is not button three on two-button // mice, is it? return; } x = me.getX(); y = me.getY(); altDown = me.isAltDown() || me.isAltGraphDown(); undo = (me.getButton() == BUTTON3) || altDown; ctrlDown = me.isControlDown() || me.isMetaDown(); shiftDown = me.isShiftDown(); first = true; if (! oneShot) { interrupt(); // Make sure any operation in progress (due to timing issues perhaps) is interrupted timer = new Timer(delay, e -> { Point worldCoords = view.viewToWorld((int) x, (int) y); tick(worldCoords.x, worldCoords.y, undo, first, 1.0f); view.updateStatusBar(worldCoords.x, worldCoords.y); first = false; }); timer.setInitialDelay(0); timer.start(); operationStartedWithButton = me.getButton(); App.getInstance().pauseAutosave(); // start = System.currentTimeMillis(); } else { Point worldCoords = view.viewToWorld((int) x, (int) y); App.getInstance().pauseAutosave(); try { tick(worldCoords.x, worldCoords.y, undo, true, 1.0f); view.updateStatusBar(worldCoords.x, worldCoords.y); Dimension dimension = getDimension(); if (dimension != null) { dimension.armSavePoint(); } logOperation(undo ? statisticsKeyUndo : statisticsKey); } finally { App.getInstance().resumeAutosave(); } } me.consume(); }
Example 7
Source Project: WorldPainter File: MouseOrTabletOperation.java License: GNU General Public License v3.0 | 4 votes |
@Override public void mouseMoved(MouseEvent me) { altDown = me.isAltDown() || me.isAltGraphDown(); ctrlDown = me.isControlDown() || me.isMetaDown(); shiftDown = me.isShiftDown(); }