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

Method setVisible

app/src/processing/app/ui/ExamplesFrame.java:187–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

185
186
187 public void setVisible() {
188 // Space for the editor plus a li'l gap
189 int roughWidth = getWidth() + 20;
190 // If no window open, or the editor is at the edge of the screen
191 Editor editor = base.getActiveEditor();
192 if (editor == null) {
193 setLocationRelativeTo(null);
194 } else {
195 Point p = editor.getLocation();
196 if (p.x < roughWidth) {
197 // Center the window on the screen
198 setLocationRelativeTo(null);
199 } else {
200 // Open the window relative to the editor
201 setLocation(p.x - roughWidth, p.y);
202 }
203 }
204 setVisible(true);
205 }
206
207
208 protected void updateExpanded(JTree tree) {

Callers 2

ExamplesFrameMethod · 0.95
keyPressedMethod · 0.95

Calls 3

getActiveEditorMethod · 0.80
setLocationMethod · 0.65
getWidthMethod · 0.45

Tested by

no test coverage detected