Package com.google.gwt.view.client
Class DefaultSelectionEventManager.BlacklistEventTranslator<T>
java.lang.Object
com.google.gwt.view.client.DefaultSelectionEventManager.BlacklistEventTranslator<T>
- Type Parameters:
T- the data type
- All Implemented Interfaces:
DefaultSelectionEventManager.EventTranslator<T>
- Enclosing class:
DefaultSelectionEventManager<T>
public static class DefaultSelectionEventManager.BlacklistEventTranslator<T>
extends Object
implements DefaultSelectionEventManager.EventTranslator<T>
An event translator that disables selection for the specified blacklisted
columns.
-
Constructor Summary
ConstructorsConstructorDescriptionBlacklistEventTranslator(int... blacklistedColumns) Construct a newDefaultSelectionEventManager.BlacklistEventTranslator. -
Method Summary
Modifier and TypeMethodDescriptionvoidClear all columns from the blacklist.booleanclearCurrentSelection(CellPreviewEvent<T> event) Check whether a user selection event should clear all currently selected values.booleanisColumnBlacklisted(int index) Check if the specified column is blacklisted.voidsetColumnBlacklisted(int index, boolean isBlacklisted) Set whether or not the specified column in blacklisted.translateSelectionEvent(CellPreviewEvent<T> event) Translate the user selection event into aDefaultSelectionEventManager.SelectAction.
-
Constructor Details
-
BlacklistEventTranslator
public BlacklistEventTranslator(int... blacklistedColumns) Construct a newDefaultSelectionEventManager.BlacklistEventTranslator.- Parameters:
blacklistedColumns- the columns to blacklist
-
-
Method Details
-
clearBlacklist
public void clearBlacklist()Clear all columns from the blacklist. -
clearCurrentSelection
Description copied from interface:DefaultSelectionEventManager.EventTranslatorCheck whether a user selection event should clear all currently selected values.- Specified by:
clearCurrentSelectionin interfaceDefaultSelectionEventManager.EventTranslator<T>- Parameters:
event- theCellPreviewEventto translate
-
isColumnBlacklisted
public boolean isColumnBlacklisted(int index) Check if the specified column is blacklisted.- Parameters:
index- the column index- Returns:
- true if blacklisted, false if not
-
setColumnBlacklisted
public void setColumnBlacklisted(int index, boolean isBlacklisted) Set whether or not the specified column in blacklisted.- Parameters:
index- the column indexisBlacklisted- true to blacklist, false to allow selection
-
translateSelectionEvent
Description copied from interface:DefaultSelectionEventManager.EventTranslatorTranslate the user selection event into aDefaultSelectionEventManager.SelectAction.- Specified by:
translateSelectionEventin interfaceDefaultSelectionEventManager.EventTranslator<T>- Parameters:
event- theCellPreviewEventto translate
-