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


Java DisplayerSettings.getDataSetLookup方法代碼示例

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


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

示例1: toJsonObject

import org.dashbuilder.displayer.DisplayerSettings; //導入方法依賴的package包/類
public JsonObject toJsonObject( DisplayerSettings displayerSettings ) {
    JsonObject json = Json.createObject();

    // UUID
    json.put(SETTINGS_UUID, displayerSettings.getUUID());

    for (Map.Entry<String, String> entry : displayerSettings.getSettingsFlatMap().entrySet()) {
        setNodeValue(json, entry.getKey(), entry.getValue());
    }

    // Data set
    DataSetLookup dataSetLookup = displayerSettings.getDataSetLookup();
    DataSet dataSet = displayerSettings.getDataSet();
    if (dataSet != null) {
        json.put(DATASET_PREFIX, dataSetJsonMarshaller.toJson(dataSet));
    }
    else if (dataSetLookup != null) {
        json.put(DATASET_LOOKUP_PREFIX, dataSetLookupJsonMarshaller.toJson(dataSetLookup));
    }
    else {
        throw new RuntimeException("Displayer settings dataset lookup not specified");
    }

    // Column settings
    List<ColumnSettings> columnSettingsList = displayerSettings.getColumnSettingsList();
    if (!columnSettingsList.isEmpty()) {
        json.put(COLUMNS_PREFIX, formatColumnSettings(columnSettingsList));
    }

    return json;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:32,代碼來源:DisplayerSettingsJSONMarshaller.java

示例2: onDataSetModifiedEvent

import org.dashbuilder.displayer.DisplayerSettings; //導入方法依賴的package包/類
/**
 * Listen to modifications on any of the data set being used in this perspective.
 */
private void onDataSetModifiedEvent(@Observes DataSetModifiedEvent event) {
    if (!editOn) {

        String targetUUID = event.getDataSetDef().getUUID();
        for (Displayer displayer : displayerCoordinator.getDisplayerList()) {
            DisplayerSettings settings = displayer.getDisplayerSettings();

            // Do nothing if the displayer:
            // - Is not drawn
            // - Is handling the refresh by itself
            // - Is not configured to be updated on stale data
            if (!displayer.isDrawn() || displayer.isRefreshOn() || !settings.isRefreshStaleData()) {
                continue;
            }

            String uuid = null;
            DataSet dataSet = settings.getDataSet();
            if (dataSet != null) {
                uuid = dataSet.getUUID();
            }
            DataSetLookup dataSetLookup = settings.getDataSetLookup();
            if (uuid == null && dataSetLookup != null) {
                uuid = dataSetLookup.getDataSetUUID();
            }
            if (uuid != null && targetUUID.equals(uuid)) {
                displayer.redraw();
            }
        }
    }
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:34,代碼來源:PerspectiveCoordinator.java


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