Package nl.topicus.onderwijs.dashboard.modules

Examples of nl.topicus.onderwijs.dashboard.modules.DataSourceSettings


  }

  protected void retrieveDataFromApplication(List<ColumnData> ret) {
    for (Class<? extends DataSource<?>> curDataSource : dataSources
        .getObject()) {
      DataSourceSettings settings = DataSourceAnnotationReader
          .getSettings(curDataSource);
      ret.add(getColumn(settings.label(), curDataSource));
    }
  }
View Full Code Here


  private String label;
  private String scheme;

  public BarDataSet(Class<? extends DataSource<?>> key, String scheme) {
    this.key = key.getSimpleName();
    DataSourceSettings settings = DataSourceAnnotationReader
        .getSettings(key);
    this.label = settings.label();
    if (settings.unit().length() > 0)
      this.label += " (" + settings.unit() + ")";
    this.scheme = scheme;
  }
View Full Code Here

    List<String> conversions = new ArrayList<String>();
    List<String> htmlClasses = new ArrayList<String>();
    List<String> units = new ArrayList<String>();
    for (Class<? extends DataSource<?>> curDataSource : dataSources
        .getObject()) {
      DataSourceSettings settings = DataSourceAnnotationReader
          .getSettings(curDataSource);
      conversions.add(settings.conversion());
      htmlClasses.add(settings.htmlClass());
      units.add(settings.unit());
    }
    ObjectMapper mapper = new ObjectMapper();
    try {
      options.put("conversion", mapper.writeValueAsString(conversions));
      options.put("htmlClasses", mapper.writeValueAsString(htmlClasses));
View Full Code Here

        TablePanel.class, "dashboardcommittable.js"));
  }

  @Override
  public JsStatement statement() {
    DataSourceSettings settings = DataSourceAnnotationReader
        .getSettings(dataSource);
    KeyProperty keyProperty = DataSourceAnnotationReader
        .getKeyProperty(dataSource);
    Options options = new Options();
    options.putLiteral("dataUrl", dataResource.getCallbackUrl().toString());
    options.putLiteral("label",
        useKeyLabel ? key.getName() : settings.label());
    options.putLiteral("htmlClass", settings.htmlClass());
    options.putLiteral("conversion", settings.conversion());
    options.putLiteral("keyProperty", keyProperty.value());
    JsQuery jsq = new JsQuery(table);
    return jsq.$().chain("dashboardTable", options.getJavaScriptOptions());
  }
View Full Code Here

TOP

Related Classes of nl.topicus.onderwijs.dashboard.modules.DataSourceSettings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.