use of org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.Synchronizer in project drools-wb by kiegroup.
the class ModelSynchronizerImpl method updateColumn.
@Override
@SuppressWarnings("unchecked")
public List<BaseColumnFieldDiff> updateColumn(final BaseColumn originalColumn, final BaseColumn editedColumn) throws VetoException {
final MetaData originalMetaData = new BaseColumnSynchronizer.ColumnMetaDataImpl(originalColumn);
final MetaData editedMetaData = new BaseColumnSynchronizer.ColumnMetaDataImpl(editedColumn);
for (Synchronizer synchronizer : synchronizers) {
if (synchronizer.handlesUpdate(originalMetaData)) {
final List<BaseColumnFieldDiff> diffs = synchronizer.update(originalMetaData, editedMetaData);
final boolean isSalienceUseRowNumberUpdated = BaseColumnFieldDiffImpl.hasChanged(AttributeCol52.FIELD_USE_ROW_NUMBER, diffs);
final boolean isSalienceUseReverseOrderUpdated = BaseColumnFieldDiffImpl.hasChanged(AttributeCol52.FIELD_REVERSE_ORDER, diffs);
if (isSalienceUseRowNumberUpdated || isSalienceUseReverseOrderUpdated) {
systemControlledColumnValuesSynchronizer.updateSystemControlledColumnValues();
}
return diffs;
}
}
return Collections.emptyList();
}
use of org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.Synchronizer in project drools-wb by kiegroup.
the class ModelSynchronizerImpl method deleteColumn.
@Override
@SuppressWarnings("unchecked")
public void deleteColumn(final BaseColumn column) throws VetoException {
final int columnIndex = model.getExpandedColumns().indexOf(column);
final MetaData metaData = new BaseColumnSynchronizer.ColumnMetaDataImpl(column);
for (Synchronizer synchronizer : synchronizers) {
if (synchronizer.handlesDelete(metaData)) {
synchronizer.delete(metaData);
break;
}
}
fireAfterColumnDeletedEvent(columnIndex);
}
use of org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.Synchronizer in project drools-wb by kiegroup.
the class ModelSynchronizerImpl method deleteRow.
@Override
@SuppressWarnings("unchecked")
public void deleteRow(final int rowIndex) throws VetoException {
final MetaData metaData = new RowSynchronizer.RowMetaDataImpl(rowIndex);
for (Synchronizer synchronizer : synchronizers) {
if (synchronizer.handlesDelete(metaData)) {
synchronizer.delete(metaData);
break;
}
}
fireDeleteRowEvent(rowIndex);
systemControlledColumnValuesSynchronizer.deleteRow(rowIndex);
fireUpdateColumnDataEvent();
}
Aggregations