Class CellEditorMouseEventMatcher
java.lang.Object
org.eclipse.nebula.widgets.nattable.ui.matcher.CellEditorMouseEventMatcher
- All Implemented Interfaces:
IMouseEventMatcher
Implementation of
IMouseEventMatcher that 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
ConstructorsConstructorDescriptionWill 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
Modifier and TypeMethodDescriptionbooleanmatches(NatTable natTable, org.eclipse.swt.events.MouseEvent event, LabelStack regionLabels) Figures out if the mouse event occurred in the supplied region.
-
Constructor Details
-
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
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
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 Details
-
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
-