Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [nebula-dev] GeoMapViewer example

Wim,

On 08.05.12 15.02, Wim Jongman wrote:

We had a collision. Are you happy with the change I made?

Your solution is the minimal one needed for solving my problem, so it's OK. I think my suggestion is cleaner if we need to support many such options, but perhaps overkill at this point.

The name of the methods could suggest that they are concerned with the default/initial setting of a UI element, rather than the (current) value use for the layout. E.g. getInitialHorizontalFill() would be more explanatory.

Did you test that it has effect also for the initial layout. It's only when the control and layout is refreshed by triggering relayoutExample() that the hFill and vFill values are used. This bit me when I implemented my suggestion. I needed to introduce a configureLayout() method and use it both in recreateExample() and relayoutExample():

    protected void recreateExample()
    {
	...
        updateListeners();

        configureExampleLayout(); // <-----
        controlExample.setLayoutData(controlGridData);

        controlArea.layout(true);
    }

    protected void configureExampleLayout()
    {
    	controlGridData.verticalAlignment = vFill ? SWT.FILL : SWT.BEGINNING;
    	controlGridData.grabExcessVerticalSpace = vFill;
    	
controlGridData.horizontalAlignment = hFill ? SWT.FILL : SWT.BEGINNING;
    	controlGridData.grabExcessHorizontalSpace = hFill;
    }

    /**
* Recalculates and repositions the layout of the example control based upon the layout options * chosen by the user. Extenders may wish to call this method if a user changes a widget
     * parameter that might affect the layout (usually the preferred size).
     */
    protected void relayoutExample()
    {
    	configureExampleLayout(); // <--------
        controlArea.layout(true,true);
    }

Hallvard


Regards,

Wim

On Tue, May 8, 2012 at 12:38 PM, Hallvard Trætteberg<hal@xxxxxxxxxxx>  wrote:
OK, perhaps a bug and a suggestion for a solution. I think it's best to
expose the data, e.g. hFill and vFill fields, and set the UI accordingly.

Hallvard


On 08.05.12 12.09, Wim Jongman wrote:

Hi Hallvard,

There is no API for it. Put one in if you like. Other widgets can
benefit from that also.

Regards,

Wim

On Tue, May 8, 2012 at 11:56 AM, Hallvard Trætteberg<hal@xxxxxxxxxxx>
  wrote:

Yes, I can do it manually (as a user), but how to pre-select these
checkboxes in my example tab class' code. This class inherits from an
abstract class that sets up the "Size" group and uses the values for
handling layout. The fill checkboxes are unselected by default and I want
them to be selected.

Hallvard


On 08.05.12 11.35, wim.jongman@xxxxxxxxxxxxxxxxxx wrote:



Met vriendelijke groet,


Wim Jongman
Remain BV



P: +31 30 600 50 10 M:+31 62 237 12 97 F: +31 30 600 50 19 Skype:
wim.jongman
http://www.remainsoftware.com<http://www.remainsoftware.com/>
http://www.industrial-tsi.com<http://www.industrial-tsi.com/>

http://twitter.com/wimjongman



From:   Tom Schindl<tom.schindl@xxxxxxxxxxxxxxx>
To:     nebula-dev@xxxxxxxxxxx
Date:   08-05-2012 11:25
Subject:        Re: [nebula-dev] GeoMapViewer example
Sent by:        nebula-dev-bounces@xxxxxxxxxxx


------------------------------------------------------------------------




Am 08.05.12 11:21, schrieb Hallvard Trætteberg:
  >    Hi,
  >
  >    I'm working on the GeoMapViewer example (see attachment). I have one
  >    question and a request:
  >    1) Is there a way of selecting the horizontal and vertical fill
  >    checkboxes by default, since this widget is hopeless without the
full
size?

I'm not sure what you ask here for?

Tom

--
B e s t S o l u t i o n . a t EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl geschäftsführer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5-7/1 A-6020 innsbruck fax ++43 512 935833
http://www.BestSolution.at<http://www.bestsolution.at/>phone ++43 512

935834
_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/nebula-dev



_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/nebula-dev


_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/nebula-dev

_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/nebula-dev

_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/nebula-dev
_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/nebula-dev


Back to the top