List of usage examples for com.google.gwt.view.client CellPreviewEvent getColumn
public int getColumn()
From source file:org.zanata.webtrans.client.ui.SearchResultsDocumentTable.java
License:Open Source License
/** * build a selection manager that toggles selection when the row is clicked, * but suppresses selection when clicks are in the action button column to * prevent undesired selections when using action buttons * * @return the selection manager/*from w ww . j av a 2 s . c om*/ */ private static DefaultSelectionEventManager<TransUnitReplaceInfo> buildSelectionManager() { WhitelistEventTranslator<TransUnitReplaceInfo> selectionEventTranslator = new WhitelistEventTranslator<TransUnitReplaceInfo>() { @Override public SelectAction translateSelectionEvent(CellPreviewEvent<TransUnitReplaceInfo> event) { return isColumnWhitelisted(event.getColumn()) ? SelectAction.TOGGLE : SelectAction.IGNORE; } }; selectionEventTranslator.setColumnWhitelisted(CHECKBOX_COLUMN_INDEX, true); return DefaultSelectionEventManager.<TransUnitReplaceInfo>createCustomManager(selectionEventTranslator); }