當前位置: 首頁>>代碼示例>>Java>>正文


Java DisplayerSettings.setType方法代碼示例

本文整理匯總了Java中org.dashbuilder.displayer.DisplayerSettings.setType方法的典型用法代碼示例。如果您正苦於以下問題:Java DisplayerSettings.setType方法的具體用法?Java DisplayerSettings.setType怎麽用?Java DisplayerSettings.setType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.dashbuilder.displayer.DisplayerSettings的用法示例。


在下文中一共展示了DisplayerSettings.setType方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: showDisplayer

import org.dashbuilder.displayer.DisplayerSettings; //導入方法依賴的package包/類
public void showDisplayer() {
    if (view.isTableDisplayModeOn()) {
        try {
            DisplayerSettings tableSettings = displayerSettings.cloneInstance();
            tableSettings.setTitleVisible(false);
            tableSettings.setType(DisplayerType.TABLE);
            tableSettings.setTablePageSize(8);
            tableSettings.setTableWidth(800);
            tableSettings.setRenderer("default");
            Displayer tableDisplayer = displayerLocator.lookupDisplayer(tableSettings);
            tableDisplayer.addListener(displayerListener);
            tableDisplayer.setRefreshOn(false);
            tableDisplayer.draw();
            view.showDisplayer(tableDisplayer);
        } catch (Exception e) {
            view.error(new ClientRuntimeError(e));
        }
    }
    else if (supportsHtmlTemplate()) {
        displayerHtmlEditor.setDisplayer(displayer);
        view.showDisplayer(displayerHtmlEditor);
    }
    else {
        view.showDisplayer(displayer);
    }
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:27,代碼來源:DisplayerEditor.java

示例2: createChartMetric

import org.dashbuilder.displayer.DisplayerSettings; //導入方法依賴的package包/類
protected Displayer createChartMetric(String group) {

        DisplayerType type = DisplayerType.BARCHART;
        switch (chartTypeSelector.getSelectedIndex()) {
            case 1: type = DisplayerType.LINECHART; break;
            case 2: type = DisplayerType.AREACHART; break;
        }

        BarChartSettingsBuilder<BarChartSettingsBuilderImpl> builder = DisplayerSettingsFactory.newBarChartSettings()
                .title(group)
                .titleVisible(false)
                .width(700).height(200)
                .margins(30, 5, 60, 10)
                .legendOff()
                .filterOff(true)
                .dataset("clusterMetrics");

        if (DisplayerType.BARCHART.equals(type)) {
            builder.filter(COLUMN_TIMESTAMP, timeFrame("begin[minute] till end[minute]"));
            builder.group(COLUMN_TIMESTAMP).fixed(SECOND, true);
            builder.column(COLUMN_TIMESTAMP).format(AppConstants.INSTANCE.metrics_cluster_column_time());
            builder.subType_StackedColumn();
        } else {
            builder.filter(COLUMN_TIMESTAMP, timeFrame("-60second till now"));
            builder.group(COLUMN_TIMESTAMP).dynamic(60, SECOND, true);
            builder.column(COLUMN_TIMESTAMP).format(AppConstants.INSTANCE.metrics_cluster_column_time());
        }

        List<Integer> metricIdxs = metricChartDef.get(group);
        for (Integer metricIdx : metricIdxs) {
            ClusterMetric metric = metricDefList.get(metricIdx);
                builder.column(metric.column, AVERAGE);
                builder.expression(metric.expression);
                builder.format(metric.title, metric.format);
                builder.yAxisTitle(metric.units);
        }

        DisplayerSettings settings = builder.buildSettings();
        settings.setType(type);
        return displayerLocator.lookupDisplayer(settings);
    }
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:42,代碼來源:ClusterMetricsDashboard.java


注:本文中的org.dashbuilder.displayer.DisplayerSettings.setType方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。