MCPcopy Index your code
hub / github.com/benfry/processing4 / mousePressed

Method mousePressed

app/src/processing/app/ui/EditorButton.java:170–191  ·  view source on GitHub ↗
(MouseEvent e)

Source from the content-addressed store, hash-verified

168
169
170 @Override
171 public void mousePressed(MouseEvent e) {
172 // Using mousePressed() (or mouseReleased()) because mouseClicked()
173 // won't be fired if the user nudges the mouse while clicking.
174 // https://github.com/processing/processing/issues/3529
175 setPressed(true);
176
177 shift = e.isShiftDown();
178
179 // It looks like ActionEvent expects old-style modifiers,
180 // so the e.getModifiers() call is actually correct.
181 // There's an open JDK bug for this, but it remains unresolved:
182 // https://bugs.openjdk.java.net/browse/JDK-8186024
183
184 // Mostly this is only used for shift, but some modes also make use of
185 // alt as a way to control debug stepping and whatnot. [fry 210813]
186 // https://github.com/processing/processing4/issues/67
187
188 //noinspection deprecation
189 actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED,
190 null, e.getModifiers()));
191 }
192
193
194 @Override

Callers

nothing calls this directly

Calls 4

setPressedMethod · 0.95
actionPerformedMethod · 0.95
getModifiersMethod · 0.80
isShiftDownMethod · 0.45

Tested by

no test coverage detected