GWT 2.7.0

com.google.gwt.view.client
Class DefaultSelectionEventManager.WhitelistEventTranslator<T>

java.lang.Object
  extended by 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
DefaultSelectionEventManager.WhitelistEventTranslator(int... whitelistedColumns)
          Construct a new DefaultSelectionEventManager.WhitelistEventTranslator.
 
Method Summary
 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 a DefaultSelectionEventManager.SelectAction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSelectionEventManager.WhitelistEventTranslator

public DefaultSelectionEventManager.WhitelistEventTranslator(int... whitelistedColumns)
Construct a new DefaultSelectionEventManager.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 interface DefaultSelectionEventManager.EventTranslator<T>
Parameters:
event - the CellPreviewEvent 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 index
isWhitelisted - 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 a DefaultSelectionEventManager.SelectAction.

Specified by:
translateSelectionEvent in interface DefaultSelectionEventManager.EventTranslator<T>
Parameters:
event - the CellPreviewEvent to translate

GWT 2.7.0