Resizability of JFace WizardPage's

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Resizability of JFace WizardPage's

Postby Slot Head » Tue Feb 14, 2006 2:29 pm

We are using the JFace Wizard classes to make a pretty ordinary wizard.

I noticed that my wizard dialog pages are resizable. If I click and drag the the lower right corner, I can resize them.

Nowhere can I find the familiar int style parameter that you set with combinations of SWT.parameter. Usually, that is how we can control such styles, right?

Interestingly, the preview feature in SWT-Designer 4.2.0 does not allow the dialog to be resized.

As a workaround, I may simply accept that the dialogs are resizable and add FormLayout's to each page so that my controls make use of all the space the user gives them.

But I'm wondering, does anybody know what's going on here? Did the JFace people decide that all Wizard pages should be resizable? (this would not be the first time that we've found JFace to dumb things down a little too far). Is this a minor bug in the Designer, or is the Designer the only thing that's working right?

TIA for any comments, ideas or suggestions.
Slot Head
Posts: 36
Joined: Sun Jul 10, 2005 9:50 am

Postby admin » Tue Feb 14, 2006 9:28 pm

"Use the Source, Luke!" :-)

Here is piece of WizardDialog (constructor).

Code: Select all
    public WizardDialog(Shell parentShell, IWizard newWizard) {
        setShellStyle(SWT.CLOSE | SWT.TITLE | SWT.BORDER
                | SWT.APPLICATION_MODAL | SWT.RESIZE | getDefaultOrientation());
        // since VAJava can't initialize an instance var with an anonymous
        // class outside a constructor we do it here:
        cancelListener = new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {

As you can see, it sets SWT.RESIZE style, so allows Dialog to resize. If you don't want this, create subclass of WizardDialog and use it in your action. If you can not control this, you don't have choise - this is how all RCP application should behave - don't limit user and allow resize. Build good, resizable WizardPages using good layouts. SWT Designer can help you. ;-)
Posts: 166
Joined: Thu Jul 24, 2003 12:25 am

Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest