use of eu.esdihumboldt.hale.ui.HaleWizardPage in project hale by halestudio.
the class AbstractGenericCustomFunctionWizard method setContainer.
/**
* @see Wizard#setContainer(IWizardContainer)
*/
@Override
public void setContainer(IWizardContainer wizardContainer) {
super.setContainer(wizardContainer);
if (wizardContainer instanceof HaleWizardDialog) {
final HaleWizardDialog container = (HaleWizardDialog) wizardContainer;
// has to be pageChanging, because closing the tray in page changed
// leads to an exception
((HaleWizardDialog) wizardContainer).addPageChangingListener(new IPageChangingListener() {
@Override
public void handlePageChanging(PageChangingEvent event) {
boolean helpAvailable = false;
if (event.getTargetPage() instanceof HaleWizardPage<?>) {
HaleWizardPage<?> page = (HaleWizardPage<?>) event.getTargetPage();
helpAvailable = page.getHelpContext() != null;
}
container.setHelpButtonEnabled(helpAvailable);
if (container.getTray() != null)
container.closeTray();
}
});
}
}
use of eu.esdihumboldt.hale.ui.HaleWizardPage in project hale by halestudio.
the class AbstractGenericFunctionWizard method setContainer.
/**
* @see Wizard#setContainer(IWizardContainer)
*/
@Override
public void setContainer(IWizardContainer wizardContainer) {
super.setContainer(wizardContainer);
if (wizardContainer instanceof HaleWizardDialog) {
final HaleWizardDialog container = (HaleWizardDialog) wizardContainer;
// has to be pageChanging, because closing the tray in page changed
// leads to an exception
((HaleWizardDialog) wizardContainer).addPageChangingListener(new IPageChangingListener() {
@Override
public void handlePageChanging(PageChangingEvent event) {
boolean helpAvailable = false;
if (event.getTargetPage() instanceof HaleWizardPage<?>) {
HaleWizardPage<?> page = (HaleWizardPage<?>) event.getTargetPage();
helpAvailable = page.getHelpContext() != null;
}
container.setHelpButtonEnabled(helpAvailable);
if (container.getTray() != null)
container.closeTray();
}
});
}
}
Aggregations