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
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAllows to find component by item text.static classChecks component type.Nested classes/interfaces inherited from class 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
FieldsModifier and TypeFieldDescriptionstatic final StringIdentifier for a "item" properties.static final StringIdentifier for a "selected item" property.Fields inherited from class ComponentOperator
HEIGHT_DPROP, IS_SHOWING_DPROP, IS_VISIBLE_DPROP, NAME_DPROP, WIDTH_DPROP, X_DPROP, Y_DPROPFields inherited from class Operator
CLASS_DPROP, TO_STRING_DPROP -
Constructor Summary
ConstructorsConstructorDescriptionListOperator(List b) Constructor.Constructor.ListOperator(ContainerOperator cont, int index) Constructor.ListOperator(ContainerOperator cont, String text) Constructor.ListOperator(ContainerOperator cont, String text, int index) Constructor.ListOperator(ContainerOperator cont, String text, int itemIndex, int index) Constructor.ListOperator(ContainerOperator cont, ComponentChooser chooser) Constructs a ListOperator object.ListOperator(ContainerOperator cont, ComponentChooser chooser, int index) Constructs a ListOperator object. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddActionListener(ActionListener actionListener) MapsList.addActionListener(ActionListener)through queuevoidaddItemListener(ItemListener itemListener) MapsList.addItemListener(ItemListener)through queuevoidcopyEnvironment(Operator anotherOperator) Copies all environment (output, timeouts, visualizer) from another operator.voiddeselect(int i) MapsList.deselect(int)through queueintfindItemIndex(String item) Searches an item index.intfindItemIndex(String item, int index) Searches an item index.static ListfindList(Container cont, ComponentChooser chooser) Searches 0'th List in container.static ListfindList(Container cont, ComponentChooser chooser, int index) Searches List in container.getDump()Returns information about component.getItem(int i) MapsList.getItem(int)through queueintMapsList.getItemCount()through queueString[]getItems()MapsList.getItems()through queuegetMinimumSize(int i) MapsList.getMinimumSize(int)through queueReturns print output streams or writers.getPreferredSize(int i) MapsList.getPreferredSize(int)through queueintgetRows()MapsList.getRows()through queueintMapsList.getSelectedIndex()through queueint[]MapsList.getSelectedIndexes()through queueMapsList.getSelectedItem()through queueString[]MapsList.getSelectedItems()through queueObject[]MapsList.getSelectedObjects()through queueintMapsList.getVisibleIndex()through queuebooleanisIndexSelected(int i) MapsList.isIndexSelected(int)through queuebooleanMapsList.isMultipleMode()through queuevoidmakeVisible(int i) MapsList.makeVisible(int)through queuevoidremove(int i) MapsList.remove(int)through queuevoidMapsList.remove(String)through queuevoidremoveActionListener(ActionListener actionListener) MapsList.removeActionListener(ActionListener)through queuevoidMapsList.removeAll()through queuevoidremoveItemListener(ItemListener itemListener) MapsList.removeItemListener(ItemListener)through queuevoidreplaceItem(String string, int i) MapsList.replaceItem(String, int)through queuevoidselect(int i) MapsList.select(int)through queuevoidselectItem(int index) Selects an item.voidselectItem(String item) Selects an item.voidselectItem(String item, int index) Selects an item.voidselectItems(int from, int to) Selects some items.voidsetMultipleMode(boolean b) MapsList.setMultipleMode(boolean)through queuevoid/////////////////////////////////////////////////////voidwaitItemSelection(int itemIndex, boolean selected) Waits for item to be selected.voidwaitItemsSelection(int from, int to, boolean selected) Waits for items to be selected.Methods inherited from class 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, wtComponentEnabledMethods inherited from class 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 Details
-
ITEM_PREFIX_DPROP
-
SELECTED_ITEM_PREFIX_DPROP
Identifier for a "selected item" property.- See Also:
-
-
Constructor Details
-
ListOperator
-
ListOperator
Constructs a ListOperator object.- Parameters:
cont- a containerchooser- a component chooser specifying searching criteria.index- an index between appropriate ones.
-
ListOperator
Constructs a ListOperator object.- Parameters:
cont- a containerchooser- a component chooser specifying searching criteria.
-
ListOperator
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.- Throws:
TimeoutExpiredException
-
ListOperator
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.- Throws:
TimeoutExpiredException- See Also:
-
ListOperator
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:
-
ListOperator
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
-
ListOperator
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 Details
-
findList
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
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
Description copied from class:ComponentOperator/////////////////////////////////////////////////////- Specified by:
setOutputin interfaceOutputable- Overrides:
setOutputin classComponentOperator- Parameters:
output- Identify the streams or writers used for print output.- See Also:
-
getOutput
Description copied from interface:OutputableReturns print output streams or writers.- Specified by:
getOutputin interfaceOutputable- Overrides:
getOutputin classComponentOperator- Returns:
- an object that contains references to objects for printing to output and err streams.
- See Also:
-
copyEnvironment
Description copied from class:OperatorCopies all environment (output, timeouts, visualizer) from another operator.- Overrides:
copyEnvironmentin classComponentOperator- Parameters:
anotherOperator- an operator to copy the environment to.
-
findItemIndex
Searches an item index.- Parameters:
item- item text.index- an ordinal index between appropriate ones.- Returns:
- an index.
-
findItemIndex
Searches an item index.- Parameters:
item- item text.- Returns:
- an index.
-
selectItem
Selects an item.- Parameters:
item- item text.index- an ordinal index between appropriate ones.
-
selectItem
-
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 inexto- End selection inexselected- 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
Description copied from class:ComponentOperatorReturns information about component.- Overrides:
getDumpin classComponentOperator- Returns:
- a Hashtable containing name-value pairs.
-
addActionListener
MapsList.addActionListener(ActionListener)through queue -
addItemListener
MapsList.addItemListener(ItemListener)through queue -
deselect
public void deselect(int i) MapsList.deselect(int)through queue -
getItem
MapsList.getItem(int)through queue -
getItemCount
public int getItemCount()MapsList.getItemCount()through queue -
getItems
MapsList.getItems()through queue -
getMinimumSize
MapsList.getMinimumSize(int)through queue -
getPreferredSize
MapsList.getPreferredSize(int)through queue -
getRows
public int getRows()MapsList.getRows()through queue -
getSelectedIndex
public int getSelectedIndex()MapsList.getSelectedIndex()through queue -
getSelectedIndexes
public int[] getSelectedIndexes()MapsList.getSelectedIndexes()through queue -
getSelectedItem
MapsList.getSelectedItem()through queue -
getSelectedItems
MapsList.getSelectedItems()through queue -
getSelectedObjects
MapsList.getSelectedObjects()through queue -
getVisibleIndex
public int getVisibleIndex()MapsList.getVisibleIndex()through queue -
isIndexSelected
public boolean isIndexSelected(int i) MapsList.isIndexSelected(int)through queue -
isMultipleMode
public boolean isMultipleMode()MapsList.isMultipleMode()through queue -
makeVisible
public void makeVisible(int i) MapsList.makeVisible(int)through queue -
remove
public void remove(int i) MapsList.remove(int)through queue -
remove
MapsList.remove(String)through queue -
removeActionListener
MapsList.removeActionListener(ActionListener)through queue -
removeAll
public void removeAll()MapsList.removeAll()through queue -
removeItemListener
MapsList.removeItemListener(ItemListener)through queue -
replaceItem
MapsList.replaceItem(String, int)through queue -
select
public void select(int i) MapsList.select(int)through queue -
setMultipleMode
public void setMultipleMode(boolean b) MapsList.setMultipleMode(boolean)through queue
-