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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createContent
(String id, PrintWriter out) Creates HTML content in the provided PrintWriter.void
createContent
(String id, Composite parent, FormToolkit toolkit) Creates SWT content in the provided Composite.void
dispose()
Dispose of the ContentProvider.boolean
protected String
getText()
Override this method to change the default text used for the checkboxvoid
Initializes the content provider.void
run
(IIntroSite site, Properties params) Method called when box is clicked in html (swt is handled with a SelectionAdapter - both methods call reverseShowIntroState())void
setAlwaysShowIntroPref
(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:IIntroContentProvider
Creates 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:
createContent
in 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:IIntroContentProvider
Creates SWT content in the provided Composite. This method is called when Eclipse Forms are used to render intro content.- Specified by:
createContent
in 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:IIntroContentProvider
Dispose 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:
dispose
in interfaceIIntroContentProvider
-
init
Description copied from interface:IIntroContentProvider
Initializes 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:
init
in 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:
run
in 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)
-