Search in sources :

Example 6 with IMonitor

use of de.janrufmonitor.framework.monitor.IMonitor in project janrufmonitor by tbrandt77.

the class XTapi method createFieldEditors.

protected void createFieldEditors() {
    StringFieldEditor sfe = null;
    BooleanFieldEditor bfe = new BooleanFieldEditor(getConfigNamespace() + SEPARATOR + "activemonitor", this.m_i18n.getString(this.getNamespace(), "activemonitor", "label", this.m_language), this.getFieldEditorParent());
    addField(bfe);
    if (isExpertMode()) {
        bfe = new BooleanFieldEditor(getConfigNamespace() + SEPARATOR + "outgoing", this.m_i18n.getString(this.getNamespace(), "outgoing", "label", this.m_language), this.getFieldEditorParent());
        addField(bfe);
        bfe = new BooleanFieldEditor(getConfigNamespace() + SEPARATOR + "deviceid", this.m_i18n.getString(this.getNamespace(), "deviceid", "label", this.m_language), this.getFieldEditorParent());
        addField(bfe);
        sfe = new StringFieldEditor(getConfigNamespace() + SEPARATOR + "festnetzalias", this.m_i18n.getString(this.getNamespace(), "festnetzalias", "label", this.m_language), this.getFieldEditorParent());
        sfe.setEmptyStringAllowed(false);
        addField(sfe);
    }
    IMonitor fbMonitor = this.getRuntime().getMonitorListener().getMonitor("XTapiMonitor");
    if (fbMonitor != null) {
        String[] fbInfos = fbMonitor.getDescription();
        Label capi_label = new Label(this.getFieldEditorParent(), 0);
        capi_label.setText(this.m_i18n.getString(this.getNamespace(), "fbinfo", "label", this.m_language));
        for (int i = 0; i < fbInfos.length; i++) {
            if (fbInfos[i].trim().length() > 0) {
                Label capi = new Label(this.getFieldEditorParent(), SWT.NULL);
                capi.setText(fbInfos[i]);
                new Label(this.getFieldEditorParent(), SWT.NULL);
            }
        }
    }
}
Also used : StringFieldEditor(org.eclipse.jface.preference.StringFieldEditor) Label(org.eclipse.swt.widgets.Label) BooleanFieldEditor(de.janrufmonitor.ui.jface.configuration.controls.BooleanFieldEditor) IMonitor(de.janrufmonitor.framework.monitor.IMonitor)

Aggregations

IMonitor (de.janrufmonitor.framework.monitor.IMonitor)6 Label (org.eclipse.swt.widgets.Label)4 BooleanFieldEditor (de.janrufmonitor.ui.jface.configuration.controls.BooleanFieldEditor)3 StringFieldEditor (org.eclipse.jface.preference.StringFieldEditor)3 FirmwareManager (de.janrufmonitor.fritzbox.firmware.FirmwareManager)2 IOException (java.io.IOException)2 IntegerFieldEditor (org.eclipse.jface.preference.IntegerFieldEditor)2 ICommand (de.janrufmonitor.framework.command.ICommand)1 FritzBoxLoginException (de.janrufmonitor.fritzbox.firmware.exception.FritzBoxLoginException)1 IService (de.janrufmonitor.service.IService)1 File (java.io.File)1 Method (java.lang.reflect.Method)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 Map (java.util.Map)1 ComboFieldEditor (org.eclipse.jface.preference.ComboFieldEditor)1 Color (org.eclipse.swt.graphics.Color)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Composite (org.eclipse.swt.widgets.Composite)1