Package org.netbeans.jemmy.operators
Class AbstractButtonOperator
- java.lang.Object
-
- org.netbeans.jemmy.operators.Operator
-
- org.netbeans.jemmy.operators.ComponentOperator
-
- org.netbeans.jemmy.operators.ContainerOperator
-
- org.netbeans.jemmy.operators.JComponentOperator
-
- org.netbeans.jemmy.operators.AbstractButtonOperator
-
- All Implemented Interfaces:
Outputable
,Timeoutable
- Direct Known Subclasses:
JButtonOperator
,JMenuItemOperator
,JToggleButtonOperator
public class AbstractButtonOperator extends JComponentOperator implements Timeoutable, Outputable
Timeouts used:
AbstractButtonOperator.PushButtonTimeout - time between button pressing and releasing
ComponentOperator.WaitComponentTimeout - time to wait button displayed
ComponentOperator.WaitComponentEnabledTimeout - time to wait button enabled
ComponentOperator.WaitStateTimeout - time to wait for text
.- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
Timeouts
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractButtonOperator.AbstractButtonByLabelFinder
Allows to find component by text.static class
AbstractButtonOperator.AbstractButtonFinder
Checks component type.-
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.JComponentOperator
JComponentOperator.JComponentByTipFinder, JComponentOperator.JComponentFinder
-
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.ContainerOperator
ContainerOperator.ContainerFinder
-
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 Modifier and Type Field Description static java.lang.String
IS_SELECTED_DPROP
Identifier for a selected text property.static java.lang.String
TEXT_DPROP
Identifier for a text property.-
Fields inherited from class org.netbeans.jemmy.operators.JComponentOperator
A11Y_DATA, A11Y_DESCRIPTION_DPROP, A11Y_NAME_DPROP, TOOLTIP_TEXT_DPROP
-
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
Constructors Constructor Description AbstractButtonOperator(javax.swing.AbstractButton b)
Constructor.AbstractButtonOperator(ContainerOperator cont)
Constructor.AbstractButtonOperator(ContainerOperator cont, int index)
Constructor.AbstractButtonOperator(ContainerOperator cont, java.lang.String text)
Constructor.AbstractButtonOperator(ContainerOperator cont, java.lang.String text, int index)
Constructor.AbstractButtonOperator(ContainerOperator cont, ComponentChooser chooser)
Constructs an AbstractButtonOperator object.AbstractButtonOperator(ContainerOperator cont, ComponentChooser chooser, int index)
Constructs an AbstractButtonOperator object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addActionListener(java.awt.event.ActionListener actionListener)
MapsAbstractButton.addActionListener(ActionListener)
through queuevoid
addChangeListener(javax.swing.event.ChangeListener changeListener)
MapsAbstractButton.addChangeListener(ChangeListener)
through queuevoid
addItemListener(java.awt.event.ItemListener itemListener)
MapsAbstractButton.addItemListener(ItemListener)
through queuevoid
changeSelection(boolean selected)
Changes selection if necessary.void
changeSelectionNoBlock(boolean selected)
RunschangeSelection(boolean)
method in a separate thread.void
copyEnvironment(Operator anotherOperator)
Copies all environment (output, timeouts, visualizer) from another operator.void
doClick()
MapsAbstractButton.doClick()
through queuevoid
doClick(int i)
MapsAbstractButton.doClick(int)
through queuestatic javax.swing.AbstractButton
findAbstractButton(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)
Searches AbstractButton by text.static javax.swing.AbstractButton
findAbstractButton(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)
Searches AbstractButton by text.static javax.swing.AbstractButton
findAbstractButton(java.awt.Container cont, ComponentChooser chooser)
Searches for the first AbstractButton in a container.static javax.swing.AbstractButton
findAbstractButton(java.awt.Container cont, ComponentChooser chooser, int index)
Searches AbstractButton in a container.java.lang.String
getActionCommand()
MapsAbstractButton.getActionCommand()
through queuejavax.swing.Icon
getDisabledIcon()
MapsAbstractButton.getDisabledIcon()
through queuejavax.swing.Icon
getDisabledSelectedIcon()
MapsAbstractButton.getDisabledSelectedIcon()
through queuejava.util.Hashtable
getDump()
Returns information about component.int
getHorizontalAlignment()
MapsAbstractButton.getHorizontalAlignment()
through queueint
getHorizontalTextPosition()
MapsAbstractButton.getHorizontalTextPosition()
through queuejavax.swing.Icon
getIcon()
MapsAbstractButton.getIcon()
through queuejava.awt.Insets
getMargin()
MapsAbstractButton.getMargin()
through queueint
getMnemonic()
MapsAbstractButton.getMnemonic()
through queuejavax.swing.ButtonModel
getModel()
MapsAbstractButton.getModel()
through queueTestOut
getOutput()
Returns print output streams or writers.javax.swing.Icon
getPressedIcon()
MapsAbstractButton.getPressedIcon()
through queuejavax.swing.Icon
getRolloverIcon()
MapsAbstractButton.getRolloverIcon()
through queuejavax.swing.Icon
getRolloverSelectedIcon()
MapsAbstractButton.getRolloverSelectedIcon()
through queuejavax.swing.Icon
getSelectedIcon()
MapsAbstractButton.getSelectedIcon()
through queuejava.lang.Object[]
getSelectedObjects()
MapsAbstractButton.getSelectedObjects()
through queuejava.lang.String
getText()
MapsAbstractButton.getText()
through queueTimeouts
getTimeouts()
Return current timeouts.javax.swing.plaf.ButtonUI
getUI()
MapsAbstractButton.getUI()
through queueint
getVerticalAlignment()
MapsAbstractButton.getVerticalAlignment()
through queueint
getVerticalTextPosition()
MapsAbstractButton.getVerticalTextPosition()
through queueboolean
isBorderPainted()
MapsAbstractButton.isBorderPainted()
through queueboolean
isContentAreaFilled()
MapsAbstractButton.isContentAreaFilled()
through queueboolean
isFocusPainted()
MapsAbstractButton.isFocusPainted()
through queueboolean
isRolloverEnabled()
MapsAbstractButton.isRolloverEnabled()
through queueboolean
isSelected()
MapsAbstractButton.isSelected()
through queuevoid
press()
Press the button by mouse.void
push()
Pushs the button using a ButtonDriver registered for this operator.void
pushNoBlock()
Runspush()
method in a separate thread.void
release()
Releases the button by mouse.void
removeActionListener(java.awt.event.ActionListener actionListener)
MapsAbstractButton.removeActionListener(ActionListener)
through queuevoid
removeChangeListener(javax.swing.event.ChangeListener changeListener)
MapsAbstractButton.removeChangeListener(ChangeListener)
through queuevoid
removeItemListener(java.awt.event.ItemListener itemListener)
MapsAbstractButton.removeItemListener(ItemListener)
through queuevoid
setActionCommand(java.lang.String string)
MapsAbstractButton.setActionCommand(String)
through queuevoid
setBorderPainted(boolean b)
MapsAbstractButton.setBorderPainted(boolean)
through queuevoid
setContentAreaFilled(boolean b)
MapsAbstractButton.setContentAreaFilled(boolean)
through queuevoid
setDisabledIcon(javax.swing.Icon icon)
MapsAbstractButton.setDisabledIcon(Icon)
through queuevoid
setDisabledSelectedIcon(javax.swing.Icon icon)
MapsAbstractButton.setDisabledSelectedIcon(Icon)
through queuevoid
setFocusPainted(boolean b)
MapsAbstractButton.setFocusPainted(boolean)
through queuevoid
setHorizontalAlignment(int i)
MapsAbstractButton.setHorizontalAlignment(int)
through queuevoid
setHorizontalTextPosition(int i)
MapsAbstractButton.setHorizontalTextPosition(int)
through queuevoid
setIcon(javax.swing.Icon icon)
MapsAbstractButton.setIcon(Icon)
through queuevoid
setMargin(java.awt.Insets insets)
MapsAbstractButton.setMargin(Insets)
through queuevoid
setMnemonic(char c)
MapsAbstractButton.setMnemonic(char)
through queuevoid
setMnemonic(int i)
MapsAbstractButton.setMnemonic(int)
through queuevoid
setModel(javax.swing.ButtonModel buttonModel)
MapsAbstractButton.setModel(ButtonModel)
through queuevoid
setOutput(TestOut out)
Defines print output streams or writers.void
setPressedIcon(javax.swing.Icon icon)
MapsAbstractButton.setPressedIcon(Icon)
through queuevoid
setRolloverEnabled(boolean b)
MapsAbstractButton.setRolloverEnabled(boolean)
through queuevoid
setRolloverIcon(javax.swing.Icon icon)
MapsAbstractButton.setRolloverIcon(Icon)
through queuevoid
setRolloverSelectedIcon(javax.swing.Icon icon)
MapsAbstractButton.setRolloverSelectedIcon(Icon)
through queuevoid
setSelected(boolean b)
MapsAbstractButton.setSelected(boolean)
through queuevoid
setSelectedIcon(javax.swing.Icon icon)
MapsAbstractButton.setSelectedIcon(Icon)
through queuevoid
setText(java.lang.String string)
MapsAbstractButton.setText(String)
through queuevoid
setTimeouts(Timeouts timeouts)
Defines current timeouts.void
setUI(javax.swing.plaf.ButtonUI buttonUI)
MapsAbstractButton.setUI(ButtonUI)
through queuevoid
setVerticalAlignment(int i)
MapsAbstractButton.setVerticalAlignment(int)
through queuevoid
setVerticalTextPosition(int i)
MapsAbstractButton.setVerticalTextPosition(int)
through queuestatic javax.swing.AbstractButton
waitAbstractButton(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)
Waits AbstractButton by text.static javax.swing.AbstractButton
waitAbstractButton(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)
Waits AbstractButton by text.static javax.swing.AbstractButton
waitAbstractButton(java.awt.Container cont, ComponentChooser chooser)
Waits 0'th AbstractButton in container.static javax.swing.AbstractButton
waitAbstractButton(java.awt.Container cont, ComponentChooser chooser, int index)
Waits AbstractButton in container.void
waitSelected(boolean selected)
Waits for button to be selected.void
waitText(java.lang.String text)
Waits for text.-
Methods inherited from class org.netbeans.jemmy.operators.JComponentOperator
addAncestorListener, addVetoableChangeListener, computeVisibleRect, createToolTip, findJComponent, findJComponent, findJComponent, findJComponent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getAutoscrolls, getBorder, getCenterXForClick, getCenterYForClick, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getInsets, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVisibleRect, getWindowContainerOperator, grabFocus, isFocusCycleRoot, isManagingFocus, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, requestDefaultFocus, resetKeyboardActions, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, showToolTip, unregisterKeyboardAction, updateUI, waitJComponent, waitJComponent, waitJComponent, waitJComponent, waitToolTip
-
Methods inherited from class org.netbeans.jemmy.operators.ContainerOperator
add, add, add, add, add, addContainerListener, createSubOperator, createSubOperator, findComponentAt, findComponentAt, findContainer, findContainer, findContainer, findContainer, findContainerUnder, findContainerUnder, findSubComponent, findSubComponent, getComponent, getComponentCount, getComponents, getInsets, getLayout, isAncestorOf, paintComponents, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, waitContainer, waitContainer, waitContainer, waitContainer, waitSubComponent, waitSubComponent
-
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, getCenterY, 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, 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
-
-
-
-
Field Detail
-
TEXT_DPROP
public static final java.lang.String TEXT_DPROP
Identifier for a text property.- See Also:
getDump()
, Constant Field Values
-
IS_SELECTED_DPROP
public static final java.lang.String IS_SELECTED_DPROP
Identifier for a selected text property.- See Also:
getDump()
, Constant Field Values
-
-
Constructor Detail
-
AbstractButtonOperator
public AbstractButtonOperator(javax.swing.AbstractButton b)
Constructor.- Parameters:
b
- Thejava.awt.AbstractButton
managed by this instance.
-
AbstractButtonOperator
public AbstractButtonOperator(ContainerOperator cont, ComponentChooser chooser, int index)
Constructs an AbstractButtonOperator object.- Parameters:
cont
- containerchooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.
-
AbstractButtonOperator
public AbstractButtonOperator(ContainerOperator cont, ComponentChooser chooser)
Constructs an AbstractButtonOperator object.- Parameters:
cont
- containerchooser
- a component chooser specifying searching criteria.
-
AbstractButtonOperator
public AbstractButtonOperator(ContainerOperator cont, java.lang.String text, int index)
Constructor. Waits for a component in a container to show. The component is identified as theindex+1
'thjavax.swing.AbstractButton
that shows, lies below the container in the display containment hierarchy, and that has the desired text. Uses cont's timeout and output for waiting and to init this operator.- Parameters:
cont
- The operator for a container containing the sought for button.text
- Button text.index
- Ordinal component index. The first component hasindex
0.- Throws:
TimeoutExpiredException
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
AbstractButtonOperator
public AbstractButtonOperator(ContainerOperator cont, java.lang.String text)
Constructor. Waits for a component in a container to show. The component is identified as the firstjavax.swing.AbstractButton
that shows, lies below the container in the display containment hierarchy, and that has the desired text. Uses cont's timeout and output for waiting and to init this operator.- Parameters:
cont
- The operator for a container containing the sought for button.text
- Button text.- Throws:
TimeoutExpiredException
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
AbstractButtonOperator
public AbstractButtonOperator(ContainerOperator cont, int index)
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont
- The operator for a container containing the sought for button.index
- Ordinal component index.- Throws:
TimeoutExpiredException
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
AbstractButtonOperator
public AbstractButtonOperator(ContainerOperator cont)
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont
- The operator for a container containing the sought for button.- Throws:
TimeoutExpiredException
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
-
Method Detail
-
findAbstractButton
public static javax.swing.AbstractButton findAbstractButton(java.awt.Container cont, ComponentChooser chooser, int index)
Searches AbstractButton in a container.- Parameters:
cont
- Container in which to search for the component. The container lies above the component in the display containment hierarchy. The containment need not be direct.chooser
- org.netbeans.jemmy.ComponentChooser implementation, defining and applying search criteria.index
- Ordinal component index. The firstindex
is 0.- Returns:
- AbstractButton instance or null if component was not found.
-
findAbstractButton
public static javax.swing.AbstractButton findAbstractButton(java.awt.Container cont, ComponentChooser chooser)
Searches for the first AbstractButton in a container.- Parameters:
cont
- Container in which to search for the component. The container lies above the component in the display containment hierarchy. The containment need not be direct.chooser
- org.netbeans.jemmy.ComponentChooser implementation, defining and applying search criteria.- Returns:
- AbstractButton instance or null if component was not found.
-
findAbstractButton
public static javax.swing.AbstractButton findAbstractButton(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)
Searches AbstractButton by text.- Parameters:
cont
- Container to search component in.text
- Button text. If null, contents is not checked.ce
- Compare text exactly.ccs
- Compare text case sensitively.index
- Ordinal component index.- Returns:
- AbstractButton instance or null if component was not found.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
findAbstractButton
public static javax.swing.AbstractButton findAbstractButton(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)
Searches AbstractButton by text.- Parameters:
cont
- Container to search component in.text
- Button text. If null, contents is not checked.ce
- Compare text exactly.ccs
- Compare text case sensitively.- Returns:
- AbstractButton instance or null if component was not found.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
waitAbstractButton
public static javax.swing.AbstractButton waitAbstractButton(java.awt.Container cont, ComponentChooser chooser, int index)
Waits AbstractButton in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.index
- Ordinal component index.- Returns:
- AbstractButton instance.
- Throws:
TimeoutExpiredException
-
waitAbstractButton
public static javax.swing.AbstractButton waitAbstractButton(java.awt.Container cont, ComponentChooser chooser)
Waits 0'th AbstractButton in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- AbstractButton instance.
- Throws:
TimeoutExpiredException
-
waitAbstractButton
public static javax.swing.AbstractButton waitAbstractButton(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int index)
Waits AbstractButton by text.- Parameters:
cont
- Container to search component in.text
- Button text. If null, contents is not checked.ce
- Compare text exactly.ccs
- Compare text case sensitively.index
- Ordinal component index.- Returns:
- AbstractButton instance.
- Throws:
TimeoutExpiredException
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
waitAbstractButton
public static javax.swing.AbstractButton waitAbstractButton(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs)
Waits AbstractButton by text.- Parameters:
cont
- Container to search component in.text
- Button text. If null, contents is not checked.ce
- Compare text exactly.ccs
- Compare text case sensitively.- Returns:
- AbstractButton instance.
- Throws:
TimeoutExpiredException
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
setTimeouts
public void setTimeouts(Timeouts timeouts)
Description copied from interface:Timeoutable
Defines current timeouts.- Specified by:
setTimeouts
in interfaceTimeoutable
- Overrides:
setTimeouts
in classJComponentOperator
- Parameters:
timeouts
- 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 interfaceTimeoutable
- Overrides:
getTimeouts
in classJComponentOperator
- 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 interfaceOutputable
- Overrides:
setOutput
in classJComponentOperator
- 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 interfaceOutputable
- Overrides:
getOutput
in classJComponentOperator
- 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 classComponentOperator
- Parameters:
anotherOperator
- an operator to copy the environment to.
-
push
public void push()
Pushs the button using a ButtonDriver registered for this operator.
-
pushNoBlock
public void pushNoBlock()
Runspush()
method in a separate thread.
-
changeSelection
public void changeSelection(boolean selected)
Changes selection if necessary. Usespush()
method in order to do so.- Parameters:
selected
- a button selection.
-
changeSelectionNoBlock
public void changeSelectionNoBlock(boolean selected)
RunschangeSelection(boolean)
method in a separate thread.- Parameters:
selected
- a button selection.
-
press
public void press()
Press the button by mouse.- Throws:
TimeoutExpiredException
-
release
public void release()
Releases the button by mouse.- Throws:
TimeoutExpiredException
-
waitSelected
public void waitSelected(boolean selected)
Waits for button to be selected.- Parameters:
selected
- a button selection.
-
waitText
public void waitText(java.lang.String text)
Waits for text. Uses getComparator() comparator.- Parameters:
text
- Text to wait for.
-
getDump
public java.util.Hashtable getDump()
Returns information about component.- Overrides:
getDump
in classJComponentOperator
- Returns:
- a Hashtable containing name-value pairs.
-
addActionListener
public void addActionListener(java.awt.event.ActionListener actionListener)
MapsAbstractButton.addActionListener(ActionListener)
through queue
-
addChangeListener
public void addChangeListener(javax.swing.event.ChangeListener changeListener)
MapsAbstractButton.addChangeListener(ChangeListener)
through queue
-
addItemListener
public void addItemListener(java.awt.event.ItemListener itemListener)
MapsAbstractButton.addItemListener(ItemListener)
through queue
-
doClick
public void doClick()
MapsAbstractButton.doClick()
through queue
-
doClick
public void doClick(int i)
MapsAbstractButton.doClick(int)
through queue
-
getActionCommand
public java.lang.String getActionCommand()
MapsAbstractButton.getActionCommand()
through queue
-
getDisabledIcon
public javax.swing.Icon getDisabledIcon()
MapsAbstractButton.getDisabledIcon()
through queue
-
getDisabledSelectedIcon
public javax.swing.Icon getDisabledSelectedIcon()
MapsAbstractButton.getDisabledSelectedIcon()
through queue
-
getHorizontalAlignment
public int getHorizontalAlignment()
MapsAbstractButton.getHorizontalAlignment()
through queue
-
getHorizontalTextPosition
public int getHorizontalTextPosition()
MapsAbstractButton.getHorizontalTextPosition()
through queue
-
getIcon
public javax.swing.Icon getIcon()
MapsAbstractButton.getIcon()
through queue
-
getMargin
public java.awt.Insets getMargin()
MapsAbstractButton.getMargin()
through queue
-
getMnemonic
public int getMnemonic()
MapsAbstractButton.getMnemonic()
through queue
-
getModel
public javax.swing.ButtonModel getModel()
MapsAbstractButton.getModel()
through queue
-
getPressedIcon
public javax.swing.Icon getPressedIcon()
MapsAbstractButton.getPressedIcon()
through queue
-
getRolloverIcon
public javax.swing.Icon getRolloverIcon()
MapsAbstractButton.getRolloverIcon()
through queue
-
getRolloverSelectedIcon
public javax.swing.Icon getRolloverSelectedIcon()
MapsAbstractButton.getRolloverSelectedIcon()
through queue
-
getSelectedIcon
public javax.swing.Icon getSelectedIcon()
MapsAbstractButton.getSelectedIcon()
through queue
-
getSelectedObjects
public java.lang.Object[] getSelectedObjects()
MapsAbstractButton.getSelectedObjects()
through queue
-
getText
public java.lang.String getText()
MapsAbstractButton.getText()
through queue
-
getUI
public javax.swing.plaf.ButtonUI getUI()
MapsAbstractButton.getUI()
through queue
-
getVerticalAlignment
public int getVerticalAlignment()
MapsAbstractButton.getVerticalAlignment()
through queue
-
getVerticalTextPosition
public int getVerticalTextPosition()
MapsAbstractButton.getVerticalTextPosition()
through queue
-
isBorderPainted
public boolean isBorderPainted()
MapsAbstractButton.isBorderPainted()
through queue
-
isContentAreaFilled
public boolean isContentAreaFilled()
MapsAbstractButton.isContentAreaFilled()
through queue
-
isFocusPainted
public boolean isFocusPainted()
MapsAbstractButton.isFocusPainted()
through queue
-
isRolloverEnabled
public boolean isRolloverEnabled()
MapsAbstractButton.isRolloverEnabled()
through queue
-
isSelected
public boolean isSelected()
MapsAbstractButton.isSelected()
through queue
-
removeActionListener
public void removeActionListener(java.awt.event.ActionListener actionListener)
MapsAbstractButton.removeActionListener(ActionListener)
through queue
-
removeChangeListener
public void removeChangeListener(javax.swing.event.ChangeListener changeListener)
MapsAbstractButton.removeChangeListener(ChangeListener)
through queue
-
removeItemListener
public void removeItemListener(java.awt.event.ItemListener itemListener)
MapsAbstractButton.removeItemListener(ItemListener)
through queue
-
setActionCommand
public void setActionCommand(java.lang.String string)
MapsAbstractButton.setActionCommand(String)
through queue
-
setBorderPainted
public void setBorderPainted(boolean b)
MapsAbstractButton.setBorderPainted(boolean)
through queue
-
setContentAreaFilled
public void setContentAreaFilled(boolean b)
MapsAbstractButton.setContentAreaFilled(boolean)
through queue
-
setDisabledIcon
public void setDisabledIcon(javax.swing.Icon icon)
MapsAbstractButton.setDisabledIcon(Icon)
through queue
-
setDisabledSelectedIcon
public void setDisabledSelectedIcon(javax.swing.Icon icon)
MapsAbstractButton.setDisabledSelectedIcon(Icon)
through queue
-
setFocusPainted
public void setFocusPainted(boolean b)
MapsAbstractButton.setFocusPainted(boolean)
through queue
-
setHorizontalAlignment
public void setHorizontalAlignment(int i)
MapsAbstractButton.setHorizontalAlignment(int)
through queue
-
setHorizontalTextPosition
public void setHorizontalTextPosition(int i)
MapsAbstractButton.setHorizontalTextPosition(int)
through queue
-
setIcon
public void setIcon(javax.swing.Icon icon)
MapsAbstractButton.setIcon(Icon)
through queue
-
setMargin
public void setMargin(java.awt.Insets insets)
MapsAbstractButton.setMargin(Insets)
through queue
-
setMnemonic
public void setMnemonic(char c)
MapsAbstractButton.setMnemonic(char)
through queue
-
setMnemonic
public void setMnemonic(int i)
MapsAbstractButton.setMnemonic(int)
through queue
-
setModel
public void setModel(javax.swing.ButtonModel buttonModel)
MapsAbstractButton.setModel(ButtonModel)
through queue
-
setPressedIcon
public void setPressedIcon(javax.swing.Icon icon)
MapsAbstractButton.setPressedIcon(Icon)
through queue
-
setRolloverEnabled
public void setRolloverEnabled(boolean b)
MapsAbstractButton.setRolloverEnabled(boolean)
through queue
-
setRolloverIcon
public void setRolloverIcon(javax.swing.Icon icon)
MapsAbstractButton.setRolloverIcon(Icon)
through queue
-
setRolloverSelectedIcon
public void setRolloverSelectedIcon(javax.swing.Icon icon)
MapsAbstractButton.setRolloverSelectedIcon(Icon)
through queue
-
setSelected
public void setSelected(boolean b)
MapsAbstractButton.setSelected(boolean)
through queue
-
setSelectedIcon
public void setSelectedIcon(javax.swing.Icon icon)
MapsAbstractButton.setSelectedIcon(Icon)
through queue
-
setText
public void setText(java.lang.String string)
MapsAbstractButton.setText(String)
through queue
-
setUI
public void setUI(javax.swing.plaf.ButtonUI buttonUI)
MapsAbstractButton.setUI(ButtonUI)
through queue
-
setVerticalAlignment
public void setVerticalAlignment(int i)
MapsAbstractButton.setVerticalAlignment(int)
through queue
-
setVerticalTextPosition
public void setVerticalTextPosition(int i)
MapsAbstractButton.setVerticalTextPosition(int)
through queue
-
-