Package org.netbeans.jemmy.operators
Class TextFieldOperator
java.lang.Object
org.netbeans.jemmy.operators.Operator
org.netbeans.jemmy.operators.ComponentOperator
org.netbeans.jemmy.operators.TextComponentOperator
org.netbeans.jemmy.operators.TextFieldOperator
- All Implemented Interfaces:
Outputable
,Timeoutable
This operator type covers java.awt.TextField component.
- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Allows to find component by text.static class
Checks component type.Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.TextComponentOperator
TextComponentOperator.TextComponentByTextFinder, TextComponentOperator.TextComponentFinder
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
FieldsFields 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.Constructor.TextFieldOperator
(ContainerOperator cont, int index) Constructor.TextFieldOperator
(ContainerOperator cont, String text) Constructor.TextFieldOperator
(ContainerOperator cont, String text, int index) Constructor.TextFieldOperator
(ContainerOperator cont, ComponentChooser chooser) Constructs a TextFieldOperator object.TextFieldOperator
(ContainerOperator cont, ComponentChooser chooser, int index) Constructs a TextFieldOperator object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addActionListener
(ActionListener actionListener) MapsTextField.addActionListener(ActionListener)
through queueboolean
MapsTextField.echoCharIsSet()
through queuestatic TextField
findTextField
(Container cont, String text, boolean ce, boolean ccs) Searches TextField by text.static TextField
findTextField
(Container cont, String text, boolean ce, boolean ccs, int index) Searches TextField by text.static TextField
findTextField
(Container cont, ComponentChooser chooser) Searches for the first TextField in a container.static TextField
findTextField
(Container cont, ComponentChooser chooser, int index) Searches TextField in a container.int
MapsTextField.getColumns()
through queuegetDump()
Returns information about component.char
MapsTextField.getEchoChar()
through queuegetMinimumSize
(int i) MapsTextField.getMinimumSize(int)
through queueReturns print output streams or writers.getPreferredSize
(int i) MapsTextField.getPreferredSize(int)
through queueReturn current timeouts.void
removeActionListener
(ActionListener actionListener) MapsTextField.removeActionListener(ActionListener)
through queuevoid
setColumns
(int i) MapsTextField.setColumns(int)
through queuevoid
Defines print output streams or writers.void
setTimeouts
(Timeouts timeouts) Defines current timeouts.static TextField
waitTextField
(Container cont, String text, boolean ce, boolean ccs) Waits TextField by text.static TextField
waitTextField
(Container cont, String text, boolean ce, boolean ccs, int index) Waits TextField by text.static TextField
waitTextField
(Container cont, ComponentChooser chooser) Waits 0'th TextField in container.static TextField
waitTextField
(Container cont, ComponentChooser chooser, int index) Waits TextField in container.Methods inherited from class org.netbeans.jemmy.operators.TextComponentOperator
addTextListener, changeCaretPosition, clearText, copyEnvironment, enterText, findTextComponent, findTextComponent, findTextComponent, findTextComponent, getCaretPosition, getPositionByText, getPositionByText, getSelectedText, getSelectionEnd, getSelectionStart, getText, getTextDriver, isEditable, removeTextListener, select, selectAll, selectText, setCaretPosition, setEditable, setSelectionEnd, setSelectionStart, setText, typeText, typeText, waitTextComponent, waitTextComponent, waitTextComponent, waitTextComponent
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
-
TEXT_DPROP
Identifier for a "text" property.- See Also:
-
-
Constructor Details
-
TextFieldOperator
Constructor.- Parameters:
b
- Thejava.awt.TextField
managed by this instance.
-
TextFieldOperator
Constructs a TextFieldOperator object.- Parameters:
cont
- a containerchooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.
-
TextFieldOperator
Constructs a TextFieldOperator object.- Parameters:
cont
- a containerchooser
- a component chooser specifying searching criteria.
-
TextFieldOperator
Constructor. Waits for a component in a container to show. The component is identified as theindex+1
'thjava.awt.TextField
that shows, lies below the container in the display containment hierarchy, and that has the desired text. Uses cont's timeout and output for waiting and to init this operator.- Parameters:
cont
- The operator for a container containing the sought for textField.text
- TextField text.index
- Ordinal component index. The first component hasindex
0.- See Also:
-
TextFieldOperator
Constructor. Waits for a component in a container to show. The component is identified as the firstjava.awt.TextField
that shows, lies below the container in the display containment hierarchy, and that has the desired text. Uses cont's timeout and output for waiting and to init this operator.- Parameters:
cont
- The operator for a container containing the sought for textField.text
- TextField text.- See Also:
-
TextFieldOperator
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont
- The operator for a container containing the sought for textField.index
- Ordinal component index.- See Also:
-
TextFieldOperator
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont
- The operator for a container containing the sought for textField.- See Also:
-
-
Method Details
-
findTextField
Searches TextField in a container.- Parameters:
cont
- Container in which to search for the component. The container lies above the component in the display containment hierarchy. The containment need not be direct.chooser
- org.netbeans.jemmy.ComponentChooser implementation, defining and applying search criteria.index
- Ordinal component index. The firstindex
is 0.- Returns:
- TextField instance or null if component was not found.
-
findTextField
Searches for the first TextField in a container.- Parameters:
cont
- Container in which to search for the component. The container lies above the component in the display containment hierarchy. The containment need not be direct.chooser
- org.netbeans.jemmy.ComponentChooser implementation, defining and applying search criteria.- Returns:
- TextField instance or null if component was not found.
-
findTextField
public static TextField findTextField(Container cont, String text, boolean ce, boolean ccs, int index) Searches TextField by text.- Parameters:
cont
- Container to search component in.text
- TextField text. If null, contents is not checked.ce
- Compare text exactly.ccs
- Compare text case sensitively.index
- Ordinal component index.- Returns:
- TextField instance or null if component was not found.
- See Also:
-
findTextField
Searches TextField by text.- Parameters:
cont
- Container to search component in.text
- TextField text. If null, contents is not checked.ce
- Compare text exactly.ccs
- Compare text case sensitively.- Returns:
- TextField instance or null if component was not found.
- See Also:
-
waitTextField
Waits TextField in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.index
- Ordinal component index.- Returns:
- TextField instance.
-
waitTextField
Waits 0'th TextField in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- TextField instance.
-
waitTextField
public static TextField waitTextField(Container cont, String text, boolean ce, boolean ccs, int index) Waits TextField by text.- Parameters:
cont
- Container to search component in.text
- TextField text. If null, contents is not checked.ce
- Compare text exactly.ccs
- Compare text case sensitively.index
- Ordinal component index.- Returns:
- TextField instance.
- See Also:
-
waitTextField
Waits TextField by text.- Parameters:
cont
- Container to search component in.text
- TextField text. If null, contents is not checked.ce
- Compare text exactly.ccs
- Compare text case sensitively.- Returns:
- TextField instance.
- See Also:
-
setTimeouts
Description copied from interface:Timeoutable
Defines current timeouts.- Specified by:
setTimeouts
in interfaceTimeoutable
- Overrides:
setTimeouts
in classTextComponentOperator
- Parameters:
timeouts
- A collection of timeout assignments.- See Also:
-
getTimeouts
Description copied from interface:Timeoutable
Return current timeouts.- Specified by:
getTimeouts
in interfaceTimeoutable
- Overrides:
getTimeouts
in classTextComponentOperator
- Returns:
- the collection of current timeout assignments.
- See Also:
-
setOutput
Description copied from interface:Outputable
Defines print output streams or writers.- Specified by:
setOutput
in interfaceOutputable
- Overrides:
setOutput
in classTextComponentOperator
- Parameters:
out
- Identify the streams or writers used for print output.- See Also:
-
getOutput
Description copied from interface:Outputable
Returns print output streams or writers.- Specified by:
getOutput
in interfaceOutputable
- Overrides:
getOutput
in classTextComponentOperator
- Returns:
- an object that contains references to objects for printing to output and err streams.
- See Also:
-
getDump
Description copied from class:ComponentOperator
Returns information about component.- Overrides:
getDump
in classTextComponentOperator
- Returns:
- a Hashtable containing name-value pairs.
-
addActionListener
MapsTextField.addActionListener(ActionListener)
through queue -
echoCharIsSet
public boolean echoCharIsSet()MapsTextField.echoCharIsSet()
through queue -
getColumns
public int getColumns()MapsTextField.getColumns()
through queue -
getEchoChar
public char getEchoChar()MapsTextField.getEchoChar()
through queue -
getMinimumSize
MapsTextField.getMinimumSize(int)
through queue -
getPreferredSize
MapsTextField.getPreferredSize(int)
through queue -
removeActionListener
MapsTextField.removeActionListener(ActionListener)
through queue -
setColumns
public void setColumns(int i) MapsTextField.setColumns(int)
through queue
-