}
} else if ( modelColumn instanceof AttributeCol ) {
// Update Salience values
AttributeCol attrCol = (AttributeCol) modelColumn;
if ( attrCol.getAttribute().equals( RuleAttributeWidget.SALIENCE_ATTR ) ) {
if ( attrCol.isUseRowNumber() ) {
col.setSortDirection( SortDirection.NONE );
final int MAX_ROWS = data.size();
for ( int iRow = 0; iRow < data.size(); iRow++ ) {
int salience = iRow + 1;
if ( attrCol.isReverseOrder() ) {
salience = Math.abs( iRow
- MAX_ROWS );
}
data.get( iRow ).get( col.getColumnIndex() )
.setValue( salience );
}
}
// Ensure Salience cells are rendered with the correct Cell
col.setCell( cellFactory.getCell( attrCol ) );
col.setSystemControlled( attrCol.isUseRowNumber() );
col.setSortable( !attrCol.isUseRowNumber() );
}
}
}
}