Java Doc for PageBookView.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » part » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » ui workbench » org.eclipse.ui.part 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.eclipse.ui.part.WorkbenchPart
   org.eclipse.ui.part.ViewPart
      org.eclipse.ui.part.PageBookView

PageBookView
abstract public class PageBookView extends ViewPart implements IPartListener(Code)
Abstract superclass of all multi-page workbench views.

Within the workbench there are many views which track the active part. If a part is activated these views display some properties for the active part. A simple example is the Outline View, which displays the outline for the active editor. To avoid loss of context when part activation changes, these views may implement a multi-page approach. A separate page is maintained within the view for each source view. If a part is activated the associated page for the part is brought to top. If a part is closed the associated page is disposed. PageBookView is a base implementation for multi page views.

PageBookViews provide an IPageSite for each of their pages. This site is supplied during the page's initialization. The page may supply a selection provider for this site. PageBookViews deal with these selection providers in a similar way to a workbench page's SelectionService. When a page is made visible, if its site has a selection provider, then changes in the selection are listened for and the current selection is obtained and fired as a selection change event. Selection changes are no longer listened for when a page is made invisible.

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

When a PageBookView is created the following methods are invoked. Subclasses must implement these.

  • createDefaultPage - called to create a default page for the view. This page is displayed when the active part in the workbench does not have a page.
  • getBootstrapPart - called to determine the active part in the workbench. A page will be created for this part

When a part is activated the base implementation does not know if a page should be created for the part. Therefore, it delegates creation to the subclass.

  • isImportant - called when a workbench part is activated. Subclasses return whether a page should be created for the new part.
  • doCreatePage - called to create a page for a particular part in the workbench. This is only invoked when isImportant returns true.

When a part is closed the base implementation will destroy the page associated with the particular part. The page was created by a subclass, so the subclass must also destroy it. Subclasses must implement these.

  • doDestroyPage - called to destroy a page for a particular part in the workbench.


Inner Class :protected static class PageRec
Inner Class :protected class SelectionProvider implements IPostSelectionProvider


Constructor Summary
protected  PageBookView()
     Creates a new pagebook view.

Method Summary
abstract protected  IPagecreateDefaultPage(PageBook book)
     Creates and returns the default page for this view.
public  voidcreatePartControl(Composite parent)
     The PageBookView implementation of this IWorkbenchPart method creates a PageBook control with its default page showing.
public  voiddispose()
     The PageBookView implementation of this IWorkbenchPart method cleans up all the pages.
abstract protected  PageRecdoCreatePage(IWorkbenchPart part)
     Creates a new page in the pagebook for a particular part.
abstract protected  voiddoDestroyPage(IWorkbenchPart part, PageRec pageRecord)
     Destroys a page in the pagebook for a particular part.
protected  booleandoesPageExist(IPage page)
     Returns true if the page has already been created.
public  ObjectgetAdapter(Class key)
     The PageBookView implementation of this IAdaptable method delegates to the current page, if it implements IAdaptable.
abstract protected  IWorkbenchPartgetBootstrapPart()
     Returns the active, important workbench part for this view.

When the page book view is created it has no idea which part within the workbook should be used to generate the first page.

protected  IWorkbenchPartgetCurrentContributingPart()
     Returns the part which contributed the current page to this view.
public  IPagegetCurrentPage()
     Returns the currently visible page for this view or null if no page is currently visible.
public  IPagegetDefaultPage()
     Returns the default page for this view.
protected  PageBookgetPageBook()
     Returns the pagebook control for this view.
protected  PageRecgetPageRec(IWorkbenchPart part)
     Returns the page record for the given part.
protected  PageRecgetPageRec(IPage page)
     Returns the page record for the given page of this view.
protected  PageSitegetPageSite(IPage page)
     Returns the view site for the given page of this view.
protected  SelectionProvidergetSelectionProvider()
     Returns the selectionProvider for this page book view.
protected  ObjectgetViewAdapter(Class adapter)
     Returns an adapter of the specified type, as provided by this view (not the current page), or null if this view does not provide an adapter of the specified adapter.

The default implementation returns null.

public  voidinit(IViewSite site)
    
protected  voidinitPage(IPageBookViewPage page)
     Initializes the given page with a page site.
abstract protected  booleanisImportant(IWorkbenchPart part)
     Returns whether the given part should be added to this view.
public  voidpartActivated(IWorkbenchPart part)
     The PageBookView implementation of this IPartListener method shows the page when the given part is activated.
public  voidpartBroughtToTop(IWorkbenchPart part)
     The PageBookView implementation of this IPartListener method does nothing.
public  voidpartClosed(IWorkbenchPart part)
     The PageBookView implementation of this IPartListener method deal with the closing of the active part.
public  voidpartDeactivated(IWorkbenchPart part)
     The PageBookView implementation of this IPartListener method does nothing.
public  voidpartOpened(IWorkbenchPart part)
    
public  voidsetFocus()
    
protected  voidshowPageRec(PageRec pageRec)
     Shows page contained in the given page record in this view.


Constructor Detail
PageBookView
protected PageBookView()(Code)
Creates a new pagebook view.




Method Detail
createDefaultPage
abstract protected IPage createDefaultPage(PageBook book)(Code)
Creates and returns the default page for this view.

Subclasses must implement this method.

Subclasses must call initPage with the new page (if it is an IPageBookViewPage) before calling createControl on the page.


Parameters:
  book - the pagebook control the default page



createPartControl
public void createPartControl(Composite parent)(Code)
The PageBookView implementation of this IWorkbenchPart method creates a PageBook control with its default page showing. Subclasses may extend.



dispose
public void dispose()(Code)
The PageBookView implementation of this IWorkbenchPart method cleans up all the pages. Subclasses may extend.



doCreatePage
abstract protected PageRec doCreatePage(IWorkbenchPart part)(Code)
Creates a new page in the pagebook for a particular part. This page will be made visible whenever the part is active, and will be destroyed with a call to doDestroyPage.

Subclasses must implement this method.

Subclasses must call initPage with the new page (if it is an IPageBookViewPage) before calling createControl on the page.


Parameters:
  part - the input part the record describing a new page for this view
See Also:   PageBookView.doDestroyPage



doDestroyPage
abstract protected void doDestroyPage(IWorkbenchPart part, PageRec pageRecord)(Code)
Destroys a page in the pagebook for a particular part. This page was returned as a result from doCreatePage.

Subclasses must implement this method.


Parameters:
  part - the input part
Parameters:
  pageRecord - a page record for the part
See Also:   PageBookView.doCreatePage



doesPageExist
protected boolean doesPageExist(IPage page)(Code)
Returns true if the page has already been created.
Parameters:
  page - the page to test true if this page has already been created.



getAdapter
public Object getAdapter(Class key)(Code)
The PageBookView implementation of this IAdaptable method delegates to the current page, if it implements IAdaptable.



getBootstrapPart
abstract protected IWorkbenchPart getBootstrapPart()(Code)
Returns the active, important workbench part for this view.

When the page book view is created it has no idea which part within the workbook should be used to generate the first page. Therefore, it delegates the choice to subclasses of PageBookView.

Implementors of this method should return an active, important part in the workbench or null if none found.

Subclasses must implement this method.

the active important part, or null if none



getCurrentContributingPart
protected IWorkbenchPart getCurrentContributingPart()(Code)
Returns the part which contributed the current page to this view. the part which contributed the current page or nullif no part contributed the current page



getCurrentPage
public IPage getCurrentPage()(Code)
Returns the currently visible page for this view or null if no page is currently visible. the currently visible page



getDefaultPage
public IPage getDefaultPage()(Code)
Returns the default page for this view. the default page



getPageBook
protected PageBook getPageBook()(Code)
Returns the pagebook control for this view. the pagebook control, or null if not initialized



getPageRec
protected PageRec getPageRec(IWorkbenchPart part)(Code)
Returns the page record for the given part.
Parameters:
  part - the part the corresponding page record, or null if notfound



getPageRec
protected PageRec getPageRec(IPage page)(Code)
Returns the page record for the given page of this view.
Parameters:
  page - the page the corresponding page record, or null if notfound



getPageSite
protected PageSite getPageSite(IPage page)(Code)
Returns the view site for the given page of this view.
Parameters:
  page - the page the corresponding site, or null if not found



getSelectionProvider
protected SelectionProvider getSelectionProvider()(Code)
Returns the selectionProvider for this page book view. a SelectionProvider



getViewAdapter
protected Object getViewAdapter(Class adapter)(Code)
Returns an adapter of the specified type, as provided by this view (not the current page), or null if this view does not provide an adapter of the specified adapter.

The default implementation returns null. Subclasses may override.


Parameters:
  adapter - the adapter class to look up a object castable to the given class, or null ifthis object does not have an adapter for the given class
since:
   3.2



init
public void init(IViewSite site) throws PartInitException(Code)



initPage
protected void initPage(IPageBookViewPage page)(Code)
Initializes the given page with a page site.

Subclasses should call this method after the page is created but before creating its controls.

Subclasses may override


Parameters:
  page - The page to initialize



isImportant
abstract protected boolean isImportant(IWorkbenchPart part)(Code)
Returns whether the given part should be added to this view.

Subclasses must implement this method.


Parameters:
  part - the input part true if the part is relevant, andfalse otherwise



partActivated
public void partActivated(IWorkbenchPart part)(Code)
The PageBookView implementation of this IPartListener method shows the page when the given part is activated. Subclasses may extend.



partBroughtToTop
public void partBroughtToTop(IWorkbenchPart part)(Code)
The PageBookView implementation of this IPartListener method does nothing. Subclasses may extend.



partClosed
public void partClosed(IWorkbenchPart part)(Code)
The PageBookView implementation of this IPartListener method deal with the closing of the active part. Subclasses may extend.



partDeactivated
public void partDeactivated(IWorkbenchPart part)(Code)
The PageBookView implementation of this IPartListener method does nothing. Subclasses may extend.



partOpened
public void partOpened(IWorkbenchPart part)(Code)



setFocus
public void setFocus()(Code)



showPageRec
protected void showPageRec(PageRec pageRec)(Code)
Shows page contained in the given page record in this view. The page record must be one from this pagebook view.

The PageBookView implementation of this method asks the pagebook control to show the given page's control, and records that the given page is now current. Subclasses may extend.


Parameters:
  pageRec - the page record containing the page to show



Methods inherited from org.eclipse.ui.part.ViewPart
final protected void checkSite(IWorkbenchPartSite site)(Code)(Java Doc)
public IViewSite getViewSite()(Code)(Java Doc)
public void init(IViewSite site) throws PartInitException(Code)(Java Doc)
public void init(IViewSite site, IMemento memento) throws PartInitException(Code)(Java Doc)
public void saveState(IMemento memento)(Code)(Java Doc)
protected void setContentDescription(String description)(Code)(Java Doc)
public void setInitializationData(IConfigurationElement cfig, String propertyName, Object data)(Code)(Java Doc)
protected void setPartName(String partName)(Code)(Java Doc)

Methods inherited from org.eclipse.ui.part.WorkbenchPart
public void addPartPropertyListener(IPropertyChangeListener listener)(Code)(Java Doc)
public void addPropertyListener(IPropertyListener l)(Code)(Java Doc)
protected void checkSite(IWorkbenchPartSite site)(Code)(Java Doc)
abstract public void createPartControl(Composite parent)(Code)(Java Doc)
public void dispose()(Code)(Java Doc)
protected void firePartPropertyChanged(String key, String oldValue, String newValue)(Code)(Java Doc)
protected void firePropertyChange(int propertyId)(Code)(Java Doc)
public Object getAdapter(Class adapter)(Code)(Java Doc)
protected IConfigurationElement getConfigurationElement()(Code)(Java Doc)
public String getContentDescription()(Code)(Java Doc)
protected Image getDefaultImage()(Code)(Java Doc)
public int getOrientation()(Code)(Java Doc)
public String getPartName()(Code)(Java Doc)
public Map getPartProperties()(Code)(Java Doc)
public String getPartProperty(String key)(Code)(Java Doc)
public IWorkbenchPartSite getSite()(Code)(Java Doc)
public String getTitle()(Code)(Java Doc)
public Image getTitleImage()(Code)(Java Doc)
public String getTitleToolTip()(Code)(Java Doc)
void internalSetContentDescription(String description)(Code)(Java Doc)
void internalSetPartName(String partName)(Code)(Java Doc)
public void removePartPropertyListener(IPropertyChangeListener listener)(Code)(Java Doc)
public void removePropertyListener(IPropertyListener l)(Code)(Java Doc)
protected void setContentDescription(String description)(Code)(Java Doc)
void setDefaultTitle()(Code)(Java Doc)
abstract public void setFocus()(Code)(Java Doc)
public void setInitializationData(IConfigurationElement cfig, String propertyName, Object data)(Code)(Java Doc)
protected void setPartName(String partName)(Code)(Java Doc)
public void setPartProperty(String key, String value)(Code)(Java Doc)
protected void setSite(IWorkbenchPartSite site)(Code)(Java Doc)
protected void setTitle(String title)(Code)(Java Doc)
protected void setTitleImage(Image titleImage)(Code)(Java Doc)
protected void setTitleToolTip(String toolTip)(Code)(Java Doc)
public void showBusy(boolean busy)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.