Package org.netbeans.jemmy.operators
Class ContainerOperator<T extends Container>
java.lang.Object
org.netbeans.jemmy.operators.Operator
org.netbeans.jemmy.operators.ComponentOperator
org.netbeans.jemmy.operators.ContainerOperator<T>
- All Implemented Interfaces:
Outputable
,Timeoutable
- Direct Known Subclasses:
JComponentOperator
,ScrollPaneOperator
,WindowOperator
public class ContainerOperator<T extends Container>
extends ComponentOperator
implements Timeoutable, Outputable
Timeouts used:
ComponentOperator.WaitComponentTimeout - time to wait container displayed
.
- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Checks component type.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 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
ConstructorsConstructorDescriptionConstructor.Constructor.ContainerOperator
(ContainerOperator cont, int index) Constructor.ContainerOperator
(ContainerOperator cont, ComponentChooser chooser) Constructs a ContainerOperator object.ContainerOperator
(ContainerOperator cont, ComponentChooser chooser, int index) Constructs a ContainerOperator object. -
Method Summary
Modifier and TypeMethodDescriptionMapsContainer.add(Component)
through queueMapsContainer.add(Component, int)
through queuevoid
MapsContainer.add(Component, Object)
through queuevoid
MapsContainer.add(Component, Object, int)
through queueMapsContainer.add(String, Component)
through queuevoid
addContainerListener
(ContainerListener containerListener) MapsContainer.addContainerListener(ContainerListener)
through queuecreateSubOperator
(ComponentChooser chooser) Waits for a subcomponent and creates an operator.createSubOperator
(ComponentChooser chooser, int index) Waits for a subcomponent and creates an operator.findComponentAt
(int i, int i1) MapsContainer.findComponentAt(int, int)
through queuefindComponentAt
(Point point) MapsContainer.findComponentAt(Point)
through queuestatic Container
findContainer
(Container cont) Searches 0'th Container in container.static Container
findContainer
(Container cont, int index) Searches Container in container.static Container
findContainer
(Container cont, ComponentChooser chooser) Searches 0'th Container in container.static Container
findContainer
(Container cont, ComponentChooser chooser, int index) Searches Container in container.static Container
findContainerUnder
(Component comp) Searches Container object which component lies on.static Container
findContainerUnder
(Component comp, ComponentChooser chooser) Searches Container object which component lies on.findSubComponent
(ComponentChooser chooser) Searches for a subcomponent.findSubComponent
(ComponentChooser chooser, int index) Searches for a subcomponent.getComponent
(int i) MapsContainer.getComponent(int)
through queueint
MapsContainer.getComponentCount()
through queueMapsContainer.getComponents()
through queueMapsContainer.getInsets()
through queueMapsContainer.getLayout()
through queueReturns print output streams or writers.Return current timeouts.boolean
isAncestorOf
(Component component) MapsContainer.isAncestorOf(Component)
through queuevoid
paintComponents
(Graphics graphics) MapsContainer.paintComponents(Graphics)
through queuevoid
printComponents
(Graphics graphics) MapsContainer.printComponents(Graphics)
through queuevoid
remove
(int i) MapsContainer.remove(int)
through queuevoid
MapsContainer.remove(Component)
through queuevoid
MapsContainer.removeAll()
through queuevoid
removeContainerListener
(ContainerListener containerListener) MapsContainer.removeContainerListener(ContainerListener)
through queuevoid
setLayout
(LayoutManager layoutManager) MapsContainer.setLayout(LayoutManager)
through queuevoid
Defines print output streams or writers.void
setTimeouts
(Timeouts timeouts) Defines current timeouts.static Container
waitContainer
(Container cont) Waits 0'th Container in container.static Container
waitContainer
(Container cont, int index) Waits Container in container.static Container
waitContainer
(Container cont, ComponentChooser chooser) Waits 0'th Container in container.static Container
waitContainer
(Container cont, ComponentChooser chooser, int index) Waits Container in container.waitSubComponent
(ComponentChooser chooser) Waits for a subcomponent.waitSubComponent
(ComponentChooser chooser, int index) Waits for a subcomponent.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, copyEnvironment, 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, getDump, 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
-
Constructor Details
-
ContainerOperator
Constructor.- Parameters:
b
- Container component.
-
ContainerOperator
Constructs a ContainerOperator object.- Parameters:
cont
- containerchooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.
-
ContainerOperator
Constructs a ContainerOperator object.- Parameters:
cont
- containerchooser
- a component chooser specifying searching criteria.
-
ContainerOperator
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont
- Operator pointing a container to search component in.index
- Ordinal component index.- Throws:
TimeoutExpiredException
-
ContainerOperator
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont
- Operator pointing a container to search component in.- Throws:
TimeoutExpiredException
-
-
Method Details
-
findContainer
Searches Container in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.index
- Ordinal component index.- Returns:
- Container instance or null if component was not found.
-
findContainer
Searches 0'th Container in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- Container instance or null if component was not found.
-
findContainer
Searches Container in container.- Parameters:
cont
- Container to search component in.index
- Ordinal component index.- Returns:
- Container instance or null if component was not found.
-
findContainer
Searches 0'th Container in container.- Parameters:
cont
- Container to search component in.- Returns:
- Container instance or null if component was not found.
-
findContainerUnder
Searches Container object which component lies on.- Parameters:
comp
- Component to find Container under.chooser
- a chooser specifying searching criteria.- Returns:
- Container instance or null if component was not found.
-
findContainerUnder
Searches Container object which component lies on.- Parameters:
comp
- Component to find Container under.- Returns:
- Container instance or null if component was not found.
-
waitContainer
Waits Container in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.index
- Ordinal component index.- Returns:
- Container instance.
- Throws:
TimeoutExpiredException
-
waitContainer
Waits 0'th Container in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- Container instance.
- Throws:
TimeoutExpiredException
-
waitContainer
Waits Container in container.- Parameters:
cont
- Container to search component in.index
- Ordinal component index.- Returns:
- Container instance.
- Throws:
TimeoutExpiredException
-
waitContainer
Waits 0'th Container in container.- Parameters:
cont
- Container to search component in.- Returns:
- Container instance.
- Throws:
TimeoutExpiredException
-
setTimeouts
Description copied from interface:Timeoutable
Defines current timeouts.- Specified by:
setTimeouts
in interfaceTimeoutable
- Overrides:
setTimeouts
in classComponentOperator
- Parameters:
timeouts
- A collection of timeout assignments.- See Also:
-
getTimeouts
Description copied from interface:Timeoutable
Return current timeouts.- Specified by:
getTimeouts
in interfaceTimeoutable
- Overrides:
getTimeouts
in classComponentOperator
- Returns:
- the collection of current timeout assignments.
- See Also:
-
setOutput
Description copied from interface:Outputable
Defines print output streams or writers.- Specified by:
setOutput
in interfaceOutputable
- Overrides:
setOutput
in classComponentOperator
- Parameters:
out
- Identify the streams or writers used for print output.- See Also:
-
getOutput
Description copied from interface:Outputable
Returns print output streams or writers.- Specified by:
getOutput
in interfaceOutputable
- Overrides:
getOutput
in classComponentOperator
- Returns:
- an object that contains references to objects for printing to output and err streams.
- See Also:
-
findSubComponent
Searches for a subcomponent.- Parameters:
chooser
- a chooser specifying searching criteria.index
- Ordinal component index.- Returns:
- Component instance.
-
findSubComponent
Searches for a subcomponent.- Parameters:
chooser
- a chooser specifying searching criteria.- Returns:
- Component instance.
-
waitSubComponent
Waits for a subcomponent.- Parameters:
chooser
- a chooser specifying searching criteria.index
- Ordinal component index.- Returns:
- Component instance.
-
waitSubComponent
Waits for a subcomponent.- Parameters:
chooser
- a chooser specifying searching criteria.- Returns:
- Component instance.
-
createSubOperator
Waits for a subcomponent and creates an operator.- Parameters:
chooser
- a chooser specifying searching criteria.index
- Ordinal component index.- Returns:
- Component instance.
-
createSubOperator
Waits for a subcomponent and creates an operator.- Parameters:
chooser
- a chooser specifying searching criteria.- Returns:
- Component instance.
-
add
MapsContainer.add(Component)
through queue -
add
MapsContainer.add(Component, int)
through queue -
add
MapsContainer.add(Component, Object)
through queue -
add
MapsContainer.add(Component, Object, int)
through queue -
add
MapsContainer.add(String, Component)
through queue -
addContainerListener
MapsContainer.addContainerListener(ContainerListener)
through queue -
findComponentAt
MapsContainer.findComponentAt(int, int)
through queue -
findComponentAt
MapsContainer.findComponentAt(Point)
through queue -
getComponent
MapsContainer.getComponent(int)
through queue -
getComponentCount
public int getComponentCount()MapsContainer.getComponentCount()
through queue -
getComponents
MapsContainer.getComponents()
through queue -
getInsets
MapsContainer.getInsets()
through queue -
getLayout
MapsContainer.getLayout()
through queue -
isAncestorOf
MapsContainer.isAncestorOf(Component)
through queue -
paintComponents
MapsContainer.paintComponents(Graphics)
through queue -
printComponents
MapsContainer.printComponents(Graphics)
through queue -
remove
public void remove(int i) MapsContainer.remove(int)
through queue -
remove
MapsContainer.remove(Component)
through queue -
removeAll
public void removeAll()MapsContainer.removeAll()
through queue -
removeContainerListener
MapsContainer.removeContainerListener(ContainerListener)
through queue -
setLayout
MapsContainer.setLayout(LayoutManager)
through queue
-