Package org.netbeans.jemmy.util
Class DefaultVisualizer
java.lang.Object
org.netbeans.jemmy.util.DefaultVisualizer
- All Implemented Interfaces:
Cloneable
,Operator.ComponentVisualizer
- Direct Known Subclasses:
MouseVisualizer
Used as component visualizer by default.
- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
activate
(WindowOperator winOper) Activates a window.void
activateInternalFrame
(boolean yesOrNo) Informs that an internal frame contained component should be activated.void
activateWindow
(boolean yesOrNo) Informs that a window contained component should be activated.void
checkForModal
(boolean yesOrNo) Forces vizualizer to check that component is on the top modal dialog or no modal dialog displayed.Creates an exact copy of this visualizer.protected void
initInternalFrame
(JInternalFrameOperator intOper) Inits an internal frame.protected boolean
isWindowActive
(WindowOperator winOper) Returns true if window is active.void
makeVisible
(ComponentOperator compOper) Prepares the component for user input.protected void
makeWindowActive
(WindowOperator winOper) Performs an atomic window-activization precedure.void
scroll
(boolean yesOrNo) Informs that scrolling should be made.protected void
scroll
(JScrollPaneOperator scrollOper, Component target) Scrolls JScrollPane to make the component visible.void
switchTab
(boolean yesOrNo) Informs that tab switching should be made.protected void
switchTab
(JTabbedPaneOperator tabOper, Component target) Switches tabs to make the component visible.
-
Constructor Details
-
DefaultVisualizer
public DefaultVisualizer()
-
-
Method Details
-
checkForModal
public void checkForModal(boolean yesOrNo) Forces vizualizer to check that component is on the top modal dialog or no modal dialog displayed.- Parameters:
yesOrNo
- If true, JemmyInputException will be throught if component is not on the top modal dialog and a modal dialog is dislayed.
-
activateWindow
public void activateWindow(boolean yesOrNo) Informs that a window contained component should be activated.- Parameters:
yesOrNo
- true if windows need to be activated.
-
activateInternalFrame
public void activateInternalFrame(boolean yesOrNo) Informs that an internal frame contained component should be activated.- Parameters:
yesOrNo
- true if internal frames need to be activated.
-
scroll
public void scroll(boolean yesOrNo) Informs that scrolling should be made.- Parameters:
yesOrNo
- true if scroll panes need to be scrolled.
-
switchTab
public void switchTab(boolean yesOrNo) Informs that tab switching should be made.- Parameters:
yesOrNo
- true if tabbed panes need to be switched.
-
isWindowActive
Returns true if window is active.- Parameters:
winOper
- an operator representing the window.- Returns:
- true is window is active.
-
makeWindowActive
Performs an atomic window-activization precedure. A window is sopposed to be prepared for the activization (i.e. put "to front").- Parameters:
winOper
- an operator representing the window.
-
activate
Activates a window. Uses makeWindowActive if necessary.- Parameters:
winOper
- an operator representing the window.- See Also:
-
initInternalFrame
Inits an internal frame.- Parameters:
intOper
- an operator representing the frame.
-
scroll
Scrolls JScrollPane to make the component visible.- Parameters:
scrollOper
- an operator representing a scroll pane.target
- a component - target to be made visible.
-
switchTab
Switches tabs to make the component visible.- Parameters:
tabOper
- an operator representing a tabbed pane.target
- a component - target to be made visible.
-
makeVisible
Prepares the component for user input.- Specified by:
makeVisible
in interfaceOperator.ComponentVisualizer
- Parameters:
compOper
- an operator representing the component.- Throws:
JemmyInputException
- See Also:
-
cloneThis
Creates an exact copy of this visualizer.- Returns:
- new instance.
-