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


Java DataSetGroup類代碼示例

本文整理匯總了Java中org.dashbuilder.dataset.group.DataSetGroup的典型用法代碼示例。如果您正苦於以下問題:Java DataSetGroup類的具體用法?Java DataSetGroup怎麽用?Java DataSetGroup使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: filterApply

import org.dashbuilder.dataset.group.DataSetGroup; //導入依賴的package包/類
/**
 * Filter the values of the given column.
 *
 * @param columnId The name of the column to filter.
 * @param intervalList A list of interval selections to filter for.
 */
public void filterApply(String columnId, List<Interval> intervalList) {
    if (displayerSettings.isFilterEnabled()) {

        // For string column filters, init the group interval selection operation.
        DataSetGroup groupOp = dataSetHandler.getGroupOperation(columnId);
        groupOp.setSelectedIntervalList(intervalList);

        // Notify to those interested parties the selection event.
        if (displayerSettings.isFilterNotificationEnabled()) {
            for (DisplayerListener listener : listenerList) {
                listener.onFilterEnabled(this, groupOp);
            }
        }
        // Drill-down support
        if (displayerSettings.isFilterSelfApplyEnabled()) {
            dataSetHandler.drillDown(groupOp);
            redraw();
        }
    }
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:27,代碼來源:AbstractDisplayer.java

示例2: filterReset

import org.dashbuilder.dataset.group.DataSetGroup; //導入依賴的package包/類
/**
 * Clear any filter on the given column.
 *
 * @param columnId The name of the column to reset.
 */
public void filterReset(String columnId) {
    if (displayerSettings.isFilterEnabled()) {

        columnSelectionMap.remove(columnId);
        DataSetGroup groupOp = dataSetHandler.getGroupOperation(columnId);

        // Notify to those interested parties the reset event.
        if (displayerSettings.isFilterNotificationEnabled()) {
            for (DisplayerListener listener : listenerList) {
                listener.onFilterReset(this, Arrays.asList(groupOp));
            }
        }
        // Apply the selection to this displayer
        if (displayerSettings.isFilterSelfApplyEnabled()) {
            dataSetHandler.drillUp(groupOp);
            redraw();
        }
    }
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:25,代碼來源:AbstractDisplayer.java

示例3: onAddColumn

import org.dashbuilder.dataset.group.DataSetGroup; //導入依賴的package包/類
void onAddColumn() {
    if (lookupConstraints.areExtraColumnsAllowed()) {
        DataSetGroup op = getFirstGroupOp();
        List<GroupFunction> functionList = op.getGroupFunctions();
        GroupFunction last = functionList.get(functionList.size() - 1);

        GroupFunction clone = last.cloneInstance();
        String newColumnId = lookupConstraints.buildUniqueColumnId(dataSetLookup,
                                                                   clone);
        clone.setColumnId(newColumnId);
        functionList.add(clone);

        updateColumnControls();
        changeEvent.fire(new DataSetLookupChangedEvent(dataSetLookup));
    }
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:17,代碼來源:DataSetLookupEditor.java

示例4: getExistingDataColumnIds

import org.dashbuilder.dataset.group.DataSetGroup; //導入依賴的package包/類
List<String> getExistingDataColumnIds() {
    DataSet dataSet = displayerSettings.getDataSet();
    DataSetLookup dataSetLookup = displayerSettings.getDataSetLookup();

    List<String> columnIds = new ArrayList<String>();
    if (dataSet != null) {
        for (DataColumn dataColumn : dataSet.getColumns()) {
            columnIds.add(dataColumn.getId());
        }
    }
    else if (dataSetLookup != null) {
        int idx = dataSetLookup.getLastGroupOpIndex(0);
        if (idx != -1) {
            DataSetGroup groupOp = dataSetLookup.getOperation(idx);
            for (GroupFunction groupFunction : groupOp.getGroupFunctions()) {
                columnIds.add(groupFunction.getColumnId());
            }
        }
    }
    return columnIds;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:22,代碼來源:DisplayerEditor.java

示例5: verifySettings

import org.dashbuilder.dataset.group.DataSetGroup; //導入依賴的package包/類
private void verifySettings(DisplayerSettings settings) {
    assertEquals(DATASOURCE_UUID + SEPARATOR + SCHEMA + SEPARATOR + TABLE,
                 settings.getDataSetLookup().getDataSetUUID());
    assertEquals(TABLE,
                 settings.getTitle());
    assertEquals(true,
                 settings.isTitleVisible());
    assertEquals(20,
                 settings.getTablePageSize());
    assertEquals(true,
                 settings.isTableSortEnabled());

    assertEquals(1,
                 settings.getDataSetLookup().getOperationList().size());
    DataSetGroup dataSetOp = (DataSetGroup) settings.getDataSetLookup().getOperationList().get(0);
    List<GroupFunction> groupFunctions = dataSetOp.getGroupFunctions();
    assertEquals(COLUMNS_COUNT,
                 groupFunctions.size());

    for (int i = 0; i < groupFunctions.size(); i++) {
        assertEquals(DATA_COLUMN + String.valueOf(i),
                     groupFunctions.get(i).getColumnId());
    }
    assertEquals(COLUMN_WIDTH * COLUMNS_COUNT,
                 settings.getTableWidth());
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:27,代碼來源:DataManagementServiceImplTest.java

示例6: format

import org.dashbuilder.dataset.group.DataSetGroup; //導入依賴的package包/類
public T format(String name, String pattern) {
    DataSetOp op = getCurrentOp();
    if (op == null || !(op instanceof DataSetGroup)) {
        throw new RuntimeException("column(...) must be called first.");
    }
    DataSetGroup gOp = (DataSetGroup) getCurrentOp();
    List<GroupFunction> columns = gOp.getGroupFunctions();
    if (columns.isEmpty()) {
        throw new RuntimeException("column(...) must be called first.");
    }
    GroupFunction lastColumn = columns.get(columns.size() - 1);
    return format(lastColumn.getColumnId(), name, pattern);
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:14,代碼來源:AbstractDisplayerSettingsBuilder.java

示例7: onFilterEnabled

import org.dashbuilder.dataset.group.DataSetGroup; //導入依賴的package包/類
@Override
public void onFilterEnabled(Displayer displayer, DataSetGroup groupOp) {
    if (displayerSettings.isFilterListeningEnabled()) {
        if (dataSetHandler.filter(groupOp)) {
            redraw();
        }
    }
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:9,代碼來源:AbstractDisplayer.java

示例8: onFilterReset

import org.dashbuilder.dataset.group.DataSetGroup; //導入依賴的package包/類
@Override
public void onFilterReset(Displayer displayer, List<DataSetGroup> groupOps) {
    if (displayerSettings.isFilterListeningEnabled()) {
        boolean applied = false;
        for (DataSetGroup groupOp : groupOps) {
            if (dataSetHandler.unfilter(groupOp)) {
                applied = true;
            }
        }
        if (applied) {
            redraw();
        }
    }
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:15,代碼來源:AbstractDisplayer.java

示例9: getFirstGroupOp

import org.dashbuilder.dataset.group.DataSetGroup; //導入依賴的package包/類
public DataSetGroup getFirstGroupOp() {
    List<DataSetGroup> groupOpList = dataSetLookup.getOperationList(DataSetGroup.class);
    if (groupOpList.isEmpty()) {
        return null;
    }
    return groupOpList.get(0);
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:8,代碼來源:DataSetLookupEditor.java

示例10: isFirstGroupOpDateBased

import org.dashbuilder.dataset.group.DataSetGroup; //導入依賴的package包/類
public boolean isFirstGroupOpDateBased() {
    DataSetGroup first = getFirstGroupOp();
    if (first == null) {
        return false;
    }
    ColumnGroup cg = first.getColumnGroup();
    if (cg == null) {
        return false;
    }
    ColumnType type = getColumnType(cg.getSourceId());
    return ColumnType.DATE.equals(type);
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:13,代碼來源:DataSetLookupEditor.java

示例11: getFirstGroupFunctions

import org.dashbuilder.dataset.group.DataSetGroup; //導入依賴的package包/類
public List<GroupFunction> getFirstGroupFunctions() {
    List<DataSetGroup> groupOpList = dataSetLookup.getOperationList(DataSetGroup.class);
    if (groupOpList.isEmpty()) {
        return null;
    }
    return groupOpList.get(0).getGroupFunctions();
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:8,代碼來源:DataSetLookupEditor.java

示例12: getFirstGroupFunctionIdx

import org.dashbuilder.dataset.group.DataSetGroup; //導入依賴的package包/類
public int getFirstGroupFunctionIdx(GroupFunction gf) {
    List<DataSetGroup> groupOpList = dataSetLookup.getOperationList(DataSetGroup.class);
    if (groupOpList.isEmpty()) {
        return -1;
    }
    return groupOpList.get(0).getGroupFunctionIdx(gf);
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:8,代碼來源:DataSetLookupEditor.java

示例13: getFirstGroupColumnId

import org.dashbuilder.dataset.group.DataSetGroup; //導入依賴的package包/類
public String getFirstGroupColumnId() {
    List<DataSetGroup> groupOpList = dataSetLookup.getOperationList(DataSetGroup.class);
    if (groupOpList.isEmpty()) {
        return null;
    }
    DataSetGroup groupOp = groupOpList.get(0);
    if (groupOp.getColumnGroup() == null) {
        return null;
    }
    return groupOp.getColumnGroup().getSourceId();
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:12,代碼來源:DataSetLookupEditor.java

示例14: onDateGroupChanged

import org.dashbuilder.dataset.group.DataSetGroup; //導入依賴的package包/類
void onDateGroupChanged(@Observes DataSetGroupDateChanged event) {
    ColumnGroup columnGroup = event.getColumnGroup();
    DataSetGroup groupOp = getFirstGroupOp();
    if (groupOp != null) {
        groupOp.setColumnGroup(columnGroup);

        changeEvent.fire(new DataSetLookupChangedEvent(dataSetLookup));
    }
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:10,代碼來源:DataSetLookupEditor.java

示例15: testNotifications

import org.dashbuilder.dataset.group.DataSetGroup; //導入依賴的package包/類
@Test
public void testNotifications() {
    AbstractDisplayer deptPieChart = (AbstractDisplayer) displayerLocator.lookupDisplayer(byDepartment);
    DisplayerListener listener = mock(DisplayerListener.class);
    deptPieChart.addListener(listener);
    deptPieChart.draw();

    deptPieChart.filterUpdate(COLUMN_DEPARTMENT, 0);
    verify(listener).onFilterEnabled(eq(deptPieChart), any(DataSetGroup.class));
    verify(listener, never()).onRedraw(deptPieChart);

    deptPieChart.filterReset();
    verify(listener).onFilterReset(eq(deptPieChart), anyList());
    verify(listener, never()).onRedraw(deptPieChart);
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:16,代碼來源:DisplayerFilterTest.java


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