|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.uif.splash.Splash
public final class Splash
A singleton that provides access to a pluggable splash to improve the application's feedback during startup. You can open and close it, set messages and indicate progress.
The concrete work is done by pluggable splash providers, which you
can set via #setProvider, for example a splash window or splash panel.
The default provider is NullSplash
, other providers
are ImageSplash
and JWindowSplash
.
This class logs splash events on CONFIG
level with
the elapsed time. You must invoke #initStartTime
in your
application's #main
method to get accurate timing information.
SplashProvider
Method Summary | |
---|---|
static void |
close()
Closes the splash by calling the providers #closeSplash method. |
static long |
elapsedTime()
Computes and returns the elapsed time since the last invocation of #resetStartTime() . |
static void |
ensureClosed()
Ensures that the splash is closed, calls #close if necessary. |
static void |
ensureOpen()
Ensures that the splash is open, calls #open if necessary. |
static SplashProvider |
getProvider()
Returns the current SplashProvider . |
static void |
open()
Opens the splash by calling the providers #openSplash method. |
static void |
resetStartTime()
Resets the start time that is used to compute the elapsed time. |
static void |
setNote(String message)
Sets the splash note. |
static void |
setNote(String message,
int percent)
Sets the splash note and progress at the same time. |
static void |
setProgress(int percent)
Sets the splash progress percent value. |
static void |
setProvider(SplashProvider newProvider)
Sets a SplashProvider . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void resetStartTime()
public static long elapsedTime()
#resetStartTime()
.
public static void ensureOpen()
#open
if necessary.
public static void ensureClosed()
#close
if necessary.
public static void open()
#openSplash
method.
public static void close()
#closeSplash
method.
public static void setNote(String message)
message
- the text to be set as current splash notepublic static void setProgress(int percent)
percent
- the progress in percent to be set as splash progresspublic static void setNote(String message, int percent)
message
- the text to be set as current splash notepercent
- the progress in percent to be set as splash progresspublic static SplashProvider getProvider()
SplashProvider
.
public static void setProvider(SplashProvider newProvider)
SplashProvider
.
newProvider
- the SplashProvider to be set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |