Class MouseEventMatcher
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.ui.matcher.MouseEventMatcher
-
- All Implemented Interfaces:
IMouseEventMatcher
- Direct Known Subclasses:
CellLabelMouseEventMatcher
,CellPainterMouseEventMatcher
,ColumnHeaderClickEventMatcher
,ColumnHideIndicatorEventMatcher
,ColumnResizeEventMatcher
,FillHandleEventMatcher
,HierarchicalRowHideIndicatorEventMatcher
,RowHideIndicatorEventMatcher
,RowResizeEventMatcher
public class MouseEventMatcher extends Object implements IMouseEventMatcher
-
-
Field Summary
Fields Modifier and Type Field Description static int
LEFT_BUTTON
static int
RIGHT_BUTTON
-
Constructor Summary
Constructors Constructor Description MouseEventMatcher()
MouseEventMatcher(int stateMask, String eventRegion)
MouseEventMatcher(int stateMask, String eventRegion, int button)
ConstructorMouseEventMatcher(String eventRegionName)
MouseEventMatcher(String eventRegion, int button)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MouseEventMatcher
bodyLeftClick(int mask)
static MouseEventMatcher
bodyRightClick(int mask)
static MouseEventMatcher
columnGroupHeaderLeftClick(int mask)
static MouseEventMatcher
columnGroupHeaderRightClick(int mask)
static MouseEventMatcher
columnHeaderLeftClick(int mask)
static MouseEventMatcher
columnHeaderRightClick(int mask)
boolean
equals(Object obj)
int
getButton()
String
getEventRegion()
int
getStateMask()
int
hashCode()
boolean
matches(NatTable natTable, org.eclipse.swt.events.MouseEvent event, LabelStack regionLabels)
Figures out if the mouse event occurred in the supplied region.static MouseEventMatcher
rowGroupHeaderLeftClick(int mask)
static MouseEventMatcher
rowGroupHeaderRightClick(int mask)
static MouseEventMatcher
rowHeaderLeftClick(int mask)
static MouseEventMatcher
rowHeaderRightClick(int mask)
-
-
-
Field Detail
-
LEFT_BUTTON
public static final int LEFT_BUTTON
- See Also:
- Constant Field Values
-
RIGHT_BUTTON
public static final int RIGHT_BUTTON
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MouseEventMatcher
public MouseEventMatcher()
-
MouseEventMatcher
public MouseEventMatcher(String eventRegionName)
-
MouseEventMatcher
public MouseEventMatcher(String eventRegion, int button)
-
MouseEventMatcher
public MouseEventMatcher(int stateMask, String eventRegion)
-
MouseEventMatcher
public MouseEventMatcher(int stateMask, String eventRegion, int button)
Constructor- Parameters:
stateMask
- the state of the keyboard modifier keys and mouse masks at the time the event was generated.eventRegion
- the grid region in which the mouse event should be matchedbutton
- the button that was pressed or released, e.g.LEFT_BUTTON
,RIGHT_BUTTON
- See Also:
MouseEvent.stateMask
,GridRegion
,MouseEvent.button
-
-
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
-
getStateMask
public int getStateMask()
-
getEventRegion
public String getEventRegion()
-
getButton
public int getButton()
-
columnHeaderLeftClick
public static MouseEventMatcher columnHeaderLeftClick(int mask)
-
columnHeaderRightClick
public static MouseEventMatcher columnHeaderRightClick(int mask)
-
rowHeaderLeftClick
public static MouseEventMatcher rowHeaderLeftClick(int mask)
-
rowHeaderRightClick
public static MouseEventMatcher rowHeaderRightClick(int mask)
-
bodyLeftClick
public static MouseEventMatcher bodyLeftClick(int mask)
-
bodyRightClick
public static MouseEventMatcher bodyRightClick(int mask)
-
columnGroupHeaderLeftClick
public static MouseEventMatcher columnGroupHeaderLeftClick(int mask)
-
columnGroupHeaderRightClick
public static MouseEventMatcher columnGroupHeaderRightClick(int mask)
-
rowGroupHeaderLeftClick
public static MouseEventMatcher rowGroupHeaderLeftClick(int mask)
-
rowGroupHeaderRightClick
public static MouseEventMatcher rowGroupHeaderRightClick(int mask)
-
-