use of org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.impl.BaseColumnSynchronizer.MetaData in project drools-wb by kiegroup.
the class ModelSynchronizerImpl method insertRow.
@Override
public void insertRow(final int rowIndex) throws VetoException {
final MetaData metaData = new RowSynchronizer.RowMetaDataImpl(rowIndex);
for (Synchronizer synchronizer : synchronizers) {
if (synchronizer.handlesInsert(metaData)) {
synchronizer.insert(metaData);
break;
}
}
fireInsertRowEvent(rowIndex);
systemControlledColumnValuesSynchronizer.insertRow(rowIndex);
fireUpdateColumnDataEvent();
}
use of org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.impl.BaseColumnSynchronizer.MetaData in project drools-wb by kiegroup.
the class ModelSynchronizerImpl method appendRow.
@Override
@SuppressWarnings("unchecked")
public void appendRow() throws VetoException {
final MetaData metaData = new RowSynchronizer.RowMetaDataImpl();
for (Synchronizer synchronizer : synchronizers) {
if (synchronizer.handlesAppend(metaData)) {
synchronizer.append(metaData);
break;
}
}
fireAppendRowEvent();
systemControlledColumnValuesSynchronizer.appendRow();
fireUpdateColumnDataEvent();
}
use of org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.impl.BaseColumnSynchronizer.MetaData in project drools-wb by kiegroup.
the class ModelSynchronizerImpl method appendColumn.
@Override
@SuppressWarnings("unchecked")
public void appendColumn(final BaseColumn column) throws VetoException {
final MetaData metaData = new BaseColumnSynchronizer.ColumnMetaDataImpl(column);
for (Synchronizer synchronizer : synchronizers) {
if (synchronizer.handlesAppend(metaData)) {
synchronizer.append(metaData);
break;
}
}
fireAfterColumnInsertedEvent(column);
}
use of org.drools.workbench.screens.guided.dtable.client.widget.table.model.synchronizers.impl.BaseColumnSynchronizer.MetaData 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.impl.BaseColumnSynchronizer.MetaData 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);
}
Aggregations