org.springframework.richclient.application.splash
Class SimpleSplashScreen

Show UML class diagram
java.lang.Object
  extended by org.springframework.richclient.application.splash.AbstractSplashScreen
      extended by org.springframework.richclient.application.splash.SimpleSplashScreen
All Implemented Interfaces:
SplashScreen
Direct Known Subclasses:
ProgressSplashScreen, SplashScreen

public class SimpleSplashScreen
extends AbstractSplashScreen

A lightweight splash-screen for display when a GUI application is being initialized.

The splash screen renders an image in a Frame. It minimizes class loading so it is displayed immediately once the application is started.

Author:
Keith Donald, Jan Hoskens

Nested Class Summary
 class SimpleSplashScreen.ImageCanvas
          Simple Canvas that paints an image.
 
Field Summary
 
Fields inherited from class org.springframework.richclient.application.splash.AbstractSplashScreen
SPLASH_TITLE_KEY
 
Constructor Summary
SimpleSplashScreen()
          Creates a new uninitialized SimpleSplashScreen.
SimpleSplashScreen(Image image)
          Creates a new SimpleSplashScreen that will display the given image.
SimpleSplashScreen(Resource imageResourcePath)
          Creates a new SimpleSplashScreen that will display the image at the specified location.
 
Method Summary
protected  Component createContentPane()
          Returns a component that displays an image in a canvas.
protected  Image getImage()
           
 void setImageResourcePath(Resource path)
          Sets the location of the image to be displayed by this splash screen.
 
Methods inherited from class org.springframework.richclient.application.splash.AbstractSplashScreen
dispose, getIconResourcePath, getMessageSource, isRootFrame, isShadowBorder, setIconResourcePath, setMessageSource, setRootFrame, setShadowBorder, splash
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSplashScreen

public SimpleSplashScreen()
Creates a new uninitialized SimpleSplashScreen.


SimpleSplashScreen

public SimpleSplashScreen(Resource imageResourcePath)
Creates a new SimpleSplashScreen that will display the image at the specified location.

Parameters:
imageResourcePath - The location of the image file to be displayed by this splash screen.
See Also:
#setImageResourcePath(String)

SimpleSplashScreen

public SimpleSplashScreen(Image image)
Creates a new SimpleSplashScreen that will display the given image.

Parameters:
image - the image to splash.
Throws:
IllegalArgumentException - if image is null.
Method Detail

setImageResourcePath

public void setImageResourcePath(Resource path)
Sets the location of the image to be displayed by this splash screen. If the given path starts with a '/', it is interpreted to be relative to the root of the runtime classpath. Otherwise it is interpreted to be relative to the subdirectory of the classpath root that corresponds to the package of this class.

Parameters:
path - The path to the splash screen image.

getImage

protected Image getImage()

createContentPane

protected Component createContentPane()
Returns a component that displays an image in a canvas.

Specified by:
createContentPane in class AbstractSplashScreen
Returns:
The content pane component. Can be null.


Copyright © 2004-2009 The Spring Framework. All Rights Reserved.