Class SelectionAnchorCellLabelKeyEventMatcher
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.ui.matcher.SelectionAnchorCellLabelKeyEventMatcher
-
- All Implemented Interfaces:
IKeyEventMatcher
public class SelectionAnchorCellLabelKeyEventMatcher extends Object implements IKeyEventMatcher
This class allows checking the current selection anchor's cell for a matching label. Only labels from the givenIUniqueIndexLayer
downwards are considered. Optionally the matcher can be chained with an additionalIKeyEventMatcher
(results are and'ed).
-
-
Field Summary
Fields Modifier and Type Field Description protected IKeyEventMatcher
aggregate
protected String
labelToMatch
protected IUniqueIndexLayer
layer
protected SelectionLayer
selectionLayer
-
Constructor Summary
Constructors Constructor Description SelectionAnchorCellLabelKeyEventMatcher(SelectionLayer selectionLayer, IUniqueIndexLayer layer, String labelToMatch)
Create aSelectionAnchorCellLabelKeyEventMatcher
that checks only if the given label is assigned to the selection anchor's cell, while the label stack is retrieved from the given layer.SelectionAnchorCellLabelKeyEventMatcher(SelectionLayer selectionLayer, IUniqueIndexLayer layer, String labelToMatch, IKeyEventMatcher aggregate)
Create aSelectionAnchorCellLabelKeyEventMatcher
that checks if the aggregate matches as well as if the given label is assigned to the selection anchor's cell, while the label stack is retrieved from the given layer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SelectionAnchorCellLabelKeyEventMatcher
anchorLabel(SelectionLayer selectionLayer, IUniqueIndexLayer layer, String labelToMatch)
Create aSelectionAnchorCellLabelKeyEventMatcher
that checks only if the given label is assigned to the selection anchor's cell, while the label stack is retrieved from the given layer.static SelectionAnchorCellLabelKeyEventMatcher
anchorLabel(SelectionLayer selectionLayer, IUniqueIndexLayer layer, String labelToMatch, IKeyEventMatcher aggregate)
Create aSelectionAnchorCellLabelKeyEventMatcher
that checks if the aggregate matches as well as if the given label is assigned to the selection anchor's cell, while the label stack is retrieved from the given layer.boolean
matches(org.eclipse.swt.events.KeyEvent event)
-
-
-
Field Detail
-
selectionLayer
protected final SelectionLayer selectionLayer
-
layer
protected final IUniqueIndexLayer layer
-
labelToMatch
protected final String labelToMatch
-
aggregate
protected final IKeyEventMatcher aggregate
-
-
Constructor Detail
-
SelectionAnchorCellLabelKeyEventMatcher
public SelectionAnchorCellLabelKeyEventMatcher(SelectionLayer selectionLayer, IUniqueIndexLayer layer, String labelToMatch)
Create aSelectionAnchorCellLabelKeyEventMatcher
that checks only if the given label is assigned to the selection anchor's cell, while the label stack is retrieved from the given layer.- Parameters:
selectionLayer
- theSelectionLayer
used to get the current selection anchor's position.layer
- the layer used to retrieve the label stack at the selection anchor's position.labelToMatch
- the label that should be part of the label stack at the selection anchor's position.
-
SelectionAnchorCellLabelKeyEventMatcher
public SelectionAnchorCellLabelKeyEventMatcher(SelectionLayer selectionLayer, IUniqueIndexLayer layer, String labelToMatch, IKeyEventMatcher aggregate)
Create aSelectionAnchorCellLabelKeyEventMatcher
that checks if the aggregate matches as well as if the given label is assigned to the selection anchor's cell, while the label stack is retrieved from the given layer.- Parameters:
selectionLayer
- theSelectionLayer
used to get the current selection anchor's position.layer
- the layer used to retrieve the label stack at the selection anchor's position.labelToMatch
- the label that should be part of the label stack at the selection anchor's position.aggregate
- (optional) an additionalIKeyEventMatcher
to be chained with the result of this matcher (results are and'ed).
-
-
Method Detail
-
matches
public boolean matches(org.eclipse.swt.events.KeyEvent event)
- Specified by:
matches
in interfaceIKeyEventMatcher
-
anchorLabel
public static SelectionAnchorCellLabelKeyEventMatcher anchorLabel(SelectionLayer selectionLayer, IUniqueIndexLayer layer, String labelToMatch)
Create aSelectionAnchorCellLabelKeyEventMatcher
that checks only if the given label is assigned to the selection anchor's cell, while the label stack is retrieved from the given layer.- Parameters:
selectionLayer
- theSelectionLayer
used to get the current selection anchor's position.layer
- the layer used to retrieve the label stack at the selection anchor's position.labelToMatch
- the label that should be part of the label stack at the selection anchor's position.
-
anchorLabel
public static SelectionAnchorCellLabelKeyEventMatcher anchorLabel(SelectionLayer selectionLayer, IUniqueIndexLayer layer, String labelToMatch, IKeyEventMatcher aggregate)
Create aSelectionAnchorCellLabelKeyEventMatcher
that checks if the aggregate matches as well as if the given label is assigned to the selection anchor's cell, while the label stack is retrieved from the given layer.- Parameters:
selectionLayer
- theSelectionLayer
used to get the current selection anchor's position.layer
- the layer used to retrieve the label stack at the selection anchor's position.labelToMatch
- the label that should be part of the label stack at the selection anchor's position.aggregate
- (optional) an additionalIKeyEventMatcher
to be chained with the result of this matcher (results are and'ed).
-
-