Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.netbeans.jemmy.operators
Class ListOperator

    java.lang.Object
      |
      +--org.netbeans.jemmy.operators.Operator
            |
            +--org.netbeans.jemmy.operators.ComponentOperator
                  |
                  +--org.netbeans.jemmy.operators.ListOperator

All Implemented Interfaces:
  Outputable, Timeoutable

public class ListOperator
extends ComponentOperator
implements Outputable

Timeouts used:
ComponentOperator.WaitComponentTimeout - time to wait component displayed
ComponentOperator.WaitComponentEnabledTimeout - time to wait component enabled
.

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

Inner Class Summary
`static class` | `ListOperator.ListByItemFinder` Allows to find component by item text.
`static class` | `ListOperator.ListFinder` Checks component type.

Inner classes inherited from class org.netbeans.jemmy.operators.Operator
`Operator.ComponentVisualizer, Operator.DefaultPathParser, Operator.DefaultStringComparator, Operator.Finder, Operator.MapAction, Operator.MapBooleanAction, Operator.MapByteAction, Operator.MapCharacterAction, Operator.MapDoubleAction, Operator.MapFloatAction, Operator.MapIntegerAction, Operator.MapLongAction, Operator.MapVoidAction, Operator.NoBlockingAction, Operator.PathParser, Operator.StringComparator`

Field Summary
`static java.lang.String` | `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.ComponentOperator
`HEIGHT_DPROP, IS_SHOWING_DPROP, IS_VISIBLE_DPROP, WIDTH_DPROP, X_DPROP, Y_DPROP`

Fields inherited from class org.netbeans.jemmy.operators.Operator
`CLASS_DPROP, TO_STRING_DPROP`

Constructor Summary
`ListOperator(ContainerOperator cont)` Constructor.
`ListOperator(ContainerOperator cont, ComponentChooser chooser)` Constructs a ListOperator object.
`ListOperator(ContainerOperator cont, ComponentChooser chooser, int index)` Constructs a ListOperator object.
`ListOperator(ContainerOperator cont, int index)` Constructor.
`ListOperator(ContainerOperator cont, java.lang.String text)` Constructor.
`ListOperator(ContainerOperator cont, java.lang.String text, int index)` Constructor.
`ListOperator(ContainerOperator cont, java.lang.String text, int itemIndex, int index)` Constructor.
`ListOperator(java.awt.List b)` Constructor.

Method Summary
`void` | `addActionListener(java.awt.event.ActionListener actionListener)` Maps `List.addActionListener(ActionListener)` through queue
`void` | `addItemListener(java.awt.event.ItemListener itemListener)` Maps `List.addItemListener(ItemListener)` through queue
`void` | `copyEnvironment(Operator anotherOperator)` Copies all environment (output, timeouts, visualizer) from another operator.
`void` | `deselect(int i)` Maps `List.deselect(int)` through queue
`int` | `findItemIndex(java.lang.String item)` Searches an item index.
`int` | `findItemIndex(java.lang.String item, int index)` Searches an item index.
`static java.awt.List` | `findList(java.awt.Container cont, ComponentChooser chooser)` Searches 0'th List in container.
`static java.awt.List` | `findList(java.awt.Container cont, ComponentChooser chooser, int index)` Searches List in container.
`java.util.Hashtable` | `getDump()` Returns information about component.
`java.lang.String` | `getItem(int i)` Maps `List.getItem(int)` through queue
`int` | `getItemCount()` Maps `List.getItemCount()` through queue
`java.lang.String[]` | `getItems()` Maps `List.getItems()` through queue
`java.awt.Dimension` | `getMinimumSize(int i)` Maps `List.getMinimumSize(int)` through queue
`TestOut` | `getOutput()` Returns print output streams or writers.
`java.awt.Dimension` | `getPreferredSize(int i)` Maps `List.getPreferredSize(int)` through queue
`int` | `getRows()` Maps `List.getRows()` through queue
`int` | `getSelectedIndex()` Maps `List.getSelectedIndex()` through queue
`int[]` | `getSelectedIndexes()` Maps `List.getSelectedIndexes()` through queue
`java.lang.String` | `getSelectedItem()` Maps `List.getSelectedItem()` through queue
`java.lang.String[]` | `getSelectedItems()` Maps `List.getSelectedItems()` through queue
`java.lang.Object[]` | `getSelectedObjects()` Maps `List.getSelectedObjects()` through queue
`int` | `getVisibleIndex()` Maps `List.getVisibleIndex()` through queue
`boolean` | `isIndexSelected(int i)` Maps `List.isIndexSelected(int)` through queue
`boolean` | `isMultipleMode()` Maps `List.isMultipleMode()` through queue
`void` | `makeVisible(int i)` Maps `List.makeVisible(int)` through queue
`void` | `remove(int i)` Maps `List.remove(int)` through queue
`void` | `remove(java.lang.String string)` Maps `List.remove(String)` through queue
`void` | `removeActionListener(java.awt.event.ActionListener actionListener)` Maps `List.removeActionListener(ActionListener)` through queue
`void` | `removeAll()` Maps `List.removeAll()` through queue
`void` | `removeItemListener(java.awt.event.ItemListener itemListener)` Maps `List.removeItemListener(ItemListener)` through queue
`void` | `replaceItem(java.lang.String string, int i)` Maps `List.replaceItem(String, int)` through queue
`void` | `select(int i)` Maps `List.select(int)` through queue
`void` | `selectItem(int index)` Selects an item.
`void` | `selectItem(java.lang.String item)` Selects an item.
`void` | `selectItem(java.lang.String item, int index)` Selects an item.
`void` | `selectItems(int from, int to)` Selects some items.
`void` | `setMultipleMode(boolean b)` Maps `List.setMultipleMode(boolean)` through queue
`void` | `setOutput(TestOut output)` Defines print output streams or writers.
`void` | `waitItemSelection(int itemIndex, boolean selected)` Waits for item to be selected.
`void` | `waitItemsSelection(int from, int to, boolean selected)` Waits for items to be selected.

Methods inherited from class org.netbeans.jemmy.operators.ComponentOperator
`activateWindow, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, checkImage, checkImage, clickForPopup, clickForPopup, clickForPopup, clickForPopup, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, contains, contains, createImage, createImage, dispatchEvent, doLayout, dragMouse, dragMouse, dragMouse, dragNDrop, dragNDrop, dragNDrop, enableInputMethods, enterMouse, exitMouse, findComponent, findComponent, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getCenterX, getCenterXForClick, getCenterY, getCenterYForClick, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getContainer, getContainers, getCursor, getDropTarget, getEventDispatcher, getFocus, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getSize, getSource, getTimeouts, 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, setTimeouts, setVisible, transferFocus, typeKey, typeKey, typeKey, update, validate, waitComponent, waitComponent, waitComponent, waitComponent, waitComponentEnabled, waitComponentShowing, waitComponentVisible, waitHasFocus`

Methods inherited from class org.netbeans.jemmy.operators.Operator
`addOperatorPackage, addToDump, addToDump, createOperator, getCharBindingMap, getCharKey, getCharModifiers, getCharsKeys, getCharsKeys, getCharsModifiers, getCharsModifiers, getComparator, getDefaultComponentVisualizer, getDefaultMouseButton, getDefaultPathParser, getDefaultStringComparator, getDefaultVerification, getEnvironmentOperator, getParentPath, getPathParser, getPopupMouseButton, getProperties, getQueueTool, getVerification, getVisualizer, isCaptionEqual, isCaptionEqual, isCaptionEqual, lockQueue, parseString, parseString, printDump, produceNoBlocking, produceNoBlocking, produceTimeRestricted, produceTimeRestricted, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, setCharBindingMap, setComparator, setDefaultComponentVisualizer, setDefaultPathParser, setDefaultStringComparator, setDefaultVerification, setPathParser, setProperties, setVerification, setVisualizer, unlockAndThrow, unlockQueue, waitState`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ITEM_PREFIX_DPROP

    public static final java.lang.String ITEM_PREFIX_DPROP

  Identifier for a "item" properties.
  See Also:
    `getDump()`

### SELECTED_ITEM_PREFIX_DPROP

    public static final java.lang.String SELECTED_ITEM_PREFIX_DPROP

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

Constructor Detail

### ListOperator

    public ListOperator(java.awt.List b)

  Constructor.
  Parameters:
    `b` - a component

### ListOperator

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

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

### ListOperator

    public ListOperator(ContainerOperator cont,
                        ComponentChooser chooser)

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

### ListOperator

    public ListOperator(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 container
    `text` - Text of item which is currently selected.
    `itemIndex` - Item index.
    `index` - Ordinal component index.
  Throws:
    `TimeoutExpiredException` -

### ListOperator

    public ListOperator(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 container
    `text` - Text of item which is currently selected.
    `index` - Ordinal component index.
  Throws:
    `TimeoutExpiredException` -
  See Also:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### ListOperator

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

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

### ListOperator

    public ListOperator(ContainerOperator cont,
                        int index)

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

### ListOperator

    public ListOperator(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

### findList

    public static java.awt.List findList(java.awt.Container cont,
                                         ComponentChooser chooser,
                                         int index)

  Searches List in container.
  Parameters:
    `cont` - Container to search component in.
    `chooser` - org.netbeans.jemmy.ComponentChooser implementation.
    `index` - Ordinal component index.
  Returns:
    List instance or null if component was not found.

### findList

    public static java.awt.List findList(java.awt.Container cont,
                                         ComponentChooser chooser)

  Searches 0'th List in container.
  Parameters:
    `cont` - Container to search component in.
    `chooser` - org.netbeans.jemmy.ComponentChooser implementation.
  Returns:
    List instance or null if component was not found.

### setOutput

    public void setOutput(TestOut output)

  Description copied from interface: `Outputable`
  Defines print output streams or writers.
  Specified by:
    `setOutput` in interface `Outputable`
  Overrides:
    `setOutput` in class `ComponentOperator`
  Following copied from interface: `org.netbeans.jemmy.Outputable`
  Parameters:
    `out` - Identify the streams or writers used for print output.
  See Also:
    `Outputable.getOutput()`

### getOutput

    public TestOut getOutput()

  Description copied from interface: `Outputable`
  Returns print output streams or writers.
  Specified by:
    `getOutput` in interface `Outputable`
  Overrides:
    `getOutput` in class `ComponentOperator`
  Following copied from interface: `org.netbeans.jemmy.Outputable`
  Returns:
    an object that contains references to objects for printing to output and err streams.
  See Also:
    `Outputable.setOutput(org.netbeans.jemmy.TestOut)`

### copyEnvironment

    public void copyEnvironment(Operator anotherOperator)

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

### findItemIndex

    public int findItemIndex(java.lang.String item,
                             int index)

  Searches an item index.
  Parameters:
    `item` - item text.
    `index` - an ordinal index between appropriate ones.
  Returns:
    an index.

### findItemIndex

    public int findItemIndex(java.lang.String item)

  Searches an item index.
  Parameters:
    `item` - item text.
  Returns:
    an index.

### selectItem

    public void selectItem(java.lang.String item,
                           int index)

  Selects an item.
  Parameters:
    `item` - item text.
    `index` - an ordinal index between appropriate ones.

### selectItem

    public void selectItem(java.lang.String item)

  Selects an item.
  Parameters:
    `item` - item text.

### selectItem

    public void selectItem(int index)

  Selects an item.
  Parameters:
    `index` - an item index.

### selectItems

    public void selectItems(int from,
                            int to)

  Selects some items.
  Parameters:
    `from` - start selection index.
    `to` - end selection index.

### waitItemsSelection

    public void waitItemsSelection(int from,
                                   int to,
                                   boolean selected)

  Waits for items to be selected.
  Parameters:
    `from` - Start selection inex
    `to` - End selection inex
    `selected` - Selected (true) or unselected (false).

### waitItemSelection

    public void waitItemSelection(int itemIndex,
                                  boolean selected)

  Waits for item to be selected.
  Parameters:
    `itemIndex` - an item index to be selected.
    `selected` - Selected (true) or unselected (false).

### getDump

    public java.util.Hashtable getDump()

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

### addActionListener

    public void addActionListener(java.awt.event.ActionListener actionListener)

  Maps `List.addActionListener(ActionListener)` through queue

### addItemListener

    public void addItemListener(java.awt.event.ItemListener itemListener)

  Maps `List.addItemListener(ItemListener)` through queue

### deselect

    public void deselect(int i)

  Maps `List.deselect(int)` through queue

### getItem

    public java.lang.String getItem(int i)

  Maps `List.getItem(int)` through queue

### getItemCount

    public int getItemCount()

  Maps `List.getItemCount()` through queue

### getItems

    public java.lang.String[] getItems()

  Maps `List.getItems()` through queue

### getMinimumSize

    public java.awt.Dimension getMinimumSize(int i)

  Maps `List.getMinimumSize(int)` through queue

### getPreferredSize

    public java.awt.Dimension getPreferredSize(int i)

  Maps `List.getPreferredSize(int)` through queue

### getRows

    public int getRows()

  Maps `List.getRows()` through queue

### getSelectedIndex

    public int getSelectedIndex()

  Maps `List.getSelectedIndex()` through queue

### getSelectedIndexes

    public int[] getSelectedIndexes()

  Maps `List.getSelectedIndexes()` through queue

### getSelectedItem

    public java.lang.String getSelectedItem()

  Maps `List.getSelectedItem()` through queue

### getSelectedItems

    public java.lang.String[] getSelectedItems()

  Maps `List.getSelectedItems()` through queue

### getSelectedObjects

    public java.lang.Object[] getSelectedObjects()

  Maps `List.getSelectedObjects()` through queue

### getVisibleIndex

    public int getVisibleIndex()

  Maps `List.getVisibleIndex()` through queue

### isIndexSelected

    public boolean isIndexSelected(int i)

  Maps `List.isIndexSelected(int)` through queue

### isMultipleMode

    public boolean isMultipleMode()

  Maps `List.isMultipleMode()` through queue

### makeVisible

    public void makeVisible(int i)

  Maps `List.makeVisible(int)` through queue

### remove

    public void remove(int i)

  Maps `List.remove(int)` through queue

### remove

    public void remove(java.lang.String string)

  Maps `List.remove(String)` through queue

### removeActionListener

    public void removeActionListener(java.awt.event.ActionListener actionListener)

  Maps `List.removeActionListener(ActionListener)` through queue

### removeAll

    public void removeAll()

  Maps `List.removeAll()` through queue

### removeItemListener

    public void removeItemListener(java.awt.event.ItemListener itemListener)

  Maps `List.removeItemListener(ItemListener)` through queue

### replaceItem

    public void replaceItem(java.lang.String string,
                            int i)

  Maps `List.replaceItem(String, int)` through queue

### select

    public void select(int i)

  Maps `List.select(int)` through queue

### setMultipleMode

    public void setMultipleMode(boolean b)

  Maps `List.setMultipleMode(boolean)` through queue

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD