Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » help understanding the IPageLayout ratio
help understanding the IPageLayout ratio [message #517803] Tue, 02 March 2010 08:20 Go to next message
Luca Ferrari is currently offline Luca FerrariFriend
Messages: 159
Registered: November 2009
Senior Member
Hi all,
after experimenting with the IPageLayout I guess I got how the floating ratio works, even if a lot of articles and books simply states that the floating ratio is the amount of horizontal space for a view:
- when using TOP alignment the floating ratio indicates the vertical space of a view
- when using the LEFT alignment the floating ration indicates the amount of horizontal space
- when using the RIGHT alignment the floating ratio indicates the amount of inversed horizontal space for the view, that is how much space remains for other views.

So for instance, in the case of LEFT 0.8 the view will occupy the 80% of the horizontal space, in the case of RIGHT 0.8 it will occupy the remaining 20%. Is this correct?
Re: help understanding the IPageLayout ratio [message #518400 is a reply to message #517803] Wed, 03 March 2010 19:06 Go to previous message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 418
Registered: July 2009
Senior Member
Hi Luca,

Yes, it seems a bit weird. read the javadoc of IPagelayout: ratio: a ratio
specifying how to divide the space currently occupied by the reference part,
in the range 0.05f to 0.95f. Values outside this range will be clipped to
facilitate direct manipulation. For a vertical split, the part on top gets
the specified ratio of the current space and the part on bottom gets the
rest. Likewise, for a horizontal split, the part at left gets the specified
ratio of the current space and the part at right gets the rest.

--

Best Regards,
Wim Jongman
-- Does fuzzy logic tickle?
(Eclipse Old Skool Quote Service)
> Hi all,
> after experimenting with the IPageLayout I guess I got how the floating
ratio works, even if a lot of articles and books simply states that the
floating ratio is the amount of horizontal space for a view:
> - when using TOP alignment the floating ratio indicates the vertical space
of a view
> - when using the LEFT alignment the floating ration indicates the amount of
horizontal space
> - when using the RIGHT alignment the floating ratio indicates the amount of
inversed horizontal space for the view, that is how much space remains for
other views.
>
> So for instance, in the case of LEFT 0.8 the view will occupy the 80% of
the horizontal space, in the case of RIGHT 0.8 it will occupy the remaining
20%. Is this correct?
Previous Topic:Getting Tab File Location
Next Topic:Dynamic ContributionItem menus keyboard Accelerators
Goto Forum:
  


Current Time: Thu Dec 18 05:44:55 GMT 2014

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

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