Class AlwaysWelcomeCheckbox
java.lang.Object
org.eclipse.ui.intro.contentproviders.AlwaysWelcomeCheckbox
- All Implemented Interfaces:
IIntroAction,IIntroContentProvider
Class which contributes a checkbox to an intro page which allows welcome to show
on startup. If the checkbox is checked the home page of intro will be shown the next
time the Eclipse application starts up. This class may be subclassed to override
the text for the checkbox label.
Implements the IIntroContentProvider to create the checkbox ui, and the
org.eclipse.ui.intro.config.IIntroAction interface for handling checkbox click events.
- Since:
- 3.3
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateContent(String id, PrintWriter out) Creates HTML content in the provided PrintWriter.voidcreateContent(String id, Composite parent, FormToolkit toolkit) Creates SWT content in the provided Composite.voiddispose()Dispose of the ContentProvider.booleanprotected StringgetText()Override this method to change the default text used for the checkboxvoidInitializes the content provider.voidrun(IIntroSite site, Properties params) Method called when box is clicked in html (swt is handled with a SelectionAdapter - both methods call reverseShowIntroState())voidsetAlwaysShowIntroPref(boolean val)
-
Field Details
-
ALWAYS_SHOW_INTRO
- See Also:
-
-
Constructor Details
-
AlwaysWelcomeCheckbox
public AlwaysWelcomeCheckbox()
-
-
Method Details
-
getText
Override this method to change the default text used for the checkbox- Returns:
- String label for the checkbox
- Since:
- 3.3
-
createContent
Description copied from interface:IIntroContentProviderCreates HTML content in the provided PrintWriter. This content will be included in the generated HTML page when embedded HTML widget is used to render intro content.- Specified by:
createContentin interfaceIIntroContentProvider- Parameters:
id- the unique identifier of the content element. The same content provider class can be reused for several elements and the id can be used to tell them apart.out- the output print writer to generate HTML content into
-
createContent
Description copied from interface:IIntroContentProviderCreates SWT content in the provided Composite. This method is called when Eclipse Forms are used to render intro content.- Specified by:
createContentin interfaceIIntroContentProvider- Parameters:
id- the unique identifier of the content elementparent- the parent composite that should be used when creating SWT widgetstoolkit- the form toolkit that should be used when creating new widgets
-
dispose
public void dispose()Description copied from interface:IIntroContentProviderDispose of the ContentProvider. This will only be called when the Intro view is closed. In other words, the content provider will not be disposed of until the last possible minute. This gives the implementor the chance to cache content and avoid regenerating content on every page switch.- Specified by:
disposein interfaceIIntroContentProvider
-
init
Description copied from interface:IIntroContentProviderInitializes the content provider. An IIntroContentProviderSite is passed, which will be called on to recompute or layout the content when the content becomes stale.- Specified by:
initin interfaceIIntroContentProvider- Parameters:
site- the site of this IIntroContentProvider
-
run
Method called when box is clicked in html (swt is handled with a SelectionAdapter - both methods call reverseShowIntroState())- Specified by:
runin interfaceIIntroAction- Parameters:
site- The part to execute the command on.params- Parameters for the command as extracted from the URL.
-
getAlwaysShowIntroPref
public boolean getAlwaysShowIntroPref() -
setAlwaysShowIntroPref
public void setAlwaysShowIntroPref(boolean val)
-