MCPcopy Index your code
hub / github.com/processing/processing / run

Method run

app/src/processing/app/ui/SketchbookFrame.java:152–168  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150 // Either one is wrong or we're papering over something [fry 150811]
151 EventQueue.invokeLater(new Runnable() {
152 @Override
153 public void run() {
154 // Space for the editor plus a li'l gap
155 int roughWidth = getWidth() + 20;
156 Point p = null;
157 // If no window open, or the editor is at the edge of the screen
158 Editor editor = base.getActiveEditor();
159 if (editor == null ||
160 (p = editor.getLocation()).x < roughWidth) {
161 // Center the window on the screen
162 setLocationRelativeTo(null);
163 } else {
164 // Open the window relative to the editor
165 setLocation(p.x - roughWidth, p.y);
166 }
167 setVisible(true);
168 }
169 });
170 }
171}

Callers

nothing calls this directly

Calls 4

setVisibleMethod · 0.95
getActiveEditorMethod · 0.80
setLocationMethod · 0.65
getWidthMethod · 0.45

Tested by

no test coverage detected