Package org.netbeans.jemmy.operators
Class JComboBoxOperator
- 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.JComboBoxOperator
-
- All Implemented Interfaces:
Outputable,Timeoutable
public class JComboBoxOperator extends JComponentOperator implements Timeoutable, Outputable
Timeouts used:
JComboBoxOperator.BeforeSelectingTimeout - time to sleep after list opened and before item selected
JComboBoxOperator.WaitListTimeout - time to wait list opened
ComponentOperator.WaitComponentTimeout - time to wait component displayed
ComponentOperator.WaitComponentEnabledTimeout - time to wait component enabled
ComponentOperator.WaitStateTimeout - time to wait for item to be selected
AbstractButtonOperator.PushButtonTimeout - time between combo button pressing and releasing
ComponentOperator.MouseClickTimeout - time between mouse pressing and releasing during item selecting
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
.- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
Timeouts
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJComboBoxOperator.JComboBoxByItemFinderAllows to find component by an item.static classJComboBoxOperator.JComboBoxFinderChecks component type.-
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.JComponentOperator
JComponentOperator.JComponentByTipFinder, JComponentOperator.JComponentFinder
-
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.ContainerOperator
ContainerOperator.ContainerFinder
-
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.Operator
Operator.ComponentVisualizer, Operator.DefaultPathParser, Operator.DefaultStringComparator, Operator.Finder, Operator.MapAction, Operator.MapBooleanAction, Operator.MapByteAction, Operator.MapCharacterAction, Operator.MapDoubleAction, Operator.MapFloatAction, Operator.MapIntegerAction, Operator.MapLongAction, Operator.MapVoidAction, Operator.NoBlockingAction, Operator.PathParser, Operator.StringComparator
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringITEM_PREFIX_DPROPIdentifier for a "item" property values.static java.lang.StringTEXT_DPROPIdentifier for a "text" property.-
Fields inherited from class org.netbeans.jemmy.operators.JComponentOperator
A11Y_DATA, A11Y_DESCRIPTION_DPROP, A11Y_NAME_DPROP, TOOLTIP_TEXT_DPROP
-
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 JComboBoxOperator(javax.swing.JComboBox b)Constructs a JComboBoxOperator object.JComboBoxOperator(ContainerOperator cont)Constructor.JComboBoxOperator(ContainerOperator cont, int index)Constructor.JComboBoxOperator(ContainerOperator cont, java.lang.String text)Constructor.JComboBoxOperator(ContainerOperator cont, java.lang.String text, int index)Constructor.JComboBoxOperator(ContainerOperator cont, ComponentChooser chooser)Constructs a JComboBoxOperator object.JComboBoxOperator(ContainerOperator cont, ComponentChooser chooser, int index)Constructs a JComboBoxOperator object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent actionEvent)MapsJComboBox.actionPerformed(ActionEvent)through queuevoidaddActionListener(java.awt.event.ActionListener actionListener)MapsJComboBox.addActionListener(ActionListener)through queuevoidaddItem(java.lang.Object object)MapsJComboBox.addItem(Object)through queuevoidaddItemListener(java.awt.event.ItemListener itemListener)MapsJComboBox.addItemListener(ItemListener)through queuevoidclearText()Clears text in the editable combobox using left-arrow and delete keys.voidconfigureEditor(javax.swing.ComboBoxEditor comboBoxEditor, java.lang.Object object)MapsJComboBox.configureEditor(ComboBoxEditor, Object)through queuevoidcontentsChanged(javax.swing.event.ListDataEvent listDataEvent)MapsJComboBox.contentsChanged(ListDataEvent)through queuevoidcopyEnvironment(Operator anotherOperator)Copies all environment (output, timeouts, visualizer) from another operator.voidenterText(java.lang.String text)Requests a focus, clears text, types new one and pushes Enter.intfindItemIndex(java.lang.String item, Operator.StringComparator comparator)Finds an item between list items.javax.swing.JButtonfindJButton()Searches JButton inside component.static javax.swing.JComboBoxfindJComboBox(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int itemIndex)Searches JComboBox by item.static javax.swing.JComboBoxfindJComboBox(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int itemIndex, int index)Searches JComboBox by item.static javax.swing.JComboBoxfindJComboBox(java.awt.Container cont, ComponentChooser chooser)Searches 0'th JComboBox in container.static javax.swing.JComboBoxfindJComboBox(java.awt.Container cont, ComponentChooser chooser, int index)Searches JComboBox in container.javax.swing.JTextFieldfindJTextField()Searches JTextField inside component.java.lang.StringgetActionCommand()MapsJComboBox.getActionCommand()through queueJButtonOperatorgetButton()Creates an operator for button returned byfindJButton()method.java.util.HashtablegetDump()Returns information about component.javax.swing.ComboBoxEditorgetEditor()MapsJComboBox.getEditor()through queuejava.lang.ObjectgetItemAt(int i)MapsJComboBox.getItemAt(int)through queueintgetItemCount()MapsJComboBox.getItemCount()through queuejavax.swing.JComboBox.KeySelectionManagergetKeySelectionManager()MapsJComboBox.getKeySelectionManager()through queueintgetMaximumRowCount()MapsJComboBox.getMaximumRowCount()through queuejavax.swing.ComboBoxModelgetModel()MapsJComboBox.getModel()through queueTestOutgetOutput()Returns print output streams or writers.javax.swing.ListCellRenderergetRenderer()MapsJComboBox.getRenderer()through queueintgetSelectedIndex()MapsJComboBox.getSelectedIndex()through queuejava.lang.ObjectgetSelectedItem()MapsJComboBox.getSelectedItem()through queuejava.lang.Object[]getSelectedObjects()MapsJComboBox.getSelectedObjects()through queueJTextFieldOperatorgetTextField()Creates an operator for button returned byfindJTextField()method.TimeoutsgetTimeouts()Return current timeouts.javax.swing.plaf.ComboBoxUIgetUI()MapsJComboBox.getUI()through queuevoidhidePopup()MapsJComboBox.hidePopup()through queuevoidinsertItemAt(java.lang.Object object, int i)MapsJComboBox.insertItemAt(Object, int)through queuevoidintervalAdded(javax.swing.event.ListDataEvent listDataEvent)MapsJComboBox.intervalAdded(ListDataEvent)through queuevoidintervalRemoved(javax.swing.event.ListDataEvent listDataEvent)MapsJComboBox.intervalRemoved(ListDataEvent)through queuebooleanisEditable()MapsJComboBox.isEditable()through queuebooleanisLightWeightPopupEnabled()MapsJComboBox.isLightWeightPopupEnabled()through queuebooleanisPopupVisible()MapsJComboBox.isPopupVisible()through queuevoidprocessKeyEvent(java.awt.event.KeyEvent keyEvent)MapsJComboBox.processKeyEvent(KeyEvent)through queuevoidpushComboButton()Push combobox's button to expand or collapse combobox.voidremoveActionListener(java.awt.event.ActionListener actionListener)MapsJComboBox.removeActionListener(ActionListener)through queuevoidremoveAllItems()MapsJComboBox.removeAllItems()through queuevoidremoveItem(java.lang.Object object)MapsJComboBox.removeItem(Object)through queuevoidremoveItemAt(int i)MapsJComboBox.removeItemAt(int)through queuevoidremoveItemListener(java.awt.event.ItemListener itemListener)MapsJComboBox.removeItemListener(ItemListener)through queuevoidselectItem(int index)Selects combobox item.voidselectItem(java.lang.String item)Selects combobox item.voidselectItem(java.lang.String item, boolean ce, boolean cc)Deprecated.Use selectItem(String) or selectItem(String, StringComparator)voidselectItem(java.lang.String item, Operator.StringComparator comparator)Selects an item by text.booleanselectWithKeyChar(char c)MapsJComboBox.selectWithKeyChar(char)through queuevoidsetActionCommand(java.lang.String string)MapsJComboBox.setActionCommand(String)through queuevoidsetEditable(boolean b)MapsJComboBox.setEditable(boolean)through queuevoidsetEditor(javax.swing.ComboBoxEditor comboBoxEditor)MapsJComboBox.setEditor(ComboBoxEditor)through queuevoidsetKeySelectionManager(javax.swing.JComboBox.KeySelectionManager keySelectionManager)MapsJComboBox.setKeySelectionManager(KeySelectionManager)through queuevoidsetLightWeightPopupEnabled(boolean b)MapsJComboBox.setLightWeightPopupEnabled(boolean)through queuevoidsetMaximumRowCount(int i)MapsJComboBox.setMaximumRowCount(int)through queuevoidsetModel(javax.swing.ComboBoxModel comboBoxModel)MapsJComboBox.setModel(ComboBoxModel)through queuevoidsetOutput(TestOut output)Defines print output streams or writers.voidsetPopupVisible(boolean b)MapsJComboBox.setPopupVisible(boolean)through queuevoidsetRenderer(javax.swing.ListCellRenderer listCellRenderer)MapsJComboBox.setRenderer(ListCellRenderer)through queuevoidsetSelectedIndex(int i)MapsJComboBox.setSelectedIndex(int)through queuevoidsetSelectedItem(java.lang.Object object)MapsJComboBox.setSelectedItem(Object)through queuevoidsetTimeouts(Timeouts timeouts)Defines current timeouts.voidsetUI(javax.swing.plaf.ComboBoxUI comboBoxUI)MapsJComboBox.setUI(ComboBoxUI)through queuevoidshowPopup()MapsJComboBox.showPopup()through queuevoidtypeText(java.lang.String text)Types text in the editable combobox.intwaitItem(int itemIndex)Waits for an item of given index available between list items.intwaitItem(java.lang.String item, Operator.StringComparator comparator)Waits for an item available between list items.voidwaitItemSelected(int index)Waits for item to be selected.voidwaitItemSelected(java.lang.String item)Waits for item to be selected.static javax.swing.JComboBoxwaitJComboBox(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int itemIndex)Waits JComboBox by item.static javax.swing.JComboBoxwaitJComboBox(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int itemIndex, int index)Waits JComboBox by item.static javax.swing.JComboBoxwaitJComboBox(java.awt.Container cont, ComponentChooser chooser)Waits 0'th JComboBox in container.static javax.swing.JComboBoxwaitJComboBox(java.awt.Container cont, ComponentChooser chooser, int index)Waits JComboBox in container.javax.swing.JListwaitList()Waits combobox's list to be displayed.-
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, 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
-
ITEM_PREFIX_DPROP
public static final java.lang.String ITEM_PREFIX_DPROP
Identifier for a "item" property values.- See Also:
getDump(), Constant Field Values
-
-
Constructor Detail
-
JComboBoxOperator
public JComboBoxOperator(javax.swing.JComboBox b)
Constructs a JComboBoxOperator object.- Parameters:
b- a component
-
JComboBoxOperator
public JComboBoxOperator(ContainerOperator cont, ComponentChooser chooser, int index)
Constructs a JComboBoxOperator object.- Parameters:
cont- a containerchooser- a component chooser specifying searching criteria.index- an index between appropriate ones.
-
JComboBoxOperator
public JComboBoxOperator(ContainerOperator cont, ComponentChooser chooser)
Constructs a JComboBoxOperator object.- Parameters:
cont- a containerchooser- a component chooser specifying searching criteria.
-
JComboBoxOperator
public JComboBoxOperator(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 containertext- Text of item which is currently selected.index- Ordinal component index.- Throws:
TimeoutExpiredException- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
JComboBoxOperator
public JComboBoxOperator(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 containertext- Text of item which is currently selected.- Throws:
TimeoutExpiredException- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
JComboBoxOperator
public JComboBoxOperator(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 containerindex- Ordinal component index.- Throws:
TimeoutExpiredException
-
JComboBoxOperator
public JComboBoxOperator(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
-
findJComboBox
public static javax.swing.JComboBox findJComboBox(java.awt.Container cont, ComponentChooser chooser, int index)Searches JComboBox in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.index- Ordinal component index.- Returns:
- JComboBox instance or null if component was not found.
-
findJComboBox
public static javax.swing.JComboBox findJComboBox(java.awt.Container cont, ComponentChooser chooser)Searches 0'th JComboBox in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- JComboBox instance or null if component was not found.
-
findJComboBox
public static javax.swing.JComboBox findJComboBox(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int itemIndex, int index)Searches JComboBox by item.- Parameters:
cont- Container to search component in.text- Item text. If null, contents is not checked.ce- Compare text exactly.ccs- Compare text case sensitively.itemIndex- Index of item to compare text. If -1, selected item is checked.index- Ordinal component index.- Returns:
- JComboBox instance or null if component was not found.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
findJComboBox
public static javax.swing.JComboBox findJComboBox(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int itemIndex)Searches JComboBox by item.- Parameters:
cont- Container to search component in.text- Item text. If null, contents is not checked.ce- Compare text exactly.ccs- Compare text case sensitively.itemIndex- Index of item to compare text. If -1, selected item is checked.- Returns:
- JComboBox instance or null if component was not found.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
waitJComboBox
public static javax.swing.JComboBox waitJComboBox(java.awt.Container cont, ComponentChooser chooser, int index)Waits JComboBox in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.index- Ordinal component index.- Returns:
- JComboBox instance or null if component was not found.
- Throws:
TimeoutExpiredException
-
waitJComboBox
public static javax.swing.JComboBox waitJComboBox(java.awt.Container cont, ComponentChooser chooser)Waits 0'th JComboBox in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- JComboBox instance or null if component was not found.
- Throws:
TimeoutExpiredException
-
waitJComboBox
public static javax.swing.JComboBox waitJComboBox(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int itemIndex, int index)Waits JComboBox by item.- Parameters:
cont- Container to search component in.text- Item text. If null, contents is not checked.ce- Compare text exactly.ccs- Compare text case sensitively.itemIndex- Index of item to compare text. If -1, selected item is checked.index- Ordinal component index.- Returns:
- JComboBox instance or null if component was not found.
- Throws:
TimeoutExpiredException- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
waitJComboBox
public static javax.swing.JComboBox waitJComboBox(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int itemIndex)Waits JComboBox by item.- Parameters:
cont- Container to search component in.text- Item text. If null, contents is not checked.ce- Compare text exactly.ccs- Compare text case sensitively.itemIndex- Index of item to compare text. If -1, selected item is checked.- Returns:
- JComboBox instance or null if component was not found.
- Throws:
TimeoutExpiredException- 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 classJComponentOperator- 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 classJComponentOperator- Returns:
- the collection of current timeout assignments.
- See Also:
Timeoutable.setTimeouts(org.netbeans.jemmy.Timeouts)
-
setOutput
public void setOutput(TestOut output)
Description copied from interface:OutputableDefines print output streams or writers.- Specified by:
setOutputin interfaceOutputable- Overrides:
setOutputin classJComponentOperator- Parameters:
output- 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 classJComponentOperator- 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:OperatorCopies all environment (output, timeouts, visualizer) from another operator.- Overrides:
copyEnvironmentin classComponentOperator- Parameters:
anotherOperator- an operator to copy the environment to.
-
findJButton
public javax.swing.JButton findJButton()
Searches JButton inside component.- Returns:
- JButton which is used to expand this JComboBox.
-
findJTextField
public javax.swing.JTextField findJTextField()
Searches JTextField inside component.- Returns:
- JTextField if JComboBox is editable, null otherwise.
-
getButton
public JButtonOperator getButton()
Creates an operator for button returned byfindJButton()method.- Returns:
- new JButtonOperator instance.
-
getTextField
public JTextFieldOperator getTextField()
Creates an operator for button returned byfindJTextField()method.- Returns:
- new JTextField instance.
-
waitList
public javax.swing.JList waitList()
Waits combobox's list to be displayed.- Returns:
- JList object if it was displayed in JComboBoxOperator.WaitListTimeout millisecont, null otherwise.
- Throws:
TimeoutExpiredException
-
pushComboButton
public void pushComboButton()
Push combobox's button to expand or collapse combobox.- Throws:
TimeoutExpiredException
-
findItemIndex
public int findItemIndex(java.lang.String item, Operator.StringComparator comparator)Finds an item between list items.- Parameters:
item- a text pattern.comparator- a searching criteria.- Returns:
- an item index.
-
waitItem
public int waitItem(java.lang.String item, Operator.StringComparator comparator)Waits for an item available between list items.- Parameters:
item- a text pattern.comparator- a searching criteria.- Returns:
- an item index or throws TimeoutExpiredException if item not found.
-
waitItem
public int waitItem(int itemIndex)
Waits for an item of given index available between list items.- Parameters:
itemIndex- index of desired item- Returns:
- an item index or throws TimeoutExpiredException if item not found.
-
selectItem
public void selectItem(java.lang.String item, Operator.StringComparator comparator)Selects an item by text.- Parameters:
item- a text pattern.comparator- a searching criteria.
-
selectItem
public void selectItem(java.lang.String item, boolean ce, boolean cc)Deprecated.Use selectItem(String) or selectItem(String, StringComparator)Selects combobox item.- Parameters:
item- Item text.ce- Compare exactly.cc- Compare case sensitivelly.- Throws:
TimeoutExpiredException- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
selectItem
public void selectItem(java.lang.String item)
Selects combobox item. Uses StringComparator assigned to this object.- Parameters:
item- Item text.- Throws:
TimeoutExpiredException
-
selectItem
public void selectItem(int index)
Selects combobox item. If verification mode is on, checks that right item has been selected.- Parameters:
index- Item index.- Throws:
TimeoutExpiredException
-
typeText
public void typeText(java.lang.String text)
Types text in the editable combobox. If combobox has no focus, does simple mouse click on it first.- Parameters:
text- text to type.- Throws:
TimeoutExpiredException
-
clearText
public void clearText()
Clears text in the editable combobox using left-arrow and delete keys. If combobox has no focus, does simple mouse click on it first.- Throws:
TimeoutExpiredException
-
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
-
waitItemSelected
public void waitItemSelected(int index)
Waits for item to be selected.- Parameters:
index- Item index.
-
waitItemSelected
public void waitItemSelected(java.lang.String item)
Waits for item to be selected. Uses getComparator() comparator.- Parameters:
item- wait an item to be selected.
-
getDump
public java.util.Hashtable getDump()
Returns information about component.- Overrides:
getDumpin classJComponentOperator- Returns:
- a Hashtable containing name-value pairs.
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent actionEvent)
MapsJComboBox.actionPerformed(ActionEvent)through queue
-
addActionListener
public void addActionListener(java.awt.event.ActionListener actionListener)
MapsJComboBox.addActionListener(ActionListener)through queue
-
addItem
public void addItem(java.lang.Object object)
MapsJComboBox.addItem(Object)through queue
-
addItemListener
public void addItemListener(java.awt.event.ItemListener itemListener)
MapsJComboBox.addItemListener(ItemListener)through queue
-
configureEditor
public void configureEditor(javax.swing.ComboBoxEditor comboBoxEditor, java.lang.Object object)MapsJComboBox.configureEditor(ComboBoxEditor, Object)through queue
-
contentsChanged
public void contentsChanged(javax.swing.event.ListDataEvent listDataEvent)
MapsJComboBox.contentsChanged(ListDataEvent)through queue
-
getActionCommand
public java.lang.String getActionCommand()
MapsJComboBox.getActionCommand()through queue
-
getEditor
public javax.swing.ComboBoxEditor getEditor()
MapsJComboBox.getEditor()through queue
-
getItemAt
public java.lang.Object getItemAt(int i)
MapsJComboBox.getItemAt(int)through queue
-
getItemCount
public int getItemCount()
MapsJComboBox.getItemCount()through queue
-
getKeySelectionManager
public javax.swing.JComboBox.KeySelectionManager getKeySelectionManager()
MapsJComboBox.getKeySelectionManager()through queue
-
getMaximumRowCount
public int getMaximumRowCount()
MapsJComboBox.getMaximumRowCount()through queue
-
getModel
public javax.swing.ComboBoxModel getModel()
MapsJComboBox.getModel()through queue
-
getRenderer
public javax.swing.ListCellRenderer getRenderer()
MapsJComboBox.getRenderer()through queue
-
getSelectedIndex
public int getSelectedIndex()
MapsJComboBox.getSelectedIndex()through queue
-
getSelectedItem
public java.lang.Object getSelectedItem()
MapsJComboBox.getSelectedItem()through queue
-
getSelectedObjects
public java.lang.Object[] getSelectedObjects()
MapsJComboBox.getSelectedObjects()through queue
-
getUI
public javax.swing.plaf.ComboBoxUI getUI()
MapsJComboBox.getUI()through queue
-
hidePopup
public void hidePopup()
MapsJComboBox.hidePopup()through queue
-
insertItemAt
public void insertItemAt(java.lang.Object object, int i)MapsJComboBox.insertItemAt(Object, int)through queue
-
intervalAdded
public void intervalAdded(javax.swing.event.ListDataEvent listDataEvent)
MapsJComboBox.intervalAdded(ListDataEvent)through queue
-
intervalRemoved
public void intervalRemoved(javax.swing.event.ListDataEvent listDataEvent)
MapsJComboBox.intervalRemoved(ListDataEvent)through queue
-
isEditable
public boolean isEditable()
MapsJComboBox.isEditable()through queue
-
isLightWeightPopupEnabled
public boolean isLightWeightPopupEnabled()
MapsJComboBox.isLightWeightPopupEnabled()through queue
-
isPopupVisible
public boolean isPopupVisible()
MapsJComboBox.isPopupVisible()through queue
-
processKeyEvent
public void processKeyEvent(java.awt.event.KeyEvent keyEvent)
MapsJComboBox.processKeyEvent(KeyEvent)through queue
-
removeActionListener
public void removeActionListener(java.awt.event.ActionListener actionListener)
MapsJComboBox.removeActionListener(ActionListener)through queue
-
removeAllItems
public void removeAllItems()
MapsJComboBox.removeAllItems()through queue
-
removeItem
public void removeItem(java.lang.Object object)
MapsJComboBox.removeItem(Object)through queue
-
removeItemAt
public void removeItemAt(int i)
MapsJComboBox.removeItemAt(int)through queue
-
removeItemListener
public void removeItemListener(java.awt.event.ItemListener itemListener)
MapsJComboBox.removeItemListener(ItemListener)through queue
-
selectWithKeyChar
public boolean selectWithKeyChar(char c)
MapsJComboBox.selectWithKeyChar(char)through queue
-
setActionCommand
public void setActionCommand(java.lang.String string)
MapsJComboBox.setActionCommand(String)through queue
-
setEditable
public void setEditable(boolean b)
MapsJComboBox.setEditable(boolean)through queue
-
setEditor
public void setEditor(javax.swing.ComboBoxEditor comboBoxEditor)
MapsJComboBox.setEditor(ComboBoxEditor)through queue
-
setKeySelectionManager
public void setKeySelectionManager(javax.swing.JComboBox.KeySelectionManager keySelectionManager)
MapsJComboBox.setKeySelectionManager(KeySelectionManager)through queue
-
setLightWeightPopupEnabled
public void setLightWeightPopupEnabled(boolean b)
MapsJComboBox.setLightWeightPopupEnabled(boolean)through queue
-
setMaximumRowCount
public void setMaximumRowCount(int i)
MapsJComboBox.setMaximumRowCount(int)through queue
-
setModel
public void setModel(javax.swing.ComboBoxModel comboBoxModel)
MapsJComboBox.setModel(ComboBoxModel)through queue
-
setPopupVisible
public void setPopupVisible(boolean b)
MapsJComboBox.setPopupVisible(boolean)through queue
-
setRenderer
public void setRenderer(javax.swing.ListCellRenderer listCellRenderer)
MapsJComboBox.setRenderer(ListCellRenderer)through queue
-
setSelectedIndex
public void setSelectedIndex(int i)
MapsJComboBox.setSelectedIndex(int)through queue
-
setSelectedItem
public void setSelectedItem(java.lang.Object object)
MapsJComboBox.setSelectedItem(Object)through queue
-
setUI
public void setUI(javax.swing.plaf.ComboBoxUI comboBoxUI)
MapsJComboBox.setUI(ComboBoxUI)through queue
-
showPopup
public void showPopup()
MapsJComboBox.showPopup()through queue
-
-