Class CellEditorMouseEventMatcher
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.ui.matcher.CellEditorMouseEventMatcher
-
- All Implemented Interfaces:
IMouseEventMatcher
public class CellEditorMouseEventMatcher extends Object implements IMouseEventMatcher
Implementation ofIMouseEventMatcherthat will check if editing should be activated. For this it is possible to specify the region label to react on, the mouse button that was used to click and if an editor is registered for the cell on which the mouse click was executed. If no region label is specified, only the mouse button and the presence of a cell editor is evaluated.If not specified, this matcher will react on the left mouse button.
-
-
Constructor Summary
Constructors Constructor Description CellEditorMouseEventMatcher()Will create a newCellEditorMouseEventMatcherthat will only evaluate the presence of a cell editor and the mouse left click.CellEditorMouseEventMatcher(int button)Will create a newCellEditorMouseEventMatcherthat will only evaluate the presence of a cell editor and the specified mouse click.CellEditorMouseEventMatcher(String regionLabel)Will create a newCellEditorMouseEventMatcherfor the specified grid region and the mouse left click.CellEditorMouseEventMatcher(String regionLabel, int button)Will create a newCellEditorMouseEventMatcherfor the specified grid region and mouse button.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanmatches(NatTable natTable, org.eclipse.swt.events.MouseEvent event, LabelStack regionLabels)Figures out if the mouse event occurred in the supplied region.
-
-
-
Constructor Detail
-
CellEditorMouseEventMatcher
public CellEditorMouseEventMatcher()
Will create a newCellEditorMouseEventMatcherthat will only evaluate the presence of a cell editor and the mouse left click.
-
CellEditorMouseEventMatcher
public CellEditorMouseEventMatcher(int button)
Will create a newCellEditorMouseEventMatcherthat will only evaluate the presence of a cell editor and the specified mouse click.- Parameters:
button- The mouse button that need to be pressed or released for this matcher to react.
-
CellEditorMouseEventMatcher
public CellEditorMouseEventMatcher(String regionLabel)
Will create a newCellEditorMouseEventMatcherfor the specified grid region and the mouse left click.- Parameters:
regionLabel- the label that specifies the region this matcher should be attached.
-
CellEditorMouseEventMatcher
public CellEditorMouseEventMatcher(String regionLabel, int button)
Will create a newCellEditorMouseEventMatcherfor the specified grid region and mouse button.- Parameters:
regionLabel- the label that specifies the region this matcher should be attached.button- The mouse button that need to be pressed or released for this matcher to react.
-
-
Method Detail
-
matches
public boolean matches(NatTable natTable, org.eclipse.swt.events.MouseEvent event, LabelStack regionLabels)
Description copied from interface:IMouseEventMatcherFigures out if the mouse event occurred in the supplied region.- Specified by:
matchesin interfaceIMouseEventMatcher- Parameters:
natTable- The NatTable on which theMouseEventoccured.event- The SWTMouseEvent.regionLabels- TheLabelStackwith the region labels of theMouseEventcoordinates.- Returns:
trueif theMouseEventmatches thisIMouseEventMatcherand should therefore be handled,falseif not
-
-