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 Details

  • Constructor Details

    • 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 matched
      button - the button that was pressed or released, e.g. LEFT_BUTTON, RIGHT_BUTTON
      See Also:
      • MouseEvent.stateMask
      • GridRegion
      • MouseEvent.button
  • Method Details

    • 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 interface IMouseEventMatcher
      Parameters:
      natTable - The NatTable on which the MouseEvent occured.
      event - The SWT MouseEvent.
      regionLabels - The LabelStack with the region labels of the MouseEvent coordinates.
      Returns:
      true if the MouseEvent matches this IMouseEventMatcher and should therefore be handled, false if not
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • 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)