Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to catch first time displaying of the WizardPage

I'm writing a little wizard for Eclipse with some pages and I need to catch the moment of the first time page displaying.

I checked constructor and createControl but they are called in the creation moment in the Wizard object (addPages).

Is there a way to get what I need? Maybe somebody knows some trick?

like image 586
morbilli Avatar asked Apr 24 '12 17:04

morbilli


2 Answers

You can override setVisible(boolean) method in your WizardPage. So for example use something like:

private boolean initialized = false;

@Override
public void setVisible(boolean visible) {
    if (!initialized && visible) {
        //do something
        initialized = true;
    }
    control.setVisible(visible);
}
like image 57
Jan Arciuchiewicz Avatar answered Dec 08 '22 22:12

Jan Arciuchiewicz


You can use a IPageChangedListener or a IpageChangingListener, registered on the WizardDialog. They will be notified when the current page of the wizard changes.

like image 26
Baldrick Avatar answered Dec 08 '22 23:12

Baldrick