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 CheckboxOperator

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

All Implemented Interfaces:
  Outputable, Timeoutable

public class CheckboxOperator
extends ComponentOperator
implements Outputable

Timeouts used:
ButtonOperator.PushButtonTimeout - time between checkbox pressing and releasing
ComponentOperator.WaitComponentTimeout - time to wait checkbox displayed
ComponentOperator.WaitComponentEnabledTimeout - time to wait checkbox enabled
.

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

Inner Class Summary
`static class` | `CheckboxOperator.CheckboxByLabelFinder` Allows to find component by label.
`static class` | `CheckboxOperator.CheckboxFinder` 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` | `TEXT_DPROP` Identifier for a label 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
`CheckboxOperator(java.awt.Checkbox b)` Constructor.
`CheckboxOperator(ContainerOperator cont)` Constructor.
`CheckboxOperator(ContainerOperator cont, ComponentChooser chooser)` Constructs an CheckboxOperator object.
`CheckboxOperator(ContainerOperator cont, ComponentChooser chooser, int index)` Constructs an CheckboxOperator object.
`CheckboxOperator(ContainerOperator cont, int index)` Constructor.
`CheckboxOperator(ContainerOperator cont, java.lang.String text)` Constructor.
`CheckboxOperator(ContainerOperator cont, java.lang.String text, int index)` Constructor.

Method Summary
`void` | `addItemListener(java.awt.event.ItemListener itemListener)` Maps `Checkbox.addItemListener(ItemListener)` through queue
`void` | `changeSelection(boolean newValue)` Changes selection if necessary.
`void` | `changeSelectionNoBlock(boolean selected)` Runs `changeSelection(boolean)` method in a separate thread.
`void` | `copyEnvironment(Operator anotherOperator)` Copies all environment (output, timeouts, visualizer) from another operator.
`static java.awt.Checkbox` | `findCheckbox(java.awt.Container cont, ComponentChooser chooser)` Searches 0'th Checkbox in container.
`static java.awt.Checkbox` | `findCheckbox(java.awt.Container cont, ComponentChooser chooser, int index)` Searches Checkbox in container.
`static java.awt.Checkbox` | `findCheckbox(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)` Searches Checkbox by text.
`static java.awt.Checkbox` | `findCheckbox(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)` Searches Checkbox by text.
`java.awt.CheckboxGroup` | `getCheckboxGroup()` Maps `Checkbox.getCheckboxGroup()` through queue
`java.util.Hashtable` | `getDump()` Returns information about component.
`java.lang.String` | `getLabel()` Maps `Checkbox.getLabel()` through queue
`TestOut` | `getOutput()` Returns print output streams or writers.
`boolean` | `getState()` Maps `Checkbox.getState()` through queue
`void` | `removeItemListener(java.awt.event.ItemListener itemListener)` Maps `Checkbox.removeItemListener(ItemListener)` through queue
`void` | `setCheckboxGroup(java.awt.CheckboxGroup grp)` Maps `Checkbox.setCheckboxGroup(CheckboxGroup)` through queue
`void` | `setLabel(java.lang.String string)` Maps `Checkbox.setLabel(String)` through queue
`void` | `setOutput(TestOut out)` Defines print output streams or writers.
`void` | `setState(boolean state)` Maps `Checkbox.setState(boolean)` through queue
`static java.awt.Checkbox` | `waitCheckbox(java.awt.Container cont, ComponentChooser chooser)` Waits 0'th Checkbox in container.
`static java.awt.Checkbox` | `waitCheckbox(java.awt.Container cont, ComponentChooser chooser, int index)` Waits Checkbox in container.
`static java.awt.Checkbox` | `waitCheckbox(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)` Waits Checkbox by text.
`static java.awt.Checkbox` | `waitCheckbox(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)` Waits Checkbox by text.
`void` | `waitSelected(boolean selected)` Waits for button 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

### TEXT_DPROP

    public static final java.lang.String TEXT_DPROP

  Identifier for a label property.
  See Also:
    `getDump()`

Constructor Detail

### CheckboxOperator

    public CheckboxOperator(java.awt.Checkbox b)

  Constructor.
  Parameters:
    `b` - a component

### CheckboxOperator

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

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

### CheckboxOperator

    public CheckboxOperator(ContainerOperator cont,
                            ComponentChooser chooser)

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

### CheckboxOperator

    public CheckboxOperator(ContainerOperator cont,
                            java.lang.String text,
                            int index)

  Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.
  Parameters:
    `cont` - container
    `text` - Checkbox text.
    `index` - Ordinal component index.
  Throws:
    `TimeoutExpiredException` -
  See Also:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### CheckboxOperator

    public CheckboxOperator(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` - container
    `text` - Checkbox text.
  Throws:
    `TimeoutExpiredException` -
  See Also:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### CheckboxOperator

    public CheckboxOperator(ContainerOperator cont,
                            int index)

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

### CheckboxOperator

    public CheckboxOperator(ContainerOperator cont)

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

Method Detail

### findCheckbox

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

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

### findCheckbox

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

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

### findCheckbox

    public static java.awt.Checkbox findCheckbox(java.awt.Container cont,
                                                 java.lang.String text,
                                                 boolean ce,
                                                 boolean ccs,
                                                 int index)

  Searches Checkbox by text.
  Parameters:
    `cont` - Container to search component in.
    `text` - Checkbox text. If null, contents is not checked.
    `ce` - Compare text exactly.
    `ccs` - Compare text case sensitively.
    `index` - Ordinal component index.
  Returns:
    Checkbox instance or null if component was not found.
  See Also:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### findCheckbox

    public static java.awt.Checkbox findCheckbox(java.awt.Container cont,
                                                 java.lang.String text,
                                                 boolean ce,
                                                 boolean ccs)

  Searches Checkbox by text.
  Parameters:
    `cont` - Container to search component in.
    `text` - Checkbox text. If null, contents is not checked.
    `ce` - Compare text exactly.
    `ccs` - Compare text case sensitively.
  Returns:
    Checkbox instance or null if component was not found.
  See Also:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### waitCheckbox

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

  Waits Checkbox in container.
  Parameters:
    `cont` - Container to search component in.
    `chooser` - org.netbeans.jemmy.ComponentChooser implementation.
    `index` - Ordinal component index.
  Returns:
    Checkbox instance.
  Throws:
    `TimeoutExpiredException` -

### waitCheckbox

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

  Waits 0'th Checkbox in container.
  Parameters:
    `cont` - Container to search component in.
    `chooser` - org.netbeans.jemmy.ComponentChooser implementation.
  Returns:
    Checkbox instance.
  Throws:
    `TimeoutExpiredException` -

### waitCheckbox

    public static java.awt.Checkbox waitCheckbox(java.awt.Container cont,
                                                 java.lang.String text,
                                                 boolean ce,
                                                 boolean ccs,
                                                 int index)

  Waits Checkbox by text.
  Parameters:
    `cont` - Container to search component in.
    `text` - Checkbox text. If null, contents is not checked.
    `ce` - Compare text exactly.
    `ccs` - Compare text case sensitively.
    `index` - Ordinal component index.
  Returns:
    Checkbox instance.
  Throws:
    `TimeoutExpiredException` -
  See Also:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

### waitCheckbox

    public static java.awt.Checkbox waitCheckbox(java.awt.Container cont,
                                                 java.lang.String text,
                                                 boolean ce,
                                                 boolean ccs)

  Waits Checkbox by text.
  Parameters:
    `cont` - Container to search component in.
    `text` - Checkbox text. If null, contents is not checked.
    `ce` - Compare text exactly.
    `ccs` - Compare text case sensitively.
  Returns:
    Checkbox instance.
  Throws:
    `TimeoutExpiredException` -
  See Also:
    `Operator.isCaptionEqual(String, String, boolean, boolean)`

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

### 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.

### changeSelection

    public void changeSelection(boolean newValue)

  Changes selection if necessary. Uses a ButtonDriver registered for this operator.
  Parameters:
    `newValue` - a button selection.

### changeSelectionNoBlock

    public void changeSelectionNoBlock(boolean selected)

  Runs `changeSelection(boolean)` method in a separate thread.
  Parameters:
    `selected` - a button selection.

### waitSelected

    public void waitSelected(boolean selected)

  Waits for button to be selected.
  Parameters:
    `selected` - selection.

### getDump

    public java.util.Hashtable getDump()

  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.

### addItemListener

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

  Maps `Checkbox.addItemListener(ItemListener)` through queue

### getCheckboxGroup

    public java.awt.CheckboxGroup getCheckboxGroup()

  Maps `Checkbox.getCheckboxGroup()` through queue

### getLabel

    public java.lang.String getLabel()

  Maps `Checkbox.getLabel()` through queue

### getState

    public boolean getState()

  Maps `Checkbox.getState()` through queue

### removeItemListener

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

  Maps `Checkbox.removeItemListener(ItemListener)` through queue

### setCheckboxGroup

    public void setCheckboxGroup(java.awt.CheckboxGroup grp)

  Maps `Checkbox.setCheckboxGroup(CheckboxGroup)` through queue

### setLabel

    public void setLabel(java.lang.String string)

  Maps `Checkbox.setLabel(String)` through queue

### setState

    public void setState(boolean state)

  Maps `Checkbox.setState(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