Search in sources :

Example 1 with RuleWizard

use of de.janrufmonitor.ui.jface.wizards.RuleWizard in project janrufmonitor by tbrandt77.

the class RuleAssistent method openRuleWizard.

private void openRuleWizard(IRule rule) {
    Display display = DisplayManager.getDefaultDisplay();
    Shell shell = new Shell(display);
    WizardDialog.setDefaultImage(SWTImageManager.getInstance(this.getRuntime()).get(IJAMConst.IMAGE_KEY_PIM_ICON));
    RuleWizard ruleWiz = new RuleWizard(rule);
    WizardDialog dlg = new WizardDialog(shell, ruleWiz);
    dlg.open();
    if (dlg.getReturnCode() == WizardDialog.OK) {
        IRule newRule = ruleWiz.getResult();
        if (rule != null)
            this.m_rules.remove(rule);
        if (newRule != null)
            this.m_rules.add(newRule);
    }
    cl.setInput(this.m_rules);
}
Also used : RuleWizard(de.janrufmonitor.ui.jface.wizards.RuleWizard) Shell(org.eclipse.swt.widgets.Shell) WizardDialog(org.eclipse.jface.wizard.WizardDialog) IRule(de.janrufmonitor.framework.rules.IRule) Display(org.eclipse.swt.widgets.Display)

Aggregations

IRule (de.janrufmonitor.framework.rules.IRule)1 RuleWizard (de.janrufmonitor.ui.jface.wizards.RuleWizard)1 WizardDialog (org.eclipse.jface.wizard.WizardDialog)1 Display (org.eclipse.swt.widgets.Display)1 Shell (org.eclipse.swt.widgets.Shell)1