Package org.netbeans.jemmy.operators
Class JListOperator
- 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.JListOperator
-
- All Implemented Interfaces:
Outputable
,Timeoutable
public class JListOperator extends JComponentOperator implements Outputable
Timeouts used:
ComponentOperator.WaitComponentTimeout - time to wait component displayed
ComponentOperator.WaitStateTimeout - time to wait for item, and for item to be selected
JScrollBarOperator.OneScrollClickTimeout - time for one scroll click
JScrollBarOperator.WholeScrollTimeout - time for the whole scrolling
.- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
Timeouts
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JListOperator.JListByItemFinder
Allows to find component by an item.static class
JListOperator.JListFinder
Checks component type.static interface
JListOperator.ListItemChooser
Iterface to choose list item.class
JListOperator.NoSuchItemException
Can be throught during item selecting if list does not have item requested.-
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.String
ITEM_PREFIX_DPROP
Identifier for a "item" properties.static java.lang.String
SELECTED_ITEM_PREFIX_DPROP
Identifier for a "selected item" 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 JListOperator(javax.swing.JList b)
Constructor.JListOperator(ContainerOperator cont)
Constructor.JListOperator(ContainerOperator cont, int index)
Constructor.JListOperator(ContainerOperator cont, java.lang.String text)
Constructor.JListOperator(ContainerOperator cont, java.lang.String text, int index)
Constructor.JListOperator(ContainerOperator cont, java.lang.String text, int itemIndex, int index)
Constructor.JListOperator(ContainerOperator cont, ComponentChooser chooser)
Constructs a JListOperator object.JListOperator(ContainerOperator cont, ComponentChooser chooser, int index)
Constructs a JListOperator object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addListSelectionListener(javax.swing.event.ListSelectionListener listSelectionListener)
MapsJList.addListSelectionListener(ListSelectionListener)
through queuevoid
addSelectionInterval(int i, int i1)
MapsJList.addSelectionInterval(int, int)
through queuevoid
clearSelection()
MapsJList.clearSelection()
through queuejava.lang.Object
clickOnItem(int itemIndex, int clickCount)
Clicks on item by item index.java.lang.Object
clickOnItem(java.lang.String item)
Finds item by item text, and do simple mouse click on it.java.lang.Object
clickOnItem(java.lang.String item, boolean ce, boolean cc)
Deprecated.Use clickOnItem(String) or clickOnItem(String, StringComparator)java.lang.Object
clickOnItem(java.lang.String item, boolean ce, boolean cc, int clickCount)
Deprecated.Use clickOnItem(String, int) or clickOnItem(String, StringComparator, int)java.lang.Object
clickOnItem(java.lang.String item, int clickCount)
Finds item by item text, and do mouse click on it.java.lang.Object
clickOnItem(java.lang.String item, Operator.StringComparator comparator)
Finds item by item text, and do simple mouse click on it.java.lang.Object
clickOnItem(java.lang.String item, Operator.StringComparator comparator, int clickCount)
Finds item by item text, and do mouse click on it.void
copyEnvironment(Operator anotherOperator)
Copies all environment (output, timeouts, visualizer) from another operator.void
ensureIndexIsVisible(int i)
MapsJList.ensureIndexIsVisible(int)
through queueint
findItemIndex(java.lang.String item)
Searched for first item by text.int
findItemIndex(java.lang.String item, boolean ce, boolean cc)
Deprecated.Use findItemIndex(String) or findItemIndex(String, StringComparator)int
findItemIndex(java.lang.String item, boolean ce, boolean cc, int index)
Deprecated.Use findItemIndex(String, int) or findItemIndex(String, StringComparator, int)int
findItemIndex(java.lang.String item, int index)
Searched for index'th item by text.int
findItemIndex(java.lang.String item, Operator.StringComparator comparator)
Searches for an item good from chooser's point of view.int
findItemIndex(java.lang.String item, Operator.StringComparator comparator, int index)
Searches for an item good from chooser's point of view.int
findItemIndex(ComponentChooser chooser)
Searches for an item by rendered component.int
findItemIndex(ComponentChooser chooser, int index)
Searches for index'th item by rendered component.int
findItemIndex(JListOperator.ListItemChooser chooser)
Searches for an item good from chooser's point of view.int
findItemIndex(JListOperator.ListItemChooser chooser, int index)
Searches for index'th item good from chooser's point of view.static javax.swing.JList
findJList(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int itemIndex)
Searches JList by item.static javax.swing.JList
findJList(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int itemIndex, int index)
Searches JList by item.static javax.swing.JList
findJList(java.awt.Container cont, ComponentChooser chooser)
Searches 0'th JList in container.static javax.swing.JList
findJList(java.awt.Container cont, ComponentChooser chooser, int index)
Searches JList in container.int
getAnchorSelectionIndex()
MapsJList.getAnchorSelectionIndex()
through queuejava.awt.Rectangle
getCellBounds(int i, int i1)
MapsJList.getCellBounds(int, int)
through queuejavax.swing.ListCellRenderer
getCellRenderer()
MapsJList.getCellRenderer()
through queuejava.awt.Point
getClickPoint(int itemIndex)
Gets point to click on itemIndex'th item.java.util.Hashtable
getDump()
Returns information about component.int
getFirstVisibleIndex()
MapsJList.getFirstVisibleIndex()
through queueint
getFixedCellHeight()
MapsJList.getFixedCellHeight()
through queueint
getFixedCellWidth()
MapsJList.getFixedCellWidth()
through queueint
getLastVisibleIndex()
MapsJList.getLastVisibleIndex()
through queueint
getLeadSelectionIndex()
MapsJList.getLeadSelectionIndex()
through queueint
getMaxSelectionIndex()
MapsJList.getMaxSelectionIndex()
through queueint
getMinSelectionIndex()
MapsJList.getMinSelectionIndex()
through queuejavax.swing.ListModel
getModel()
MapsJList.getModel()
through queueTestOut
getOutput()
Returns print output streams or writers.java.awt.Dimension
getPreferredScrollableViewportSize()
MapsJList.getPreferredScrollableViewportSize()
through queuejava.lang.Object
getPrototypeCellValue()
MapsJList.getPrototypeCellValue()
through queuejava.awt.Component
getRenderedComponent(int itemIndex)
Ask renderer for component to be displayed.java.awt.Component
getRenderedComponent(int itemIndex, boolean isSelected, boolean cellHasFocus)
Ask renderer for component to be displayed.int
getScrollableBlockIncrement(java.awt.Rectangle rectangle, int i, int i1)
MapsJList.getScrollableBlockIncrement(Rectangle, int, int)
through queueboolean
getScrollableTracksViewportHeight()
MapsJList.getScrollableTracksViewportHeight()
through queueboolean
getScrollableTracksViewportWidth()
MapsJList.getScrollableTracksViewportWidth()
through queueint
getScrollableUnitIncrement(java.awt.Rectangle rectangle, int i, int i1)
MapsJList.getScrollableUnitIncrement(Rectangle, int, int)
through queueint
getSelectedIndex()
MapsJList.getSelectedIndex()
through queueint[]
getSelectedIndices()
MapsJList.getSelectedIndices()
through queuejava.lang.Object
getSelectedValue()
MapsJList.getSelectedValue()
through queuejava.lang.Object[]
getSelectedValues()
MapsJList.getSelectedValues()
through queuejava.awt.Color
getSelectionBackground()
MapsJList.getSelectionBackground()
through queuejava.awt.Color
getSelectionForeground()
MapsJList.getSelectionForeground()
through queueint
getSelectionMode()
MapsJList.getSelectionMode()
through queuejavax.swing.ListSelectionModel
getSelectionModel()
MapsJList.getSelectionModel()
through queuejavax.swing.plaf.ListUI
getUI()
MapsJList.getUI()
through queueboolean
getValueIsAdjusting()
MapsJList.getValueIsAdjusting()
through queueint
getVisibleRowCount()
MapsJList.getVisibleRowCount()
through queuejava.awt.Point
indexToLocation(int i)
MapsJList.indexToLocation(int)
through queueboolean
isSelectedIndex(int i)
MapsJList.isSelectedIndex(int)
through queueboolean
isSelectionEmpty()
MapsJList.isSelectionEmpty()
through queueint
locationToIndex(java.awt.Point point)
MapsJList.locationToIndex(Point)
through queuevoid
removeListSelectionListener(javax.swing.event.ListSelectionListener listSelectionListener)
MapsJList.removeListSelectionListener(ListSelectionListener)
through queuevoid
removeSelectionInterval(int i, int i1)
MapsJList.removeSelectionInterval(int, int)
through queuevoid
scrollToItem(int itemIndex)
Scrolls to an item if the list is on a JScrollPane component.void
scrollToItem(java.lang.String item, boolean ce, boolean cc)
Deprecated.Use scrollToItem(String) or scrollToItem(String, StringComparator)void
scrollToItem(java.lang.String item, Operator.StringComparator comparator)
Scrolls to an item if the list is on a JScrollPane component.void
selectItem(int index)
Selects an item by index.void
selectItem(java.lang.String item)
Selects an item by text.void
selectItem(java.lang.String[] items)
Selects items by texts.void
selectItems(int[] indices)
Selects items by indices.void
setCellRenderer(javax.swing.ListCellRenderer listCellRenderer)
MapsJList.setCellRenderer(ListCellRenderer)
through queuevoid
setFixedCellHeight(int i)
MapsJList.setFixedCellHeight(int)
through queuevoid
setFixedCellWidth(int i)
MapsJList.setFixedCellWidth(int)
through queuevoid
setListData(java.lang.Object[] object)
MapsJList.setListData(Object[])
through queuevoid
setListData(java.util.Vector vector)
MapsJList.setListData(Vector)
through queuevoid
setModel(javax.swing.ListModel listModel)
MapsJList.setModel(ListModel)
through queuevoid
setOutput(TestOut output)
Defines print output streams or writers.void
setPrototypeCellValue(java.lang.Object object)
MapsJList.setPrototypeCellValue(Object)
through queuevoid
setSelectedIndex(int i)
MapsJList.setSelectedIndex(int)
through queuevoid
setSelectedIndices(int[] i)
MapsJList.setSelectedIndices(int[])
through queuevoid
setSelectedValue(java.lang.Object object, boolean b)
MapsJList.setSelectedValue(Object, boolean)
through queuevoid
setSelectionBackground(java.awt.Color color)
MapsJList.setSelectionBackground(Color)
through queuevoid
setSelectionForeground(java.awt.Color color)
MapsJList.setSelectionForeground(Color)
through queuevoid
setSelectionInterval(int i, int i1)
MapsJList.setSelectionInterval(int, int)
through queuevoid
setSelectionMode(int i)
MapsJList.setSelectionMode(int)
through queuevoid
setSelectionModel(javax.swing.ListSelectionModel listSelectionModel)
MapsJList.setSelectionModel(ListSelectionModel)
through queuevoid
setUI(javax.swing.plaf.ListUI listUI)
MapsJList.setUI(ListUI)
through queuevoid
setValueIsAdjusting(boolean b)
MapsJList.setValueIsAdjusting(boolean)
through queuevoid
setVisibleRowCount(int i)
MapsJList.setVisibleRowCount(int)
through queuevoid
waitItem(java.lang.String item, int itemIndex)
Waits for item.void
waitItemSelection(int itemIndex, boolean selected)
Waits for item to be selected.void
waitItemsSelection(int[] itemIndices, boolean selected)
Waits for items to be selected.static javax.swing.JList
waitJList(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int itemIndex)
Waits JList by item.static javax.swing.JList
waitJList(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int itemIndex, int index)
Waits JList by item.static javax.swing.JList
waitJList(java.awt.Container cont, ComponentChooser chooser)
Waits 0'th JList in container.static javax.swing.JList
waitJList(java.awt.Container cont, ComponentChooser chooser, int index)
Waits JList in container.-
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, getTimeouts, 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, setTimeouts, 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
-
ITEM_PREFIX_DPROP
public static final java.lang.String ITEM_PREFIX_DPROP
Identifier for a "item" properties.- See Also:
getDump()
, Constant Field Values
-
SELECTED_ITEM_PREFIX_DPROP
public static final java.lang.String SELECTED_ITEM_PREFIX_DPROP
Identifier for a "selected item" property.- See Also:
getDump()
, Constant Field Values
-
-
Constructor Detail
-
JListOperator
public JListOperator(javax.swing.JList b)
Constructor.- Parameters:
b
- a component
-
JListOperator
public JListOperator(ContainerOperator cont, ComponentChooser chooser, int index)
Constructs a JListOperator object.- Parameters:
cont
- a containerchooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.
-
JListOperator
public JListOperator(ContainerOperator cont, ComponentChooser chooser)
Constructs a JListOperator object.- Parameters:
cont
- a containerchooser
- a component chooser specifying searching criteria.
-
JListOperator
public JListOperator(ContainerOperator cont, java.lang.String text, int itemIndex, int index)
Constructor. Waits item text first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont
- a containertext
- Text of item which is currently selected.itemIndex
- Item index.index
- Ordinal component index.
-
JListOperator
public JListOperator(ContainerOperator cont, java.lang.String text, int index)
Constructor. Waits component by selected item text 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.- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
JListOperator
public JListOperator(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.- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
JListOperator
public JListOperator(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.
-
JListOperator
public JListOperator(ContainerOperator cont)
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont
- a container
-
-
Method Detail
-
findJList
public static javax.swing.JList findJList(java.awt.Container cont, ComponentChooser chooser, int index)
Searches JList in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.index
- Ordinal component index.- Returns:
- JList instance or null if component was not found.
-
findJList
public static javax.swing.JList findJList(java.awt.Container cont, ComponentChooser chooser)
Searches 0'th JList in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- JList instance or null if component was not found.
-
findJList
public static javax.swing.JList findJList(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int itemIndex, int index)
Searches JList 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:
- JList instance or null if component was not found.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
findJList
public static javax.swing.JList findJList(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int itemIndex)
Searches JList 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:
- JList instance or null if component was not found.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
waitJList
public static javax.swing.JList waitJList(java.awt.Container cont, ComponentChooser chooser, int index)
Waits JList in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.index
- Ordinal component index.- Returns:
- JList instance or null if component was not found.
-
waitJList
public static javax.swing.JList waitJList(java.awt.Container cont, ComponentChooser chooser)
Waits 0'th JList in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- JList instance or null if component was not found.
-
waitJList
public static javax.swing.JList waitJList(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int itemIndex, int index)
Waits JList 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:
- JList instance or null if component was not found.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
waitJList
public static javax.swing.JList waitJList(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int itemIndex)
Waits JList 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:
- JList instance or null if component was not found.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
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.
-
getClickPoint
public java.awt.Point getClickPoint(int itemIndex)
Gets point to click on itemIndex'th item.- Parameters:
itemIndex
- an index of an item to click.- Returns:
- a Point in component's coordinate system.
-
getRenderedComponent
public java.awt.Component getRenderedComponent(int itemIndex, boolean isSelected, boolean cellHasFocus)
Ask renderer for component to be displayed.- Parameters:
itemIndex
- Item index.isSelected
- True if the specified cell was selected.cellHasFocus
- True if the specified cell has the focus.- Returns:
- Component to be displayed.
-
getRenderedComponent
public java.awt.Component getRenderedComponent(int itemIndex)
Ask renderer for component to be displayed. Uses isSelectedIndex(itemIndex) to determine whether item is selected. Supposes item do not have focus.- Parameters:
itemIndex
- Item index.- Returns:
- Component to be displayed.
-
findItemIndex
public int findItemIndex(JListOperator.ListItemChooser chooser, int index)
Searches for index'th item good from chooser's point of view.- Parameters:
chooser
- Item verifying object.index
- Ordinal item index.- Returns:
- Item index or -1 if search was insuccessful.
-
findItemIndex
public int findItemIndex(JListOperator.ListItemChooser chooser)
Searches for an item good from chooser's point of view.- Parameters:
chooser
- Item verifying object.- Returns:
- Item index or -1 if serch was insuccessful.
- See Also:
findItemIndex(JListOperator.ListItemChooser, int)
,findItemIndex(String, boolean, boolean)
-
findItemIndex
public int findItemIndex(java.lang.String item, Operator.StringComparator comparator, int index)
Searches for an item good from chooser's point of view.- Parameters:
item
- a text patterncomparator
- a string comparision algorithmindex
- Ordinal item index.- Returns:
- Item index or -1 if serch was insuccessful.
- See Also:
findItemIndex(JListOperator.ListItemChooser, int)
,findItemIndex(String, boolean, boolean)
-
findItemIndex
public int findItemIndex(java.lang.String item, boolean ce, boolean cc, int index)
Deprecated.Use findItemIndex(String, int) or findItemIndex(String, StringComparator, int)Searched for index'th item by text.- Parameters:
item
- a text patternce
- Compare text exactly.cc
- Compare text case sensitively.index
- Ordinal item index.- Returns:
- Item index or -1 if serch was insuccessful.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
findItemIndex
public int findItemIndex(java.lang.String item, int index)
Searched for index'th item by text. Uses StringComparator assigned to this object.- Parameters:
item
- a text patternindex
- Ordinal item index.- Returns:
- Item index or -1 if search was insuccessful.
-
findItemIndex
public int findItemIndex(java.lang.String item, Operator.StringComparator comparator)
Searches for an item good from chooser's point of view.- Parameters:
item
- a text patterncomparator
- a string comparision algorithm- Returns:
- Item index or -1 if serch was insuccessful.
- See Also:
findItemIndex(JListOperator.ListItemChooser, int)
,findItemIndex(String, boolean, boolean)
-
findItemIndex
public int findItemIndex(java.lang.String item, boolean ce, boolean cc)
Deprecated.Use findItemIndex(String) or findItemIndex(String, StringComparator)Searched item by text.- Parameters:
item
- a text patternce
- Compare text exactly.cc
- Compare text case sensitively.- Returns:
- Item index or -1 if search was insuccessful.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
findItemIndex
public int findItemIndex(java.lang.String item)
Searched for first item by text. Uses StringComparator assigned to this object.- Parameters:
item
- a text pattern- Returns:
- Item index or -1 if search was insuccessful.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
findItemIndex
public int findItemIndex(ComponentChooser chooser, int index)
Searches for index'th item by rendered component.- Parameters:
chooser
- Component verifying object.index
- Ordinal item index.- Returns:
- Item index or -1 if serch was insuccessful.
- See Also:
getRenderedComponent(int, boolean, boolean)
-
findItemIndex
public int findItemIndex(ComponentChooser chooser)
Searches for an item by rendered component.- Parameters:
chooser
- Component verifying object.- Returns:
- Item index or -1 if serch was insuccessful.
- See Also:
getRenderedComponent(int, boolean, boolean)
-
clickOnItem
public java.lang.Object clickOnItem(int itemIndex, int clickCount)
Clicks on item by item index.- Parameters:
itemIndex
- Item index.clickCount
- count click.- Returns:
- Click point or null if list does not contains itemIndex'th item.
- Throws:
JListOperator.NoSuchItemException
-
clickOnItem
public java.lang.Object clickOnItem(java.lang.String item, Operator.StringComparator comparator, int clickCount)
Finds item by item text, and do mouse click on it.- Parameters:
item
- Item text.comparator
- a string comparision algorithmclickCount
- count click.- Returns:
- Click point or null if list does not contains itemIndex'th item.
- Throws:
JListOperator.NoSuchItemException
-
clickOnItem
public java.lang.Object clickOnItem(java.lang.String item, boolean ce, boolean cc, int clickCount)
Deprecated.Use clickOnItem(String, int) or clickOnItem(String, StringComparator, int)Finds item by item text, and do mouse click on it.- Parameters:
item
- Item text.ce
- Compare exactly.cc
- Compare case sensitively.clickCount
- count click.- Returns:
- Click point or null if list does not contains itemIndex'th item.
- Throws:
JListOperator.NoSuchItemException
-
clickOnItem
public java.lang.Object clickOnItem(java.lang.String item, int clickCount)
Finds item by item text, and do mouse click on it. Uses StringComparator assigned to this object.- Parameters:
item
- Item text.clickCount
- count click.- Returns:
- Click point or null if list does not contains itemIndex'th item.
- Throws:
JListOperator.NoSuchItemException
-
clickOnItem
public java.lang.Object clickOnItem(java.lang.String item, Operator.StringComparator comparator)
Finds item by item text, and do simple mouse click on it. Uses StringComparator assigned to this object.- Parameters:
item
- Item text.comparator
- a string comparision algorithm- Returns:
- Click point or null if list does not contains itemIndex'th item.
- Throws:
JListOperator.NoSuchItemException
-
clickOnItem
public java.lang.Object clickOnItem(java.lang.String item, boolean ce, boolean cc)
Deprecated.Use clickOnItem(String) or clickOnItem(String, StringComparator)Finds item by item text, and do simple mouse click on it.- Parameters:
item
- Item text.ce
- Compare exactly.cc
- Compare case sensitively.- Returns:
- Click point or null if list does not contains itemIndex'th item.
- Throws:
JListOperator.NoSuchItemException
-
clickOnItem
public java.lang.Object clickOnItem(java.lang.String item)
Finds item by item text, and do simple mouse click on it. Uses StringComparator assigned to this object.- Parameters:
item
- Item text.- Returns:
- Click point or null if list does not contains itemIndex'th item.
- Throws:
JListOperator.NoSuchItemException
-
scrollToItem
public void scrollToItem(int itemIndex)
Scrolls to an item if the list is on a JScrollPane component.- Parameters:
itemIndex
- an item index.- Throws:
JListOperator.NoSuchItemException
- See Also:
scrollToItem(String, boolean, boolean)
-
scrollToItem
public void scrollToItem(java.lang.String item, Operator.StringComparator comparator)
Scrolls to an item if the list is on a JScrollPane component.- Parameters:
item
- Item textcomparator
- a string comparision algorithm- See Also:
scrollToItem(String, boolean, boolean)
-
scrollToItem
public void scrollToItem(java.lang.String item, boolean ce, boolean cc)
Deprecated.Use scrollToItem(String) or scrollToItem(String, StringComparator)Scrolls to an item if the list is on a JScrollPane component.- Parameters:
item
- Item textce
- Compare exactly.cc
- Compare case sensitively.- See Also:
scrollToItem(String, boolean, boolean)
-
selectItem
public void selectItem(int index)
Selects an item by index.- Parameters:
index
- an item index.
-
selectItem
public void selectItem(java.lang.String item)
Selects an item by text.- Parameters:
item
- an item text.
-
selectItems
public void selectItems(int[] indices)
Selects items by indices.- Parameters:
indices
- item indices.
-
selectItem
public void selectItem(java.lang.String[] items)
Selects items by texts.- Parameters:
items
- item texts.
-
waitItemsSelection
public void waitItemsSelection(int[] itemIndices, boolean selected)
Waits for items to be selected.- Parameters:
itemIndices
- item indices to be selectedselected
- Selected (true) or unselected (false).
-
waitItemSelection
public void waitItemSelection(int itemIndex, boolean selected)
Waits for item to be selected.- Parameters:
itemIndex
- an item needs to be selectedselected
- Selected (true) or unselected (false).
-
waitItem
public void waitItem(java.lang.String item, int itemIndex)
Waits for item. Uses getComparator() comparator.- Parameters:
item
- an item textitemIndex
- Index of item to check or -1 to check selected item.
-
getDump
public java.util.Hashtable getDump()
Returns information about component.- Overrides:
getDump
in classJComponentOperator
- Returns:
- a Hashtable containing name-value pairs.
-
addListSelectionListener
public void addListSelectionListener(javax.swing.event.ListSelectionListener listSelectionListener)
MapsJList.addListSelectionListener(ListSelectionListener)
through queue
-
addSelectionInterval
public void addSelectionInterval(int i, int i1)
MapsJList.addSelectionInterval(int, int)
through queue
-
clearSelection
public void clearSelection()
MapsJList.clearSelection()
through queue
-
ensureIndexIsVisible
public void ensureIndexIsVisible(int i)
MapsJList.ensureIndexIsVisible(int)
through queue
-
getAnchorSelectionIndex
public int getAnchorSelectionIndex()
MapsJList.getAnchorSelectionIndex()
through queue
-
getCellBounds
public java.awt.Rectangle getCellBounds(int i, int i1)
MapsJList.getCellBounds(int, int)
through queue
-
getCellRenderer
public javax.swing.ListCellRenderer getCellRenderer()
MapsJList.getCellRenderer()
through queue
-
getFirstVisibleIndex
public int getFirstVisibleIndex()
MapsJList.getFirstVisibleIndex()
through queue
-
getFixedCellHeight
public int getFixedCellHeight()
MapsJList.getFixedCellHeight()
through queue
-
getFixedCellWidth
public int getFixedCellWidth()
MapsJList.getFixedCellWidth()
through queue
-
getLastVisibleIndex
public int getLastVisibleIndex()
MapsJList.getLastVisibleIndex()
through queue
-
getLeadSelectionIndex
public int getLeadSelectionIndex()
MapsJList.getLeadSelectionIndex()
through queue
-
getMaxSelectionIndex
public int getMaxSelectionIndex()
MapsJList.getMaxSelectionIndex()
through queue
-
getMinSelectionIndex
public int getMinSelectionIndex()
MapsJList.getMinSelectionIndex()
through queue
-
getModel
public javax.swing.ListModel getModel()
MapsJList.getModel()
through queue
-
getPreferredScrollableViewportSize
public java.awt.Dimension getPreferredScrollableViewportSize()
MapsJList.getPreferredScrollableViewportSize()
through queue
-
getPrototypeCellValue
public java.lang.Object getPrototypeCellValue()
MapsJList.getPrototypeCellValue()
through queue
-
getScrollableBlockIncrement
public int getScrollableBlockIncrement(java.awt.Rectangle rectangle, int i, int i1)
MapsJList.getScrollableBlockIncrement(Rectangle, int, int)
through queue
-
getScrollableTracksViewportHeight
public boolean getScrollableTracksViewportHeight()
MapsJList.getScrollableTracksViewportHeight()
through queue
-
getScrollableTracksViewportWidth
public boolean getScrollableTracksViewportWidth()
MapsJList.getScrollableTracksViewportWidth()
through queue
-
getScrollableUnitIncrement
public int getScrollableUnitIncrement(java.awt.Rectangle rectangle, int i, int i1)
MapsJList.getScrollableUnitIncrement(Rectangle, int, int)
through queue
-
getSelectedIndex
public int getSelectedIndex()
MapsJList.getSelectedIndex()
through queue
-
getSelectedIndices
public int[] getSelectedIndices()
MapsJList.getSelectedIndices()
through queue
-
getSelectedValue
public java.lang.Object getSelectedValue()
MapsJList.getSelectedValue()
through queue
-
getSelectedValues
public java.lang.Object[] getSelectedValues()
MapsJList.getSelectedValues()
through queue
-
getSelectionBackground
public java.awt.Color getSelectionBackground()
MapsJList.getSelectionBackground()
through queue
-
getSelectionForeground
public java.awt.Color getSelectionForeground()
MapsJList.getSelectionForeground()
through queue
-
getSelectionMode
public int getSelectionMode()
MapsJList.getSelectionMode()
through queue
-
getSelectionModel
public javax.swing.ListSelectionModel getSelectionModel()
MapsJList.getSelectionModel()
through queue
-
getUI
public javax.swing.plaf.ListUI getUI()
MapsJList.getUI()
through queue
-
getValueIsAdjusting
public boolean getValueIsAdjusting()
MapsJList.getValueIsAdjusting()
through queue
-
getVisibleRowCount
public int getVisibleRowCount()
MapsJList.getVisibleRowCount()
through queue
-
indexToLocation
public java.awt.Point indexToLocation(int i)
MapsJList.indexToLocation(int)
through queue
-
isSelectedIndex
public boolean isSelectedIndex(int i)
MapsJList.isSelectedIndex(int)
through queue
-
isSelectionEmpty
public boolean isSelectionEmpty()
MapsJList.isSelectionEmpty()
through queue
-
locationToIndex
public int locationToIndex(java.awt.Point point)
MapsJList.locationToIndex(Point)
through queue
-
removeListSelectionListener
public void removeListSelectionListener(javax.swing.event.ListSelectionListener listSelectionListener)
MapsJList.removeListSelectionListener(ListSelectionListener)
through queue
-
removeSelectionInterval
public void removeSelectionInterval(int i, int i1)
MapsJList.removeSelectionInterval(int, int)
through queue
-
setCellRenderer
public void setCellRenderer(javax.swing.ListCellRenderer listCellRenderer)
MapsJList.setCellRenderer(ListCellRenderer)
through queue
-
setFixedCellHeight
public void setFixedCellHeight(int i)
MapsJList.setFixedCellHeight(int)
through queue
-
setFixedCellWidth
public void setFixedCellWidth(int i)
MapsJList.setFixedCellWidth(int)
through queue
-
setListData
public void setListData(java.util.Vector vector)
MapsJList.setListData(Vector)
through queue
-
setListData
public void setListData(java.lang.Object[] object)
MapsJList.setListData(Object[])
through queue
-
setModel
public void setModel(javax.swing.ListModel listModel)
MapsJList.setModel(ListModel)
through queue
-
setPrototypeCellValue
public void setPrototypeCellValue(java.lang.Object object)
MapsJList.setPrototypeCellValue(Object)
through queue
-
setSelectedIndex
public void setSelectedIndex(int i)
MapsJList.setSelectedIndex(int)
through queue
-
setSelectedIndices
public void setSelectedIndices(int[] i)
MapsJList.setSelectedIndices(int[])
through queue
-
setSelectedValue
public void setSelectedValue(java.lang.Object object, boolean b)
MapsJList.setSelectedValue(Object, boolean)
through queue
-
setSelectionBackground
public void setSelectionBackground(java.awt.Color color)
MapsJList.setSelectionBackground(Color)
through queue
-
setSelectionForeground
public void setSelectionForeground(java.awt.Color color)
MapsJList.setSelectionForeground(Color)
through queue
-
setSelectionInterval
public void setSelectionInterval(int i, int i1)
MapsJList.setSelectionInterval(int, int)
through queue
-
setSelectionMode
public void setSelectionMode(int i)
MapsJList.setSelectionMode(int)
through queue
-
setSelectionModel
public void setSelectionModel(javax.swing.ListSelectionModel listSelectionModel)
MapsJList.setSelectionModel(ListSelectionModel)
through queue
-
setUI
public void setUI(javax.swing.plaf.ListUI listUI)
MapsJList.setUI(ListUI)
through queue
-
setValueIsAdjusting
public void setValueIsAdjusting(boolean b)
MapsJList.setValueIsAdjusting(boolean)
through queue
-
setVisibleRowCount
public void setVisibleRowCount(int i)
MapsJList.setVisibleRowCount(int)
through queue
-
-