Java Doc for IPageLayout.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.IPageLayout

All known Subclasses:   org.eclipse.ui.internal.PageLayout,
IPageLayout
public interface IPageLayout (Code)
A page layout defines the initial layout for a perspective within a page in a workbench window.

This interface is not intended to be implemented by clients.

When a perspective is opened, it creates a new page layout with a single editor area. This layout is then passed to the perspective factory (implementation of org.eclipse.ui.IPerspectiveFactory.createInitialLayout(IPageLayout) ) where additional views and other content can be added, using the existing editor area as the initial point of reference.

In some cases, multiple instances of a particular view may need to be added to the same layout. These are disambiguated using a secondary id. In layout methods taking a view id, the id can have the compound form: primaryId [':' secondaryId]. If a secondary id is given, the view must allow multiple instances by having specified allowMultiple="true" in its extension. View placeholders may also have a secondary id.

Wildcards are permitted in placeholder ids (but not regular view ids). '*' matches any substring, '?' matches any single character. Wildcards can be specified for the primary id, the secondary id, or both. For example, the placeholder "someView:*" will match any occurrence of the view that has primary id "someView" and that also has some non-null secondary id. Note that this placeholder will not match the view if it has no secondary id, since the compound id in this case is simply "someView".

Example of populating a layout with standard workbench views:

 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);
 



Field Summary
final public static  intBOTTOM
     Relationship constant indicating a part should be placed below its relative.
final public static  floatDEFAULT_FASTVIEW_RATIO
     The default fast view ratio width.
final public static  floatDEFAULT_VIEW_RATIO
     The default view ratio width for regular (non-fast) views.
public static  StringID_BOOKMARKS
     The view id for the workbench's Bookmark Navigator standard component.
public static  StringID_EDITOR_AREA
     The part id for the workbench's editor area.
final public static  StringID_NAVIGATE_ACTION_SET
     Id of the navigate action set.
public static  StringID_OUTLINE
     The view id for the workbench's Content Outline standard component.
public static  StringID_PROBLEM_VIEW
     The view id for the workbench's Problems View standard component.
public static  StringID_PROGRESS_VIEW
     The view id for the workbench's Progress View standard component.
public static  StringID_PROP_SHEET
     The view id for the workbench's Property Sheet standard component.
public static  StringID_RES_NAV
     The view id for the workbench's Resource Navigator standard component.
public static  StringID_TASK_LIST
     The view id for the workbench's Task List standard component.
final public static  floatINVALID_RATIO
     A variable used to represent invalid ratios.
final public static  intLEFT
     Relationship constant indicating a part should be placed to the left of its relative.
final public static  floatNULL_RATIO
     A variable used to represent a ratio which has not been specified.
final public static  floatRATIO_MAX
    
final public static  floatRATIO_MIN
    
final public static  intRIGHT
     Relationship constant indicating a part should be placed to the right of its relative.
final public static  intTOP
     Relationship constant indicating a part should be placed above its relative.


Method Summary
public  voidaddActionSet(String actionSetId)
     Adds an action set with the given id to this page layout.
public  voidaddFastView(String viewId)
     Adds the view with the given compound id to the page layout as a fast view.
public  voidaddFastView(String viewId, float ratio)
     Adds the view with the given compound id to the page layout as a fast view with the given width ratio.
public  voidaddNewWizardShortcut(String id)
     Adds a new wizard shortcut to the page layout. These are typically shown in the UI to allow rapid navigation to appropriate new wizards.
public  voidaddPerspectiveShortcut(String id)
     Adds a perspective shortcut to the page layout. These are typically shown in the UI to allow rapid navigation to appropriate new wizards.
public  voidaddPlaceholder(String viewId, int relationship, float ratio, String refId)
     Adds a view placeholder to this page layout. A view placeholder is used to define the position of a view before the view appears.
public  voidaddShowInPart(String id)
     Adds an item to the Show In prompter.
public  voidaddShowViewShortcut(String id)
     Adds a show view shortcut to the page layout. These are typically shown in the UI to allow rapid navigation to appropriate views.
public  voidaddStandaloneView(String viewId, boolean showTitle, int relationship, float ratio, String refId)
     Adds a standalone view with the given compound id to this page layout. See the IPageLayout type documentation for more details about compound ids. A standalone view cannot be docked together with other views. A standalone view's title can optionally be hidden.
public  voidaddStandaloneViewPlaceholder(String viewId, int relationship, float ratio, String refId, boolean showTitle)
     Adds a standalone view placeholder to this page layout.
public  voidaddView(String viewId, int relationship, float ratio, String refId)
     Adds a view with the given compound id to this page layout.
public  IFolderLayoutcreateFolder(String folderId, int relationship, float ratio, String refId)
     Creates and adds a new folder with the given id to this page layout. The position and relative size of the folder is expressed relative to a reference part.
Parameters:
  folderId - the id for the new folder.
public  IPlaceholderFolderLayoutcreatePlaceholderFolder(String folderId, int relationship, float ratio, String refId)
     Creates and adds a placeholder for a new folder with the given id to this page layout. The position and relative size of the folder is expressed relative to a reference part.
Parameters:
  folderId - the id for the new folder.
public  IPerspectiveDescriptorgetDescriptor()
     Returns the perspective descriptor for the perspective being layed out.
public  StringgetEditorArea()
     Returns the special identifier for the editor area in this page layout.
public  intgetEditorReuseThreshold()
     Returns the number of open editors before reusing editors or -1 if the preference settings should be used instead.
public  IPlaceholderFolderLayoutgetFolderForView(String id)
     Returns the folder layout for the view or placeholder with the given compound id in this page layout.
public  IViewLayoutgetViewLayout(String id)
     Returns the layout for the view or placeholder with the given compound id in this page layout.
public  booleanisEditorAreaVisible()
     Returns whether the page's layout will show the editor area.
public  booleanisFixed()
     Returns true if this layout is fixed, false if not.
public  voidsetEditorAreaVisible(boolean showEditorArea)
     Show or hide the editor area for the page's layout.
public  voidsetEditorReuseThreshold(int openEditors)
     Sets the number of open editors before reusing editors.
public  voidsetFixed(boolean isFixed)
     Sets whether this layout is fixed.

Field Detail
BOTTOM
final public static int BOTTOM(Code)
Relationship constant indicating a part should be placed below its relative.



DEFAULT_FASTVIEW_RATIO
final public static float DEFAULT_FASTVIEW_RATIO(Code)
The default fast view ratio width.
since:
   2.0



DEFAULT_VIEW_RATIO
final public static float DEFAULT_VIEW_RATIO(Code)
The default view ratio width for regular (non-fast) views.
since:
   2.0



ID_BOOKMARKS
public static String ID_BOOKMARKS(Code)
The view id for the workbench's Bookmark Navigator standard component.



ID_EDITOR_AREA
public static String ID_EDITOR_AREA(Code)
The part id for the workbench's editor area. This may only be used as a reference part for view addition.



ID_NAVIGATE_ACTION_SET
final public static String ID_NAVIGATE_ACTION_SET(Code)
Id of the navigate action set. (value "org.eclipse.ui.NavigateActionSet")
since:
   2.1



ID_OUTLINE
public static String ID_OUTLINE(Code)
The view id for the workbench's Content Outline standard component.



ID_PROBLEM_VIEW
public static String ID_PROBLEM_VIEW(Code)
The view id for the workbench's Problems View standard component.
since:
   3.0



ID_PROGRESS_VIEW
public static String ID_PROGRESS_VIEW(Code)
The view id for the workbench's Progress View standard component.
since:
   3.2



ID_PROP_SHEET
public static String ID_PROP_SHEET(Code)
The view id for the workbench's Property Sheet standard component.



ID_RES_NAV
public static String ID_RES_NAV(Code)
The view id for the workbench's Resource Navigator standard component.



ID_TASK_LIST
public static String ID_TASK_LIST(Code)
The view id for the workbench's Task List standard component.



INVALID_RATIO
final public static float INVALID_RATIO(Code)
A variable used to represent invalid ratios.
since:
   2.0



LEFT
final public static int LEFT(Code)
Relationship constant indicating a part should be placed to the left of its relative.



NULL_RATIO
final public static float NULL_RATIO(Code)
A variable used to represent a ratio which has not been specified.
since:
   2.0



RATIO_MAX
final public static float RATIO_MAX(Code)
Maximum acceptable ratio value when adding a view
since:
   2.0



RATIO_MIN
final public static float RATIO_MIN(Code)
Minimum acceptable ratio value when adding a view
since:
   2.0



RIGHT
final public static int RIGHT(Code)
Relationship constant indicating a part should be placed to the right of its relative.



TOP
final public static int TOP(Code)
Relationship constant indicating a part should be placed above its relative.





Method Detail
addActionSet
public void addActionSet(String actionSetId)(Code)
Adds an action set with the given id to this page layout. The id must name an action set contributed to the workbench's extension point (named "org.eclipse.ui.actionSet").
Parameters:
  actionSetId - the action set id



addFastView
public void addFastView(String viewId)(Code)
Adds the view with the given compound id to the page layout as a fast view. See the IPageLayout type documentation for more details about compound ids. The primary id must name a view contributed to the workbench's view extension point (named "org.eclipse.ui.views").
Parameters:
  viewId - the compound id of the view to be added
since:
   2.0



addFastView
public void addFastView(String viewId, float ratio)(Code)
Adds the view with the given compound id to the page layout as a fast view with the given width ratio. See the IPageLayout type documentation for more details about compound ids. The primary id must name a view contributed to the workbench's view extension point (named "org.eclipse.ui.views").
Parameters:
  viewId - the compound id of the view to be added
Parameters:
  ratio - the percentage of the workbench the fast view will cover
since:
   2.0



addNewWizardShortcut
public void addNewWizardShortcut(String id)(Code)
Adds a new wizard shortcut to the page layout. These are typically shown in the UI to allow rapid navigation to appropriate new wizards. For example, in the Eclipse IDE, these appear as items under the File > New menu. The id must name a new wizard extension contributed to the workbench's new wizards extension point (named "org.eclipse.ui.newWizards").
Parameters:
  id - the wizard id



addPerspectiveShortcut
public void addPerspectiveShortcut(String id)(Code)
Adds a perspective shortcut to the page layout. These are typically shown in the UI to allow rapid navigation to appropriate new wizards. For example, in the Eclipse IDE, these appear as items under the Window > Open Perspective menu. The id must name a perspective extension contributed to the workbench's perspectives extension point (named "org.eclipse.ui.perspectives").
Parameters:
  id - the perspective id



addPlaceholder
public void addPlaceholder(String viewId, int relationship, float ratio, String refId)(Code)
Adds a view placeholder to this page layout. A view placeholder is used to define the position of a view before the view appears. Initially, it is invisible; however, if the user ever opens a view whose compound id matches the placeholder, the view will appear at the same location as the placeholder. See the IPageLayout type documentation for more details about compound ids. If the placeholder contains wildcards, it remains in the layout, otherwise it is replaced by the view. If the primary id of the placeholder has no wildcards, it must refer to a view contributed to the workbench's view extension point (named "org.eclipse.ui.views").
Parameters:
  viewId - the compound view id (wildcards allowed)
Parameters:
  relationship - the position relative to the reference part;one of TOP, BOTTOM, LEFT,or RIGHT
Parameters:
  ratio - a ratio specifying how to divide the space currently occupied by the reference part,in the range 0.05f to 0.95f.Values outside this range will be clipped to facilitate direct manipulation.For a vertical split, the part on top gets the specified ratio of the current spaceand the part on bottom gets the rest.Likewise, for a horizontal split, the part at left gets the specified ratio of the current spaceand the part at right gets the rest.
Parameters:
  refId - the id of the reference part; either a view id, a folder id,or the special editor area id returned by getEditorArea



addShowInPart
public void addShowInPart(String id)(Code)
Adds an item to the Show In prompter. The id must name a view contributed to the workbench's view extension point (named "org.eclipse.ui.views").
Parameters:
  id - the view id
since:
   2.1



addShowViewShortcut
public void addShowViewShortcut(String id)(Code)
Adds a show view shortcut to the page layout. These are typically shown in the UI to allow rapid navigation to appropriate views. For example, in the Eclipse IDE, these appear as items under the Window > Show View menu. The id must name a view contributed to the workbench's views extension point (named "org.eclipse.ui.views").
Parameters:
  id - the view id



addStandaloneView
public void addStandaloneView(String viewId, boolean showTitle, int relationship, float ratio, String refId)(Code)
Adds a standalone view with the given compound id to this page layout. See the IPageLayout type documentation for more details about compound ids. A standalone view cannot be docked together with other views. A standalone view's title can optionally be hidden. If hidden, then any controls typically shown with the title (such as the close button) are also hidden. Any contributions or other content from the view itself are always shown (e.g. toolbar or view menu contributions, content description).

The id must name a view contributed to the workbench's view extension point (named "org.eclipse.ui.views").


Parameters:
  viewId - the compound view id
Parameters:
  showTitle - true to show the title and related controls,false to hide them
Parameters:
  relationship - the position relative to the reference part;one of TOP, BOTTOM, LEFT,or RIGHT
Parameters:
  ratio - a ratio specifying how to divide the space currently occupied by the reference part,in the range 0.05f to 0.95f.Values outside this range will be clipped to facilitate direct manipulation.For a vertical split, the part on top gets the specified ratio of the current spaceand the part on bottom gets the rest.Likewise, for a horizontal split, the part at left gets the specified ratio of the current spaceand the part at right gets the rest.
Parameters:
  refId - the id of the reference part; either a view id, a folder id,or the special editor area id returned by getEditorArea
since:
   3.0



addStandaloneViewPlaceholder
public void addStandaloneViewPlaceholder(String viewId, int relationship, float ratio, String refId, boolean showTitle)(Code)
Adds a standalone view placeholder to this page layout. A view placeholder is used to define the position of a view before the view appears. Initially, it is invisible; however, if the user ever opens a view whose compound id matches the placeholder, the view will appear at the same location as the placeholder. See the IPageLayout type documentation for more details about compound ids. If the placeholder contains wildcards, it remains in the layout, otherwise it is replaced by the view. If the primary id of the placeholder has no wildcards, it must refer to a view contributed to the workbench's view extension point (named "org.eclipse.ui.views").
Parameters:
  viewId - the compound view id (wildcards allowed)
Parameters:
  relationship - the position relative to the reference part; one ofTOP, BOTTOM, LEFT,or RIGHT
Parameters:
  ratio - a ratio specifying how to divide the space currently occupiedby the reference part, in the range 0.05f to0.95f. Values outside this range will beclipped to facilitate direct manipulation. For a verticalsplit, the part on top gets the specified ratio of the currentspace and the part on bottom gets the rest. Likewise, for ahorizontal split, the part at left gets the specified ratio ofthe current space and the part at right gets the rest.
Parameters:
  refId - the id of the reference part; either a view id, a folder id,or the special editor area id returned bygetEditorArea
Parameters:
  showTitle - true to show the view's title, false if not
since:
   3.2



addView
public void addView(String viewId, int relationship, float ratio, String refId)(Code)
Adds a view with the given compound id to this page layout. See the IPageLayout type documentation for more details about compound ids. The primary id must name a view contributed to the workbench's view extension point (named "org.eclipse.ui.views").
Parameters:
  viewId - the compound view id
Parameters:
  relationship - the position relative to the reference part;one of TOP, BOTTOM, LEFT,or RIGHT
Parameters:
  ratio - a ratio specifying how to divide the space currently occupied by the reference part,in the range 0.05f to 0.95f.Values outside this range will be clipped to facilitate direct manipulation.For a vertical split, the part on top gets the specified ratio of the current spaceand the part on bottom gets the rest.Likewise, for a horizontal split, the part at left gets the specified ratio of the current spaceand the part at right gets the rest.
Parameters:
  refId - the id of the reference part; either a view id, a folder id,or the special editor area id returned by getEditorArea



createFolder
public IFolderLayout createFolder(String folderId, int relationship, float ratio, String refId)(Code)
Creates and adds a new folder with the given id to this page layout. The position and relative size of the folder is expressed relative to a reference part.
Parameters:
  folderId - the id for the new folder. This must be unique withinthe layout to avoid collision with other parts.
Parameters:
  relationship - the position relative to the reference part;one of TOP, BOTTOM, LEFT,or RIGHT
Parameters:
  ratio - a ratio specifying how to divide the space currently occupied by the reference part,in the range 0.05f to 0.95f.Values outside this range will be clipped to facilitate direct manipulation.For a vertical split, the part on top gets the specified ratio of the current spaceand the part on bottom gets the rest.Likewise, for a horizontal split, the part at left gets the specified ratio of the current spaceand the part at right gets the rest.
Parameters:
  refId - the id of the reference part; either a view id, a folder id,or the special editor area id returned by getEditorArea the new folder



createPlaceholderFolder
public IPlaceholderFolderLayout createPlaceholderFolder(String folderId, int relationship, float ratio, String refId)(Code)
Creates and adds a placeholder for a new folder with the given id to this page layout. The position and relative size of the folder is expressed relative to a reference part.
Parameters:
  folderId - the id for the new folder. This must be unique withinthe layout to avoid collision with other parts.
Parameters:
  relationship - the position relative to the reference part;one of TOP, BOTTOM, LEFT,or RIGHT
Parameters:
  ratio - a ratio specifying how to divide the space currently occupied by the reference part,in the range 0.05f to 0.95f.Values outside this range will be clipped to facilitate direct manipulation.For a vertical split, the part on top gets the specified ratio of the current spaceand the part on bottom gets the rest.Likewise, for a horizontal split, the part at left gets the specified ratio of the current spaceand the part at right gets the rest.
Parameters:
  refId - the id of the reference part; either a view id, a folder id,or the special editor area id returned by getEditorArea a placeholder for the new folder
since:
   2.0



getDescriptor
public IPerspectiveDescriptor getDescriptor()(Code)
Returns the perspective descriptor for the perspective being layed out. the perspective descriptor for the perspective being layed out
since:
   3.2



getEditorArea
public String getEditorArea()(Code)
Returns the special identifier for the editor area in this page layout. The identifier for the editor area is also stored in ID_EDITOR_AREA.

The editor area is automatically added to each layout before anything else. It should be used as the point of reference when adding views to a layout.

the special id of the editor area



getEditorReuseThreshold
public int getEditorReuseThreshold()(Code)
Returns the number of open editors before reusing editors or -1 if the preference settings should be used instead. the number of open editors before reusing editors or -1 if the preference settings should be used instead.



getFolderForView
public IPlaceholderFolderLayout getFolderForView(String id)(Code)
Returns the folder layout for the view or placeholder with the given compound id in this page layout. See the IPageLayout type documentation for more details about compound ids. Returns null if the specified view or placeholder is unknown to the layout, or the placeholder was not in a folder.
Parameters:
  id - the compound view id or placeholder. Must not benull. the folder layout, or null
since:
   3.3



getViewLayout
public IViewLayout getViewLayout(String id)(Code)
Returns the layout for the view or placeholder with the given compound id in this page layout. See the IPageLayout type documentation for more details about compound ids. Returns null if the specified view or placeholder is unknown to the layout.
Parameters:
  id - the compound view id or placeholder the view layout, or null
since:
   3.0



isEditorAreaVisible
public boolean isEditorAreaVisible()(Code)
Returns whether the page's layout will show the editor area. true when editor area visible, false otherwise



isFixed
public boolean isFixed()(Code)
Returns true if this layout is fixed, false if not. In a fixed layout, layout parts cannot be moved or zoomed, and the initial set of views cannot be closed. The default is false. true if this layout is fixed, false if not.
since:
   3.0



setEditorAreaVisible
public void setEditorAreaVisible(boolean showEditorArea)(Code)
Show or hide the editor area for the page's layout.
Parameters:
  showEditorArea - true to show the editor area, false to hide the editor area



setEditorReuseThreshold
public void setEditorReuseThreshold(int openEditors)(Code)
Sets the number of open editors before reusing editors. If < 0 the user preference settings will be used.
Parameters:
  openEditors - the number of open editors



setFixed
public void setFixed(boolean isFixed)(Code)
Sets whether this layout is fixed. In a fixed layout, layout parts cannot be moved or zoomed, and the initial set of views cannot be closed.
Parameters:
  isFixed - true if this layout is fixed, false if not
since:
   3.0



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