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
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAllows to find component by label.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
FieldsFields 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
ConstructorsConstructorDescriptionConstructor.Constructor.CheckboxOperator(ContainerOperator cont, int index) Constructor.CheckboxOperator(ContainerOperator cont, String text) Constructor.CheckboxOperator(ContainerOperator cont, String text, int index) Constructor.CheckboxOperator(ContainerOperator cont, ComponentChooser chooser) Constructs an CheckboxOperator object.CheckboxOperator(ContainerOperator cont, ComponentChooser chooser, int index) Constructs an CheckboxOperator object. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddItemListener(ItemListener itemListener) MapsCheckbox.addItemListener(ItemListener)through queuevoidchangeSelection(boolean newValue) Changes selection if necessary.voidchangeSelectionNoBlock(boolean selected) RunschangeSelection(boolean)method in a separate thread.voidcopyEnvironment(Operator anotherOperator) Copies all environment (output, timeouts, visualizer) from another operator.static CheckboxfindCheckbox(Container cont, String text, boolean ce, boolean ccs) Searches Checkbox by text.static CheckboxfindCheckbox(Container cont, String text, boolean ce, boolean ccs, int index) Searches Checkbox by text.static CheckboxfindCheckbox(Container cont, ComponentChooser chooser) Searches 0'th Checkbox in container.static CheckboxfindCheckbox(Container cont, ComponentChooser chooser, int index) Searches Checkbox in container.MapsCheckbox.getCheckboxGroup()through queuegetDump()Returns information about component.getLabel()MapsCheckbox.getLabel()through queueReturns print output streams or writers.booleangetState()MapsCheckbox.getState()through queuevoidremoveItemListener(ItemListener itemListener) MapsCheckbox.removeItemListener(ItemListener)through queuevoidMapsCheckbox.setCheckboxGroup(CheckboxGroup)through queuevoidMapsCheckbox.setLabel(String)through queuevoid/////////////////////////////////////////////////////voidsetState(boolean state) MapsCheckbox.setState(boolean)through queuestatic CheckboxwaitCheckbox(Container cont, String text, boolean ce, boolean ccs) Waits Checkbox by text.static CheckboxwaitCheckbox(Container cont, String text, boolean ce, boolean ccs, int index) Waits Checkbox by text.static CheckboxwaitCheckbox(Container cont, ComponentChooser chooser) Waits 0'th Checkbox in container.static CheckboxwaitCheckbox(Container cont, ComponentChooser chooser, int index) Waits Checkbox in container.voidwaitSelected(boolean selected) Waits for button 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
-
TEXT_DPROP
-
-
Constructor Details
-
CheckboxOperator
-
CheckboxOperator
Constructs an CheckboxOperator object.- Parameters:
cont- containerchooser- a component chooser specifying searching criteria.index- an index between appropriate ones.
-
CheckboxOperator
Constructs an CheckboxOperator object.- Parameters:
cont- containerchooser- a component chooser specifying searching criteria.
-
CheckboxOperator
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont- containertext- Checkbox text.index- Ordinal component index.- Throws:
TimeoutExpiredException- See Also:
-
CheckboxOperator
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont- containertext- Checkbox text.- Throws:
TimeoutExpiredException- See Also:
-
CheckboxOperator
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont- containerindex- Ordinal component index.- Throws:
TimeoutExpiredException
-
CheckboxOperator
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont- container- Throws:
TimeoutExpiredException
-
-
Method Details
-
findCheckbox
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
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 Checkbox findCheckbox(Container cont, 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:
-
findCheckbox
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:
-
waitCheckbox
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
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 Checkbox waitCheckbox(Container cont, 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:
-
waitCheckbox
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:
-
setOutput
Description copied from class:ComponentOperator/////////////////////////////////////////////////////- Specified by:
setOutputin interfaceOutputable- Overrides:
setOutputin classComponentOperator- Parameters:
out- 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.
-
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) RunschangeSelection(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
Returns information about component.- Overrides:
getDumpin classComponentOperator- Returns:
- a Hashtable containing name-value pairs.
-
addItemListener
MapsCheckbox.addItemListener(ItemListener)through queue -
getCheckboxGroup
MapsCheckbox.getCheckboxGroup()through queue -
getLabel
MapsCheckbox.getLabel()through queue -
getState
public boolean getState()MapsCheckbox.getState()through queue -
removeItemListener
MapsCheckbox.removeItemListener(ItemListener)through queue -
setCheckboxGroup
MapsCheckbox.setCheckboxGroup(CheckboxGroup)through queue -
setLabel
MapsCheckbox.setLabel(String)through queue -
setState
public void setState(boolean state) MapsCheckbox.setState(boolean)through queue
-