org.vishia.gral.base

## Class GralButton.MouseActionButton

- java.lang.Object
- - org.vishia.gral.base.GralButton.MouseActionButton

- All Implemented Interfaces:
    GralMouseWidgetAction_ifc
  Enclosing class:
    GralButton

      class GralButton.MouseActionButton
      extends java.lang.Object
      implements GralMouseWidgetAction_ifc

  Inner class to implement the mouse actions called from the gral implementing layer. If the mouse was moved from the widget's area while a button is pressed, the mouse action on release is not invoked.

- - ### Field Summary

    - ### Fields inherited from interface org.vishia.gral.base.GralMouseWidgetAction_ifc

      `mUser1down, mUser1up, mUser2down, mUser2up, mUser3down, mUser3up, mUserAll, mUserAlldown, mUserAllup, mUserDouble, version`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MouseActionButton()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `mouse1Double(int keyCode, int xMousePixel, int yMousePixel, int xWidgetSizePixel, int yWidgetSizePixel, GralWidget widgg)`
    `void` | `mouse1Down(int keyCode, int xMousePixel, int yMousePixel, int xWidgetSizePixel, int yWidgetSizePixel, GralWidget widgg)` Called from the graphic implementation layer if the standard left mouse button is pressed.
    `void` | `mouse1Up(int keyCode, int xMousePixel, int yMousePixel, int xWidgetSizePixel, int yWidgetSizePixel, GralWidget widgg)` It will be called only if the mouse up is pressed inside the button's area.
    `void` | `mouse2Down(int keyCode, int xMousePixel, int yMousePixel, int xWidgetSizePixel, int yWidgetSizePixel, GralWidget widgg)` Called from the graphic implementation layer if the standard right mouse button is pressed.
    `void` | `mouse2Up(int keyCode, int xMousePixel, int yMousePixel, int xWidgetSizePixel, int yWidgetSizePixel, GralWidget widgg)`
    `boolean` | `mouseMoved(int xMousePixel, int yMousePixel, int sizex, int sizey)` This routine is called only if a mouse button is pressed while moving the mouse cursor.

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

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

- - ### Constructor Detail

    - #### MouseActionButton

          MouseActionButton()

  - ### Method Detail

    - #### mouseMoved

          public boolean mouseMoved(int xMousePixel,
                                    int yMousePixel,
                                    int sizex,
                                    int sizey)

      Description copied from interface: `GralMouseWidgetAction_ifc`
      This routine is called only if a mouse button is pressed while moving the mouse cursor.
      Specified by:
        `mouseMoved` in interface `GralMouseWidgetAction_ifc`
      Parameters:
        `xMousePixel` - The current mouse cursor x value
        `yMousePixel` - The current mouse cursor y value
        `sizex` - Width of the associated widget.
        `sizey` - Height of the associated widget.
      Returns:
        true if the mouse should be still accepted as pressed, false if the mouse button up action should be prevented. The mouse is not accepted as pressed any more.

    - #### mouse1Down

          public void mouse1Down(int keyCode,
                                 int xMousePixel,
                                 int yMousePixel,
                                 int xWidgetSizePixel,
                                 int yWidgetSizePixel,
                                 GralWidget widgg)

      Description copied from interface: `GralMouseWidgetAction_ifc`
      Called from the graphic implementation layer if the standard left mouse button is pressed.
      Specified by:
        `mouse1Down` in interface `GralMouseWidgetAction_ifc`

    - #### mouse1Up

          public void mouse1Up(int keyCode,
                               int xMousePixel,
                               int yMousePixel,
                               int xWidgetSizePixel,
                               int yWidgetSizePixel,
                               GralWidget widgg)

      It will be called only if the mouse up is pressed inside the button's area.
      Specified by:
        `mouse1Up` in interface `GralMouseWidgetAction_ifc`
      See Also:
        `GralMouseWidgetAction_ifc.mouse1Up(int, int, int, int, int, org.vishia.gral.base.GralWidget)`

    - #### mouse2Down

          public void mouse2Down(int keyCode,
                                 int xMousePixel,
                                 int yMousePixel,
                                 int xWidgetSizePixel,
                                 int yWidgetSizePixel,
                                 GralWidget widgg)

      Description copied from interface: `GralMouseWidgetAction_ifc`
      Called from the graphic implementation layer if the standard right mouse button is pressed.
      Specified by:
        `mouse2Down` in interface `GralMouseWidgetAction_ifc`

    - #### mouse2Up

          public void mouse2Up(int keyCode,
                               int xMousePixel,
                               int yMousePixel,
                               int xWidgetSizePixel,
                               int yWidgetSizePixel,
                               GralWidget widgg)

      Specified by:
        `mouse2Up` in interface `GralMouseWidgetAction_ifc`

    - #### mouse1Double

          public void mouse1Double(int keyCode,
                                   int xMousePixel,
                                   int yMousePixel,
                                   int xWidgetSizePixel,
                                   int yWidgetSizePixel,
                                   GralWidget widgg)

      Specified by:
        `mouse1Double` in interface `GralMouseWidgetAction_ifc`