org.vishia.gral.swt

## Class SwtGralMouseListener.MouseListenerGralAction

- java.lang.Object
- - org.vishia.gral.swt.SwtGralMouseListener.MouseListenerNoAction
  - - org.vishia.gral.swt.SwtGralMouseListener.MouseListenerGralAction

- All Implemented Interfaces:
    java.util.EventListener, org.eclipse.swt.events.MouseListener, org.eclipse.swt.internal.SWTEventListener
  Enclosing class:
    SwtGralMouseListener

      public static class SwtGralMouseListener.MouseListenerGralAction
      extends SwtGralMouseListener.MouseListenerNoAction
      implements org.eclipse.swt.events.MouseListener

  This class is the implementation of a SWT `MouseListener` and implements methods which invokes the `GralWidget.setActionMouse(GralMouseWidgetAction_ifc, int)` or the `GralWidget.setActionChange(GralUserAction)` on the determined mouse clicks.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `isPressed` Used in the implementation level for the paint routine.
    `protected org.eclipse.swt.events.MouseMoveListener` | `mouseMoveListener` TODO invoke user action if mouse releases the area
    `private int` | `xMousePress` Positions saved on mouse press, to detect whether the mouse-release occurs in the pressed area.
    `private int` | `yMousePress` Positions saved on mouse press, to detect whether the mouse-release occurs in the pressed area.

    - ### Fields inherited from class org.vishia.gral.swt.SwtGralMouseListener.MouseListenerNoAction

      `xDown, yDown`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MouseListenerGralAction()` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `mouseDoubleClick(org.eclipse.swt.events.MouseEvent e)` The mouse doubleclick is left empty.
    `void` | `mouseDown(org.eclipse.swt.events.MouseEvent ev)` The mouse-down action save some informations about the widget.
    `void` | `mouseUp(org.eclipse.swt.events.MouseEvent ev)` The default behavior for mouse up is used for design mode.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### xMousePress

          private int xMousePress

      Positions saved on mouse press, to detect whether the mouse-release occurs in the pressed area. If the mouse-position is shifted outside the area of the widget, the mouse-release-user-action is not executed.

    - #### yMousePress

          private int yMousePress

      Positions saved on mouse press, to detect whether the mouse-release occurs in the pressed area. If the mouse-position is shifted outside the area of the widget, the mouse-release-user-action is not executed.

    - #### isPressed

          protected boolean isPressed

      Used in the implementation level for the paint routine. Therefore it is package private.

    - #### mouseMoveListener

          protected org.eclipse.swt.events.MouseMoveListener mouseMoveListener

      TODO invoke user action if mouse releases the area

  - ### Constructor Detail

    - #### MouseListenerGralAction

          public MouseListenerGralAction()

      Constructor.
      Parameters:
        `mouseWidgetAction` - Action invoked, maybe null
        `mUser` - 0 or or-combinations of bits in `GralMouseWidgetAction_ifc.mUser1down` and all other mUser... If one of this bits is set, the `GralWidget.setActionChange(GralUserAction)` is invoked on the appropriate mouse action after and independent of the mouseWidgetAction.

  - ### Method Detail

    - #### mouseDoubleClick

          public void mouseDoubleClick(org.eclipse.swt.events.MouseEvent e)

      Description copied from class: `SwtGralMouseListener.MouseListenerNoAction`
      The mouse doubleclick is left empty. It may be overridden by an derived class.
      Specified by:
        `mouseDoubleClick` in interface `org.eclipse.swt.events.MouseListener`
      Overrides:
        `mouseDoubleClick` in class `SwtGralMouseListener.MouseListenerNoAction`

    - #### mouseDown

          public void mouseDown(org.eclipse.swt.events.MouseEvent ev)

      Description copied from class: `SwtGralMouseListener.MouseListenerNoAction`
      The mouse-down action save some informations about the widget. It may be overridden by an derived class, then this method should be invoked within.
      Specified by:
        `mouseDown` in interface `org.eclipse.swt.events.MouseListener`
      Overrides:
        `mouseDown` in class `SwtGralMouseListener.MouseListenerNoAction`

    - #### mouseUp

          public void mouseUp(org.eclipse.swt.events.MouseEvent ev)

      Description copied from class: `SwtGralMouseListener.MouseListenerNoAction`
      The default behavior for mouse up is used for design mode.
      Specified by:
        `mouseUp` in interface `org.eclipse.swt.events.MouseListener`
      Overrides:
        `mouseUp` in class `SwtGralMouseListener.MouseListenerNoAction`