Wrong view sizing in perspective [message #464412] |
Fri, 02 March 2007 09:48  |
Eclipse User |
|
|
|
Originally posted by: mgenovese.austin.rr.com
Attempting to create a view layout in a perspective, and finding one of
the views that I size to be "0.01f" is taking up most of the perspective.
The perspective does NOT have any editors - only views. The look I'm
going for is this:
-----------------------------------------
| | | |
| | | |
| | | |
| | TOP FOLDER | |
| | | |
| LEFT | | RIGHT |
| FOLDER | | FOLDER |
| | | |
| |---------------------| |
| | | |
| | CONSOLE | |
| | | |
-----------------------------------------
However, with the code below, what I get is this:
-----------------------------------------
| | | |
| | | |
| | | |
| |TOP | |
| |FOLD| |
| LEFT |ER | RIGHT |
| FOLDER | | FOLDER |
| | | |
| |----| |
| | | |
| |CON | |
| |SOLE| |
-----------------------------------------
No matter what I do with the proportional sizings when creating the
views, the right folder remains HUGE. I have tried sizing the right
folder to 0.0f, and it's still the same
Here's my code:
public void createInitialLayout(IPageLayout layout) {
layout.setEditorAreaVisible(false);
layout.setFixed(false);
String editorArea = layout.getEditorArea();
// Create the folder that will hold views on the LEFT SIDE.
IFolderLayout leftFolder = layout.createFolder(LEFT_FOLDER_ID,
IPageLayout.LEFT, 0.20f, editorArea);
// Add items to the left folder.
leftFolder.addView(ViewResources.ID);
leftFolder.addView(ViewTools.ID);
leftFolder.addView(ViewFields.ID);
// Create the folder that will hold views on the RIGHT SIDE.
IFolderLayout rightFolder = layout.createFolder(RIGHT_FOLDER_ID,
IPageLayout.RIGHT, 0.01f, editorArea);
// Add items to the right folder.
rightFolder.addView(ViewNotes.ID);
// Create the folder that will hold views on the TOP SIDE.
IFolderLayout topFolder = layout.createFolder(TOP_FOLDER_ID,
IPageLayout.TOP, 0.70f, editorArea);
// Create the Workspace view at the top.
topFolder.addView(ViewWorkspaceTemplate.ID);
topFolder.addView(ViewTemplate.ID);
// Create the Console view at the very BOTTOM.
layout.addView(ViewConsole.ID, IPageLayout.BOTTOM, 0.5f, editorArea);
....
}
Any ideas? This is really screwing me up.
Thanks,
Matt
--
|
|
|
|
Re: Wrong view sizing in perspective [message #464425 is a reply to message #464412] |
Sat, 03 March 2007 18:19  |
Eclipse User |
|
|
|
Originally posted by: nugaee.SPAMtlen.pl
Matt Genovese wrote:
> Any ideas? This is really screwing me up.
couple of hints :
- adding views sequence is important
- ratio works this way :
in vertical split top part takes ratio space
in horizontal split left part takes ratio space
full description can be found for example in
org.eclipse.ui.perspectiveExtensions extension point description
hope this helps (a little bit)
bartek michalik
|
|
|
Powered by
FUDForum. Page generated in 0.04255 seconds