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 class
JComboBoxOperator.JComboBoxByItemFinder
Allows to find component by an item.static class
JComboBoxOperator.JComboBoxFinder
Checks 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 String
ITEM_PREFIX_DPROP
Identifier for a "item" property values.static String
TEXT_DPROP
Identifier 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(JComboBox b)
Constructs a JComboBoxOperator object.JComboBoxOperator(ContainerOperator cont)
Constructor.JComboBoxOperator(ContainerOperator cont, int index)
Constructor.JComboBoxOperator(ContainerOperator cont, String text)
Constructor.JComboBoxOperator(ContainerOperator cont, 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 void
actionPerformed(ActionEvent actionEvent)
MapsJComboBox.actionPerformed(ActionEvent)
through queuevoid
addActionListener(ActionListener actionListener)
MapsJComboBox.addActionListener(ActionListener)
through queuevoid
addItem(Object object)
MapsJComboBox.addItem(Object)
through queuevoid
addItemListener(ItemListener itemListener)
MapsJComboBox.addItemListener(ItemListener)
through queuevoid
clearText()
Clears text in the editable combobox using left-arrow and delete keys.void
configureEditor(ComboBoxEditor comboBoxEditor, Object object)
MapsJComboBox.configureEditor(ComboBoxEditor, Object)
through queuevoid
contentsChanged(ListDataEvent listDataEvent)
MapsJComboBox.contentsChanged(ListDataEvent)
through queuevoid
copyEnvironment(Operator anotherOperator)
Copies all environment (output, timeouts, visualizer) from another operator.void
enterText(String text)
Requests a focus, clears text, types new one and pushes Enter.int
findItemIndex(String item, Operator.StringComparator comparator)
Finds an item between list items.JButton
findJButton()
Searches JButton inside component.static JComboBox
findJComboBox(Container cont, String text, boolean ce, boolean ccs, int itemIndex)
Searches JComboBox by item.static JComboBox
findJComboBox(Container cont, String text, boolean ce, boolean ccs, int itemIndex, int index)
Searches JComboBox by item.static JComboBox
findJComboBox(Container cont, ComponentChooser chooser)
Searches 0'th JComboBox in container.static JComboBox
findJComboBox(Container cont, ComponentChooser chooser, int index)
Searches JComboBox in container.JTextField
findJTextField()
Searches JTextField inside component.String
getActionCommand()
MapsJComboBox.getActionCommand()
through queueJButtonOperator
getButton()
Creates an operator for button returned byfindJButton()
method.Hashtable
getDump()
Returns information about component.ComboBoxEditor
getEditor()
MapsJComboBox.getEditor()
through queueObject
getItemAt(int i)
MapsJComboBox.getItemAt(int)
through queueint
getItemCount()
MapsJComboBox.getItemCount()
through queueJComboBox.KeySelectionManager
getKeySelectionManager()
MapsJComboBox.getKeySelectionManager()
through queueint
getMaximumRowCount()
MapsJComboBox.getMaximumRowCount()
through queueComboBoxModel
getModel()
MapsJComboBox.getModel()
through queueTestOut
getOutput()
Returns print output streams or writers.ListCellRenderer
getRenderer()
MapsJComboBox.getRenderer()
through queueint
getSelectedIndex()
MapsJComboBox.getSelectedIndex()
through queueObject
getSelectedItem()
MapsJComboBox.getSelectedItem()
through queueObject[]
getSelectedObjects()
MapsJComboBox.getSelectedObjects()
through queueJTextFieldOperator
getTextField()
Creates an operator for button returned byfindJTextField()
method.Timeouts
getTimeouts()
Return current timeouts.ComboBoxUI
getUI()
MapsJComboBox.getUI()
through queuevoid
hidePopup()
MapsJComboBox.hidePopup()
through queuevoid
insertItemAt(Object object, int i)
MapsJComboBox.insertItemAt(Object, int)
through queuevoid
intervalAdded(ListDataEvent listDataEvent)
MapsJComboBox.intervalAdded(ListDataEvent)
through queuevoid
intervalRemoved(ListDataEvent listDataEvent)
MapsJComboBox.intervalRemoved(ListDataEvent)
through queueboolean
isEditable()
MapsJComboBox.isEditable()
through queueboolean
isLightWeightPopupEnabled()
MapsJComboBox.isLightWeightPopupEnabled()
through queueboolean
isPopupVisible()
MapsJComboBox.isPopupVisible()
through queuevoid
processKeyEvent(KeyEvent keyEvent)
MapsJComboBox.processKeyEvent(KeyEvent)
through queuevoid
pushComboButton()
Push combobox's button to expand or collapse combobox.void
removeActionListener(ActionListener actionListener)
MapsJComboBox.removeActionListener(ActionListener)
through queuevoid
removeAllItems()
MapsJComboBox.removeAllItems()
through queuevoid
removeItem(Object object)
MapsJComboBox.removeItem(Object)
through queuevoid
removeItemAt(int i)
MapsJComboBox.removeItemAt(int)
through queuevoid
removeItemListener(ItemListener itemListener)
MapsJComboBox.removeItemListener(ItemListener)
through queuevoid
selectItem(int index)
Selects combobox item.void
selectItem(String item)
Selects combobox item.void
selectItem(String item, boolean ce, boolean cc)
Deprecated.Use selectItem(String) or selectItem(String, StringComparator)void
selectItem(String item, Operator.StringComparator comparator)
Selects an item by text.boolean
selectWithKeyChar(char c)
MapsJComboBox.selectWithKeyChar(char)
through queuevoid
setActionCommand(String string)
MapsJComboBox.setActionCommand(String)
through queuevoid
setEditable(boolean b)
MapsJComboBox.setEditable(boolean)
through queuevoid
setEditor(ComboBoxEditor comboBoxEditor)
MapsJComboBox.setEditor(ComboBoxEditor)
through queuevoid
setKeySelectionManager(JComboBox.KeySelectionManager keySelectionManager)
MapsJComboBox.setKeySelectionManager(KeySelectionManager)
through queuevoid
setLightWeightPopupEnabled(boolean b)
MapsJComboBox.setLightWeightPopupEnabled(boolean)
through queuevoid
setMaximumRowCount(int i)
MapsJComboBox.setMaximumRowCount(int)
through queuevoid
setModel(ComboBoxModel comboBoxModel)
MapsJComboBox.setModel(ComboBoxModel)
through queuevoid
setOutput(TestOut output)
Defines print output streams or writers.void
setPopupVisible(boolean b)
MapsJComboBox.setPopupVisible(boolean)
through queuevoid
setRenderer(ListCellRenderer listCellRenderer)
MapsJComboBox.setRenderer(ListCellRenderer)
through queuevoid
setSelectedIndex(int i)
MapsJComboBox.setSelectedIndex(int)
through queuevoid
setSelectedItem(Object object)
MapsJComboBox.setSelectedItem(Object)
through queuevoid
setTimeouts(Timeouts timeouts)
Defines current timeouts.void
setUI(ComboBoxUI comboBoxUI)
MapsJComboBox.setUI(ComboBoxUI)
through queuevoid
showPopup()
MapsJComboBox.showPopup()
through queuevoid
typeText(String text)
Types text in the editable combobox.int
waitItem(int itemIndex)
Waits for an item of given index available between list items.int
waitItem(String item, Operator.StringComparator comparator)
Waits for an item available between list items.void
waitItemSelected(int index)
Waits for item to be selected.void
waitItemSelected(String item)
Waits for item to be selected.static JComboBox
waitJComboBox(Container cont, String text, boolean ce, boolean ccs, int itemIndex)
Waits JComboBox by item.static JComboBox
waitJComboBox(Container cont, String text, boolean ce, boolean ccs, int itemIndex, int index)
Waits JComboBox by item.static JComboBox
waitJComboBox(Container cont, ComponentChooser chooser)
Waits 0'th JComboBox in container.static JComboBox
waitJComboBox(Container cont, ComponentChooser chooser, int index)
Waits JComboBox in container.JList
waitList()
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 String TEXT_DPROP
Identifier for a "text" property.- See Also:
getDump()
, Constant Field Values
-
ITEM_PREFIX_DPROP
public static final String ITEM_PREFIX_DPROP
Identifier for a "item" property values.- See Also:
getDump()
, Constant Field Values
-
-
Constructor Detail
-
JComboBoxOperator
public JComboBoxOperator(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, 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, 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 JComboBox findJComboBox(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 JComboBox findJComboBox(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 JComboBox findJComboBox(Container cont, 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 JComboBox findJComboBox(Container cont, 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 JComboBox waitJComboBox(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 JComboBox waitJComboBox(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 JComboBox waitJComboBox(Container cont, 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 JComboBox waitJComboBox(Container cont, 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:Timeoutable
Defines current timeouts.- Specified by:
setTimeouts
in interfaceTimeoutable
- Overrides:
setTimeouts
in classJComponentOperator
- Parameters:
timeouts
- 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 interfaceTimeoutable
- Overrides:
getTimeouts
in 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:Outputable
Defines print output streams or writers.- Specified by:
setOutput
in interfaceOutputable
- Overrides:
setOutput
in classJComponentOperator
- Parameters:
output
- 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 interfaceOutputable
- Overrides:
getOutput
in 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:Operator
Copies all environment (output, timeouts, visualizer) from another operator.- Overrides:
copyEnvironment
in classComponentOperator
- Parameters:
anotherOperator
- an operator to copy the environment to.
-
findJButton
public JButton findJButton()
Searches JButton inside component.- Returns:
- JButton which is used to expand this JComboBox.
-
findJTextField
public 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 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(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(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(String item, Operator.StringComparator comparator)
Selects an item by text.- Parameters:
item
- a text pattern.comparator
- a searching criteria.
-
selectItem
public void selectItem(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(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(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(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(String item)
Waits for item to be selected. Uses getComparator() comparator.- Parameters:
item
- wait an item to be selected.
-
getDump
public Hashtable getDump()
Returns information about component.- Overrides:
getDump
in classJComponentOperator
- Returns:
- a Hashtable containing name-value pairs.
-
actionPerformed
public void actionPerformed(ActionEvent actionEvent)
MapsJComboBox.actionPerformed(ActionEvent)
through queue
-
addActionListener
public void addActionListener(ActionListener actionListener)
MapsJComboBox.addActionListener(ActionListener)
through queue
-
addItem
public void addItem(Object object)
MapsJComboBox.addItem(Object)
through queue
-
addItemListener
public void addItemListener(ItemListener itemListener)
MapsJComboBox.addItemListener(ItemListener)
through queue
-
configureEditor
public void configureEditor(ComboBoxEditor comboBoxEditor, Object object)
MapsJComboBox.configureEditor(ComboBoxEditor, Object)
through queue
-
contentsChanged
public void contentsChanged(ListDataEvent listDataEvent)
MapsJComboBox.contentsChanged(ListDataEvent)
through queue
-
getActionCommand
public String getActionCommand()
MapsJComboBox.getActionCommand()
through queue
-
getEditor
public ComboBoxEditor getEditor()
MapsJComboBox.getEditor()
through queue
-
getItemAt
public Object getItemAt(int i)
MapsJComboBox.getItemAt(int)
through queue
-
getItemCount
public int getItemCount()
MapsJComboBox.getItemCount()
through queue
-
getKeySelectionManager
public JComboBox.KeySelectionManager getKeySelectionManager()
MapsJComboBox.getKeySelectionManager()
through queue
-
getMaximumRowCount
public int getMaximumRowCount()
MapsJComboBox.getMaximumRowCount()
through queue
-
getModel
public ComboBoxModel getModel()
MapsJComboBox.getModel()
through queue
-
getRenderer
public ListCellRenderer getRenderer()
MapsJComboBox.getRenderer()
through queue
-
getSelectedIndex
public int getSelectedIndex()
MapsJComboBox.getSelectedIndex()
through queue
-
getSelectedItem
public Object getSelectedItem()
MapsJComboBox.getSelectedItem()
through queue
-
getSelectedObjects
public Object[] getSelectedObjects()
MapsJComboBox.getSelectedObjects()
through queue
-
getUI
public ComboBoxUI getUI()
MapsJComboBox.getUI()
through queue
-
hidePopup
public void hidePopup()
MapsJComboBox.hidePopup()
through queue
-
insertItemAt
public void insertItemAt(Object object, int i)
MapsJComboBox.insertItemAt(Object, int)
through queue
-
intervalAdded
public void intervalAdded(ListDataEvent listDataEvent)
MapsJComboBox.intervalAdded(ListDataEvent)
through queue
-
intervalRemoved
public void intervalRemoved(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(KeyEvent keyEvent)
MapsJComboBox.processKeyEvent(KeyEvent)
through queue
-
removeActionListener
public void removeActionListener(ActionListener actionListener)
MapsJComboBox.removeActionListener(ActionListener)
through queue
-
removeAllItems
public void removeAllItems()
MapsJComboBox.removeAllItems()
through queue
-
removeItem
public void removeItem(Object object)
MapsJComboBox.removeItem(Object)
through queue
-
removeItemAt
public void removeItemAt(int i)
MapsJComboBox.removeItemAt(int)
through queue
-
removeItemListener
public void removeItemListener(ItemListener itemListener)
MapsJComboBox.removeItemListener(ItemListener)
through queue
-
selectWithKeyChar
public boolean selectWithKeyChar(char c)
MapsJComboBox.selectWithKeyChar(char)
through queue
-
setActionCommand
public void setActionCommand(String string)
MapsJComboBox.setActionCommand(String)
through queue
-
setEditable
public void setEditable(boolean b)
MapsJComboBox.setEditable(boolean)
through queue
-
setEditor
public void setEditor(ComboBoxEditor comboBoxEditor)
MapsJComboBox.setEditor(ComboBoxEditor)
through queue
-
setKeySelectionManager
public void setKeySelectionManager(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(ComboBoxModel comboBoxModel)
MapsJComboBox.setModel(ComboBoxModel)
through queue
-
setPopupVisible
public void setPopupVisible(boolean b)
MapsJComboBox.setPopupVisible(boolean)
through queue
-
setRenderer
public void setRenderer(ListCellRenderer listCellRenderer)
MapsJComboBox.setRenderer(ListCellRenderer)
through queue
-
setSelectedIndex
public void setSelectedIndex(int i)
MapsJComboBox.setSelectedIndex(int)
through queue
-
setSelectedItem
public void setSelectedItem(Object object)
MapsJComboBox.setSelectedItem(Object)
through queue
-
setUI
public void setUI(ComboBoxUI comboBoxUI)
MapsJComboBox.setUI(ComboBoxUI)
through queue
-
showPopup
public void showPopup()
MapsJComboBox.showPopup()
through queue
-
-