gpt4 book ai didi

org.opennms.features.vaadin.dashboard.config.ui.WallboardConfigUI类的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 20:41:05 28 4
gpt4 key购买 nike

本文整理了Java中org.opennms.features.vaadin.dashboard.config.ui.WallboardConfigUI类的一些代码示例,展示了WallboardConfigUI类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WallboardConfigUI类的具体详情如下:
包路径:org.opennms.features.vaadin.dashboard.config.ui.WallboardConfigUI
类名称:WallboardConfigUI

WallboardConfigUI介绍

[英]The Vaadin application used for wallboard configuration. This application instantiates a WallboardConfigView instance.
[中]Vaadin应用程序用于墙板配置。此应用程序实例化WallboardConfigView实例。

代码示例

代码示例来源:origin: OpenNMS/opennms

/**
 * Method used for updating the {@link DashletFactory} list
 *
 * @param serviceList the available {@link DashletFactory} instances
 */
public void updateServiceList(List<DashletFactory> serviceList) {
  for (DashletSpecEditor dashletSpecEditor : m_dashletSpecEditorMap.values()) {
    dashletSpecEditor.updateDashletSelection(serviceList);
  }
  ((WallboardConfigUI) getUI()).notifyMessage("Configuration change", "Dashlet list modified");
}

代码示例来源:origin: OpenNMS/opennms

/**
   * Method for displaying notification for the user.
   *
   * @param message     the message to be displayed
   * @param description the description of this message
   */
  public void notifyMessage(String message, String description) {
    final Notification notification = new Notification("Message", Notification.Type.TRAY_NOTIFICATION);
    notification.setCaption(message);
    notification.setDescription(description);
    notification.setDelayMsec(1000);
    if (getUI() != null) {
      if (getPage() != null) {
        notification.show(getUI().getPage());
      }
    }
  }
}

代码示例来源:origin: OpenNMS/opennms

/**
 * Method for setting up the application.
 *
 * @param request the {@link VaadinRequest} object
 */
@Override
protected void init(VaadinRequest request) {
  setContent(new WallboardConfigView(m_dashletSelector));
}

代码示例来源:origin: OpenNMS/opennms

/**
 * This method is used for updating the available {@link DashletFactory} instances.
 *
 * @param factoryList the available {@link DashletFactory} instances.
 */
public void serviceListChanged(List<DashletFactory> factoryList) {
  for (Map.Entry<Wallboard, TabSheet.Tab> entry : m_wallboardEditorMap.entrySet()) {
    WallboardEditor wallboardEditor = (WallboardEditor) entry.getValue().getComponent();
    wallboardEditor.updateServiceList(factoryList);
  }
  ((WallboardConfigUI) getUI()).notifyMessage("Configuration change", "Dashlet list modified");
}

代码示例来源:origin: OpenNMS/opennms

@Override
  public void buttonClick(Button.ClickEvent event) {
    for (Map.Entry<String, String> entry : requiredParameters.entrySet()) {
      String newValue = table.getItem(entry.getKey()).getItemProperty("Value").getValue().toString();
      dashletSpec.getParameters().put(entry.getKey(), newValue);
    }
    WallboardProvider.getInstance().save();
    ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Properties");
    close();
  }
});

代码示例来源:origin: OpenNMS/opennms

@Override
  public void buttonClick(Button.ClickEvent event) {
    m_dashletSpec.getParameters().put("criteria", criteriaBuilderComponent.getCriteria());
    m_dashletSpec.getParameters().put("boostSeverity", String.valueOf(m_boostedSeveritySelect.getValue()));
    WallboardProvider.getInstance().save();
    ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Properties");
    close();
  }
});

代码示例来源:origin: OpenNMS/opennms

@Override
  public void buttonClick(Button.ClickEvent event) {
    Map<Integer, String> reportsMap = kscPerformanceReportFactory.getReportList();
    m_dashletSpec.getParameters().put("kscReport", reportsMap.get(m_kscSelect.getValue()));
    WallboardProvider.getInstance().save();
    ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Properties");
    close();
  }
});

代码示例来源:origin: org.opennms.features.vaadin-dashlets/dashlet-charts

@Override
  public void buttonClick(Button.ClickEvent event) {
    m_dashletSpec.getParameters().put("maximizeWidth", (m_maximizeWidth.getValue() ? "true" : "false"));
    m_dashletSpec.getParameters().put("maximizeHeight", (m_maximizeHeight.getValue() ? "true" : "false"));
    m_dashletSpec.getParameters().put("chart", String.valueOf(m_chartSelect.getValue()));
    WallboardProvider.getInstance().save();
    ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Properties");
    close();
  }
});

代码示例来源:origin: org.opennms.features.vaadin-dashlets/dashlet-ksc

@Override
  public void buttonClick(Button.ClickEvent event) {
    Map<Integer, String> reportsMap = kscPerformanceReportFactory.getReportList();
    m_dashletSpec.getParameters().put("kscReport", reportsMap.get(m_kscSelect.getValue()));
    WallboardProvider.getInstance().save();
    ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Properties");
    close();
  }
});

代码示例来源:origin: OpenNMS/opennms

@Override
  public void buttonClick(Button.ClickEvent event) {
    m_dashletSpec.getParameters().put("maximizeWidth", (m_maximizeWidth.getValue() ? "true" : "false"));
    m_dashletSpec.getParameters().put("maximizeHeight", (m_maximizeHeight.getValue() ? "true" : "false"));
    m_dashletSpec.getParameters().put("chart", String.valueOf(m_chartSelect.getValue()));
    WallboardProvider.getInstance().save();
    ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Properties");
    close();
  }
});

代码示例来源:origin: OpenNMS/opennms

public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
    if (durationField.isValid()) {
      m_dashletSpec.setDuration(Integer.valueOf((String) valueChangeEvent.getProperty().getValue()));
      WallboardProvider.getInstance().save();
      ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Duration");
    }
  }
});

代码示例来源:origin: OpenNMS/opennms

public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
    if (boostDurationField.isValid()) {
      m_dashletSpec.setBoostDuration(Integer.valueOf((String) valueChangeEvent.getProperty().getValue()));
      WallboardProvider.getInstance().save();
      ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Duration");
    }
  }
});

代码示例来源:origin: OpenNMS/opennms

public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
    if (priorityField.isValid()) {
      m_dashletSpec.setPriority(Integer.valueOf((String) valueChangeEvent.getProperty().getValue()));
      WallboardProvider.getInstance().save();
      ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Priority");
    }
  }
});

代码示例来源:origin: OpenNMS/opennms

public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
    if (boostPriorityField.isValid()) {
      m_dashletSpec.setBoostPriority(Integer.valueOf((String) valueChangeEvent.getProperty().getValue()));
      WallboardProvider.getInstance().save();
      ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Priority");
    }
  }
});

代码示例来源:origin: OpenNMS/opennms

public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
    m_dashletSpec.setTitle((String) valueChangeEvent.getProperty().getValue());
    WallboardProvider.getInstance().save();
    ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Title");
  }
});

代码示例来源:origin: OpenNMS/opennms

((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Properties");

代码示例来源:origin: org.opennms.features.vaadin-dashlets/dashlet-rrd

((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Properties");

代码示例来源:origin: OpenNMS/opennms

public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
    if (m_savingDisabled) {
      return;
    }
    if (valueChangeEvent.getProperty().getValue() == null) {
      m_dashletSpec.setDashletName("Undefined");
    } else {
      m_dashletSpec.setDashletName(valueChangeEvent.getProperty().getValue().toString());
      m_dashletSelect.removeItem("Undefined");
    }
    m_dashletSpec.getParameters().clear();
    Map<String, String> requiredParameters = m_dashletSelector.getDashletFactoryForName(m_dashletSpec.getDashletName()).getRequiredParameters();
    for (Map.Entry<String, String> entry : requiredParameters.entrySet()) {
      m_dashletSpec.getParameters().put(entry.getKey(), entry.getValue());
    }
    m_propertiesButton.setEnabled(requiredParameters.size() > 0);
    boolean boostable = m_dashletSelector.getDashletFactoryForName(m_dashletSpec.getDashletName()).isBoostable();
    boostPriorityField.setEnabled(boostable);
    boostDurationField.setEnabled(boostable);
    WallboardProvider.getInstance().save();
    ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Dashlet");
  }
});

代码示例来源:origin: OpenNMS/opennms

((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Properties");

代码示例来源:origin: OpenNMS/opennms

public void textChange(FieldEvents.TextChangeEvent textChangeEvent) {
    AbstractTextField source = (AbstractTextField) textChangeEvent.getSource();
    source.setValue(textChangeEvent.getText());
    if (source.isValid()) {
      m_tab.setCaption(textChangeEvent.getText());
      m_wallboard.setTitle(textChangeEvent.getText());
      WallboardProvider.getInstance().save();
      ((WallboardConfigUI) getUI()).notifyMessage("Data saved", "Title");
    }
  }
});

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com