Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

public class TextFieldOperator
extends TextComponentOperator
implements Timeoutable, Outputable

This operator type covers java.awt.TextField component.

Author:
  Alexandre Iline (alexandre.iline@sun.com)
See Also:
  `Timeouts`

Inner Class Summary
`static class` | `TextFieldOperator.TextFieldByTextFinder` Allows to find component by text.
`static class` | `TextFieldOperator.TextFieldFinder` Checks component type.

Inner classes inherited from class org.netbeans.jemmy.operators.TextComponentOperator
`TextComponentOperator.TextComponentByTextFinder, TextComponentOperator.TextComponentFinder`

Inner classes 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
`static java.lang.String` | `TEXT_DPROP` Identifier for a "text" property.

Fields inherited from class org.netbeans.jemmy.operators.ComponentOperator
`HEIGHT_DPROP, IS_SHOWING_DPROP, IS_VISIBLE_DPROP, WIDTH_DPROP, X_DPROP, Y_DPROP`

Fields inherited from class org.netbeans.jemmy.operators.Operator
`CLASS_DPROP, TO_STRING_DPROP`

Constructor Summary
`TextFieldOperator(ContainerOperator cont)` Constructor.
`TextFieldOperator(ContainerOperator cont, ComponentChooser chooser)` Constructs a TextFieldOperator object.
`TextFieldOperator(ContainerOperator cont, ComponentChooser chooser, int index)` Constructs a TextFieldOperator object.
`TextFieldOperator(ContainerOperator cont, int index)` Constructor.
`TextFieldOperator(ContainerOperator cont, java.lang.String text)` Constructor.
`TextFieldOperator(ContainerOperator cont, java.lang.String text, int index)` Constructor.
`TextFieldOperator(java.awt.TextField b)` Constructor.

Method Summary
`void` | `addActionListener(java.awt.event.ActionListener actionListener)` Maps `TextField.addActionListener(ActionListener)` through queue
`boolean` | `echoCharIsSet()` Maps `TextField.echoCharIsSet()` through queue
`static java.awt.TextField` | `findTextField(java.awt.Container cont, ComponentChooser chooser)` Searches for the first TextField in a container.
`static java.awt.TextField` | `findTextField(java.awt.Container cont, ComponentChooser chooser, int index)` Searches TextField in a container.
`static java.awt.TextField` | `findTextField(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)` Searches TextField by text.
`static java.awt.TextField` | `findTextField(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)` Searches TextField by text.
`int` | `getColumns()` Maps `TextField.getColumns()` through queue
`java.util.Hashtable` | `getDump()` Returns information about component.
`char` | `getEchoChar()` Maps `TextField.getEchoChar()` through queue
`java.awt.Dimension` | `getMinimumSize(int i)` Maps `TextField.getMinimumSize(int)` through queue
`TestOut` | `getOutput()` Returns print output streams or writers.
`java.awt.Dimension` | `getPreferredSize(int i)` Maps `TextField.getPreferredSize(int)` through queue
`Timeouts` | `getTimeouts()` Return current timeouts.
`void` | `removeActionListener(java.awt.event.ActionListener actionListener)` Maps `TextField.removeActionListener(ActionListener)` through queue
`void` | `setColumns(int i)` Maps `TextField.setColumns(int)` through queue
`void` | `setOutput(TestOut out)` Defines print output streams or writers.
`void` | `setTimeouts(Timeouts timeouts)` Defines current timeouts.
`static java.awt.TextField` | `waitTextField(java.awt.Container cont, ComponentChooser chooser)` Waits 0'th TextField in container.
`static java.awt.TextField` | `waitTextField(java.awt.Container cont, ComponentChooser chooser, int index)` Waits TextField in container.
`static java.awt.TextField` | `waitTextField(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)` Waits TextField by text.
`static java.awt.TextField` | `waitTextField(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)` Waits TextField by text.

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`

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, 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, unlockAndThrow, unlockQueue, waitState`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TEXT_DPROP

    public static final java.lang.String TEXT_DPROP

  Identifier for a "text" property.
  See Also:
    `getDump()`

Constructor Detail

### TextFieldOperator

    public TextFieldOperator(java.awt.TextField b)

  Constructor.
  Parameters:
    `b` - The `java.awt.TextField` managed by this instance.

### TextFieldOperator

    public TextFieldOperator(ContainerOperator cont,
                             ComponentChooser chooser,
                             int index)

  Constructs a TextFieldOperator object.
  Parameters:
    `cont` - a container
    `chooser` - a component chooser specifying searching criteria.
    `index` - an index between appropriate ones.

### TextFieldOperator

    public TextFieldOperator(ContainerOperator cont,
                             ComponentChooser chooser)

  Constructs a TextFieldOperator object.
  Parameters:
    `cont` - a container
    `chooser` - a component chooser specifying searching criteria.

### TextFieldOperator

    public TextFieldOperator(ContainerOperator cont,
                             java.lang.String text,
                             int index)

  Constructor. Waits for a component in a container to show. The component is identified as the `index+1`'th `java.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 has `index` 0.
  See Also:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### TextFieldOperator

    public TextFieldOperator(ContainerOperator cont,
                             java.lang.String text)

  Constructor. Waits for a component in a container to show. The component is identified as the first `java.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:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### TextFieldOperator

    public TextFieldOperator(ContainerOperator cont,
                             int index)

  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:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### TextFieldOperator

    public TextFieldOperator(ContainerOperator cont)

  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:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

Method Detail

### findTextField

    public static java.awt.TextField findTextField(java.awt.Container cont,
                                                   ComponentChooser chooser,
                                                   int index)

  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 first `index` is 0.
  Returns:
    TextField instance or null if component was not found.

### findTextField

    public static java.awt.TextField findTextField(java.awt.Container cont,
                                                   ComponentChooser chooser)

  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 java.awt.TextField findTextField(java.awt.Container cont,
                                                   java.lang.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:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### findTextField

    public static java.awt.TextField findTextField(java.awt.Container cont,
                                                   java.lang.String text,
                                                   boolean ce,
                                                   boolean ccs)

  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:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### waitTextField

    public static java.awt.TextField waitTextField(java.awt.Container cont,
                                                   ComponentChooser chooser,
                                                   int index)

  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

    public static java.awt.TextField waitTextField(java.awt.Container cont,
                                                   ComponentChooser chooser)

  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 java.awt.TextField waitTextField(java.awt.Container cont,
                                                   java.lang.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:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### waitTextField

    public static java.awt.TextField waitTextField(java.awt.Container cont,
                                                   java.lang.String text,
                                                   boolean ce,
                                                   boolean ccs)

  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:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### setTimeouts

    public void setTimeouts(Timeouts timeouts)

  Description copied from interface: `Timeoutable`
  Defines current timeouts.
  Specified by:
    `setTimeouts` in interface `Timeoutable`
  Overrides:
    `setTimeouts` in class `TextComponentOperator`
  Following copied from interface: `org.netbeans.jemmy.Timeoutable`
  Parameters:
    `t` - A collection of timeout assignments.
  See Also:
    `Timeoutable.getTimeouts()`

### getTimeouts

    public Timeouts getTimeouts()

  Description copied from interface: `Timeoutable`
  Return current timeouts.
  Specified by:
    `getTimeouts` in interface `Timeoutable`
  Overrides:
    `getTimeouts` in class `TextComponentOperator`
  Following copied from interface: `org.netbeans.jemmy.Timeoutable`
  Returns:
    the collection of current timeout assignments.
  See Also:
    `Timeoutable.setTimeouts(org.netbeans.jemmy.Timeouts)`

### setOutput

    public void setOutput(TestOut out)

  Description copied from interface: `Outputable`
  Defines print output streams or writers.
  Specified by:
    `setOutput` in interface `Outputable`
  Overrides:
    `setOutput` in class `TextComponentOperator`
  Following copied from interface: `org.netbeans.jemmy.Outputable`
  Parameters:
    `out` - Identify the streams or writers used for print output.
  See Also:
    `Outputable.getOutput()`

### getOutput

    public TestOut getOutput()

  Description copied from interface: `Outputable`
  Returns print output streams or writers.
  Specified by:
    `getOutput` in interface `Outputable`
  Overrides:
    `getOutput` in class `TextComponentOperator`
  Following copied from interface: `org.netbeans.jemmy.Outputable`
  Returns:
    an object that contains references to objects for printing to output and err streams.
  See Also:
    `Outputable.setOutput(org.netbeans.jemmy.TestOut)`

### getDump

    public java.util.Hashtable getDump()

  Description copied from class: `ComponentOperator`
  Returns information about component.
  Overrides:
    `getDump` in class `TextComponentOperator`
  Following copied from class: `org.netbeans.jemmy.operators.Operator`
  Returns:
    a Hashtable containing name-value pairs.

### addActionListener

    public void addActionListener(java.awt.event.ActionListener actionListener)

  Maps `TextField.addActionListener(ActionListener)` through queue

### echoCharIsSet

    public boolean echoCharIsSet()

  Maps `TextField.echoCharIsSet()` through queue

### getColumns

    public int getColumns()

  Maps `TextField.getColumns()` through queue

### getEchoChar

    public char getEchoChar()

  Maps `TextField.getEchoChar()` through queue

### getMinimumSize

    public java.awt.Dimension getMinimumSize(int i)

  Maps `TextField.getMinimumSize(int)` through queue

### getPreferredSize

    public java.awt.Dimension getPreferredSize(int i)

  Maps `TextField.getPreferredSize(int)` through queue

### removeActionListener

    public void removeActionListener(java.awt.event.ActionListener actionListener)

  Maps `TextField.removeActionListener(ActionListener)` through queue

### setColumns

    public void setColumns(int i)

  Maps `TextField.setColumns(int)` through queue

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD