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 ContainerOperator

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

All Implemented Interfaces:
  Outputable, Timeoutable

Direct Known Subclasses:
  JComponentOperator, ScrollPaneOperator, WindowOperator

public class ContainerOperator
extends ComponentOperator
implements Timeoutable, Outputable

Timeouts used:
ComponentOperator.WaitComponentTimeout - time to wait container displayed
.

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

Inner Class Summary
`static class` | `ContainerOperator.ContainerFinder` 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`

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
`ContainerOperator(java.awt.Container b)` Constructor.
`ContainerOperator(ContainerOperator cont)` Constructor.
`ContainerOperator(ContainerOperator cont, ComponentChooser chooser)` Constructs a ContainerOperator object.
`ContainerOperator(ContainerOperator cont, ComponentChooser chooser, int index)` Constructs a ContainerOperator object.
`ContainerOperator(ContainerOperator cont, int index)` Constructor.

Method Summary
`java.awt.Component` | `add(java.awt.Component component)` Maps `Container.add(Component)` through queue
`java.awt.Component` | `add(java.awt.Component component, int i)` Maps `Container.add(Component, int)` through queue
`void` | `add(java.awt.Component component, java.lang.Object object)` Maps `Container.add(Component, Object)` through queue
`void` | `add(java.awt.Component component, java.lang.Object object, int i)` Maps `Container.add(Component, Object, int)` through queue
`java.awt.Component` | `add(java.lang.String string, java.awt.Component component)` Maps `Container.add(String, Component)` through queue
`void` | `addContainerListener(java.awt.event.ContainerListener containerListener)` Maps `Container.addContainerListener(ContainerListener)` through queue
`ComponentOperator` | `createSubOperator(ComponentChooser chooser)` Waits for a subcomponent and creates an operator.
`ComponentOperator` | `createSubOperator(ComponentChooser chooser, int index)` Waits for a subcomponent and creates an operator.
`java.awt.Component` | `findComponentAt(int i, int i1)` Maps `Container.findComponentAt(int, int)` through queue
`java.awt.Component` | `findComponentAt(java.awt.Point point)` Maps `Container.findComponentAt(Point)` through queue
`static java.awt.Container` | `findContainer(java.awt.Container cont)` Searches 0'th Container in container.
`static java.awt.Container` | `findContainer(java.awt.Container cont, ComponentChooser chooser)` Searches 0'th Container in container.
`static java.awt.Container` | `findContainer(java.awt.Container cont, ComponentChooser chooser, int index)` Searches Container in container.
`static java.awt.Container` | `findContainer(java.awt.Container cont, int index)` Searches Container in container.
`static java.awt.Container` | `findContainerUnder(java.awt.Component comp)` Searches Container object which component lies on.
`static java.awt.Container` | `findContainerUnder(java.awt.Component comp, ComponentChooser chooser)` Searches Container object which component lies on.
`java.awt.Component` | `findSubComponent(ComponentChooser chooser)` Searches for a subcomponent.
`java.awt.Component` | `findSubComponent(ComponentChooser chooser, int index)` Searches for a subcomponent.
`java.awt.Component` | `getComponent(int i)` Maps `Container.getComponent(int)` through queue
`int` | `getComponentCount()` Maps `Container.getComponentCount()` through queue
`java.awt.Component[]` | `getComponents()` Maps `Container.getComponents()` through queue
`java.awt.Insets` | `getInsets()` Maps `Container.getInsets()` through queue
`java.awt.LayoutManager` | `getLayout()` Maps `Container.getLayout()` through queue
`TestOut` | `getOutput()` Returns print output streams or writers.
`Timeouts` | `getTimeouts()` Return current timeouts.
`boolean` | `isAncestorOf(java.awt.Component component)` Maps `Container.isAncestorOf(Component)` through queue
`void` | `paintComponents(java.awt.Graphics graphics)` Maps `Container.paintComponents(Graphics)` through queue
`void` | `printComponents(java.awt.Graphics graphics)` Maps `Container.printComponents(Graphics)` through queue
`void` | `remove(java.awt.Component component)` Maps `Container.remove(Component)` through queue
`void` | `remove(int i)` Maps `Container.remove(int)` through queue
`void` | `removeAll()` Maps `Container.removeAll()` through queue
`void` | `removeContainerListener(java.awt.event.ContainerListener containerListener)` Maps `Container.removeContainerListener(ContainerListener)` through queue
`void` | `setLayout(java.awt.LayoutManager layoutManager)` Maps `Container.setLayout(LayoutManager)` through queue
`void` | `setOutput(TestOut out)` Defines print output streams or writers.
`void` | `setTimeouts(Timeouts timeouts)` Defines current timeouts.
`static java.awt.Container` | `waitContainer(java.awt.Container cont)` Waits 0'th Container in container.
`static java.awt.Container` | `waitContainer(java.awt.Container cont, ComponentChooser chooser)` Waits 0'th Container in container.
`static java.awt.Container` | `waitContainer(java.awt.Container cont, ComponentChooser chooser, int index)` Waits Container in container.
`static java.awt.Container` | `waitContainer(java.awt.Container cont, int index)` Waits Container in container.
`java.awt.Component` | `waitSubComponent(ComponentChooser chooser)` Waits for a subcomponent.
`java.awt.Component` | `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`

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`

Constructor Detail

### ContainerOperator

    public ContainerOperator(java.awt.Container b)

  Constructor.
  Parameters:
    `b` - Container component.

### ContainerOperator

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

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

### ContainerOperator

    public ContainerOperator(ContainerOperator cont,
                             ComponentChooser chooser)

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

### ContainerOperator

    public ContainerOperator(ContainerOperator cont,
                             int index)

  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

    public ContainerOperator(ContainerOperator cont)

  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 Detail

### findContainer

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

  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

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

  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

    public static java.awt.Container findContainer(java.awt.Container cont,
                                                   int index)

  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

    public static java.awt.Container findContainer(java.awt.Container cont)

  Searches 0'th Container in container.
  Parameters:
    `cont` - Container to search component in.
  Returns:
    Container instance or null if component was not found.

### findContainerUnder

    public static java.awt.Container findContainerUnder(java.awt.Component comp,
                                                        ComponentChooser chooser)

  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

    public static java.awt.Container findContainerUnder(java.awt.Component comp)

  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

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

  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

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

  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

    public static java.awt.Container waitContainer(java.awt.Container cont,
                                                   int index)

  Waits Container in container.
  Parameters:
    `cont` - Container to search component in.
    `index` - Ordinal component index.
  Returns:
    Container instance.
  Throws:
    `TimeoutExpiredException` -

### waitContainer

    public static java.awt.Container waitContainer(java.awt.Container cont)

  Waits 0'th Container in container.
  Parameters:
    `cont` - Container to search component in.
  Returns:
    Container instance.
  Throws:
    `TimeoutExpiredException` -

### setTimeouts

    public void setTimeouts(Timeouts timeouts)

  Description copied from interface: `Timeoutable`
  Defines current timeouts.
  Specified by:
    `setTimeouts` in interface `Timeoutable`
  Overrides:
    `setTimeouts` in class `ComponentOperator`
  Following copied from interface: `org.netbeans.jemmy.Timeoutable`
  Parameters:
    `t` - 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 interface `Timeoutable`
  Overrides:
    `getTimeouts` in class `ComponentOperator`
  Following copied from interface: `org.netbeans.jemmy.Timeoutable`
  Returns:
    the collection of current timeout assignments.
  See Also:
    `Timeoutable.setTimeouts(org.netbeans.jemmy.Timeouts)`

### setOutput

    public void setOutput(TestOut out)

  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)`

### findSubComponent

    public java.awt.Component findSubComponent(ComponentChooser chooser,
                                               int index)

  Searches for a subcomponent.
  Parameters:
    `chooser` - a chooser specifying searching criteria.
    `index` - Ordinal component index.
  Returns:
    Component instance.

### findSubComponent

    public java.awt.Component findSubComponent(ComponentChooser chooser)

  Searches for a subcomponent.
  Parameters:
    `chooser` - a chooser specifying searching criteria.
  Returns:
    Component instance.

### waitSubComponent

    public java.awt.Component waitSubComponent(ComponentChooser chooser,
                                               int index)

  Waits for a subcomponent.
  Parameters:
    `chooser` - a chooser specifying searching criteria.
    `index` - Ordinal component index.
  Returns:
    Component instance.

### waitSubComponent

    public java.awt.Component waitSubComponent(ComponentChooser chooser)

  Waits for a subcomponent.
  Parameters:
    `chooser` - a chooser specifying searching criteria.
  Returns:
    Component instance.

### createSubOperator

    public ComponentOperator createSubOperator(ComponentChooser chooser,
                                               int index)

  Waits for a subcomponent and creates an operator.
  Parameters:
    `chooser` - a chooser specifying searching criteria.
    `index` - Ordinal component index.
  Returns:
    Component instance.

### createSubOperator

    public ComponentOperator createSubOperator(ComponentChooser chooser)

  Waits for a subcomponent and creates an operator.
  Parameters:
    `chooser` - a chooser specifying searching criteria.
  Returns:
    Component instance.

### add

    public java.awt.Component add(java.awt.Component component)

  Maps `Container.add(Component)` through queue

### add

    public java.awt.Component add(java.awt.Component component,
                                  int i)

  Maps `Container.add(Component, int)` through queue

### add

    public void add(java.awt.Component component,
                    java.lang.Object object)

  Maps `Container.add(Component, Object)` through queue

### add

    public void add(java.awt.Component component,
                    java.lang.Object object,
                    int i)

  Maps `Container.add(Component, Object, int)` through queue

### add

    public java.awt.Component add(java.lang.String string,
                                  java.awt.Component component)

  Maps `Container.add(String, Component)` through queue

### addContainerListener

    public void addContainerListener(java.awt.event.ContainerListener containerListener)

  Maps `Container.addContainerListener(ContainerListener)` through queue

### findComponentAt

    public java.awt.Component findComponentAt(int i,
                                              int i1)

  Maps `Container.findComponentAt(int, int)` through queue

### findComponentAt

    public java.awt.Component findComponentAt(java.awt.Point point)

  Maps `Container.findComponentAt(Point)` through queue

### getComponent

    public java.awt.Component getComponent(int i)

  Maps `Container.getComponent(int)` through queue

### getComponentCount

    public int getComponentCount()

  Maps `Container.getComponentCount()` through queue

### getComponents

    public java.awt.Component[] getComponents()

  Maps `Container.getComponents()` through queue

### getInsets

    public java.awt.Insets getInsets()

  Maps `Container.getInsets()` through queue

### getLayout

    public java.awt.LayoutManager getLayout()

  Maps `Container.getLayout()` through queue

### isAncestorOf

    public boolean isAncestorOf(java.awt.Component component)

  Maps `Container.isAncestorOf(Component)` through queue

### paintComponents

    public void paintComponents(java.awt.Graphics graphics)

  Maps `Container.paintComponents(Graphics)` through queue

### printComponents

    public void printComponents(java.awt.Graphics graphics)

  Maps `Container.printComponents(Graphics)` through queue

### remove

    public void remove(int i)

  Maps `Container.remove(int)` through queue

### remove

    public void remove(java.awt.Component component)

  Maps `Container.remove(Component)` through queue

### removeAll

    public void removeAll()

  Maps `Container.removeAll()` through queue

### removeContainerListener

    public void removeContainerListener(java.awt.event.ContainerListener containerListener)

  Maps `Container.removeContainerListener(ContainerListener)` through queue

### setLayout

    public void setLayout(java.awt.LayoutManager layoutManager)

  Maps `Container.setLayout(LayoutManager)` 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