Class Page

java.lang.Object
org.eclipse.ui.part.Page
All Implemented Interfaces:
IPage, IPageBookViewPage
Direct Known Subclasses:
AbstractTemplatesPage, AbstractTextSearchViewPage, CompareOutlinePage, ContentOutlinePage, HistoryPage, MessagePage, PropertySheetPage, TabbedPropertySheetPage

public abstract class Page extends Object implements IPageBookViewPage
Abstract base superclass for pages in a pagebook view.

This class should be subclassed by clients wishing to define new types of pages for multi-page views.

Subclasses must implement the following methods:

  • createControl - to create the page's control
  • getControl - to retrieve the page's control

Subclasses may extend or reimplement the following methods as required:

  • dispose - extend to provide additional cleanup
  • setFocus - reimplement to accept focus
  • setActionBars - reimplement to make contributions
  • makeContributions - this method exists to support previous versions
  • setActionBars - this method exists to support previous versions
  • init - extend to provide additional setup
See Also:
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    Creates the SWT control for this page under the given parent control.
    void
    The Page implementation of this IPage method disposes of this page's control (if it has one and it has not already been disposed).
    abstract Control
    The Page implementation of this IPage method returns null.
    Returns the site which contains this page.
    void
    init(IPageSite pageSite)
    The Page implementation of this IPageBookViewPage method stores a reference to the supplied site (the site which contains this page).
    void
    makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager)
    This method exists for backward compatibility.
    void
    This method exists for backward compatibility.
    abstract void
    The Page implementation of this IPage method does nothing.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Page

      protected Page()
  • Method Details

    • createControl

      public abstract void createControl(Composite parent)
      Description copied from interface: IPage
      Creates the SWT control for this page under the given parent control.

      Clients should not call this method (the workbench calls this method when it needs to, which may be never).

      Specified by:
      createControl in interface IPage
      Parameters:
      parent - the parent control
    • dispose

      public void dispose()
      The Page implementation of this IPage method disposes of this page's control (if it has one and it has not already been disposed). Subclasses may extend.
      Specified by:
      dispose in interface IPage
    • getControl

      public abstract Control getControl()
      The Page implementation of this IPage method returns null. Subclasses must reimplement.
      Specified by:
      getControl in interface IPage
      Returns:
      the SWT control for this page, or null if this page does not have a control
    • makeContributions

      public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager)
      This method exists for backward compatibility. Subclasses should reimplement init.
    • setActionBars

      public void setActionBars(IActionBars actionBars)
      This method exists for backward compatibility. Subclasses should reimplement init.
      Specified by:
      setActionBars in interface IPage
      Parameters:
      actionBars - the action bars for this page
    • init

      public void init(IPageSite pageSite)
      The Page implementation of this IPageBookViewPage method stores a reference to the supplied site (the site which contains this page).

      Subclasses may extend.

      Specified by:
      init in interface IPageBookViewPage
      Parameters:
      pageSite - the page site
      Since:
      2.0
    • getSite

      public IPageSite getSite()
      Returns the site which contains this page.
      Specified by:
      getSite in interface IPageBookViewPage
      Returns:
      the site which contains this page
    • setFocus

      public abstract void setFocus()
      The Page implementation of this IPage method does nothing. Subclasses must implement.
      Specified by:
      setFocus in interface IPage