/** * move mouse using mouse wheel in the given direction the given steps <br> * the result is system dependent * * @param direction {@link Button} * @param steps value */ public static void wheel(int direction, int steps) { wheel(direction, steps, null); }
/** * Move the wheel at the current mouse position<br> the given steps in the given direction: <br >Button.WHEEL_DOWN, * Button.WHEEL_UP * * @param direction to move the wheel * @param steps the number of steps * @return 1 in any case */ public int wheel(int direction, int steps) { Mouse.wheel(direction, steps, this); return 1; }
protected static void wheel(int direction, int steps, Region region) { wheel(direction,steps,region, WHEEL_STEP_DELAY); }
/** * move the mouse pointer to the given target location<br> and move the wheel the given steps in the given direction: * <br>Button.WHEEL_DOWN, Button.WHEEL_UP * * @param <PFRML> Pattern, Filename, Text, Region, Match or Location target * @param target Pattern, Filename, Text, Region, Match or Location * @param direction to move the wheel * @param steps the number of steps * @param stepDelay number of miliseconds to wait when incrementing the step value * @return 1 if possible, 0 otherwise * @throws FindFailed if the Find operation failed */ public <PFRML> int wheel(PFRML target, int direction, int steps, int stepDelay) throws FindFailed { Location loc = getLocationFromTarget(target); if (loc != null) { Mouse.use(this); Mouse.keep(this); Mouse.move(loc, this); Mouse.wheel(direction, steps, this, stepDelay); Mouse.let(this); return 1; } return 0; }