use of de.janrufmonitor.framework.IMsn in project janrufmonitor by tbrandt77.
the class MsnManager method performOk.
public boolean performOk() {
for (int i = 0; i < this.removeMsns.size(); i++) {
IMsn m = (IMsn) this.removeMsns.get(i);
this.getRuntime().getConfigManagerFactory().getConfigManager().removeProperty(this.CONFIG_NAMESPACE, m.getMSN() + "_label");
this.getRuntime().getConfigManagerFactory().getConfigManager().removeProperty(this.CONFIG_NAMESPACE, m.getMSN() + "_msn");
}
this.removeMsns.clear();
StringBuffer list = new StringBuffer();
for (int i = 0; i < this.msns.size(); i++) {
IMsn m = (IMsn) this.msns.get(i);
this.getPreferenceStore().setValue(this.CONFIG_NAMESPACE + SEPARATOR + m.getMSN() + "_msn", m.getMSN());
this.getPreferenceStore().setValue(this.CONFIG_NAMESPACE + SEPARATOR + m.getMSN() + "_label", m.getAdditional());
list.append(m.getMSN());
list.append(",");
}
this.getPreferenceStore().setValue(this.CONFIG_NAMESPACE + SEPARATOR + "list", list.toString());
this.getPreferenceStore().setValue(IJAMConst.GLOBAL_NAMESPACE + SEPARATOR + "detectallmsn", allMsns.getBooleanValue());
return super.performOk();
}
use of de.janrufmonitor.framework.IMsn in project janrufmonitor by tbrandt77.
the class MsnManager method removeMsn.
private void removeMsn(String msn, String additional) {
if (MessageDialog.openConfirm(Display.getCurrent().getActiveShell(), this.m_i18n.getString(this.getNamespace(), "ctitle", "label", this.m_language), this.m_i18n.getString(this.getNamespace(), "confirm", "label", this.m_language))) {
IMsn oldMsn = this.getRuntime().getCallFactory().createMsn(msn, additional);
this.msns.remove(oldMsn);
this.removeMsns.add(oldMsn);
}
tv.setInput(this.msns);
this.resizeTable(tv.getTable());
}
use of de.janrufmonitor.framework.IMsn 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());
}
Aggregations