java.lang.Object
io.github.jspinak.brobot.actions.methods.basicactions.mouse.MouseUp
All Implemented Interfaces:
ActionInterface

@Component public class MouseUp extends Object implements ActionInterface
Releases a mouse button in the Brobot model-based GUI automation framework.

MouseUp is a low-level action in the Action Model (α) that releases a previously pressed mouse button. It completes mouse interactions initiated by MouseDown, enabling the framework to perform complex mouse gestures and maintain proper button state throughout automation execution.

Key features:

  • Button Release: Releases left, right, or middle mouse buttons
  • Timing Control: Configurable pauses before and after release for precise interaction timing
  • State Completion: Completes drag operations and finalizes selections
  • Event Generation: Triggers appropriate mouse release events in the GUI

Common use cases:

  • Completing drag-and-drop operations (after MouseDown and MouseMove)
  • Finalizing selection rectangles for multiple item selection
  • Ending context menu triggers started with right button MouseDown
  • Completing custom gestures that require button press and release

Important considerations:

  • Must be paired with a preceding MouseDown action
  • Releasing an already-released button is typically harmless but ineffective
  • The mouse position remains unchanged by this action
  • Some applications may process the release event differently based on duration

In the model-based approach, MouseUp represents the completion phase of mouse interactions. Together with MouseDown and MouseMove, it enables the decomposition of complex GUI gestures into atomic, reusable operations. This granular control is essential for handling sophisticated interaction patterns while maintaining the framework's ability to model and predict GUI behavior.

Since:
1.0
See Also: