Package org.netbeans.jemmy.util
Class MouseVisualizer
java.lang.Object
org.netbeans.jemmy.util.DefaultVisualizer
org.netbeans.jemmy.util.MouseVisualizer
- All Implemented Interfaces:
Cloneable
,Operator.ComponentVisualizer
Does
super.activate(org.netbeans.jemmy.operators.WindowOperator)
.
Then, if java version is appropriate (1.3 or later) activates windows by robot mouse click on border.- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic int
A constant used to inform that window activating click needs to performed on the botton side of frame.static int
A constant used to inform that window activating click needs to performed on the left side of frame.static int
A constant used to inform that window activating click needs to performed on the right side of frame.static int
A constant used to inform that window activating click needs to performed on the top side of frame. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a visualizer which clicks on (0, 0) window coords.MouseVisualizer
(int place, double pointLocation, int depth, boolean checkMouse) Creates a visualizer which clicks on window boder. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
isWindowActive
(WindowOperator winOper) Returns true if window is active.protected void
makeWindowActive
(WindowOperator winOper) Performs an atomic window-activization precedure.Methods inherited from class org.netbeans.jemmy.util.DefaultVisualizer
activate, activateInternalFrame, activateWindow, checkForModal, cloneThis, initInternalFrame, makeVisible, scroll, scroll, switchTab, switchTab
-
Field Details
-
TOP
public static int TOPA constant used to inform that window activating click needs to performed on the top side of frame.- See Also:
-
BOTTOM
public static int BOTTOMA constant used to inform that window activating click needs to performed on the botton side of frame.- See Also:
-
LEFT
public static int LEFTA constant used to inform that window activating click needs to performed on the left side of frame.- See Also:
-
RIGHT
public static int RIGHTA constant used to inform that window activating click needs to performed on the right side of frame.- See Also:
-
-
Constructor Details
-
MouseVisualizer
public MouseVisualizer()Creates a visualizer which clicks on (0, 0) window coords. -
MouseVisualizer
public MouseVisualizer(int place, double pointLocation, int depth, boolean checkMouse) Creates a visualizer which clicks on window boder. In case ifplace == BOTTOM
, for example clicks on (width * pointLocation, height - depth) coordinates.- Parameters:
place
- One of the predefined value: TOP, BOTTOM, LEFT, RIGHTpointLocation
- Proportial coordinates to click.depth
- Distance from the border.checkMouse
- Check if there is any java component under mouse
-
-
Method Details
-
isWindowActive
Description copied from class:DefaultVisualizer
Returns true if window is active.- Overrides:
isWindowActive
in classDefaultVisualizer
- Parameters:
winOper
- an operator representing the window.- Returns:
- true is window is active.
-
makeWindowActive
Description copied from class:DefaultVisualizer
Performs an atomic window-activization precedure. A window is sopposed to be prepared for the activization (i.e. put "to front").- Overrides:
makeWindowActive
in classDefaultVisualizer
- Parameters:
winOper
- an operator representing the window.
-