Class ModeSupport

All Implemented Interfaces:
EventListener,,,,,, org.eclipse.swt.internal.SWTEventListener

public class ModeSupport extends Object implements,,,,
Modal event handler for NatTable. This class acts as a proxy event listener. It manages a set of IModeEventHandler instances which control the actual event handling for a given mode. This allows the event handling behavior for different modes to be grouped together and isolated from each other.
  • Constructor Details

    • ModeSupport

      public ModeSupport(NatTable natTable)
  • Method Details

    • registerModeEventHandler

      public void registerModeEventHandler(Mode mode, IModeEventHandler modeEventHandler)
      Register an event handler to handle events for a given mode.
      mode - The mode.
      modeEventHandler - An IModeEventHandler instance that will handle events in the given mode.
      See Also:
    • switchMode

      public void switchMode(Mode mode)
      Switch to the given mode.
      mode - The target mode to switch to.
    • switchMode

      public void switchMode(IModeEventHandler modeEventHandler)
    • keyPressed

      public void keyPressed( event)
      Specified by:
      keyPressed in interface
    • keyReleased

      public void keyReleased( event)
      Specified by:
      keyReleased in interface
    • mouseDoubleClick

      public void mouseDoubleClick( event)
      Specified by:
      mouseDoubleClick in interface
    • mouseDown

      public void mouseDown( event)
      Specified by:
      mouseDown in interface
    • mouseUp

      public void mouseUp( event)
      Specified by:
      mouseUp in interface
    • mouseMove

      public void mouseMove( event)
      Specified by:
      mouseMove in interface
    • mouseEnter

      public void mouseEnter( e)
      Specified by:
      mouseEnter in interface
    • mouseExit

      public void mouseExit( e)
      Specified by:
      mouseExit in interface
    • mouseHover

      public void mouseHover( e)
      Specified by:
      mouseHover in interface
    • focusGained

      public void focusGained( event)
      Specified by:
      focusGained in interface
    • focusLost

      public void focusLost( event)
      Specified by:
      focusLost in interface