use of org.eclipse.nebula.widgets.nattable.filterrow.command.ClearFilterCommand in project nebula.widgets.nattable by eclipse.
the class ComboBoxFilterRowHeaderComposite method doCommand.
@Override
public boolean doCommand(ILayerCommand command) {
boolean handled = false;
if (command instanceof ToggleFilterRowCommand) {
setFilterRowVisible(!this.filterRowVisible);
return true;
} else // to the FilterRowDataLayer
if (command instanceof ClearFilterCommand && command.convertToTargetLayer(this)) {
int columnPosition = ((ClearFilterCommand) command).getColumnPosition();
this.filterRowDataLayer.setDataValueByPosition(columnPosition, 0, getComboBoxDataProvider().getValues(columnPosition, 0));
handled = true;
} else if (command instanceof ClearAllFiltersCommand) {
setAllValuesSelected();
handled = true;
} else if (command instanceof DisposeResourcesCommand) {
this.comboBoxDataProvider.dispose();
}
if (handled) {
fireLayerEvent(new RowStructuralRefreshEvent(this));
return true;
} else {
return super.doCommand(command);
}
}
Aggregations