Class SearchCommand
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.search.command.SearchCommand
-
- All Implemented Interfaces:
ILayerCommand
public class SearchCommand extends Object implements ILayerCommand
-
-
Constructor Summary
Constructors Modifier Constructor Description SearchCommand(String searchText, ILayer layer, ISearchStrategy searchStrategy, String searchDirection, boolean isWrapSearch, boolean isCaseSensitive, boolean isWholeWord, boolean isIncremental, boolean isRegex, boolean isIncludeCollapsed, Comparator<?> comparator)
Deprecated.Use constructor withSearchDirection
parameterSearchCommand(String searchText, ILayer layer, ISearchStrategy searchStrategy, SearchDirection searchDirection, boolean isWrapSearch, boolean isCaseSensitive, boolean isWholeWord, boolean isIncremental, boolean isRegex, boolean isIncludeCollapsed, Comparator<?> comparator)
SearchCommand(ILayer layer, ISearchStrategy searchStrategy, String searchDirection, boolean isWrapSearch, boolean isCaseSensitive, boolean isWholeWord, boolean isIncremental, boolean isRegex, boolean isIncludeCollapsed, Comparator<?> comparator)
Deprecated.Use constructor withSearchDirection
parameter and text to search forprotected
SearchCommand(SearchCommand command)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchCommand
cloneCommand()
Same semantics asObject.clone()
Used to make a copies of the command if has to passed to different layer stacks.boolean
convertToTargetLayer(ILayer targetLayer)
Convert the row/column coordinates the command might be carrying from the source layer to the destination (target) layer.Comparator<?>
getComparator()
ILayer
getContext()
SearchDirection
getSearchDirection()
ILayerListener
getSearchEventListener()
ISearchStrategy
getSearchStrategy()
String
getSearchText()
boolean
isCaseSensitive()
boolean
isIncludeCollapsed()
boolean
isIncremental()
boolean
isRegex()
boolean
isWholeWord()
boolean
isWrapSearch()
void
setSearchEventListener(ILayerListener listener)
-
-
-
Constructor Detail
-
SearchCommand
@Deprecated public SearchCommand(ILayer layer, ISearchStrategy searchStrategy, String searchDirection, boolean isWrapSearch, boolean isCaseSensitive, boolean isWholeWord, boolean isIncremental, boolean isRegex, boolean isIncludeCollapsed, Comparator<?> comparator)
Deprecated.Use constructor withSearchDirection
parameter and text to search for- Parameters:
layer
- The layer to search for the cell with the provided text. Typically the SelectionLayer.searchStrategy
- The search strategy to performsearchDirection
- The search direction.isWrapSearch
- is search wrap enabledisCaseSensitive
- is search case sensitiveisWholeWord
- only search whole wordsisIncremental
- is search incrementalisRegex
- is search based on regular expressionsisIncludeCollapsed
- is search including collapsed nodescomparator
- the comparator to use
-
SearchCommand
@Deprecated public SearchCommand(String searchText, ILayer layer, ISearchStrategy searchStrategy, String searchDirection, boolean isWrapSearch, boolean isCaseSensitive, boolean isWholeWord, boolean isIncremental, boolean isRegex, boolean isIncludeCollapsed, Comparator<?> comparator)
Deprecated.Use constructor withSearchDirection
parameter- Parameters:
searchText
- The text to search.layer
- The layer to search for the cell with the provided text. Typically the SelectionLayer.searchStrategy
- The search strategy to performsearchDirection
- The search direction.isWrapSearch
- is search wrap enabledisCaseSensitive
- is search case sensitiveisWholeWord
- only search whole wordsisIncremental
- is search incrementalisRegex
- is search based on regular expressionsisIncludeCollapsed
- is search including collapsed nodescomparator
- the comparator to use
-
SearchCommand
public SearchCommand(String searchText, ILayer layer, ISearchStrategy searchStrategy, SearchDirection searchDirection, boolean isWrapSearch, boolean isCaseSensitive, boolean isWholeWord, boolean isIncremental, boolean isRegex, boolean isIncludeCollapsed, Comparator<?> comparator)
- Parameters:
searchText
- The text to search.layer
- The layer to search for the cell with the provided text. Typically the SelectionLayer.searchStrategy
- The search strategy to performsearchDirection
- The search direction.isWrapSearch
- is search wrap enabledisCaseSensitive
- is search case sensitiveisWholeWord
- only search whole wordsisIncremental
- is search incrementalisRegex
- is search based on regular expressionsisIncludeCollapsed
- is search including collapsed nodescomparator
- the comparator to use- Since:
- 2.0
-
SearchCommand
protected SearchCommand(SearchCommand command)
-
-
Method Detail
-
getContext
public ILayer getContext()
-
getSearchStrategy
public ISearchStrategy getSearchStrategy()
-
getSearchText
public String getSearchText()
-
getSearchDirection
public SearchDirection getSearchDirection()
- Returns:
- the search direction.
- Since:
- 2.0
-
isWrapSearch
public boolean isWrapSearch()
-
isCaseSensitive
public boolean isCaseSensitive()
-
isWholeWord
public boolean isWholeWord()
-
isIncremental
public boolean isIncremental()
-
isIncludeCollapsed
public boolean isIncludeCollapsed()
-
isRegex
public boolean isRegex()
-
getSearchEventListener
public ILayerListener getSearchEventListener()
-
setSearchEventListener
public void setSearchEventListener(ILayerListener listener)
-
getComparator
public Comparator<?> getComparator()
-
convertToTargetLayer
public boolean convertToTargetLayer(ILayer targetLayer)
Description copied from interface:ILayerCommand
Convert the row/column coordinates the command might be carrying from the source layer to the destination (target) layer. If it is not possible to convert the command to the target layer, then this method will return false and the state of this command object will remain unchanged. Note: Commands should not be processed if they fail conversion.- Specified by:
convertToTargetLayer
in interfaceILayerCommand
- Parameters:
targetLayer
- the target layer- Returns:
- true if the command is valid after conversion, false if the command is no longer valid.
-
cloneCommand
public SearchCommand cloneCommand()
Description copied from interface:ILayerCommand
Same semantics asObject.clone()
Used to make a copies of the command if has to passed to different layer stacks.- Specified by:
cloneCommand
in interfaceILayerCommand
- Returns:
- a cloned instance of the command
- See Also:
GridLayer.doCommand(ILayerCommand)
-
-