Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Wrong view sizing in perspective
Wrong view sizing in perspective [message #464412] Fri, 02 March 2007 09:48 Go to next message
Eclipse UserFriend
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 #464418 is a reply to message #464412] Fri, 02 March 2007 13:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse5.rizzoweb.com

Matt Genovese wrote:
> 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.

Your question would probably receive more attention in the
eclipse.platform or eclipse.platform.swt groups.

Hope this helps,
Eric
Re: Wrong view sizing in perspective [message #464425 is a reply to message #464412] Sat, 03 March 2007 18:19 Go to previous message
Eclipse UserFriend
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
Previous Topic:Difference between RCP and normal PlugIn ?
Next Topic:setting a IPropertySourceProvider to a PropertySheetPage
Goto Forum:
  


Current Time: Sun Mar 16 06:52:05 EDT 2025

Powered by FUDForum. Page generated in 0.04255 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top