public class SplashScreen extends SimpleListenableContainer<AsyncEvent> implements WorkProgress
WorkProgress.MultiTaskevent| Constructor and Description |
|---|
SplashScreen(boolean devMode)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(CancelException reason)
Cancel the underlying work.
|
void |
close()
Close this window.
|
protected AsyncEvent |
createEvent() |
void |
done()
Signal all the work has been done.
|
void |
endInit()
End of initial startup.
|
void |
error(Exception error)
Signal an error.
|
long |
getAmount()
Return the total amount of work to be done.
|
long |
getPosition()
Return the current position, which is the current amount of work already done.
|
long |
getRemainingWork()
Return the amount of remaining work.
|
String |
getSubText()
Return a sub-text describing the work being done.
|
IAsync<Exception> |
getSynch()
Return a synchronization point that will be unblocked by one of the method done, error or cancel.
|
String |
getText()
Return the text describing the work being done.
|
void |
interruptEvents()
Stop triggering events to listener, this may be useful before doing several modifications.
|
boolean |
isReady() |
void |
loadDefaultLogo()
Load the default logo.
|
void |
progress(long amountDone)
Add an amount of work already done.
|
void |
resumeEvents(boolean trigger)
Resume triggering events after a call to interruptEvents(), and optionally trigger an event now.
|
void |
setAmount(long work)
Set the total amount of work to be done.
|
void |
setApplicationName(String name)
Show application name.
|
void |
setLogo(ImageIcon logo,
boolean isCustom)
Change the logo.
|
void |
setPosition(long position)
Set the position (amount of work already done).
|
void |
setSubText(String text)
Set the sub-text describing the work being done.
|
void |
setText(String text)
Set the text describing the work being done.
|
addListener, hasListeners, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlink, linkTo, linkToaddListener, hasListeners, listen, removeListener, unlistenpublic SplashScreen(boolean devMode)
devMode - if true the screen is automatically closed after 20 seconds if the application is still loading.
This may be useful when debugging because else the splash screen remains in front of other windows.protected AsyncEvent createEvent()
createEvent in class SimpleListenableContainer<AsyncEvent>public void close()
public boolean isReady()
public void setLogo(ImageIcon logo, boolean isCustom)
public void loadDefaultLogo()
public void setApplicationName(String name)
public void endInit()
public void setAmount(long work)
WorkProgresssetAmount in interface WorkProgresspublic long getAmount()
WorkProgressgetAmount in interface WorkProgresspublic void setPosition(long position)
WorkProgresssetPosition in interface WorkProgresspublic long getPosition()
WorkProgressgetPosition in interface WorkProgresspublic long getRemainingWork()
WorkProgressgetRemainingWork in interface WorkProgresspublic void progress(long amountDone)
WorkProgressprogress in interface WorkProgresspublic void setText(String text)
WorkProgresssetText in interface WorkProgresspublic String getText()
WorkProgressgetText in interface WorkProgresspublic void setSubText(String text)
WorkProgresssetSubText in interface WorkProgresspublic String getSubText()
WorkProgressgetSubText in interface WorkProgresspublic void done()
WorkProgressdone in interface WorkProgresspublic void error(Exception error)
WorkProgresserror in interface WorkProgresspublic void cancel(CancelException reason)
WorkProgresscancel in interface WorkProgresspublic IAsync<Exception> getSynch()
WorkProgressgetSynch in interface WorkProgresspublic void interruptEvents()
WorkProgressinterruptEvents in interface WorkProgresspublic void resumeEvents(boolean trigger)
WorkProgressresumeEvents in interface WorkProgressCopyright © 2019. All rights reserved.