3-view layout. Ratio override. [message #463863] |
Sat, 17 February 2007 15:59  |
Eclipse User |
|
|
|
I'm having basic trouble with IPageLayout. I need three views distributed
across the page using .25/.50/.25 ratios, but I'm getting ratios closer to
35/.20/.45. The javadocs for IPageLayout provide no explanation. I
noticed that ratio values should range from .05 to .95. I've modified my
ratios so they add up to .95, but that had no effect.
public void createInitialLayout(IPageLayout layout) {
layout.setEditorAreaVisible(false);
String editorArea = layout.getEditorArea();
layout.addStandaloneView(OutboundConsolListView.ID, false,
IPageLayout.LEFT, 0.25f,
editorArea);
IFolderLayout center=layout.createFolder("center", IPageLayout.RIGHT,
0.50f,
OutboundConsolListView.ID);
center.addView(PlaceholderView.ID);
layout.addStandaloneView(OutboundShipmentListView.ID, false,
IPageLayout.RIGHT, 0.25f,
"center");
}
|
|
|
|
Re: 3-view layout. Ratio override. [message #463887 is a reply to message #463864] |
Mon, 19 February 2007 11:21   |
Eclipse User |
|
|
|
A layout is always splitting the "relativeTo" view into 2.
For example, if you wanted an editor area on the right, and 3 views on
the left, all 33%, you could code it:
layout.addView("view1.id", IPageLayout.LEFT, 0.25f,
IPageLayout.ID_EDITOR_AREA);
// the 33% is applied to the view on "top", "view1.id"
layout.addView("view2.id", IPageLayout.BOTTOM, 0.33f, "view1.id");
// this just splits that 66% area in half
layout.addView("view3.id", IPageLayout.BOTTOM, 0.5f, "view2.id");
Later,
PW
|
|
|
|
Re: 3-view layout. Ratio override. +Re-sizing [message #463974 is a reply to message #463900] |
Wed, 21 February 2007 10:22  |
Eclipse User |
|
|
|
Octavio Berlanga wrote:
> Thanks Paul.
>
> I got it to work. I know we have limited control over view layout, but
> what's the best way to prevent views from re-sizing when another view is
> closed?
>
> In the java perspective, for example, the package explorer view does not
> take over the entire Page when all editors are closed. How does this
> happen?
The editor area is a special part stack, which can remain open and
empty. All views go into normal view stacks, which disappear when empty
There's isn't really a workaround, unless you do like you suggest and
keep an empty view open.
Later,
PW
|
|
|
Powered by
FUDForum. Page generated in 0.03106 seconds