Package org.eclipse.ui.part
Class PageSwitcher
java.lang.Object
org.eclipse.ui.part.PageSwitcher
Provides the implementation for switching pages in a view. A view may track
 pages however it wishes. The view should subclass PageSwitcher to provide the
 abstract methods, and then instantiate their page switcher once.
- Since:
- 3.4
- 
Constructor SummaryConstructorsConstructorDescriptionPageSwitcher(IWorkbenchPart part) Register the handlers for page switching with this view or editor.
- 
Method SummaryModifier and TypeMethodDescriptionabstract voidactivatePage(Object page) Displays the given page in the view.intReturns the index of the currently active page.abstract ImageDescriptorgetImageDescriptor(Object page) Returns anImageDescriptorfor the page.abstract StringReturns a readable name to identify the page.abstract Object[]getPages()Returns the pages available in the view.
- 
Constructor Details- 
PageSwitcherRegister the handlers for page switching with this view or editor.- Parameters:
- part- The part to register against.
 
 
- 
- 
Method Details- 
activatePageDisplays the given page in the view. The page must already exist in the view.- Parameters:
- page- the page to display, never- null.
 
- 
getImageDescriptorReturns anImageDescriptorfor the page.- Parameters:
- page- the page to retrieve an- ImageDescriptor
- Returns:
- An ImageDescriptorfor the page, may benull.
 
- 
getNameReturns a readable name to identify the page.- Parameters:
- page- the page to get the name
- Returns:
- the name of the page
 
- 
getPagesReturns the pages available in the view. These may be used for populating the pop-up dialog when switching pages. These are the objects that will be used inactivatePage(Object).- Returns:
- an array of pages
 
- 
getCurrentPageIndexpublic int getCurrentPageIndex()Returns the index of the currently active page. The default implementation returns 0. Subclasses can override.- Returns:
- the 0-based index of the currently active page from
         getPages(), or an arbitrary value ifgetPages()is an empty array.
 
 
-