org.vishia.gral.awt

## Class AwtGralMouseListener.MouseListenerGralAction

- java.lang.Object
- - org.vishia.gral.awt.AwtGralMouseListener.MouseListenerNoAction
  - - org.vishia.gral.awt.AwtGralMouseListener.MouseListenerGralAction

- All Implemented Interfaces:
    java.awt.event.MouseListener, java.util.EventListener
  Enclosing class:
    AwtGralMouseListener

      public static class AwtGralMouseListener.MouseListenerGralAction
      extends AwtGralMouseListener.MouseListenerNoAction
      implements java.awt.event.MouseListener

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.awt.Color` | `backgroundWhilePressed`
    `protected boolean` | `isPressed` Used in the implementation level for the paint routine.
    `protected java.awt.event.MouseMotionListener` | `mouseMoveListener`
    `protected GralMouseWidgetAction_ifc` | `mouseWidgetAction`
    `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.awt.AwtGralMouseListener.MouseListenerNoAction

      `xDown, yDown`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MouseListenerGralAction(GralMouseWidgetAction_ifc mouseWidgetAction)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `mouseClicked(java.awt.event.MouseEvent ev)` The mouse doubleclick is left empty.
    `void` | `mousePressed(java.awt.event.MouseEvent e)` The mouse-down action save some informations about the widget.
    `void` | `mouseReleased(java.awt.event.MouseEvent e)` The mouse up is left empty.

    - ### Methods inherited from class org.vishia.gral.awt.AwtGralMouseListener.MouseListenerNoAction

      `mouseEntered, mouseExited`

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

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

    - ### Methods inherited from interface java.awt.event.MouseListener

      `mouseEntered, mouseExited`

- - ### 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.

    - #### backgroundWhilePressed

          private java.awt.Color backgroundWhilePressed

    - #### isPressed

          protected boolean isPressed

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

    - #### mouseWidgetAction

          protected final GralMouseWidgetAction_ifc mouseWidgetAction

    - #### mouseMoveListener

          protected java.awt.event.MouseMotionListener mouseMoveListener

  - ### Constructor Detail

    - #### MouseListenerGralAction

          public MouseListenerGralAction(GralMouseWidgetAction_ifc mouseWidgetAction)

      Constructor.
      Parameters:
        `guiMng` - The Gui-manager
        `userCmdGui` - The users method for the action.
        `sCmdPress` - command string provided as first parameter on mouse button press.
        `sCmdRelease` -
        `sCmdDoubleClick` -

  - ### Method Detail

    - #### mouseClicked

          public void mouseClicked(java.awt.event.MouseEvent ev)

      Description copied from class: `AwtGralMouseListener.MouseListenerNoAction`
      The mouse doubleclick is left empty. It may be overridden by an derived class.
      Specified by:
        `mouseClicked` in interface `java.awt.event.MouseListener`
      Overrides:
        `mouseClicked` in class `AwtGralMouseListener.MouseListenerNoAction`

    - #### mousePressed

          public void mousePressed(java.awt.event.MouseEvent e)

      Description copied from class: `AwtGralMouseListener.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:
        `mousePressed` in interface `java.awt.event.MouseListener`
      Overrides:
        `mousePressed` in class `AwtGralMouseListener.MouseListenerNoAction`

    - #### mouseReleased

          public void mouseReleased(java.awt.event.MouseEvent e)

      Description copied from class: `AwtGralMouseListener.MouseListenerNoAction`
      The mouse up is left empty. It may be overridden by an derived class.
      Specified by:
        `mouseReleased` in interface `java.awt.event.MouseListener`
      Overrides:
        `mouseReleased` in class `AwtGralMouseListener.MouseListenerNoAction`