Re: [nebula-dev] computeSize in Control

2012-05-11 Thread Hallvard Trætteberg
Well, some places say it should return the preferred size. In the case of GeoMap, I think it is reasonable to at least ask for the size corresponding to one map tile. Hallvard On 10.05.12 17.33, Matthew Hall wrote: The computeSize method should report the minimum size needed by the control.

Re: [nebula-dev] computeSize in Control

2012-05-11 Thread Tom Schindl
The preferred size only if you pass SWT.DEFAULT as a hint! Tom Am 11.05.12 09:00, schrieb Hallvard Trætteberg: Well, some places say it should return the preferred size. In the case of GeoMap, I think it is reasonable to at least ask for the size corresponding to one map tile. Hallvard

Re: [nebula-dev] computeSize in Control

2012-05-11 Thread Hallvard Trætteberg
On 11.05.12 09.03, Tom Schindl wrote: The preferred size only if you pass SWT.DEFAULT as a hint! Yes, like I did in int w = (wHint != SWT.DEFAULT ? wHint : /* your preferred width */); int h = (hHint != SWT.DEFAULT ? hHint : /* your preferred height */); return new Point(w, h); Tom Am

[nebula-dev] computeSize in Control

2012-05-10 Thread Hallvard Trætteberg
Hi, I have been looking at implementing computeSize in GeoMap, so it grabs more space than the minimum when there are no constraints. I test it by creating an anonymous subclass in GeoMapViewer's constructor. First I tried public GeoMapViewer(Composite parent, int flags) {

Re: [nebula-dev] computeSize in Control

2012-05-10 Thread Matthew Hall
The computeSize method should report the minimum size needed by the control. Expanding the control to fill available space is the responsibility of the container control, using layout data hints. -Matthew On May 10, 2012 8:25 AM, Hallvard Trætteberg h...@idi.ntnu.no wrote: Hi, I have been