Class MouseEventMatcher

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

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

      public int hashCode()
      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)