Class BasicSplashHandler
- java.lang.Object
-
- org.eclipse.ui.splash.AbstractSplashHandler
-
- org.eclipse.ui.splash.BasicSplashHandler
-
public abstract class BasicSplashHandler extends AbstractSplashHandler
Basic splash implementation that provides an absolute positioned progress bar and message string that is hooked up to a progress monitor.- Since:
- 3.3
-
-
Constructor Summary
Constructors Constructor Description BasicSplashHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Signal the handler to end the splash and dispose of any resources.IProgressMonitor
getBundleProgressMonitor()
Return the progress monitor responsible for showing bundle loading.protected Composite
getContent()
Get the composite on which any supplemental controls should be drawn.protected Color
getForeground()
Get the foreground text color.protected void
setForeground(RGB foregroundRGB)
Set the foreground text color.protected void
setMessageRect(Rectangle messageRect)
Set the location of the message text in the splash.protected void
setProgressRect(Rectangle progressRect)
Set the location of the progress bar in the splash.-
Methods inherited from class org.eclipse.ui.splash.AbstractSplashHandler
getSplash, init
-
-
-
-
Method Detail
-
getBundleProgressMonitor
public IProgressMonitor getBundleProgressMonitor()
Description copied from class:AbstractSplashHandler
Return the progress monitor responsible for showing bundle loading. Default implementation returns a null progress monitor.Calls made to methods on this progress monitor may be made from non-UI threads so implementors must take care to ensure proper synchronization with the UI thread if necessary.
Please note that progress will only be shown if the "org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP" property has been set to
true
. Because this property defaults tofalse
RCP developers must set this property via aplugin_customization.ini
file or by setting the preference on the Platform UI preference store in theWorkbenchAdvisor.initialize(org.eclipse.ui.application.IWorkbenchConfigurer)
method if they wish to have progress reported on startup.- Overrides:
getBundleProgressMonitor
in classAbstractSplashHandler
- Returns:
- the progress monitor
- See Also:
NullProgressMonitor
,PlatformUI.getPreferenceStore()
,IWorkbenchPreferenceConstants.SHOW_PROGRESS_ON_STARTUP
,WorkbenchAdvisor.initialize(org.eclipse.ui.application.IWorkbenchConfigurer)
-
dispose
public void dispose()
Description copied from class:AbstractSplashHandler
Signal the handler to end the splash and dispose of any resources. Subclasses should ensure that they call the base implementation of this method at some point after their own method is invoked.Calls to this method will be made from the UI thread.
- Overrides:
dispose
in classAbstractSplashHandler
-
setForeground
protected void setForeground(RGB foregroundRGB)
Set the foreground text color. This method has no effect aftergetBundleProgressMonitor()
has been invoked.- Parameters:
foregroundRGB
- the color
-
getForeground
protected Color getForeground()
Get the foreground text color. This color should not be disposed by callers.- Returns:
- the foreground color
-
setMessageRect
protected void setMessageRect(Rectangle messageRect)
Set the location of the message text in the splash. This method has no effect aftergetBundleProgressMonitor()
has been invoked.- Parameters:
messageRect
- the location of the message text
-
setProgressRect
protected void setProgressRect(Rectangle progressRect)
Set the location of the progress bar in the splash. This method has no effect aftergetBundleProgressMonitor()
has been invoked.- Parameters:
progressRect
- the location of the progress bar
-
getContent
protected Composite getContent()
Get the composite on which any supplemental controls should be drawn. This will not have a layout set and clients are responsible for setting the location of child controls manually.This method must be called in the
AbstractSplashHandler.init(org.eclipse.swt.widgets.Shell)
method of a subclasses to ensure proper creation of controlsPlease note that the default implementation of this method assumes that the
IProgressMonitor
returned fromgetBundleProgressMonitor()
can be safely casted to aComposite
. If this is not the case this method must be reimplemented to reflect the new progress controls.- Returns:
- the composite
- See Also:
AbstractSplashHandler.init(org.eclipse.swt.widgets.Shell)
-
-