public class CellEditorMouseEventMatcher extends Object implements IMouseEventMatcher
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 and Description |
---|
CellEditorMouseEventMatcher()
Will create a new
CellEditorMouseEventMatcher that will only evaluate
the presence of a cell editor and the mouse left click. |
CellEditorMouseEventMatcher(int button)
Will create a new
CellEditorMouseEventMatcher that will only evaluate
the presence of a cell editor and the specified mouse click. |
CellEditorMouseEventMatcher(String regionLabel)
Will create a new
CellEditorMouseEventMatcher for the specified
grid region and the mouse left click. |
CellEditorMouseEventMatcher(String regionLabel,
int button)
Will create a new
CellEditorMouseEventMatcher for the specified
grid region and mouse button. |
Modifier and Type | Method and Description |
---|---|
boolean |
matches(NatTable natTable,
org.eclipse.swt.events.MouseEvent event,
LabelStack regionLabels)
Figures out if the mouse event occurred in the supplied region.
|
public CellEditorMouseEventMatcher()
CellEditorMouseEventMatcher
that will only evaluate
the presence of a cell editor and the mouse left click.public CellEditorMouseEventMatcher(int button)
CellEditorMouseEventMatcher
that will only evaluate
the presence of a cell editor and the specified mouse click.button
- The mouse button that need to be pressed or released for this
matcher to react.public CellEditorMouseEventMatcher(String regionLabel)
CellEditorMouseEventMatcher
for the specified
grid region and the mouse left click.regionLabel
- the label that specifies the region this matcher should
be attached.public CellEditorMouseEventMatcher(String regionLabel, int button)
CellEditorMouseEventMatcher
for the specified
grid region and mouse button.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.public boolean matches(NatTable natTable, org.eclipse.swt.events.MouseEvent event, LabelStack regionLabels)
IMouseEventMatcher
matches
in interface IMouseEventMatcher
event
- SWT mouse eventCopyright © 2013. All Rights Reserved.