Package org.netbeans.jemmy.operators
Class TextAreaOperator
- java.lang.Object
-
- org.netbeans.jemmy.operators.Operator
-
- org.netbeans.jemmy.operators.ComponentOperator
-
- org.netbeans.jemmy.operators.TextComponentOperator
-
- org.netbeans.jemmy.operators.TextAreaOperator
-
- All Implemented Interfaces:
Outputable,Timeoutable
public class TextAreaOperator extends TextComponentOperator implements Timeoutable, Outputable
This operator type covers java.awt.textArea component.- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
Timeouts
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTextAreaOperator.TextAreaByTextFinderAllows to find component by text.static classTextAreaOperator.TextAreaFinderChecks 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
Fields Modifier and Type Field Description static java.lang.StringTEXT_DPROPIdentifier for a "text" 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
Constructors Constructor Description TextAreaOperator(java.awt.TextArea b)Constructor.TextAreaOperator(ContainerOperator cont)Constructor.TextAreaOperator(ContainerOperator cont, int index)Constructor.TextAreaOperator(ContainerOperator cont, java.lang.String text)Constructor.TextAreaOperator(ContainerOperator cont, java.lang.String text, int index)Constructor.TextAreaOperator(ContainerOperator cont, ComponentChooser chooser)Constructs a TextAreaOperator object.TextAreaOperator(ContainerOperator cont, ComponentChooser chooser, int index)Constructs a TextAreaOperator object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.awt.TextAreafindTextArea(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)Searches TextArea by text.static java.awt.TextAreafindTextArea(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)Searches TextArea by text.static java.awt.TextAreafindTextArea(java.awt.Container cont, ComponentChooser chooser)Searches for the first TextArea in a container.static java.awt.TextAreafindTextArea(java.awt.Container cont, ComponentChooser chooser, int index)Searches TextArea in a container.intgetColumns()MapsTextArea.getColumns()through queuejava.util.HashtablegetDump()Returns information about component.java.awt.DimensiongetMinimumSize(int i, int i1)MapsTextArea.getMinimumSize(int, int)through queueTestOutgetOutput()Returns print output streams or writers.java.awt.DimensiongetPreferredSize(int i, int i1)MapsTextArea.getPreferredSize(int, int)through queueintgetRows()MapsTextArea.getRows()through queueintgetScrollbarVisibility()MapsTextArea.getScrollbarVisibility()through queueTimeoutsgetTimeouts()Return current timeouts.voidreplaceRange(java.lang.String string, int i, int i1)MapsTextArea.replaceRange(String, int, int)through queuevoidsetColumns(int i)MapsTextArea.setColumns(int)through queuevoidsetOutput(TestOut out)Defines print output streams or writers.voidsetRows(int i)MapsTextArea.setRows(int)through queuevoidsetTimeouts(Timeouts timeouts)Defines current timeouts.static java.awt.TextAreawaitTextArea(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)Waits TextArea by text.static java.awt.TextAreawaitTextArea(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)Waits TextArea by text.static java.awt.TextAreawaitTextArea(java.awt.Container cont, ComponentChooser chooser)Waits 0'th TextArea in container.static java.awt.TextAreawaitTextArea(java.awt.Container cont, ComponentChooser chooser, int index)Waits TextArea 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 Detail
-
TEXT_DPROP
public static final java.lang.String TEXT_DPROP
Identifier for a "text" property.- See Also:
getDump(), Constant Field Values
-
-
Constructor Detail
-
TextAreaOperator
public TextAreaOperator(java.awt.TextArea b)
Constructor.- Parameters:
b- Thejava.awt.TextAreamanaged by this instance.
-
TextAreaOperator
public TextAreaOperator(ContainerOperator cont, ComponentChooser chooser, int index)
Constructs a TextAreaOperator object.- Parameters:
cont- a containerchooser- a component chooser specifying searching criteria.index- an index between appropriate ones.
-
TextAreaOperator
public TextAreaOperator(ContainerOperator cont, ComponentChooser chooser)
Constructs a TextAreaOperator object.- Parameters:
cont- a containerchooser- a component chooser specifying searching criteria.
-
TextAreaOperator
public TextAreaOperator(ContainerOperator cont, java.lang.String text, int index)
Constructor. Waits for a component in a container to show. The component is identified as theindex+1'thjava.awt.TextAreathat 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 textArea.text- TextArea text.index- Ordinal component index. The first component hasindex0.- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
TextAreaOperator
public TextAreaOperator(ContainerOperator cont, java.lang.String text)
Constructor. Waits for a component in a container to show. The component is identified as the firstjava.awt.TextAreathat 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 textArea.text- TextArea text.- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
TextAreaOperator
public TextAreaOperator(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 textArea.index- Ordinal component index.- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
TextAreaOperator
public TextAreaOperator(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 textArea.- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
-
Method Detail
-
findTextArea
public static java.awt.TextArea findTextArea(java.awt.Container cont, ComponentChooser chooser, int index)Searches TextArea 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 firstindexis 0.- Returns:
- TextArea instance or null if component was not found.
-
findTextArea
public static java.awt.TextArea findTextArea(java.awt.Container cont, ComponentChooser chooser)Searches for the first TextArea 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:
- TextArea instance or null if component was not found.
-
findTextArea
public static java.awt.TextArea findTextArea(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)Searches TextArea by text.- Parameters:
cont- Container to search component in.text- TextArea text. If null, contents is not checked.ce- Compare text exactly.ccs- Compare text case sensitively.index- Ordinal component index.- Returns:
- TextArea instance or null if component was not found.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
findTextArea
public static java.awt.TextArea findTextArea(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)Searches TextArea by text.- Parameters:
cont- Container to search component in.text- TextArea text. If null, contents is not checked.ce- Compare text exactly.ccs- Compare text case sensitively.- Returns:
- TextArea instance or null if component was not found.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
waitTextArea
public static java.awt.TextArea waitTextArea(java.awt.Container cont, ComponentChooser chooser, int index)Waits TextArea in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.index- Ordinal component index.- Returns:
- TextArea instance.
-
waitTextArea
public static java.awt.TextArea waitTextArea(java.awt.Container cont, ComponentChooser chooser)Waits 0'th TextArea in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- TextArea instance.
-
waitTextArea
public static java.awt.TextArea waitTextArea(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)Waits TextArea by text.- Parameters:
cont- Container to search component in.text- TextArea text. If null, contents is not checked.ce- Compare text exactly.ccs- Compare text case sensitively.index- Ordinal component index.- Returns:
- TextArea instance.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
waitTextArea
public static java.awt.TextArea waitTextArea(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)Waits TextArea by text.- Parameters:
cont- Container to search component in.text- TextArea text. If null, contents is not checked.ce- Compare text exactly.ccs- Compare text case sensitively.- Returns:
- TextArea instance.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
setTimeouts
public void setTimeouts(Timeouts timeouts)
Description copied from interface:TimeoutableDefines current timeouts.- Specified by:
setTimeoutsin interfaceTimeoutable- Overrides:
setTimeoutsin classTextComponentOperator- Parameters:
timeouts- A collection of timeout assignments.- See Also:
Timeoutable.getTimeouts()
-
getTimeouts
public Timeouts getTimeouts()
Description copied from interface:TimeoutableReturn current timeouts.- Specified by:
getTimeoutsin interfaceTimeoutable- Overrides:
getTimeoutsin classTextComponentOperator- 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:OutputableDefines print output streams or writers.- Specified by:
setOutputin interfaceOutputable- Overrides:
setOutputin classTextComponentOperator- Parameters:
out- Identify the streams or writers used for print output.- See Also:
Outputable.getOutput()
-
getOutput
public TestOut getOutput()
Description copied from interface:OutputableReturns print output streams or writers.- Specified by:
getOutputin interfaceOutputable- Overrides:
getOutputin classTextComponentOperator- 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:ComponentOperatorReturns information about component.- Overrides:
getDumpin classTextComponentOperator- Returns:
- a Hashtable containing name-value pairs.
-
getColumns
public int getColumns()
MapsTextArea.getColumns()through queue
-
getMinimumSize
public java.awt.Dimension getMinimumSize(int i, int i1)MapsTextArea.getMinimumSize(int, int)through queue
-
getPreferredSize
public java.awt.Dimension getPreferredSize(int i, int i1)MapsTextArea.getPreferredSize(int, int)through queue
-
getRows
public int getRows()
MapsTextArea.getRows()through queue
-
getScrollbarVisibility
public int getScrollbarVisibility()
MapsTextArea.getScrollbarVisibility()through queue
-
replaceRange
public void replaceRange(java.lang.String string, int i, int i1)MapsTextArea.replaceRange(String, int, int)through queue
-
setColumns
public void setColumns(int i)
MapsTextArea.setColumns(int)through queue
-
setRows
public void setRows(int i)
MapsTextArea.setRows(int)through queue
-
-