Class AlwaysWelcomeCheckbox
- java.lang.Object
-
- org.eclipse.ui.intro.contentproviders.AlwaysWelcomeCheckbox
-
- All Implemented Interfaces:
IIntroAction
,IIntroContentProvider
public class AlwaysWelcomeCheckbox extends Object implements IIntroContentProvider, IIntroAction
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 Modifier and Type Field Description static String
ALWAYS_SHOW_INTRO
-
Constructor Summary
Constructors Constructor Description AlwaysWelcomeCheckbox()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
getAlwaysShowIntroPref()
protected String
getText()
Override this method to change the default text used for the checkboxvoid
init(IIntroContentProviderSite site)
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 Detail
-
ALWAYS_SHOW_INTRO
public static final String ALWAYS_SHOW_INTRO
- See Also:
- Constant Field Values
-
-
Method Detail
-
getText
protected String getText()
Override this method to change the default text used for the checkbox- Returns:
- String label for the checkbox
- Since:
- 3.3
-
createContent
public void createContent(String id, PrintWriter out)
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
public void createContent(String id, Composite parent, FormToolkit toolkit)
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
public void init(IIntroContentProviderSite site)
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
public void run(IIntroSite site, Properties params)
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)
-
-