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 JTextComponentOperator

    java.lang.Object
      |
      +--org.netbeans.jemmy.operators.Operator
            |
            +--org.netbeans.jemmy.operators.ComponentOperator
                  |
                  +--org.netbeans.jemmy.operators.ContainerOperator
                        |
                        +--org.netbeans.jemmy.operators.JComponentOperator
                              |
                              +--org.netbeans.jemmy.operators.JTextComponentOperator

All Implemented Interfaces:
  Outputable, Timeoutable

Direct Known Subclasses:
  JEditorPaneOperator, JTextAreaOperator, JTextFieldOperator

public class JTextComponentOperator
extends JComponentOperator
implements Timeoutable, Outputable

Class provides basic functions to operate with JTextComponent (selection, typing, deleting)
Timeouts used:
JTextComponentOperator.PushKeyTimeout - time between key pressing and releasing during text typing
JTextComponentOperator.BetweenKeysTimeout - time to sleep between two chars typing
JTextComponentOperator.ChangeCaretPositionTimeout - maximum time to chenge caret position
JTextComponentOperator.TypeTextTimeout - maximum time to type text
ComponentOperator.WaitComponentTimeout - time to wait component displayed
ComponentOperator.WaitFocusTimeout - time to wait component focus
ComponentOperator.WaitStateTimeout - time to wait for text
JScrollBarOperator.OneScrollClickTimeout - time for one scroll click
JScrollBarOperator.WholeScrollTimeout - time for the whole scrolling
.

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

Inner Class Summary
`static class` | `JTextComponentOperator.JTextComponentByTextFinder` Allows to find component by text.
`static class` | `JTextComponentOperator.JTextComponentFinder` Checks component type.
`class` | `JTextComponentOperator.NoSuchTextException` Can be throught during a text operation if text has not been found in the component.
`static interface` | `JTextComponentOperator.TextChooser` Interface defining additional text cearch criteria.

Inner classes inherited from class org.netbeans.jemmy.operators.JComponentOperator
`JComponentOperator.JComponentByTipFinder, JComponentOperator.JComponentFinder`

Inner classes inherited from class org.netbeans.jemmy.operators.ContainerOperator
`ContainerOperator.ContainerFinder`

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` | `IS_EDITABLE_DPROP` Identifier for a "editable" property.
`protected int` | `modifiersPressed` Deprecated. All text operations are performed by TextDriver regitered for this operator type.
`static java.lang.String` | `SELECTED_TEXT_DPROP` Identifier for a "selected text" property.
`static java.lang.String` | `TEXT_DPROP` Identifier for a "text" property.

Fields inherited from class org.netbeans.jemmy.operators.JComponentOperator
`TOOLTIP_TEXT_DPROP`

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
`JTextComponentOperator(ContainerOperator cont)` Constructor.
`JTextComponentOperator(ContainerOperator cont, ComponentChooser chooser)` Constructs a JTextComponentOperator object.
`JTextComponentOperator(ContainerOperator cont, ComponentChooser chooser, int index)` Constructs a JTextComponentOperator object.
`JTextComponentOperator(ContainerOperator cont, int index)` Constructor.
`JTextComponentOperator(ContainerOperator cont, java.lang.String text)` Constructor.
`JTextComponentOperator(ContainerOperator cont, java.lang.String text, int index)` Constructor.
`JTextComponentOperator(javax.swing.text.JTextComponent b)` Constructor.

Method Summary
`void` | `addCaretListener(javax.swing.event.CaretListener caretListener)` Maps `JTextComponent.addCaretListener(CaretListener)` through queue
`void` | `changeCaretPosition(int position)` Changes caret position.
`void` | `changeCaretPosition(java.lang.String text, boolean before)` Puts caret before or after text.
`void` | `changeCaretPosition(java.lang.String text, int index, boolean before)` Puts caret before or after text.
`void` | `clearText()` Clears text.
`void` | `copy()` Maps `JTextComponent.copy()` through queue
`void` | `copyEnvironment(Operator anotherOperator)` Copies all environment (output, timeouts, visualizer) from another operator.
`void` | `cut()` Maps `JTextComponent.cut()` through queue
`void` | `enterText(java.lang.String text)` Requests a focus, clears text, types new one and pushes Enter.
`static javax.swing.text.JTextComponent` | `findJTextComponent(java.awt.Container cont, ComponentChooser chooser)` Searches JTextComponent in container.
`static javax.swing.text.JTextComponent` | `findJTextComponent(java.awt.Container cont, ComponentChooser chooser, int index)` Searches JTextComponent in container.
`static javax.swing.text.JTextComponent` | `findJTextComponent(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)` Searches JTextComponent by text.
`static javax.swing.text.JTextComponent` | `findJTextComponent(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)` Searches JTextComponent by text.
`Action[]` | `getActions()` Maps `JTextComponent.getActions()` through queue
`javax.swing.text.Caret` | `getCaret()` Maps `JTextComponent.getCaret()` through queue
`java.awt.Color` | `getCaretColor()` Maps `JTextComponent.getCaretColor()` through queue
`int` | `getCaretPosition()` Maps `JTextComponent.getCaretPosition()` through queue
`java.awt.Color` | `getDisabledTextColor()` Maps `JTextComponent.getDisabledTextColor()` through queue
`java.lang.String` | `getDisplayedText()` Returns text which is really displayed.
`javax.swing.text.Document` | `getDocument()` Maps `JTextComponent.getDocument()` through queue
`java.util.Hashtable` | `getDump()` Returns information about component.
`char` | `getFocusAccelerator()` Maps `JTextComponent.getFocusAccelerator()` through queue
`javax.swing.text.Highlighter` | `getHighlighter()` Maps `JTextComponent.getHighlighter()` through queue
`javax.swing.text.Keymap` | `getKeymap()` Maps `JTextComponent.getKeymap()` through queue
`java.awt.Insets` | `getMargin()` Maps `JTextComponent.getMargin()` through queue
`TestOut` | `getOutput()` Returns print output streams or writers.
`int` | `getPositionByText(java.lang.String text)` Finds start text position.
`int` | `getPositionByText(java.lang.String text, int index)` Finds start text position.
`int` | `getPositionByText(java.lang.String text, JTextComponentOperator.TextChooser tChooser)` Finds start text position.
`int` | `getPositionByText(java.lang.String text, JTextComponentOperator.TextChooser tChooser, int index)` Finds start text position.
`java.awt.Dimension` | `getPreferredScrollableViewportSize()` Maps `JTextComponent.getPreferredScrollableViewportSize()` through queue
`int` | `getScrollableBlockIncrement(java.awt.Rectangle rectangle, int i, int i1)` Maps `JTextComponent.getScrollableBlockIncrement(Rectangle, int, int)` through queue
`boolean` | `getScrollableTracksViewportHeight()` Maps `JTextComponent.getScrollableTracksViewportHeight()` through queue
`boolean` | `getScrollableTracksViewportWidth()` Maps `JTextComponent.getScrollableTracksViewportWidth()` through queue
`int` | `getScrollableUnitIncrement(java.awt.Rectangle rectangle, int i, int i1)` Maps `JTextComponent.getScrollableUnitIncrement(Rectangle, int, int)` through queue
`java.lang.String` | `getSelectedText()` Maps `JTextComponent.getSelectedText()` through queue
`java.awt.Color` | `getSelectedTextColor()` Maps `JTextComponent.getSelectedTextColor()` through queue
`java.awt.Color` | `getSelectionColor()` Maps `JTextComponent.getSelectionColor()` through queue
`int` | `getSelectionEnd()` Maps `JTextComponent.getSelectionEnd()` through queue
`int` | `getSelectionStart()` Maps `JTextComponent.getSelectionStart()` through queue
`java.lang.String` | `getText()` Maps `JTextComponent.getText()` through queue
`java.lang.String` | `getText(int i, int i1)` Maps `JTextComponent.getText(int, int)` through queue
`Timeouts` | `getTimeouts()` Return current timeouts.
`javax.swing.plaf.TextUI` | `getUI()` Maps `JTextComponent.getUI()` through queue
`boolean` | `isEditable()` Maps `JTextComponent.isEditable()` through queue
`java.awt.Rectangle` | `modelToView(int i)` Maps `JTextComponent.modelToView(int)` through queue
`void` | `moveCaretPosition(int i)` Maps `JTextComponent.moveCaretPosition(int)` through queue
`void` | `paste()` Maps `JTextComponent.paste()` through queue
`void` | `read(java.io.Reader reader, java.lang.Object object)` Maps `JTextComponent.read(Reader, Object)` through queue
`void` | `removeCaretListener(javax.swing.event.CaretListener caretListener)` Maps `JTextComponent.removeCaretListener(CaretListener)` through queue
`void` | `replaceSelection(java.lang.String string)` Maps `JTextComponent.replaceSelection(String)` through queue
`void` | `scrollToPosition(int position)` Scrolls to a text poistion.
`void` | `select(int i, int i1)` Maps `JTextComponent.select(int, int)` through queue
`void` | `selectAll()` Maps `JTextComponent.selectAll()` through queue
`void` | `selectText(int startPosition, int finalPosition)` Selects a part of text.
`void` | `selectText(java.lang.String text)` Selects a part of text.
`void` | `selectText(java.lang.String text, int index)` Selects a part of text.
`void` | `setCaret(javax.swing.text.Caret caret)` Maps `JTextComponent.setCaret(Caret)` through queue
`void` | `setCaretColor(java.awt.Color color)` Maps `JTextComponent.setCaretColor(Color)` through queue
`void` | `setCaretPosition(int i)` Maps `JTextComponent.setCaretPosition(int)` through queue
`void` | `setDisabledTextColor(java.awt.Color color)` Maps `JTextComponent.setDisabledTextColor(Color)` through queue
`void` | `setDocument(javax.swing.text.Document document)` Maps `JTextComponent.setDocument(Document)` through queue
`void` | `setEditable(boolean b)` Maps `JTextComponent.setEditable(boolean)` through queue
`void` | `setFocusAccelerator(char c)` Maps `JTextComponent.setFocusAccelerator(char)` through queue
`void` | `setHighlighter(javax.swing.text.Highlighter highlighter)` Maps `JTextComponent.setHighlighter(Highlighter)` through queue
`void` | `setKeymap(javax.swing.text.Keymap keymap)` Maps `JTextComponent.setKeymap(Keymap)` through queue
`void` | `setMargin(java.awt.Insets insets)` Maps `JTextComponent.setMargin(Insets)` through queue
`void` | `setOutput(TestOut out)` Defines print output streams or writers.
`void` | `setSelectedTextColor(java.awt.Color color)` Maps `JTextComponent.setSelectedTextColor(Color)` through queue
`void` | `setSelectionColor(java.awt.Color color)` Maps `JTextComponent.setSelectionColor(Color)` through queue
`void` | `setSelectionEnd(int i)` Maps `JTextComponent.setSelectionEnd(int)` through queue
`void` | `setSelectionStart(int i)` Maps `JTextComponent.setSelectionStart(int)` through queue
`void` | `setText(java.lang.String string)` Maps `JTextComponent.setText(String)` through queue
`void` | `setTimeouts(Timeouts times)` Defines current timeouts.
`void` | `setUI(javax.swing.plaf.TextUI textUI)` Maps `JTextComponent.setUI(TextUI)` through queue
`void` | `typeText(java.lang.String text)` Types text starting from the current position.
`void` | `typeText(java.lang.String text, int caretPosition)` Types text starting from known position.
`int` | `viewToModel(java.awt.Point point)` Maps `JTextComponent.viewToModel(Point)` through queue
`void` | `waitCaretPosition(int position)` Wait for caret to be moved to certain position.
`static javax.swing.text.JTextComponent` | `waitJTextComponent(java.awt.Container cont, ComponentChooser chooser)` Waits JTextComponent in container.
`static javax.swing.text.JTextComponent` | `waitJTextComponent(java.awt.Container cont, ComponentChooser chooser, int index)` Waits JTextComponent in container.
`static javax.swing.text.JTextComponent` | `waitJTextComponent(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)` Waits JTextComponent by text.
`static javax.swing.text.JTextComponent` | `waitJTextComponent(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)` Waits JTextComponent by text.
`void` | `waitText(java.lang.String text)` Waits for certain text.
`void` | `waitText(java.lang.String text, int position)` Wait for text to be displayed starting from certain position.
`void` | `write(java.io.Writer writer)` Maps `JTextComponent.write(Writer)` through queue

Methods inherited from class org.netbeans.jemmy.operators.JComponentOperator
`addAncestorListener, addVetoableChangeListener, computeVisibleRect, createToolTip, findJComponent, findJComponent, findJComponent, findJComponent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getAutoscrolls, getBorder, getCenterXForClick, getCenterYForClick, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getInsets, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVisibleRect, getWindowContainerOperator, grabFocus, isFocusCycleRoot, isManagingFocus, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, requestDefaultFocus, resetKeyboardActions, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, showToolTip, unregisterKeyboardAction, updateUI, waitJComponent, waitJComponent, waitJComponent, waitJComponent, waitToolTip`

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, isAncestorOf, paintComponents, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, 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, getCenterY, 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()`

### SELECTED_TEXT_DPROP

    public static final java.lang.String SELECTED_TEXT_DPROP

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

### IS_EDITABLE_DPROP

    public static final java.lang.String IS_EDITABLE_DPROP

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

### modifiersPressed

    protected int modifiersPressed

  Deprecated. All text operations are performed by TextDriver regitered for this operator type.

  Notifies what modifiers are pressed.

Constructor Detail

### JTextComponentOperator

    public JTextComponentOperator(javax.swing.text.JTextComponent b)

  Constructor.
  Parameters:
    `b` - Component to operate with.

### JTextComponentOperator

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

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

### JTextComponentOperator

    public JTextComponentOperator(ContainerOperator cont,
                                  ComponentChooser chooser)

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

### JTextComponentOperator

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

  Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.
  Parameters:
    `cont` - a container
    `text` - Button text.
    `index` - Ordinal component index.
  Throws:
    `TimeoutExpiredException` -
  See Also:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### JTextComponentOperator

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

  Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.
  Parameters:
    `cont` - a container
    `text` - Button text.
  Throws:
    `TimeoutExpiredException` -
  See Also:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### JTextComponentOperator

    public JTextComponentOperator(ContainerOperator cont,
                                  int index)

  Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.
  Parameters:
    `cont` - a container
    `index` - Ordinal component index.
  Throws:
    `TimeoutExpiredException` -

### JTextComponentOperator

    public JTextComponentOperator(ContainerOperator cont)

  Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.
  Parameters:
    `cont` - a container
  Throws:
    `TimeoutExpiredException` -

Method Detail

### findJTextComponent

    public static javax.swing.text.JTextComponent findJTextComponent(java.awt.Container cont,
                                                                     ComponentChooser chooser,
                                                                     int index)

  Searches JTextComponent in container.
  Parameters:
    `cont` - Container to search component in.
    `chooser` - a component chooser specifying searching criteria.
    `index` - Ordinal component index.
  Returns:
    JTextComponent instance or null if component was not found.

### findJTextComponent

    public static javax.swing.text.JTextComponent findJTextComponent(java.awt.Container cont,
                                                                     ComponentChooser chooser)

  Searches JTextComponent in container.
  Parameters:
    `cont` - Container to search component in.
    `chooser` - a component chooser specifying searching criteria.
  Returns:
    JTextComponent instance or null if component was not found.

### findJTextComponent

    public static javax.swing.text.JTextComponent findJTextComponent(java.awt.Container cont,
                                                                     java.lang.String text,
                                                                     boolean ce,
                                                                     boolean ccs,
                                                                     int index)

  Searches JTextComponent by text.
  Parameters:
    `cont` - Container to search component in.
    `text` - Component text.
    `ce` - Compare text exactly.
    `ccs` - Compare text case sensitively.
    `index` - Ordinal component index.
  Returns:
    JTextComponent instance or null if component was not found.
  See Also:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### findJTextComponent

    public static javax.swing.text.JTextComponent findJTextComponent(java.awt.Container cont,
                                                                     java.lang.String text,
                                                                     boolean ce,
                                                                     boolean ccs)

  Searches JTextComponent by text.
  Parameters:
    `cont` - Container to search component in.
    `text` - Component text.
    `ce` - Compare text exactly.
    `ccs` - Compare text case sensitively.
  Returns:
    JTextComponent instance or null if component was not found.
  See Also:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### waitJTextComponent

    public static javax.swing.text.JTextComponent waitJTextComponent(java.awt.Container cont,
                                                                     ComponentChooser chooser,
                                                                     int index)

  Waits JTextComponent in container.
  Parameters:
    `cont` - Container to search component in.
    `chooser` - a component chooser specifying searching criteria.
    `index` - Ordinal component index.
  Returns:
    JTextComponent instance.
  Throws:
    `TimeoutExpiredException` -

### waitJTextComponent

    public static javax.swing.text.JTextComponent waitJTextComponent(java.awt.Container cont,
                                                                     ComponentChooser chooser)

  Waits JTextComponent in container.
  Parameters:
    `cont` - Container to search component in.
    `chooser` - a component chooser specifying searching criteria.
  Returns:
    JTextComponent instance.
  Throws:
    `TimeoutExpiredException` -

### waitJTextComponent

    public static javax.swing.text.JTextComponent waitJTextComponent(java.awt.Container cont,
                                                                     java.lang.String text,
                                                                     boolean ce,
                                                                     boolean ccs,
                                                                     int index)

  Waits JTextComponent by text.
  Parameters:
    `cont` - Container to search component in.
    `text` - Component text.
    `ce` - Compare text exactly.
    `ccs` - Compare text case sensitively.
    `index` - Ordinal component index.
  Returns:
    JTextComponent instance.
  Throws:
    `TimeoutExpiredException` -
  See Also:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### waitJTextComponent

    public static javax.swing.text.JTextComponent waitJTextComponent(java.awt.Container cont,
                                                                     java.lang.String text,
                                                                     boolean ce,
                                                                     boolean ccs)

  Waits JTextComponent by text.
  Parameters:
    `cont` - Container to search component in.
    `text` - Component text.
    `ce` - Compare text exactly.
    `ccs` - Compare text case sensitively.
  Returns:
    JTextComponent instance.
  Throws:
    `TimeoutExpiredException` -
  See Also:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### setTimeouts

    public void setTimeouts(Timeouts times)

  Description copied from interface: `Timeoutable`
  Defines current timeouts.
  Specified by:
    `setTimeouts` in interface `Timeoutable`
  Overrides:
    `setTimeouts` in class `JComponentOperator`
  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 `JComponentOperator`
  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 `JComponentOperator`
  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 `JComponentOperator`
  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)`

### copyEnvironment

    public void copyEnvironment(Operator anotherOperator)

  Description copied from class: `Operator`
  Copies all environment (output, timeouts, visualizer) from another operator.
  Overrides:
    `copyEnvironment` in class `ComponentOperator`
  Following copied from class: `org.netbeans.jemmy.operators.Operator`
  Parameters:
    `anotherOperator` - an operator to copy the environment to.

### getPositionByText

    public int getPositionByText(java.lang.String text,
                                 JTextComponentOperator.TextChooser tChooser,
                                 int index)

  Finds start text position.
  Parameters:
    `text` - Text to be searched.
    `tChooser` - Additional search criteria.
    `index` - Index of text instance (first instance has index 0)
  Returns:
    Caret position correspondent to text start.
  See Also:
    `JTextComponentOperator.TextChooser`

### getPositionByText

    public int getPositionByText(java.lang.String text,
                                 JTextComponentOperator.TextChooser tChooser)

  Finds start text position.
  Parameters:
    `text` - Text to be searched.
    `tChooser` - Additional search criteria.
  Returns:
    Caret position correspondent to text start.

### getPositionByText

    public int getPositionByText(java.lang.String text,
                                 int index)

  Finds start text position.
  Parameters:
    `text` - Text to be searched.
    `index` - Index of text instance (first instance has index 0)
  Returns:
    Caret position correspondent to text start.

### getPositionByText

    public int getPositionByText(java.lang.String text)

  Finds start text position.
  Parameters:
    `text` - Text to be searched.
  Returns:
    Caret position correspondent to text start.

### enterText

    public void enterText(java.lang.String text)

  Requests a focus, clears text, types new one and pushes Enter.
  Parameters:
    `text` - New text value. Shouln't include final '\n'.
  Throws:
    `TimeoutExpiredException` -

### changeCaretPosition

    public void changeCaretPosition(int position)

  Changes caret position.
  Parameters:
    `position` - Position to move caret to.
  Throws:
    `TimeoutExpiredException` -
  See Also:
    `changeCaretPosition(String, int, boolean)`

### changeCaretPosition

    public void changeCaretPosition(java.lang.String text,
                                    int index,
                                    boolean before)

  Puts caret before or after text.
  Parameters:
    `text` - Text to be searched.
    `index` - Index of text instance (first instance has index 0)
    `before` - If true put caret before text, otherwise after.
  Throws:
    `TimeoutExpiredException` -
    `JTextComponentOperator.NoSuchTextException` -
  See Also:
    `changeCaretPosition(int)`, `getPositionByText(String, int)`

### changeCaretPosition

    public void changeCaretPosition(java.lang.String text,
                                    boolean before)

  Puts caret before or after text.
  Parameters:
    `text` - Text to be searched.
    `before` - If true put caret before text, otherwise after.
  Throws:
    `TimeoutExpiredException` -
    `JTextComponentOperator.NoSuchTextException` -
  See Also:
    `changeCaretPosition(int)`, `getPositionByText(String, int)`

### typeText

    public void typeText(java.lang.String text,
                         int caretPosition)

  Types text starting from known position. If verification mode is on, checks that right text has been typed and caret has been moved to right position.
  Parameters:
    `text` - Text to be typed.
    `caretPosition` - Position to start type text
  Throws:
    `TimeoutExpiredException` -
    `JTextComponentOperator.NoSuchTextException` -
  See Also:
    `typeText(String)`

### typeText

    public void typeText(java.lang.String text)

  Types text starting from the current position.
  Parameters:
    `text` - Text to be typed.
  Throws:
    `TimeoutExpiredException` -
  See Also:
    `typeText(String, int)`

### selectText

    public void selectText(int startPosition,
                           int finalPosition)

  Selects a part of text.
  Parameters:
    `startPosition` - Start caret position
    `finalPosition` - Final caret position
  Throws:
    `TimeoutExpiredException` -
  See Also:
    `selectText(String, int)`, `selectText(String)`

### selectText

    public void selectText(java.lang.String text,
                           int index)

  Selects a part of text.
  Parameters:
    `text` - Text to be selected
    `index` - Index of text instance (first instance has index 0)
  Throws:
    `TimeoutExpiredException` -
    `JTextComponentOperator.NoSuchTextException` -
  See Also:
    `selectText(int, int)`, `selectText(String)`, `getPositionByText(String, int)`

### selectText

    public void selectText(java.lang.String text)

  Selects a part of text.
  Parameters:
    `text` - Text to be selected
  Throws:
    `TimeoutExpiredException` -
    `JTextComponentOperator.NoSuchTextException` -
  See Also:
    `selectText(String, int)`, `selectText(int, int)`

### clearText

    public void clearText()

  Clears text.
  Throws:
    `TimeoutExpiredException` -

### scrollToPosition

    public void scrollToPosition(int position)

  Scrolls to a text poistion.
  Parameters:
    `position` - a position to scroll.
  Throws:
    `TimeoutExpiredException` -

### getDisplayedText

    public java.lang.String getDisplayedText()

  Returns text which is really displayed. Results returned by `getText()` and `getDisplayedText()` are different if text component is used to display `javax.swing.text.StyledDocument`
  Returns:
    the text which is displayed.

### waitText

    public void waitText(java.lang.String text,
                         int position)

  Wait for text to be displayed starting from certain position.
  Parameters:
    `text` - text to wait.
    `position` - starting text position.

### waitText

    public void waitText(java.lang.String text)

  Waits for certain text.
  Parameters:
    `text` - Text to be compared by getComparator() comparator.

### waitCaretPosition

    public void waitCaretPosition(int position)

  Wait for caret to be moved to certain position.
  Parameters:
    `position` - a position which caret supposed to be moved to.

### getDump

    public java.util.Hashtable getDump()

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

### addCaretListener

    public void addCaretListener(javax.swing.event.CaretListener caretListener)

  Maps `JTextComponent.addCaretListener(CaretListener)` through queue

### copy

    public void copy()

  Maps `JTextComponent.copy()` through queue

### cut

    public void cut()

  Maps `JTextComponent.cut()` through queue

### getActions

    public Action[] getActions()

  Maps `JTextComponent.getActions()` through queue

### getCaret

    public javax.swing.text.Caret getCaret()

  Maps `JTextComponent.getCaret()` through queue

### getCaretColor

    public java.awt.Color getCaretColor()

  Maps `JTextComponent.getCaretColor()` through queue

### getCaretPosition

    public int getCaretPosition()

  Maps `JTextComponent.getCaretPosition()` through queue

### getDisabledTextColor

    public java.awt.Color getDisabledTextColor()

  Maps `JTextComponent.getDisabledTextColor()` through queue

### getDocument

    public javax.swing.text.Document getDocument()

  Maps `JTextComponent.getDocument()` through queue

### getFocusAccelerator

    public char getFocusAccelerator()

  Maps `JTextComponent.getFocusAccelerator()` through queue

### getHighlighter

    public javax.swing.text.Highlighter getHighlighter()

  Maps `JTextComponent.getHighlighter()` through queue

### getKeymap

    public javax.swing.text.Keymap getKeymap()

  Maps `JTextComponent.getKeymap()` through queue

### getMargin

    public java.awt.Insets getMargin()

  Maps `JTextComponent.getMargin()` through queue

### getPreferredScrollableViewportSize

    public java.awt.Dimension getPreferredScrollableViewportSize()

  Maps `JTextComponent.getPreferredScrollableViewportSize()` through queue

### getScrollableBlockIncrement

    public int getScrollableBlockIncrement(java.awt.Rectangle rectangle,
                                           int i,
                                           int i1)

  Maps `JTextComponent.getScrollableBlockIncrement(Rectangle, int, int)` through queue

### getScrollableTracksViewportHeight

    public boolean getScrollableTracksViewportHeight()

  Maps `JTextComponent.getScrollableTracksViewportHeight()` through queue

### getScrollableTracksViewportWidth

    public boolean getScrollableTracksViewportWidth()

  Maps `JTextComponent.getScrollableTracksViewportWidth()` through queue

### getScrollableUnitIncrement

    public int getScrollableUnitIncrement(java.awt.Rectangle rectangle,
                                          int i,
                                          int i1)

  Maps `JTextComponent.getScrollableUnitIncrement(Rectangle, int, int)` through queue

### getSelectedText

    public java.lang.String getSelectedText()

  Maps `JTextComponent.getSelectedText()` through queue

### getSelectedTextColor

    public java.awt.Color getSelectedTextColor()

  Maps `JTextComponent.getSelectedTextColor()` through queue

### getSelectionColor

    public java.awt.Color getSelectionColor()

  Maps `JTextComponent.getSelectionColor()` through queue

### getSelectionEnd

    public int getSelectionEnd()

  Maps `JTextComponent.getSelectionEnd()` through queue

### getSelectionStart

    public int getSelectionStart()

  Maps `JTextComponent.getSelectionStart()` through queue

### getText

    public java.lang.String getText()

  Maps `JTextComponent.getText()` through queue

### getText

    public java.lang.String getText(int i,
                                    int i1)

  Maps `JTextComponent.getText(int, int)` through queue

### getUI

    public javax.swing.plaf.TextUI getUI()

  Maps `JTextComponent.getUI()` through queue

### isEditable

    public boolean isEditable()

  Maps `JTextComponent.isEditable()` through queue

### modelToView

    public java.awt.Rectangle modelToView(int i)

  Maps `JTextComponent.modelToView(int)` through queue

### moveCaretPosition

    public void moveCaretPosition(int i)

  Maps `JTextComponent.moveCaretPosition(int)` through queue

### paste

    public void paste()

  Maps `JTextComponent.paste()` through queue

### read

    public void read(java.io.Reader reader,
                     java.lang.Object object)

  Maps `JTextComponent.read(Reader, Object)` through queue

### removeCaretListener

    public void removeCaretListener(javax.swing.event.CaretListener caretListener)

  Maps `JTextComponent.removeCaretListener(CaretListener)` through queue

### replaceSelection

    public void replaceSelection(java.lang.String string)

  Maps `JTextComponent.replaceSelection(String)` through queue

### select

    public void select(int i,
                       int i1)

  Maps `JTextComponent.select(int, int)` through queue

### selectAll

    public void selectAll()

  Maps `JTextComponent.selectAll()` through queue

### setCaret

    public void setCaret(javax.swing.text.Caret caret)

  Maps `JTextComponent.setCaret(Caret)` through queue

### setCaretColor

    public void setCaretColor(java.awt.Color color)

  Maps `JTextComponent.setCaretColor(Color)` through queue

### setCaretPosition

    public void setCaretPosition(int i)

  Maps `JTextComponent.setCaretPosition(int)` through queue

### setDisabledTextColor

    public void setDisabledTextColor(java.awt.Color color)

  Maps `JTextComponent.setDisabledTextColor(Color)` through queue

### setDocument

    public void setDocument(javax.swing.text.Document document)

  Maps `JTextComponent.setDocument(Document)` through queue

### setEditable

    public void setEditable(boolean b)

  Maps `JTextComponent.setEditable(boolean)` through queue

### setFocusAccelerator

    public void setFocusAccelerator(char c)

  Maps `JTextComponent.setFocusAccelerator(char)` through queue

### setHighlighter

    public void setHighlighter(javax.swing.text.Highlighter highlighter)

  Maps `JTextComponent.setHighlighter(Highlighter)` through queue

### setKeymap

    public void setKeymap(javax.swing.text.Keymap keymap)

  Maps `JTextComponent.setKeymap(Keymap)` through queue

### setMargin

    public void setMargin(java.awt.Insets insets)

  Maps `JTextComponent.setMargin(Insets)` through queue

### setSelectedTextColor

    public void setSelectedTextColor(java.awt.Color color)

  Maps `JTextComponent.setSelectedTextColor(Color)` through queue

### setSelectionColor

    public void setSelectionColor(java.awt.Color color)

  Maps `JTextComponent.setSelectionColor(Color)` through queue

### setSelectionEnd

    public void setSelectionEnd(int i)

  Maps `JTextComponent.setSelectionEnd(int)` through queue

### setSelectionStart

    public void setSelectionStart(int i)

  Maps `JTextComponent.setSelectionStart(int)` through queue

### setText

    public void setText(java.lang.String string)

  Maps `JTextComponent.setText(String)` through queue

### setUI

    public void setUI(javax.swing.plaf.TextUI textUI)

  Maps `JTextComponent.setUI(TextUI)` through queue

### viewToModel

    public int viewToModel(java.awt.Point point)

  Maps `JTextComponent.viewToModel(Point)` through queue

### write

    public void write(java.io.Writer writer)

  Maps `JTextComponent.write(Writer)` 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