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 ofIMouseEventMatcher
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
Constructors Constructor Description CellEditorMouseEventMatcher()
Will create a newCellEditorMouseEventMatcher
that will only evaluate the presence of a cell editor and the mouse left click.CellEditorMouseEventMatcher(int button)
Will create a newCellEditorMouseEventMatcher
that will only evaluate the presence of a cell editor and the specified mouse click.CellEditorMouseEventMatcher(String regionLabel)
Will create a newCellEditorMouseEventMatcher
for the specified grid region and the mouse left click.CellEditorMouseEventMatcher(String regionLabel, int button)
Will create a newCellEditorMouseEventMatcher
for the specified grid region and mouse button.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matches(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 newCellEditorMouseEventMatcher
that will only evaluate the presence of a cell editor and the mouse left click.
-
CellEditorMouseEventMatcher
public CellEditorMouseEventMatcher(int button)
Will create a newCellEditorMouseEventMatcher
that 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 newCellEditorMouseEventMatcher
for 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 newCellEditorMouseEventMatcher
for 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:IMouseEventMatcher
Figures out if the mouse event occurred in the supplied region.- Specified by:
matches
in interfaceIMouseEventMatcher
- Parameters:
natTable
- The NatTable on which theMouseEvent
occured.event
- The SWTMouseEvent
.regionLabels
- TheLabelStack
with the region labels of theMouseEvent
coordinates.- Returns:
true
if theMouseEvent
matches thisIMouseEventMatcher
and should therefore be handled,false
if not
-
-