org.springframework.richclient.application.splash
Class ProgressSplashScreen

java.lang.Object
  extended by org.springframework.richclient.application.splash.AbstractSplashScreen
      extended by org.springframework.richclient.application.splash.SimpleSplashScreen
          extended by org.springframework.richclient.application.splash.ProgressSplashScreen
All Implemented Interfaces:
MonitoringSplashScreen, SplashScreen

public class ProgressSplashScreen
extends SimpleSplashScreen
implements MonitoringSplashScreen

A lightweight splash-screen for displaying the progress of a GUI application startup process.

The splash screen produced by this class will be an undecorated, centered frame containing an image above a progress bar. It minimizes class loading so it is displayed immediately once the application is started.

Author:
Peter De Bruycker

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.richclient.application.splash.SimpleSplashScreen
SimpleSplashScreen.ImageCanvas
 
Field Summary
 
Fields inherited from class org.springframework.richclient.application.splash.AbstractSplashScreen
SPLASH_TITLE_KEY
 
Constructor Summary
ProgressSplashScreen()
          Creates a new ProgressSplashScreen that uses an underlying ProgressBarProgressMonitor.
 
Method Summary
protected  Component createContentPane()
          Returns a component that displays an image above a progress bar.
protected  JProgressBar getProgressBar()
          Returns the progress bar.
 ProgressMonitor getProgressMonitor()
          Returns this SplashScreen's ProgressMonitor.
 boolean isIndeterminate()
           
 boolean isShowProgressLabel()
          Returns the flag that determines whether or not the progress bar will display updated textual info as it is provided by the progress monitor.
 void setIndeterminate(boolean indeterminate)
          Determines whether the progress bar is in determinate or indeterminate mode.
 void setProgressMonitor(ProgressMonitor progressMonitor)
          Sets the progress monitor used by this splash screen.
 void setShowProgressLabel(boolean showProgressLabel)
          Sets the flag that determines whether or not the progress bar will display updated textual info as it is provided by the progress monitor.
 
Methods inherited from class org.springframework.richclient.application.splash.SimpleSplashScreen
getImage, setImageResourcePath
 
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
 
Methods inherited from interface org.springframework.richclient.application.splash.SplashScreen
dispose, splash
 

Constructor Detail

ProgressSplashScreen

public ProgressSplashScreen()
Creates a new ProgressSplashScreen that uses an underlying ProgressBarProgressMonitor.

Method Detail

isShowProgressLabel

public boolean isShowProgressLabel()
Returns the flag that determines whether or not the progress bar will display updated textual info as it is provided by the progress monitor.

Returns:
The showProgressLabel flag.

setShowProgressLabel

public void setShowProgressLabel(boolean showProgressLabel)
Sets the flag that determines whether or not the progress bar will display updated textual info as it is provided by the progress monitor.

Parameters:
showProgressLabel -

createContentPane

protected Component createContentPane()
Returns a component that displays an image above a progress bar.

Overrides:
createContentPane in class SimpleSplashScreen
Returns:
A splash screen containing an image and a progress bar, never null.

getProgressMonitor

public ProgressMonitor getProgressMonitor()
Description copied from interface: MonitoringSplashScreen
Returns this SplashScreen's ProgressMonitor. Implementors wishing to show the progress to the user should return a ProgressMonitor that updates the user interface.

Specified by:
getProgressMonitor in interface MonitoringSplashScreen
Returns:
the ProgressMonitor, not null.

setProgressMonitor

public void setProgressMonitor(ProgressMonitor progressMonitor)
Sets the progress monitor used by this splash screen.

Parameters:
progressMonitor - The progress monitor.

getProgressBar

protected JProgressBar getProgressBar()
Returns the progress bar.

Returns:
not null

isIndeterminate

public boolean isIndeterminate()

setIndeterminate

public void setIndeterminate(boolean indeterminate)
Determines whether the progress bar is in determinate or indeterminate mode. Default is true

Parameters:
indeterminate - true if the progress bar should change to indeterminate mode; false if it should revert to normal.
See Also:
JProgressBar.setIndeterminate(boolean)


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