< prev index next >
src/java.desktop/share/classes/java/awt/SplashScreen.java
Print this page
*** 46,56 ****
* If your application is packaged in a jar file, you can use the
* "SplashScreen-Image" option in a manifest file to show a splash screen.
* Place the image in the jar archive and specify the path in the option.
* The path should not have a leading slash.
* <BR>
! * For example, in the <code>manifest.mf</code> file:
* <PRE>
* Manifest-Version: 1.0
* Main-Class: Test
* SplashScreen-Image: filename.gif
* </PRE>
--- 46,56 ----
* If your application is packaged in a jar file, you can use the
* "SplashScreen-Image" option in a manifest file to show a splash screen.
* Place the image in the jar archive and specify the path in the option.
* The path should not have a leading slash.
* <BR>
! * For example, in the {@code manifest.mf} file:
* <PRE>
* Manifest-Version: 1.0
* Main-Class: Test
* SplashScreen-Image: filename.gif
* </PRE>
*** 87,97 ****
* <p>
* This class cannot be instantiated. Only a single instance of this class
* can exist, and it may be obtained by using the {@link #getSplashScreen()}
* static method. In case the splash screen has not been created at
* application startup via the command line or manifest file option,
! * the <code>getSplashScreen</code> method returns <code>null</code>.
*
* @author Oleg Semenov
* @since 1.6
*/
public final class SplashScreen {
--- 87,97 ----
* <p>
* This class cannot be instantiated. Only a single instance of this class
* can exist, and it may be obtained by using the {@link #getSplashScreen()}
* static method. In case the splash screen has not been created at
* application startup via the command line or manifest file option,
! * the {@code getSplashScreen} method returns {@code null}.
*
* @author Oleg Semenov
* @since 1.6
*/
public final class SplashScreen {
*** 106,116 ****
*
* @throws UnsupportedOperationException if the splash screen feature is not
* supported by the current toolkit
* @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns true
! * @return the {@link SplashScreen} instance, or <code>null</code> if there is
* none or it has already been closed
*/
public static SplashScreen getSplashScreen() {
synchronized (SplashScreen.class) {
if (GraphicsEnvironment.isHeadless()) {
--- 106,116 ----
*
* @throws UnsupportedOperationException if the splash screen feature is not
* supported by the current toolkit
* @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns true
! * @return the {@link SplashScreen} instance, or {@code null} if there is
* none or it has already been closed
*/
public static SplashScreen getSplashScreen() {
synchronized (SplashScreen.class) {
if (GraphicsEnvironment.isHeadless()) {
*** 140,152 ****
* The method returns after the image has finished loading and the window
* has been updated.
* The splash screen window is resized according to the size of
* the image and is centered on the screen.
*
! * @param imageURL the non-<code>null</code> URL for the new
* splash screen image
! * @throws NullPointerException if {@code imageURL} is <code>null</code>
* @throws IOException if there was an error while loading the image
* @throws IllegalStateException if the splash screen has already been
* closed
*/
public void setImageURL(URL imageURL) throws NullPointerException, IOException, IllegalStateException {
--- 140,152 ----
* The method returns after the image has finished loading and the window
* has been updated.
* The splash screen window is resized according to the size of
* the image and is centered on the screen.
*
! * @param imageURL the non-{@code null} URL for the new
* splash screen image
! * @throws NullPointerException if {@code imageURL} is {@code null}
* @throws IOException if there was an error while loading the image
* @throws IllegalStateException if the splash screen has already been
* closed
*/
public void setImageURL(URL imageURL) throws NullPointerException, IOException, IllegalStateException {
*** 280,290 ****
* screen overlay image, which allows you to draw over the splash screen.
* Note that you do not draw on the main image but on the image that is
* displayed over the main image using alpha blending. Also note that drawing
* on the overlay image does not necessarily update the contents of splash
* screen window. You should call {@code update()} on the
! * <code>SplashScreen</code> when you want the splash screen to be
* updated immediately.
* <p>
* The pixel (0, 0) in the coordinate space of the graphics context
* corresponds to the origin of the splash screen native window bounds (see
* {@link #getBounds()}).
--- 280,290 ----
* screen overlay image, which allows you to draw over the splash screen.
* Note that you do not draw on the main image but on the image that is
* displayed over the main image using alpha blending. Also note that drawing
* on the overlay image does not necessarily update the contents of splash
* screen window. You should call {@code update()} on the
! * {@code SplashScreen} when you want the splash screen to be
* updated immediately.
* <p>
* The pixel (0, 0) in the coordinate space of the graphics context
* corresponds to the origin of the splash screen native window bounds (see
* {@link #getBounds()}).
*** 400,410 ****
private URL imageURL;
/**
* The instance reference for the singleton.
! * (<code>null</code> if no instance exists yet.)
*
* @see #getSplashScreen
* @see #close
*/
private static SplashScreen theInstance = null;
--- 400,410 ----
private URL imageURL;
/**
* The instance reference for the singleton.
! * ({@code null} if no instance exists yet.)
*
* @see #getSplashScreen
* @see #close
*/
private static SplashScreen theInstance = null;
< prev index next >