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

Method splash

app/src/processing/app/ui/SplashWindow.java:165–189  ·  view source on GitHub ↗

Open's a splash window using the specified image. @param image The splash image.

(Image image, boolean hidpi)

Source from the content-addressed store, hash-verified

163 * @param image The splash image.
164 */
165 public static void splash(Image image, boolean hidpi) {
166 if (instance == null && image != null) {
167 Frame f = new Frame();
168
169 // Create the splash image
170 instance = new SplashWindow(f, image, hidpi);
171
172 // Show the window.
173 instance.setVisible(true);
174
175 // Note: To make sure the user gets a chance to see the
176 // splash window we wait until its paint method has been
177 // called at least once by the AWT event dispatcher thread.
178 // If more than one processor is available, we don't wait,
179 // and maximize CPU throughput instead.
180 if (! EventQueue.isDispatchThread()
181 && Runtime.getRuntime().availableProcessors() == 1) {
182 synchronized (instance) {
183 while (! instance.paintCalled) {
184 try { instance.wait(); } catch (InterruptedException e) {}
185 }
186 }
187 }
188 }
189 }
190
191 /**
192 * Open's a splash window using the specified image.

Callers 1

mainMethod · 0.95

Calls 2

createImageMethod · 0.80
setVisibleMethod · 0.65

Tested by

no test coverage detected