Java Doc for IPerspectiveFactory.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » 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 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.eclipse.ui.IPerspectiveFactory

IPerspectiveFactory
public interface IPerspectiveFactory (Code)
A perspective factory generates the initial page layout and visible action set for a page.

When a new page is created in the workbench a perspective is used to define the initial page layout. If this is a predefined perspective (based on an extension to the workbench's perspective extension point) an IPerspectiveFactory is used to define the initial page layout.

The factory for the perspective is created and passed an IPageLayout where views can be added. The default layout consists of the editor area with no additional views. Additional views are added to the layout using the editor area as the initial point of reference. The factory is used only briefly while a new page is created; then discarded.

To define a perspective clients should implement this interface and include the name of their class in an extension to the workbench's perspective extension point (named "org.eclipse.ui.perspectives"). For example, the plug-in's XML markup might contain:

 <extension point="org.eclipse.ui.perspectives">
 <perspective
 id="com.example.javaplugin.perspective"
 name="Java"
 class="com.example.javaplugin.JavaPerspective">
 </perspective>
 </extension>
 

Example of populating a page with standard workbench views:

 public void createInitialLayout(IPageLayout layout) {
 // Get the editor area.
 String editorArea = layout.getEditorArea();
 // Top left: Resource Navigator view and Bookmarks view placeholder
 IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, 0.25f,
 editorArea);
 topLeft.addView(IPageLayout.ID_RES_NAV);
 topLeft.addPlaceholder(IPageLayout.ID_BOOKMARKS);
 // Bottom left: Outline view and Property Sheet view
 IFolderLayout bottomLeft = layout.createFolder("bottomLeft", IPageLayout.BOTTOM, 0.50f,
 "topLeft");
 bottomLeft.addView(IPageLayout.ID_OUTLINE);
 bottomLeft.addView(IPageLayout.ID_PROP_SHEET);
 // Bottom right: Task List view
 layout.addView(IPageLayout.ID_TASK_LIST, IPageLayout.BOTTOM, 0.66f, editorArea);
 }
 

Within the workbench a user may override the visible views, layout and action sets of a predefined perspective to create a custom perspective. In such cases the layout is persisted by the workbench and the factory is not used.





Method Summary
public  voidcreateInitialLayout(IPageLayout layout)
     Creates the initial layout for a page.

Implementors of this method may add additional views to a perspective.




Method Detail
createInitialLayout
public void createInitialLayout(IPageLayout layout)(Code)
Creates the initial layout for a page.

Implementors of this method may add additional views to a perspective. The perspective already contains an editor folder identified by the result of IPageLayout.getEditorArea(). Additional views should be added to the layout using this value as the initial point of reference.


Parameters:
  layout - the page layout



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