Skip to main content



      Home
Home » Newcomers » Newcomers » Wrong view sizing in perspective
Wrong view sizing in perspective [message #197538] 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 #197614 is a reply to message #197538] 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 #197719 is a reply to message #197538] 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:Writing a plugin piggybacking on debug framework
Next Topic:Visual Editor and RCP appliacions
Goto Forum:
  


Current Time: Sat May 10 01:32:39 EDT 2025

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

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

Back to the top