Package com.google.gwt.view.client
Class DefaultSelectionEventManager.WhitelistEventTranslator<T>
- java.lang.Object
-
- com.google.gwt.view.client.DefaultSelectionEventManager.WhitelistEventTranslator<T>
-
- Type Parameters:
T
- the data type
- All Implemented Interfaces:
DefaultSelectionEventManager.EventTranslator<T>
- Enclosing class:
- DefaultSelectionEventManager<T>
public static class DefaultSelectionEventManager.WhitelistEventTranslator<T> extends java.lang.Object implements DefaultSelectionEventManager.EventTranslator<T>
An event translator that allows selection only for the specified whitelisted columns.
-
-
Constructor Summary
Constructors Constructor Description WhitelistEventTranslator(int... whitelistedColumns)
Construct a newDefaultSelectionEventManager.WhitelistEventTranslator
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
clearCurrentSelection(CellPreviewEvent<T> event)
Check whether a user selection event should clear all currently selected values.void
clearWhitelist()
Clear all columns from the whitelist.boolean
isColumnWhitelisted(int index)
Check if the specified column is whitelisted.void
setColumnWhitelisted(int index, boolean isWhitelisted)
Set whether or not the specified column in whitelisted.DefaultSelectionEventManager.SelectAction
translateSelectionEvent(CellPreviewEvent<T> event)
Translate the user selection event into aDefaultSelectionEventManager.SelectAction
.
-
-
-
Constructor Detail
-
WhitelistEventTranslator
public WhitelistEventTranslator(int... whitelistedColumns)
Construct a newDefaultSelectionEventManager.WhitelistEventTranslator
.- Parameters:
whitelistedColumns
- the columns to whitelist
-
-
Method Detail
-
clearCurrentSelection
public boolean clearCurrentSelection(CellPreviewEvent<T> event)
Description copied from interface:DefaultSelectionEventManager.EventTranslator
Check whether a user selection event should clear all currently selected values.- Specified by:
clearCurrentSelection
in interfaceDefaultSelectionEventManager.EventTranslator<T>
- Parameters:
event
- theCellPreviewEvent
to translate
-
clearWhitelist
public void clearWhitelist()
Clear all columns from the whitelist.
-
isColumnWhitelisted
public boolean isColumnWhitelisted(int index)
Check if the specified column is whitelisted.- Parameters:
index
- the column index- Returns:
- true if whitelisted, false if not
-
setColumnWhitelisted
public void setColumnWhitelisted(int index, boolean isWhitelisted)
Set whether or not the specified column in whitelisted.- Parameters:
index
- the column indexisWhitelisted
- true to whitelist, false to allow disallow selection
-
translateSelectionEvent
public DefaultSelectionEventManager.SelectAction translateSelectionEvent(CellPreviewEvent<T> event)
Description copied from interface:DefaultSelectionEventManager.EventTranslator
Translate the user selection event into aDefaultSelectionEventManager.SelectAction
.- Specified by:
translateSelectionEvent
in interfaceDefaultSelectionEventManager.EventTranslator<T>
- Parameters:
event
- theCellPreviewEvent
to translate
-
-