MCPcopy
hub / github.com/arduino/Arduino / mousePressed

Method mousePressed

app/src/processing/app/EditorHeader.java:175–191  ·  view source on GitHub ↗
(MouseEvent e)

Source from the content-addressed store, hash-verified

173
174 addMouseListener(new MouseAdapter() {
175 public void mousePressed(MouseEvent e) {
176 int x = e.getX();
177 int y = e.getY();
178
179 if ((x > menuLeft) && (x < menuRight)) {
180 popup.show(EditorHeader.this, x, y);
181
182 } else {
183 int numTabs = editor.getTabs().size();
184 for (int i = 0; i < numTabs; i++) {
185 if ((x > tabLeft[i]) && (x < tabRight[i])) {
186 editor.selectTab(i);
187 repaint();
188 }
189 }
190 }
191 }
192 });
193 }
194

Callers

nothing calls this directly

Calls 4

showMethod · 0.80
sizeMethod · 0.80
getTabsMethod · 0.80
selectTabMethod · 0.80

Tested by

no test coverage detected