Search in sources :

Example 1 with MsnWizard

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

the class InitMsnPage method openMsnWizard.

private void openMsnWizard(String msn, String additional) {
    Display display = DisplayManager.getDefaultDisplay();
    Shell shell = new Shell(display);
    // Create the dialog
    IMsn oldMsn = this.getRuntime().getCallFactory().createMsn(msn, additional);
    WizardDialog.setDefaultImage(SWTImageManager.getInstance(this.getRuntime()).get(IJAMConst.IMAGE_KEY_PIM_ICON));
    MsnWizard msnW = new MsnWizard(oldMsn);
    WizardDialog dlg = new WizardDialog(shell, msnW);
    dlg.open();
    if (dlg.getReturnCode() == WizardDialog.OK) {
        IMsn result = msnW.getResult();
        this.msns.remove(oldMsn);
        this.msns.add(result);
    }
    tv.setInput(this.msns);
    this.resizeTable(tv.getTable());
}
Also used : Shell(org.eclipse.swt.widgets.Shell) MsnWizard(de.janrufmonitor.ui.jface.wizards.MsnWizard) IMsn(de.janrufmonitor.framework.IMsn) WizardDialog(org.eclipse.jface.wizard.WizardDialog) Display(org.eclipse.swt.widgets.Display)

Example 2 with MsnWizard

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

the class MsnManager method openMsnWizard.

private void openMsnWizard(String msn, String additional) {
    Display display = DisplayManager.getDefaultDisplay();
    Shell shell = new Shell(display);
    // Create the dialog
    IMsn oldMsn = this.getRuntime().getCallFactory().createMsn(msn, additional);
    WizardDialog.setDefaultImage(SWTImageManager.getInstance(this.getRuntime()).get(IJAMConst.IMAGE_KEY_PIM_ICON));
    MsnWizard msnW = new MsnWizard(oldMsn);
    WizardDialog dlg = new WizardDialog(shell, msnW);
    dlg.open();
    if (dlg.getReturnCode() == WizardDialog.OK) {
        IMsn result = msnW.getResult();
        this.msns.remove(oldMsn);
        this.msns.add(result);
    }
    tv.setInput(this.msns);
    this.resizeTable(tv.getTable());
}
Also used : Shell(org.eclipse.swt.widgets.Shell) MsnWizard(de.janrufmonitor.ui.jface.wizards.MsnWizard) IMsn(de.janrufmonitor.framework.IMsn) WizardDialog(org.eclipse.jface.wizard.WizardDialog) Display(org.eclipse.swt.widgets.Display)

Aggregations

IMsn (de.janrufmonitor.framework.IMsn)2 MsnWizard (de.janrufmonitor.ui.jface.wizards.MsnWizard)2 WizardDialog (org.eclipse.jface.wizard.WizardDialog)2 Display (org.eclipse.swt.widgets.Display)2 Shell (org.eclipse.swt.widgets.Shell)2