| java.lang.Object org.eclipse.ui.internal.PageLayout
PageLayout | public class PageLayout implements IPageLayout(Code) | | This factory is used to define the initial layout of a part sash container.
Design notes: The design of IPageLayout is a reflection of
three requirements:
- A mechanism is required to define the initial layout for a page.
- The views and editors within a page will be persisted between
sessions.
- The view and editor lifecycle for (1) and (2) should be identical.
In reflection of these requirements, the following strategy has been
implemented for layout definition.
- A view extension is added to the workbench registry for the view.
This extension defines the extension id and extension class.
- A view is added to a page by invoking one of the add methods
in
IPageLayout . The type of view is passed as an
extension id, rather than a handle. The page layout will map
the extension id to a view class, create an instance of the class,
and then add the view to the page.
|
Method Summary | |
public void | addActionSet(String actionSetID) Adds an action set to the page.
Parameters: actionSetID - Identifies the action set extension to use. | public void | addFastView(String id) | public void | addFastView(String id, float ratio) | public void | addNewWizardShortcut(String id) Adds a creation wizard to the File New menu. | public void | addPerspectiveShortcut(String id) Adds a perspective shortcut to the Perspective menu. | public void | addPlaceholder(String viewId, int relationship, float ratio, String refId) | public void | addShowInPart(String id) | public void | addShowViewShortcut(String id) Adds a view to the Show View menu. | public void | addStandaloneView(String viewId, boolean showTitle, int relationship, float ratio, String refId) | public void | addStandaloneViewPlaceholder(String viewId, int relationship, float ratio, String refId, boolean showTitle) | public void | addView(String viewId, int relationship, float ratio, String refId) | public void | addView(String viewId, int relationship, float ratio, String refId, boolean minimized) Convenience method to allow setting the initial minimized
state if a new stack is created. | boolean | checkPartInLayout(String partId) Verify that the part is already present in the layout
and cannot be added again. | boolean | checkValidPlaceholderId(String id) Checks whether the given id is a valid placeholder id. | public IFolderLayout | createFolder(String folderId, int relationship, float ratio, String refId) | public IPlaceholderFolderLayout | createPlaceholderFolder(String folderId, int relationship, float ratio, String refId) | public ArrayList | getActionSets() the action set list for the page. | public IPerspectiveDescriptor | getDescriptor() | public String | getEditorArea() an identifier for the editor area. | public int | getEditorReuseThreshold() | public ArrayList | getFastViews() | public IPlaceholderFolderLayout | getFolderForView(String viewId) | public Map | getIDtoViewLayoutRecMap() | public List | getMinimizedStacks() | public ArrayList | getNewWizardShortcuts() the new wizard shortcuts associated with the page. | public ArrayList | getPerspectiveShortcuts() the perspective shortcuts associated with the page. | LayoutPart | getRefPart(String partID) | public ViewSashContainer | getRootLayoutContainer() | public ArrayList | getShowInPartIds() the ids of the parts to list in the Show In... | public ArrayList | getShowViewShortcuts() the show view shortcuts associated with the page. | ViewFactory | getViewFactory() | public IViewLayout | getViewLayout(String viewId) | ViewLayoutRec | getViewLayoutRec(String id, boolean create) Returns the view layout record for the given view id, or null if not
found. | public boolean | isEditorAreaVisible() | public boolean | isFixed() | public void | removePlaceholder(String id) Removes any existing placeholder with the given id. | public void | setEditorAreaVisible(boolean showEditorArea) | public void | setEditorReuseThreshold(int openEditors) | public void | setFixed(boolean fixed) | void | setFolderPart(String viewId, ContainerPlaceholder container) Map the folder part containing the given view ID. | void | setFolderPart(String viewId, ViewStack folder) Map the folder part containing the given view ID. | void | setRefPart(String partID, LayoutPart part) Map an ID to a part. | public void | stackPlaceholder(String viewId, String refId) Stack a placeholder on top of another. | public void | stackView(String viewId, String refId) Stack one view on top of another. | public static int | swtConstantToLayoutPosition(int swtConstant) Converts SWT position constants into layout position constants. |
PageLayout | public PageLayout()(Code) | | Constructs a new PageLayout for other purposes.
|
addActionSet | public void addActionSet(String actionSetID)(Code) | | Adds an action set to the page.
Parameters: actionSetID - Identifies the action set extension to use. It mustexist within the workbench registry. |
addFastView | public void addFastView(String id, float ratio)(Code) | | |
addNewWizardShortcut | public void addNewWizardShortcut(String id)(Code) | | Adds a creation wizard to the File New menu.
The id must name a new wizard extension contributed to the
workbench's 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 Perspective menu.
The id must name a perspective extension contributed to the
workbench's 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) | | |
addShowViewShortcut | public void addShowViewShortcut(String id)(Code) | | Adds a view to the Show View menu. The id must name a view extension
contributed to the workbench's 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) | | |
addStandaloneViewPlaceholder | public void addStandaloneViewPlaceholder(String viewId, int relationship, float ratio, String refId, boolean showTitle)(Code) | | |
addView | public void addView(String viewId, int relationship, float ratio, String refId)(Code) | | |
addView | public void addView(String viewId, int relationship, float ratio, String refId, boolean minimized)(Code) | | Convenience method to allow setting the initial minimized
state if a new stack is created. Used by the 'perspectiveExtension'
reader.
since: 3.3 |
checkPartInLayout | boolean checkPartInLayout(String partId)(Code) | | Verify that the part is already present in the layout
and cannot be added again. Log a warning message.
|
checkValidPlaceholderId | boolean checkValidPlaceholderId(String id)(Code) | | Checks whether the given id is a valid placeholder id.
A placeholder id may be simple or compound, and can optionally contain a wildcard.
Parameters: id - the placeholder id true if the given id is a valid placeholder id, false otherwise |
getActionSets | public ArrayList getActionSets()(Code) | | the action set list for the page. This is List of String s. |
getEditorArea | public String getEditorArea()(Code) | | an identifier for the editor area. The editor area isautomatically added to each layout before any other part. It should beused as a reference part for other views. |
getEditorReuseThreshold | public int getEditorReuseThreshold()(Code) | | |
getIDtoViewLayoutRecMap | public Map getIDtoViewLayoutRecMap()(Code) | | since: 3.0 |
getMinimizedStacks | public List getMinimizedStacks()(Code) | | |
getNewWizardShortcuts | public ArrayList getNewWizardShortcuts()(Code) | | the new wizard shortcuts associated with the page. This is a List of String s. |
getPerspectiveShortcuts | public ArrayList getPerspectiveShortcuts()(Code) | | the perspective shortcuts associated with the page. This is a List of String s. |
getShowInPartIds | public ArrayList getShowInPartIds()(Code) | | the ids of the parts to list in the Show In... prompter. This isa List of String s. |
getShowViewShortcuts | public ArrayList getShowViewShortcuts()(Code) | | the show view shortcuts associated with the page. This is a List of String s. |
getViewFactory | ViewFactory getViewFactory()(Code) | | the ViewFactory for this PageLayout . since: 3.0 |
getViewLayoutRec | ViewLayoutRec getViewLayoutRec(String id, boolean create)(Code) | | Returns the view layout record for the given view id, or null if not
found. If create is true, the record is created if it doesn't already
exist.
since: 3.0 |
isEditorAreaVisible | public boolean isEditorAreaVisible()(Code) | | |
isFixed | public boolean isFixed()(Code) | | |
removePlaceholder | public void removePlaceholder(String id)(Code) | | Removes any existing placeholder with the given id.
Parameters: id - the id for the placeholder since: 3.1 |
setEditorAreaVisible | public void setEditorAreaVisible(boolean showEditorArea)(Code) | | |
setEditorReuseThreshold | public void setEditorReuseThreshold(int openEditors)(Code) | | |
setFixed | public void setFixed(boolean fixed)(Code) | | |
setFolderPart | void setFolderPart(String viewId, ContainerPlaceholder container)(Code) | | Map the folder part containing the given view ID.
Parameters: viewId - the part ID. Parameters: container - the ContainerPlaceholder . |
setFolderPart | void setFolderPart(String viewId, ViewStack folder)(Code) | | Map the folder part containing the given view ID.
Parameters: viewId - the part ID. Parameters: folder - the ViewStack . |
setRefPart | void setRefPart(String partID, LayoutPart part)(Code) | | Map an ID to a part.
Parameters: partId - the part ID. Parameters: part - the LayoutPart . |
stackPlaceholder | public void stackPlaceholder(String viewId, String refId)(Code) | | Stack a placeholder on top of another.
Parameters: viewId - the view ID. Parameters: refId - the reference ID. |
stackView | public void stackView(String viewId, String refId)(Code) | | Stack one view on top of another.
Parameters: viewId - the view ID. Parameters: refId - the reference ID. |
swtConstantToLayoutPosition | public static int swtConstantToLayoutPosition(int swtConstant)(Code) | | Converts SWT position constants into layout position constants.
Parameters: swtConstant - one of SWT.TOP, SWT.BOTTOM, SWT.LEFT, or SWT.RIGHT one of IPageLayout.TOP, IPageLayout.BOTTOM, IPageLayout.LEFT, IPageLayout.RIGHT, or -1 indicating aninvalid input since: 3.0 |
|
|