Search in sources :

Example 41 with IMsn

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();
}
Also used : IMsn(de.janrufmonitor.framework.IMsn)

Example 42 with IMsn

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());
}
Also used : IMsn(de.janrufmonitor.framework.IMsn)

Example 43 with IMsn

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());
}
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)43 ICip (de.janrufmonitor.framework.ICip)17 IPhonenumber (de.janrufmonitor.framework.IPhonenumber)17 ICaller (de.janrufmonitor.framework.ICaller)16 Date (java.util.Date)16 IAttributeMap (de.janrufmonitor.framework.IAttributeMap)11 ICall (de.janrufmonitor.framework.ICall)9 IAttribute (de.janrufmonitor.framework.IAttribute)8 IName (de.janrufmonitor.framework.IName)6 StringTokenizer (java.util.StringTokenizer)6 SimpleDateFormat (java.text.SimpleDateFormat)5 AttributeFilter (de.janrufmonitor.repository.filter.AttributeFilter)4 IFilter (de.janrufmonitor.repository.filter.IFilter)4 ItemCountFilter (de.janrufmonitor.repository.filter.ItemCountFilter)4 MsnFilter (de.janrufmonitor.repository.filter.MsnFilter)4 IRuntime (de.janrufmonitor.runtime.IRuntime)4 HandlerException (de.janrufmonitor.service.commons.http.handler.HandlerException)4 ParseException (java.text.ParseException)4 ArrayList (java.util.ArrayList)4 Iterator (java.util.Iterator)4