Example usage for com.google.gwt.view.client CellPreviewEvent getColumn

List of usage examples for com.google.gwt.view.client CellPreviewEvent getColumn

Introduction

In this page you can find the example usage for com.google.gwt.view.client CellPreviewEvent getColumn.

Prototype

public int getColumn() 

Source Link

Document

Get the column index of the Cell where the event occurred if the source is a table.

Usage

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);
}