|Layout Constraints [message #572191]
||Tue, 28 August 2007 16:16
| Peter Centgraf
Registered: July 2009
Layout issues were not really mentioned in the article, and I wonder if
there are any unique problems when mixing SWT and Swing layout
algorithms in the same Shell.
Here's the motivating problem: I have found that I often want a mix of
top-down constraints (e.g. fit everything within my Shell) and bottom-up
constraints (e.g. this Text should be at least 50 pixels wide). The
minimum/hint mechanism in SWT's GridLayout and the layouts in the
Eclipse Forms package let me gracefully fall back on scrolling when the
bottom-up constraints cannot be satisfied, while still making a "best
effort" to adjust to the bounds of the Shell when that is possible.
How would a Swing component communicate its bottom-up constraints to an
SWT GridLayout? Clearly, it needs some help. Swing has its own
mechanism for computing minimum, preferred, and maximum sizes. Would it
be possible to bridge these values from the Swing component to the SWT
min/hint API? Is it possible to make Swing's layouts respect the hints
provided in SWT's Layout.computeSize()?
I don't have answers to these issues, but I'm curious to hear your ideas.
Eclipse Nebula Committer
RJ Lee Group, Inc.
Powered by FUDForum
. Page generated in 0.02664 seconds