Package org.netbeans.jemmy.operators
Class DialogOperator
java.lang.Object
org.netbeans.jemmy.operators.Operator
org.netbeans.jemmy.operators.ComponentOperator
org.netbeans.jemmy.operators.ContainerOperator
org.netbeans.jemmy.operators.WindowOperator
org.netbeans.jemmy.operators.DialogOperator
- All Implemented Interfaces:
Outputable
,Timeoutable
- Direct Known Subclasses:
JDialogOperator
Timeouts used:
DialogWaiter.WaitDialogTimeout - time to wait dialog displayed
DialogWaiter.AfterDialogTimeout - time to sleep after dialog has been dispayed
ComponentOperator.WaitStateTimeout - time to wait for title
.
- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Allows to find component by title.static class
Checks component type.Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.ContainerOperator
ContainerOperator.ContainerFinder
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.Operator
Operator.ComponentVisualizer, Operator.DefaultPathParser, Operator.DefaultStringComparator, Operator.Finder, Operator.MapAction, Operator.MapBooleanAction, Operator.MapByteAction, Operator.MapCharacterAction, Operator.MapDoubleAction, Operator.MapFloatAction, Operator.MapIntegerAction, Operator.MapLongAction, Operator.MapVoidAction, Operator.NoBlockingAction, Operator.PathParser, Operator.StringComparator
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Identifier for a modal property.static final String
Identifier for a resizable property.static final String
Identifier for a title property.Fields inherited from class org.netbeans.jemmy.operators.ComponentOperator
HEIGHT_DPROP, IS_SHOWING_DPROP, IS_VISIBLE_DPROP, NAME_DPROP, WIDTH_DPROP, X_DPROP, Y_DPROP
Fields inherited from class org.netbeans.jemmy.operators.Operator
CLASS_DPROP, TO_STRING_DPROP
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.DialogOperator
(int index) Constructor.Constructs a DialogOperator object.DialogOperator
(String title) Constructor.DialogOperator
(String title, int index) Constructor.DialogOperator
(String title, int index, Operator env) Constructor.DialogOperator
(ComponentChooser chooser) Constructs a DialogOperator object.DialogOperator
(ComponentChooser chooser, int index) Constructs a DialogOperator object.DialogOperator
(ComponentChooser chooser, int index, Operator env) Constructs a DialogOperator object.DialogOperator
(WindowOperator owner) Constructor.DialogOperator
(WindowOperator owner, int index) Constructor.DialogOperator
(WindowOperator owner, String title) Uses owner's timeout and output for waiting and to init operator.DialogOperator
(WindowOperator owner, String title, int index) Constructor.DialogOperator
(WindowOperator owner, ComponentChooser chooser) Constructs a DialogOperator object.DialogOperator
(WindowOperator owner, ComponentChooser chooser, int index) Constructs a DialogOperator object. -
Method Summary
Modifier and TypeMethodDescriptiongetDump()
Returns information about component.getTitle()
MapsDialog.getTitle()
through queueboolean
isModal()
MapsDialog.isModal()
through queueboolean
MapsDialog.isResizable()
through queuevoid
setModal
(boolean b) MapsDialog.setModal(boolean)
through queuevoid
setResizable
(boolean b) MapsDialog.setResizable(boolean)
through queuevoid
MapsDialog.setTitle(String)
through queueprotected static Dialog
waitDialog
(Window owner, ComponentChooser chooser, int index, Timeouts timeouts, TestOut output) A method to be used from subclasses.protected static Dialog
waitDialog
(ComponentChooser chooser, int index, Timeouts timeouts, TestOut output) A method to be used from subclasses.protected static Dialog
waitDialog
(WindowOperator owner, ComponentChooser chooser, int index) A method to be used from subclasses.void
Waits for title.Methods inherited from class org.netbeans.jemmy.operators.WindowOperator
activate, addWindowListener, applyResourceBundle, applyResourceBundle, close, copyEnvironment, dispose, findSubWindow, findSubWindow, findWindow, findWindow, findWindow, findWindow, getFocusOwner, getOutput, getOwnedWindows, getOwner, getWarningString, isActive, isFocused, move, pack, removeWindowListener, resize, setOutput, toBack, toFront, waitClosed, waitSubWindow, waitSubWindow, waitWindow, waitWindow, waitWindow, waitWindow, waitWindow, waitWindow, waitWindow
Methods inherited from class org.netbeans.jemmy.operators.ContainerOperator
add, add, add, add, add, addContainerListener, createSubOperator, createSubOperator, findComponentAt, findComponentAt, findContainer, findContainer, findContainer, findContainer, findContainerUnder, findContainerUnder, findSubComponent, findSubComponent, getComponent, getComponentCount, getComponents, getInsets, getLayout, getTimeouts, isAncestorOf, paintComponents, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, setTimeouts, waitContainer, waitContainer, waitContainer, waitContainer, waitSubComponent, waitSubComponent
Methods inherited from class org.netbeans.jemmy.operators.ComponentOperator
activateWindow, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, checkImage, checkImage, clickForPopup, clickForPopup, clickForPopup, clickForPopup, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, contains, contains, createImage, createImage, dispatchEvent, doLayout, dragMouse, dragMouse, dragMouse, dragNDrop, dragNDrop, dragNDrop, enableInputMethods, enterMouse, exitMouse, findComponent, findComponent, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getCenterX, getCenterXForClick, getCenterY, getCenterYForClick, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getContainer, getContainers, getCursor, getDropTarget, getEventDispatcher, getFocus, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getSize, getSource, getToolkit, getTreeLock, getWidth, getWindow, getX, getY, hasFocus, imageUpdate, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, list, list, list, list, list, makeComponentVisible, moveMouse, paint, paintAll, prepareImage, prepareImage, pressKey, pressKey, pressMouse, pressMouse, print, printAll, pushKey, pushKey, releaseKey, releaseKey, releaseMouse, releaseMouse, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, transferFocus, typeKey, typeKey, typeKey, update, validate, waitComponent, waitComponent, waitComponent, waitComponent, waitComponentEnabled, waitComponentShowing, waitComponentVisible, waitHasFocus, wtComponentEnabled
Methods inherited from class org.netbeans.jemmy.operators.Operator
addOperatorPackage, addToDump, addToDump, createOperator, getCharBindingMap, getCharKey, getCharModifiers, getCharsKeys, getCharsKeys, getCharsModifiers, getCharsModifiers, getComparator, getDefaultComponentVisualizer, getDefaultMouseButton, getDefaultPathParser, getDefaultStringComparator, getDefaultVerification, getEnvironmentOperator, getParentPath, getParentPath, getPathParser, getPopupMouseButton, getProperties, getQueueTool, getVerification, getVisualizer, isCaptionEqual, isCaptionEqual, isCaptionEqual, lockQueue, parseString, parseString, printDump, produceNoBlocking, produceNoBlocking, produceTimeRestricted, produceTimeRestricted, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, setCharBindingMap, setComparator, setDefaultComponentVisualizer, setDefaultPathParser, setDefaultStringComparator, setDefaultVerification, setPathParser, setProperties, setVerification, setVisualizer, toStringSource, unlockAndThrow, unlockQueue, waitState
-
Field Details
-
TITLE_DPROP
Identifier for a title property.- See Also:
-
IS_MODAL_DPROP
Identifier for a modal property.- See Also:
-
IS_RESIZABLE_DPROP
Identifier for a resizable property.- See Also:
-
-
Constructor Details
-
DialogOperator
Constructs a DialogOperator object.- Parameters:
w
- window
-
DialogOperator
Constructs a DialogOperator object.- Parameters:
chooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.env
- an operator to copy environment from.
-
DialogOperator
Constructs a DialogOperator object.- Parameters:
chooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.
-
DialogOperator
Constructs a DialogOperator object.- Parameters:
chooser
- a component chooser specifying searching criteria.
-
DialogOperator
Constructs a DialogOperator object.- Parameters:
owner
- window - ownerchooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.
-
DialogOperator
Constructs a DialogOperator object.- Parameters:
owner
- window - ownerchooser
- a component chooser specifying searching criteria.
-
DialogOperator
Constructor. Waits for a dialog to show. The dialog is identified as theindex+1
'thjava.awt.Dialog
that shows, is owned by the window managed by theWindowOperator
owner
, and that has the desired title. Uses owner's timeout and output for waiting and to init this operator.- Parameters:
owner
- Operator pointing to a window owner.title
- The desired title.index
- Ordinal index. The first dialog hasindex
0.- Throws:
TimeoutExpiredException
- See Also:
-
DialogOperator
Uses owner's timeout and output for waiting and to init operator. Waits for a dialog to show. The dialog is identified as the firstjava.awt.Dialog
that shows, is owned by the window managed by theWindowOperator
owner
, and that has the desired title. Uses owner's timeout and output for waiting and to init this operator.- Parameters:
owner
- Operator pointing to a window owner.title
- The desired title.- Throws:
TimeoutExpiredException
- See Also:
-
DialogOperator
Constructor. Waits for the index'th dialog between owner's children. Uses owner'th timeout and output for waiting and to init operator.- Parameters:
owner
- Operator pointing to a window owner.index
- Ordinal component index.- Throws:
TimeoutExpiredException
-
DialogOperator
Constructor. Waits for the first dialog between owner's children. Uses owner'th timeout and output for waiting and to init operator.- Parameters:
owner
- Operator pointing to a window owner.- Throws:
TimeoutExpiredException
-
DialogOperator
Constructor. Waits for the dialog with "title" subtitle. Constructor can be used in complicated cases when output or timeouts should differ from default.- Parameters:
title
- a window titleindex
- Ordinal component index.env
- an operator to copy environment from.- Throws:
TimeoutExpiredException
- See Also:
-
DialogOperator
Constructor. Waits for the dialog with "title" subtitle. Uses current timeouts and output values.- Parameters:
title
- a window titleindex
- Ordinal component index.- Throws:
TimeoutExpiredException
- See Also:
-
DialogOperator
Constructor. Waits for the dialog with "title" subtitle. Uses current timeouts and output values.- Parameters:
title
- a window title- Throws:
TimeoutExpiredException
- See Also:
-
DialogOperator
public DialogOperator(int index) Constructor. Waits for the index'th dialog. Uses current timeout and output for waiting and to init operator.- Parameters:
index
- Ordinal component index.- Throws:
TimeoutExpiredException
-
DialogOperator
public DialogOperator()Constructor. Waits for the first dialog. Uses current timeout and output for waiting and to init operator.- Throws:
TimeoutExpiredException
-
-
Method Details
-
waitTitle
Waits for title. Uses getComparator() comparator.- Parameters:
title
- Title to wait for.
-
getDump
Returns information about component.- Overrides:
getDump
in classComponentOperator
- Returns:
- a Hashtable containing name-value pairs.
-
getTitle
MapsDialog.getTitle()
through queue -
isModal
public boolean isModal()MapsDialog.isModal()
through queue -
isResizable
public boolean isResizable()MapsDialog.isResizable()
through queue -
setModal
public void setModal(boolean b) MapsDialog.setModal(boolean)
through queue -
setResizable
public void setResizable(boolean b) MapsDialog.setResizable(boolean)
through queue -
setTitle
MapsDialog.setTitle(String)
through queue -
waitDialog
protected static Dialog waitDialog(ComponentChooser chooser, int index, Timeouts timeouts, TestOut output) A method to be used from subclasses. Uses timeouts and output passed as parameters during the waiting.- Parameters:
chooser
- org.netbeans.jemmy.ComponentChooser implementation.index
- Ordinal component index.timeouts
- timeouts to be used during the waiting.output
- an output to be used during the waiting.- Returns:
- Component instance or null if component was not found.
-
waitDialog
A method to be used from subclasses. Usesowner
's timeouts and output during the waiting.- Parameters:
owner
- a window - dialog owner.chooser
- org.netbeans.jemmy.ComponentChooser implementation.index
- Ordinal component index.- Returns:
- Component instance or null if component was not found.
-
waitDialog
protected static Dialog waitDialog(Window owner, ComponentChooser chooser, int index, Timeouts timeouts, TestOut output) A method to be used from subclasses. Uses timeouts and output passed as parameters during the waiting.- Parameters:
owner
- a window - dialog owner.chooser
- org.netbeans.jemmy.ComponentChooser implementation.index
- Ordinal component index.timeouts
- timeouts to be used during the waiting.output
- an output to be used during the waiting.- Returns:
- Component instance or null if component was not found.
-