Search in sources :

Example 1 with Context

use of org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.DependentEnumsUtilities.Context in project drools-wb by kiegroup.

the class ModelSynchronizerImpl method updateDependentEnumerationColumns.

private Set<Integer> updateDependentEnumerationColumns(final GridData.Range rowRange, final int columnIndex) {
    final int minRowIndex = rowRange.getMinRowIndex();
    final int maxRowIndex = rowRange.getMaxRowIndex();
    final Context context = new Context(rowRange.getMinRowIndex(), columnIndex);
    final Set<Integer> dependentColumnIndexes = dependentEnumsUtilities.getDependentColumnIndexes(context);
    for (int dependentColumnIndex : dependentColumnIndexes) {
        for (int rowIndex = minRowIndex; rowIndex <= maxRowIndex; rowIndex++) {
            final List<DTCellValue52> modelRow = model.getData().get(rowIndex);
            final DTCellValue52 modelCell = modelRow.get(dependentColumnIndex);
            modelCell.clearValues();
            uiModel.deleteCellInternal(rowIndex, dependentColumnIndex);
        }
        uiModel.indexColumn(dependentColumnIndex);
    }
    dependentColumnIndexes.add(columnIndex);
    return dependentColumnIndexes;
}
Also used : Context(org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.DependentEnumsUtilities.Context) DTCellValue52(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52)

Aggregations

DTCellValue52 (org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52)1 Context (org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.DependentEnumsUtilities.Context)1