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 Details

  • Constructor Details

    • AlwaysWelcomeCheckbox

      public AlwaysWelcomeCheckbox()
  • Method Details

    • 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 interface IIntroContentProvider
      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 interface IIntroContentProvider
      Parameters:
      id - the unique identifier of the content element
      parent - the parent composite that should be used when creating SWT widgets
      toolkit - 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 interface IIntroContentProvider
    • 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 interface IIntroContentProvider
      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 interface IIntroAction
      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)