Package org.netbeans.jemmy.operators
Class ComponentOperator
- java.lang.Object
-
- org.netbeans.jemmy.operators.Operator
-
- org.netbeans.jemmy.operators.ComponentOperator
-
- All Implemented Interfaces:
Outputable,Timeoutable
- Direct Known Subclasses:
ButtonOperator,CheckboxOperator,ChoiceOperator,ContainerOperator,LabelOperator,ListOperator,ScrollbarOperator,TextComponentOperator
public class ComponentOperator extends Operator implements Timeoutable, Outputable
Root class for all component operators. Provides basic methods to operate with mouse and keyboard.
Almost all input methods can throw JemmyInputException or its subclass.
ComponentOperator and its subclasses has a lot of methods which name and parameters just like consistent component has. In this case operator class just invokes consistent component method through AWT Event Queue (invokeAndWait method).
Timeouts used:
ComponentOperator.PushKeyTimeout - time between key pressing and releasing
ComponentOperator.MouseClickTimeout - time between mouse pressing and releasing
ComponentOperator.WaitComponentTimeout - time to wait component displayed
ComponentOperator.WaitComponentEnabledTimeout - time to wait component enabled
ComponentOperator.BeforeDragTimeout - time to sleep before grag'n'drop operations
ComponentOperator.AfterDragTimeout - time to sleep after grag'n'drop operations
ComponentOperator.WaitFocusTimeout - time to wait component focus
ComponentOperator.WaitStateTimeout- time to wait component to be in some state. Typically used from methods likeOperator.wait"something happened"(*)
.- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
Timeouts
-
-
Nested Class Summary
-
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.StringHEIGHT_DPROPIdentifier for a height property.static java.lang.StringIS_SHOWING_DPROPIdentifier for a showing property.static java.lang.StringIS_VISIBLE_DPROPIdentifier for a visible property.static java.lang.StringNAME_DPROPIdentifier for a name property.static java.lang.StringWIDTH_DPROPIdentifier for a width property.static java.lang.StringX_DPROPIdentifier for a x coordinate property.static java.lang.StringY_DPROPIdentifier for a y coordinate property.-
Fields inherited from class org.netbeans.jemmy.operators.Operator
CLASS_DPROP, TO_STRING_DPROP
-
-
Constructor Summary
Constructors Constructor Description ComponentOperator(java.awt.Component comp)Constructor.ComponentOperator(ContainerOperator cont)Constructor.ComponentOperator(ContainerOperator cont, int index)Constructor.ComponentOperator(ContainerOperator cont, ComponentChooser chooser)Constructs a ComponentOperator object.ComponentOperator(ContainerOperator cont, ComponentChooser chooser, int index)Constructs a ComponentOperator object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidactivateWindow()Deprecated.Use makeComponentVisible() instead.voidadd(java.awt.PopupMenu popupMenu)MapsComponent.add(PopupMenu)through queuevoidaddComponentListener(java.awt.event.ComponentListener componentListener)MapsComponent.addComponentListener(ComponentListener)through queuevoidaddFocusListener(java.awt.event.FocusListener focusListener)MapsComponent.addFocusListener(FocusListener)through queuevoidaddInputMethodListener(java.awt.event.InputMethodListener inputMethodListener)MapsComponent.addInputMethodListener(InputMethodListener)through queuevoidaddKeyListener(java.awt.event.KeyListener keyListener)MapsComponent.addKeyListener(KeyListener)through queuevoidaddMouseListener(java.awt.event.MouseListener mouseListener)MapsComponent.addMouseListener(MouseListener)through queuevoidaddMouseMotionListener(java.awt.event.MouseMotionListener mouseMotionListener)MapsComponent.addMouseMotionListener(MouseMotionListener)through queuevoidaddNotify()MapsComponent.addNotify()through queuevoidaddPropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)MapsComponent.addPropertyChangeListener(PropertyChangeListener)through queuevoidaddPropertyChangeListener(java.lang.String string, java.beans.PropertyChangeListener propertyChangeListener)MapsComponent.addPropertyChangeListener(String, PropertyChangeListener)through queueintcheckImage(java.awt.Image image, int i, int i1, java.awt.image.ImageObserver imageObserver)MapsComponent.checkImage(Image, int, int, ImageObserver)through queueintcheckImage(java.awt.Image image, java.awt.image.ImageObserver imageObserver)MapsComponent.checkImage(Image, ImageObserver)through queuevoidclickForPopup()Clicks for popup by popup mouse button at the component center.voidclickForPopup(int mouseButton)Clicks for popup at the component center.voidclickForPopup(int x, int y)Clicks for popup by popup mouse button.voidclickForPopup(int x, int y, int mouseButton)Clicks for popup.voidclickMouse()Makes siple mouse click on the component center by default mouse button with 0 modifiers.voidclickMouse(int clickCount)Makes mouse click on the component center by default mouse button with 0 modifiers.voidclickMouse(int clickCount, int mouseButton)Makes mouse click on the component center with 0 modifiers.voidclickMouse(int x, int y, int clickCount)Makes mouse click by default mouse button with 0 modifiers.voidclickMouse(int x, int y, int clickCount, int mouseButton)Makes mouse click with 0 modifiers.voidclickMouse(int x, int y, int clickCount, int mouseButton, int modifiers)Makes mouse click.voidclickMouse(int x, int y, int clickCount, int mouseButton, int modifiers, boolean forPopup)Makes mouse click.booleancontains(int i, int i1)MapsComponent.contains(int, int)through queuebooleancontains(java.awt.Point point)MapsComponent.contains(Point)through queuevoidcopyEnvironment(Operator anotherOperator)Copies all environment (output, timeouts, visualizer) from another operator.java.awt.ImagecreateImage(int i, int i1)MapsComponent.createImage(int, int)through queuejava.awt.ImagecreateImage(java.awt.image.ImageProducer imageProducer)MapsComponent.createImage(ImageProducer)through queuevoiddispatchEvent(java.awt.AWTEvent aWTEvent)MapsComponent.dispatchEvent(AWTEvent)through queuevoiddoLayout()MapsComponent.doLayout()through queuevoiddragMouse(int x, int y)Drag mouse over the component with 0 modifiers and default mose button pressed.voiddragMouse(int x, int y, int mouseButton)Drag mouse over the component with 0 modifiers.voiddragMouse(int x, int y, int mouseButton, int modifiers)Drag mouse over the component.voiddragNDrop(int start_x, int start_y, int end_x, int end_y)Makes drag'n'drop operation by default mouse buttons with 0 modifiers.voiddragNDrop(int start_x, int start_y, int end_x, int end_y, int mouseButton)Makes drag'n'drop operation with 0 modifiers.voiddragNDrop(int start_x, int start_y, int end_x, int end_y, int mouseButton, int modifiers)Makes drag'n'drop operation.voidenableInputMethods(boolean b)MapsComponent.enableInputMethods(boolean)through queuevoidenterMouse()Move mouse inside the component.voidexitMouse()Move mouse outside the component.static java.awt.ComponentfindComponent(java.awt.Container cont, ComponentChooser chooser)Searches Component in container.static java.awt.ComponentfindComponent(java.awt.Container cont, ComponentChooser chooser, int index)Searches Component in container.floatgetAlignmentX()MapsComponent.getAlignmentX()through queuefloatgetAlignmentY()MapsComponent.getAlignmentY()through queuejava.awt.ColorgetBackground()MapsComponent.getBackground()through queuejava.awt.RectanglegetBounds()MapsComponent.getBounds()through queuejava.awt.RectanglegetBounds(java.awt.Rectangle rectangle)MapsComponent.getBounds(Rectangle)through queueintgetCenterX()Return the center x coordinate.intgetCenterXForClick()Return the x coordinate which should be used for mouse operations by default.intgetCenterY()Return the center y coordinate.intgetCenterYForClick()Return the y coordinate which should be used for mouse operations by default.java.awt.image.ColorModelgetColorModel()MapsComponent.getColorModel()through queuejava.awt.ComponentgetComponentAt(int i, int i1)MapsComponent.getComponentAt(int, int)through queuejava.awt.ComponentgetComponentAt(java.awt.Point point)MapsComponent.getComponentAt(Point)through queuejava.awt.ComponentOrientationgetComponentOrientation()MapsComponent.getComponentOrientation()through queuejava.awt.ContainergetContainer(ComponentChooser chooser)Searches a container.java.awt.Container[]getContainers()Returns an array of containers for this component.java.awt.CursorgetCursor()MapsComponent.getCursor()through queuejava.awt.dnd.DropTargetgetDropTarget()MapsComponent.getDropTarget()through queuejava.util.HashtablegetDump()Returns information about component.EventDispatchergetEventDispatcher()Returnes org.netbeans.jemmy.EventDispatcher instance which is used to dispatch events.voidgetFocus()Gives input focus to the component.java.awt.FontgetFont()MapsComponent.getFont()through queuejava.awt.FontMetricsgetFontMetrics(java.awt.Font font)MapsComponent.getFontMetrics(Font)through queuejava.awt.ColorgetForeground()MapsComponent.getForeground()through queuejava.awt.GraphicsgetGraphics()MapsComponent.getGraphics()through queueintgetHeight()MapsComponent.getHeight()through queuejava.awt.im.InputContextgetInputContext()MapsComponent.getInputContext()through queuejava.awt.im.InputMethodRequestsgetInputMethodRequests()MapsComponent.getInputMethodRequests()through queuejava.util.LocalegetLocale()MapsComponent.getLocale()through queuejava.awt.PointgetLocation()MapsComponent.getLocation()through queuejava.awt.PointgetLocation(java.awt.Point point)MapsComponent.getLocation(Point)through queuejava.awt.PointgetLocationOnScreen()MapsComponent.getLocationOnScreen()through queuejava.awt.DimensiongetMaximumSize()MapsComponent.getMaximumSize()through queuejava.awt.DimensiongetMinimumSize()MapsComponent.getMinimumSize()through queuejava.lang.StringgetName()MapsComponent.getName()through queueTestOutgetOutput()Returns print output streams or writers.java.awt.ContainergetParent()MapsComponent.getParent()through queuejava.awt.DimensiongetPreferredSize()MapsComponent.getPreferredSize()through queuejava.awt.DimensiongetSize()MapsComponent.getSize()through queuejava.awt.DimensiongetSize(java.awt.Dimension dimension)MapsComponent.getSize(Dimension)through queuejava.awt.ComponentgetSource()Returns component.TimeoutsgetTimeouts()Return current timeouts.java.awt.ToolkitgetToolkit()MapsComponent.getToolkit()through queuejava.lang.ObjectgetTreeLock()MapsComponent.getTreeLock()through queueintgetWidth()MapsComponent.getWidth()through queuejava.awt.WindowgetWindow()Searches the window under component.intgetX()MapsComponent.getX()through queueintgetY()MapsComponent.getY()through queuebooleanhasFocus()MapsComponent.hasFocus()through queuebooleanimageUpdate(java.awt.Image image, int i, int i1, int i2, int i3, int i4)MapsComponent.imageUpdate(Image, int, int, int, int, int)through queuevoidinvalidate()MapsComponent.invalidate()through queuebooleanisDisplayable()MapsComponent.isDisplayable()through queuebooleanisDoubleBuffered()MapsComponent.isDoubleBuffered()through queuebooleanisEnabled()MapsComponent.isEnabled()through queuebooleanisFocusTraversable()MapsComponent.isFocusTraversable()through queuebooleanisLightweight()MapsComponent.isLightweight()through queuebooleanisOpaque()MapsComponent.isOpaque()through queuebooleanisShowing()MapsComponent.isShowing()through queuebooleanisValid()MapsComponent.isValid()through queuebooleanisVisible()MapsComponent.isVisible()through queuevoidlist()MapsComponent.list()through queuevoidlist(java.io.PrintStream printStream)MapsComponent.list(PrintStream)through queuevoidlist(java.io.PrintStream printStream, int i)MapsComponent.list(PrintStream, int)through queuevoidlist(java.io.PrintWriter printWriter)MapsComponent.list(PrintWriter)through queuevoidlist(java.io.PrintWriter printWriter, int i)MapsComponent.list(PrintWriter, int)through queuevoidmakeComponentVisible()Prepares component for user input.voidmoveMouse(int x, int y)Move mouse over the component.voidpaint(java.awt.Graphics graphics)MapsComponent.paint(Graphics)through queuevoidpaintAll(java.awt.Graphics graphics)MapsComponent.paintAll(Graphics)through queuebooleanprepareImage(java.awt.Image image, int i, int i1, java.awt.image.ImageObserver imageObserver)MapsComponent.prepareImage(Image, int, int, ImageObserver)through queuebooleanprepareImage(java.awt.Image image, java.awt.image.ImageObserver imageObserver)MapsComponent.prepareImage(Image, ImageObserver)through queuevoidpressKey(int keyCode)Press key with no modifiers.voidpressKey(int keyCode, int modifiers)Press key.voidpressMouse()Press mouse.voidpressMouse(int x, int y)Press mouse.voidprint(java.awt.Graphics graphics)MapsComponent.print(Graphics)through queuevoidprintAll(java.awt.Graphics graphics)MapsComponent.printAll(Graphics)through queuevoidpushKey(int keyCode)Pushs key.voidpushKey(int keyCode, int modifiers)Pushs key.voidreleaseKey(int keyCode)Releases key with no modifiers.voidreleaseKey(int keyCode, int modifiers)Releases key.voidreleaseMouse()Releases mouse.voidreleaseMouse(int x, int y)Releases mouse.voidremove(java.awt.MenuComponent menuComponent)MapsComponent.remove(MenuComponent)through queuevoidremoveComponentListener(java.awt.event.ComponentListener componentListener)MapsComponent.removeComponentListener(ComponentListener)through queuevoidremoveFocusListener(java.awt.event.FocusListener focusListener)MapsComponent.removeFocusListener(FocusListener)through queuevoidremoveInputMethodListener(java.awt.event.InputMethodListener inputMethodListener)MapsComponent.removeInputMethodListener(InputMethodListener)through queuevoidremoveKeyListener(java.awt.event.KeyListener keyListener)MapsComponent.removeKeyListener(KeyListener)through queuevoidremoveMouseListener(java.awt.event.MouseListener mouseListener)MapsComponent.removeMouseListener(MouseListener)through queuevoidremoveMouseMotionListener(java.awt.event.MouseMotionListener mouseMotionListener)MapsComponent.removeMouseMotionListener(MouseMotionListener)through queuevoidremoveNotify()MapsComponent.removeNotify()through queuevoidremovePropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)MapsComponent.removePropertyChangeListener(PropertyChangeListener)through queuevoidremovePropertyChangeListener(java.lang.String string, java.beans.PropertyChangeListener propertyChangeListener)MapsComponent.removePropertyChangeListener(String, PropertyChangeListener)through queuevoidrepaint()MapsComponent.repaint()through queuevoidrepaint(int i, int i1, int i2, int i3)MapsComponent.repaint(int, int, int, int)through queuevoidrepaint(long l)MapsComponent.repaint(long)through queuevoidrepaint(long l, int i, int i1, int i2, int i3)MapsComponent.repaint(long, int, int, int, int)through queuevoidrequestFocus()MapsComponent.requestFocus()through queuevoidsetBackground(java.awt.Color color)MapsComponent.setBackground(Color)through queuevoidsetBounds(int i, int i1, int i2, int i3)MapsComponent.setBounds(int, int, int, int)through queuevoidsetBounds(java.awt.Rectangle rectangle)MapsComponent.setBounds(Rectangle)through queuevoidsetComponentOrientation(java.awt.ComponentOrientation componentOrientation)MapsComponent.setComponentOrientation(ComponentOrientation)through queuevoidsetCursor(java.awt.Cursor cursor)MapsComponent.setCursor(Cursor)through queuevoidsetDropTarget(java.awt.dnd.DropTarget dropTarget)MapsComponent.setDropTarget(DropTarget)through queuevoidsetEnabled(boolean b)MapsComponent.setEnabled(boolean)through queuevoidsetFont(java.awt.Font font)MapsComponent.setFont(Font)through queuevoidsetForeground(java.awt.Color color)MapsComponent.setForeground(Color)through queuevoidsetLocale(java.util.Locale locale)MapsComponent.setLocale(Locale)through queuevoidsetLocation(int i, int i1)MapsComponent.setLocation(int, int)through queuevoidsetLocation(java.awt.Point point)MapsComponent.setLocation(Point)through queuevoidsetName(java.lang.String string)MapsComponent.setName(String)through queuevoidsetOutput(TestOut out)Defines print output streams or writers.voidsetSize(int i, int i1)MapsComponent.setSize(int, int)through queuevoidsetSize(java.awt.Dimension dimension)MapsComponent.setSize(Dimension)through queuevoidsetTimeouts(Timeouts timeouts)Defines current timeouts.voidsetVisible(boolean b)MapsComponent.setVisible(boolean)through queuevoidtransferFocus()MapsComponent.transferFocus()through queuevoidtypeKey(char keyChar)Types one char.voidtypeKey(char keyChar, int modifiers)Types one char.voidtypeKey(int keyCode, char keyChar, int modifiers)Types one char.voidupdate(java.awt.Graphics graphics)MapsComponent.update(Graphics)through queuevoidvalidate()MapsComponent.validate()through queuestatic java.awt.ComponentwaitComponent(java.awt.Container cont, ComponentChooser chooser)Waits Component in container.static java.awt.ComponentwaitComponent(java.awt.Container cont, ComponentChooser chooser, int index)Waits Component in container.protected static java.awt.ComponentwaitComponent(java.awt.Container cont, ComponentChooser chooser, int index, Timeouts timeouts, TestOut output)A method to be used from subclasses.protected static java.awt.ComponentwaitComponent(ContainerOperator contOper, ComponentChooser chooser, int index)A method to be used from subclasses.voidwaitComponentEnabled()Waits for the component to be enabled.voidwaitComponentShowing(boolean visibility)voidwaitComponentVisible(boolean visibility)Waits for the component to be visible or unvisible.voidwaitHasFocus()Waits for this Component has the keyboard focus.voidwtComponentEnabled()Waits for the component to be enabled.-
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
-
NAME_DPROP
public static final java.lang.String NAME_DPROP
Identifier for a name property.- See Also:
getDump(), Constant Field Values
-
IS_VISIBLE_DPROP
public static final java.lang.String IS_VISIBLE_DPROP
Identifier for a visible property.- See Also:
getDump(), Constant Field Values
-
IS_SHOWING_DPROP
public static final java.lang.String IS_SHOWING_DPROP
Identifier for a showing property.- See Also:
getDump(), Constant Field Values
-
X_DPROP
public static final java.lang.String X_DPROP
Identifier for a x coordinate property.- See Also:
getDump(), Constant Field Values
-
Y_DPROP
public static final java.lang.String Y_DPROP
Identifier for a y coordinate property.- See Also:
getDump(), Constant Field Values
-
WIDTH_DPROP
public static final java.lang.String WIDTH_DPROP
Identifier for a width property.- See Also:
getDump(), Constant Field Values
-
HEIGHT_DPROP
public static final java.lang.String HEIGHT_DPROP
Identifier for a height property.- See Also:
getDump(), Constant Field Values
-
-
Constructor Detail
-
ComponentOperator
public ComponentOperator(java.awt.Component comp)
Constructor.- Parameters:
comp- a component
-
ComponentOperator
public ComponentOperator(ContainerOperator cont, ComponentChooser chooser, int index)
Constructs a ComponentOperator object.- Parameters:
cont- containerchooser- a component chooser specifying searching criteria.index- an index between appropriate ones.
-
ComponentOperator
public ComponentOperator(ContainerOperator cont, ComponentChooser chooser)
Constructs a ComponentOperator object.- Parameters:
cont- containerchooser- a component chooser specifying searching criteria.
-
ComponentOperator
public ComponentOperator(ContainerOperator cont, int index)
Constructor. Waits for a component in a container to show. The component is iis theindex+1'thjava.awt.Componentthat shows and that lies below the container in the display containment hierarchy. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont- Operator for a java.awt.Container.index- an index between appropriate ones.- Throws:
TimeoutExpiredException
-
ComponentOperator
public ComponentOperator(ContainerOperator cont)
Constructor. Waits for a component in a container to show. The component is is the firstjava.awt.Componentthat shows and that lies below the container in the display containment hierarchy. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont- Operator for a java.awt.Container.- Throws:
TimeoutExpiredException
-
-
Method Detail
-
findComponent
public static java.awt.Component findComponent(java.awt.Container cont, ComponentChooser chooser, int index)Searches Component in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.index- Ordinal component index.- Returns:
- Component instance or null if component was not found.
-
findComponent
public static java.awt.Component findComponent(java.awt.Container cont, ComponentChooser chooser)Searches Component in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- Component instance or null if component was not found.
-
waitComponent
public static java.awt.Component waitComponent(java.awt.Container cont, ComponentChooser chooser, int index)Waits Component in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.index- Ordinal component index.- Returns:
- Component instance or null if component was not found.
- Throws:
TimeoutExpiredException
-
waitComponent
public static java.awt.Component waitComponent(java.awt.Container cont, ComponentChooser chooser)Waits Component in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- Component instance or null if component was not found.
- Throws:
TimeoutExpiredException
-
waitComponent
protected static java.awt.Component waitComponent(ContainerOperator contOper, ComponentChooser chooser, int index)
A method to be used from subclasses. UsescontOper's timeouts and output during the waiting.- Parameters:
contOper- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.index- Ordinal component index.- Returns:
- Component instance or null if component was not found.
- Throws:
TimeoutExpiredException
-
waitComponent
protected static java.awt.Component waitComponent(java.awt.Container cont, ComponentChooser chooser, int index, Timeouts timeouts, TestOut output)A method to be used from subclasses. Uses timeouts and output passed as parameters during the waiting.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.index- Ordinal component index.timeouts- timeouts to be used during the waiting.output- an output to be used during the waiting.- Returns:
- Component instance or null if component was not found.
- Throws:
TimeoutExpiredException
-
getSource
public java.awt.Component getSource()
Returns component.
-
getEventDispatcher
public EventDispatcher getEventDispatcher()
Returnes org.netbeans.jemmy.EventDispatcher instance which is used to dispatch events.- Returns:
- the dispatcher.
- See Also:
EventDispatcher
-
setOutput
public void setOutput(TestOut out)
Description copied from interface:OutputableDefines print output streams or writers.- Specified by:
setOutputin interfaceOutputable- Overrides:
setOutputin classOperator- Parameters:
out- Identify the streams or writers used for print output.- See Also:
Outputable.getOutput()
-
getOutput
public TestOut getOutput()
Description copied from interface:OutputableReturns print output streams or writers.- Specified by:
getOutputin interfaceOutputable- Overrides:
getOutputin classOperator- Returns:
- an object that contains references to objects for printing to output and err streams.
- See Also:
Outputable.setOutput(org.netbeans.jemmy.TestOut)
-
setTimeouts
public void setTimeouts(Timeouts timeouts)
Description copied from interface:TimeoutableDefines current timeouts.- Specified by:
setTimeoutsin interfaceTimeoutable- Overrides:
setTimeoutsin classOperator- Parameters:
timeouts- A collection of timeout assignments.- See Also:
Timeoutable.getTimeouts()
-
getTimeouts
public Timeouts getTimeouts()
Description copied from interface:TimeoutableReturn current timeouts.- Specified by:
getTimeoutsin interfaceTimeoutable- Overrides:
getTimeoutsin classOperator- Returns:
- the collection of current timeout assignments.
- See Also:
Timeoutable.setTimeouts(org.netbeans.jemmy.Timeouts)
-
copyEnvironment
public void copyEnvironment(Operator anotherOperator)
Description copied from class:OperatorCopies all environment (output, timeouts, visualizer) from another operator.- Overrides:
copyEnvironmentin classOperator- Parameters:
anotherOperator- an operator to copy the environment to.
-
clickMouse
public void clickMouse(int x, int y, int clickCount, int mouseButton, int modifiers, boolean forPopup)Makes mouse click.- Parameters:
x- Horizontal click coordinatey- Vertical click coordinateclickCount- Click countmouseButton- Mouse button (InputEvent.BUTTON1/2/3_MASK value)modifiers- Modifiers (combination of InputEvent.*_MASK values)forPopup- signals that click is intended to call popup.
-
clickMouse
public void clickMouse(int x, int y, int clickCount, int mouseButton, int modifiers)Makes mouse click.- Parameters:
x- Horizontal click coordinatey- Vertical click coordinateclickCount- Click countmouseButton- Mouse button (InputEvent.BUTTON1/2/3_MASK value)modifiers- Modifiers (combination of InputEvent.*_MASK values)- See Also:
clickMouse(int, int, int, int, int, boolean)
-
clickMouse
public void clickMouse(int x, int y, int clickCount, int mouseButton)Makes mouse click with 0 modifiers.- Parameters:
x- Horizontal click coordinatey- Vertical click coordinateclickCount- Click countmouseButton- Mouse button (InputEvent.BUTTON1/2/3_MASK value)- See Also:
clickMouse(int, int, int, int, int)
-
clickMouse
public void clickMouse(int x, int y, int clickCount)Makes mouse click by default mouse button with 0 modifiers.- Parameters:
x- Horizontal click coordinatey- Vertical click coordinateclickCount- Click count- See Also:
clickMouse(int, int, int, int),Operator.getDefaultMouseButton()
-
pressMouse
public void pressMouse(int x, int y)Press mouse.- Parameters:
x- Horizontal click coordinatey- Vertical click coordinate
-
releaseMouse
public void releaseMouse(int x, int y)Releases mouse.- Parameters:
x- Horizontal click coordinatey- Vertical click coordinate
-
moveMouse
public void moveMouse(int x, int y)Move mouse over the component.- Parameters:
x- Horisontal destination coordinate.y- Vertical destination coordinate.
-
dragMouse
public void dragMouse(int x, int y, int mouseButton, int modifiers)Drag mouse over the component.- Parameters:
x- Horisontal destination coordinate.y- Vertical destination coordinate.mouseButton- Mouse buttonmodifiers- Modifiers
-
dragMouse
public void dragMouse(int x, int y, int mouseButton)Drag mouse over the component with 0 modifiers.- Parameters:
x- Horisontal destination coordinate.y- Vertical destination coordinate.mouseButton- Mouse button- See Also:
dragMouse(int, int, int, int)
-
dragMouse
public void dragMouse(int x, int y)Drag mouse over the component with 0 modifiers and default mose button pressed.- Parameters:
x- Horisontal destination coordinate.y- Vertical destination coordinate.- See Also:
dragMouse(int, int, int),Operator.getDefaultMouseButton()
-
dragNDrop
public void dragNDrop(int start_x, int start_y, int end_x, int end_y, int mouseButton, int modifiers)Makes drag'n'drop operation.- Parameters:
start_x- Start horizontal coordinatestart_y- Start vertical coordinateend_x- End horizontal coordinateend_y- End vertical coordinatemouseButton- Mouse buttonmodifiers- Modifiers
-
dragNDrop
public void dragNDrop(int start_x, int start_y, int end_x, int end_y, int mouseButton)Makes drag'n'drop operation with 0 modifiers.- Parameters:
start_x- Start horizontal coordinatestart_y- Start vertical coordinateend_x- End horizontal coordinateend_y- End vertical coordinatemouseButton- Mouse button- See Also:
dragNDrop(int, int, int, int, int, int)
-
dragNDrop
public void dragNDrop(int start_x, int start_y, int end_x, int end_y)Makes drag'n'drop operation by default mouse buttons with 0 modifiers.- Parameters:
start_x- Start horizontal coordinatestart_y- Start vertical coordinateend_x- End horizontal coordinateend_y- End vertical coordinate- See Also:
dragNDrop(int, int, int, int, int),Operator.getDefaultMouseButton()
-
clickForPopup
public void clickForPopup(int x, int y, int mouseButton)Clicks for popup.- Parameters:
x- Horizontal click coordinate.y- Vertical click coordinate.mouseButton- Mouse button.- See Also:
clickMouse(int, int, int, int, int, boolean)
-
clickForPopup
public void clickForPopup(int x, int y)Clicks for popup by popup mouse button.- Parameters:
x- Horizontal click coordinate.y- Vertical click coordinate.- See Also:
clickForPopup(int, int, int),Operator.getPopupMouseButton()
-
clickMouse
public void clickMouse(int clickCount, int mouseButton)Makes mouse click on the component center with 0 modifiers.- Parameters:
clickCount- Click countmouseButton- Mouse button (InputEvent.BUTTON1/2/3_MASK value)- See Also:
clickMouse(int, int, int, int)
-
clickMouse
public void clickMouse(int clickCount)
Makes mouse click on the component center by default mouse button with 0 modifiers.- Parameters:
clickCount- Click count- See Also:
clickMouse(int, int),Operator.getDefaultMouseButton()
-
clickMouse
public void clickMouse()
Makes siple mouse click on the component center by default mouse button with 0 modifiers.- See Also:
clickMouse(int),Operator.getDefaultMouseButton()
-
enterMouse
public void enterMouse()
Move mouse inside the component.
-
exitMouse
public void exitMouse()
Move mouse outside the component.
-
pressMouse
public void pressMouse()
Press mouse.
-
releaseMouse
public void releaseMouse()
Releases mouse.
-
clickForPopup
public void clickForPopup(int mouseButton)
Clicks for popup at the component center.- Parameters:
mouseButton- Mouse button.- See Also:
clickForPopup(int, int)
-
clickForPopup
public void clickForPopup()
Clicks for popup by popup mouse button at the component center.- See Also:
clickForPopup(int),Operator.getPopupMouseButton()
-
pressKey
public void pressKey(int keyCode, int modifiers)Press key.- Parameters:
keyCode- Key code (KeyEvent.VK_* value)modifiers- Modifiers (combination of InputEvent.*_MASK fields)
-
pressKey
public void pressKey(int keyCode)
Press key with no modifiers.- Parameters:
keyCode- Key code (KeyEvent.VK_* value)
-
releaseKey
public void releaseKey(int keyCode, int modifiers)Releases key.- Parameters:
keyCode- Key code (KeyEvent.VK_* value)modifiers- Modifiers (combination of InputEvent.*_MASK fields)
-
releaseKey
public void releaseKey(int keyCode)
Releases key with no modifiers.- Parameters:
keyCode- Key code (KeyEvent.VK_* value)
-
pushKey
public void pushKey(int keyCode, int modifiers)Pushs key.- Parameters:
keyCode- Key code (KeyEvent.VK_* value)modifiers- Modifiers (combination of InputEvent.*_MASK fields)
-
pushKey
public void pushKey(int keyCode)
Pushs key.- Parameters:
keyCode- Key code (KeyEvent.VK_* value)
-
typeKey
public void typeKey(int keyCode, char keyChar, int modifiers)Types one char.- Parameters:
keyCode- Key code (KeyEvent.VK_* value)keyChar- Char to be typed.modifiers- Modifiers (combination of InputEvent.*_MASK fields)
-
typeKey
public void typeKey(char keyChar, int modifiers)Types one char. Uses map defined by setCharBindingMap(CharBindingMap) method to find a key should be pressed.- Parameters:
keyChar- Char to be typed.modifiers- Modifiers (combination of InputEvent.*_MASK fields)- See Also:
CharBindingMap,Operator.setCharBindingMap(CharBindingMap),typeKey(int, char, int)
-
typeKey
public void typeKey(char keyChar)
Types one char. Uses map defined by setCharBindingMap(CharBindingMap) method to find a key and modifiers should be pressed.- Parameters:
keyChar- Char to be typed.- See Also:
Operator.setCharBindingMap(CharBindingMap),typeKey(char, int)
-
activateWindow
public void activateWindow()
Deprecated.Use makeComponentVisible() instead.Activates component's window.- See Also:
makeComponentVisible()
-
makeComponentVisible
public void makeComponentVisible()
Prepares component for user input. Uses visualizer defined by setVisualiser() method.
-
getFocus
public void getFocus()
Gives input focus to the component.
-
getCenterX
public int getCenterX()
Return the center x coordinate.- Returns:
- the center x coordinate.
-
getCenterY
public int getCenterY()
Return the center y coordinate.- Returns:
- the center y coordinate.
-
getCenterXForClick
public int getCenterXForClick()
Return the x coordinate which should be used for mouse operations by default.- Returns:
- the center x coordinate of the visible component part.
-
getCenterYForClick
public int getCenterYForClick()
Return the y coordinate which should be used for mouse operations by default.- Returns:
- the center y coordinate of the visible component part.
-
waitComponentEnabled
public void waitComponentEnabled() throws java.lang.InterruptedExceptionWaits for the component to be enabled.- Throws:
TimeoutExpiredExceptionjava.lang.InterruptedException
-
wtComponentEnabled
public void wtComponentEnabled()
Waits for the component to be enabled. per request: 37831- Throws:
TimeoutExpiredException
-
getContainers
public java.awt.Container[] getContainers()
Returns an array of containers for this component.- Returns:
- an array of containers
-
getContainer
public java.awt.Container getContainer(ComponentChooser chooser)
Searches a container.- Parameters:
chooser- a chooser specifying the searching criteria.- Returns:
- a containers specified by searching criteria.
-
getWindow
public java.awt.Window getWindow()
Searches the window under component.- Returns:
- the component window.
-
waitHasFocus
public void waitHasFocus()
Waits for this Component has the keyboard focus.- Throws:
TimeoutExpiredException
-
waitComponentVisible
public void waitComponentVisible(boolean visibility)
Waits for the component to be visible or unvisible.- Parameters:
visibility- required visiblity.- Throws:
TimeoutExpiredException
-
waitComponentShowing
public void waitComponentShowing(boolean visibility)
-
getDump
public java.util.Hashtable getDump()
Returns information about component.
-
add
public void add(java.awt.PopupMenu popupMenu)
MapsComponent.add(PopupMenu)through queue
-
addComponentListener
public void addComponentListener(java.awt.event.ComponentListener componentListener)
MapsComponent.addComponentListener(ComponentListener)through queue
-
addFocusListener
public void addFocusListener(java.awt.event.FocusListener focusListener)
MapsComponent.addFocusListener(FocusListener)through queue
-
addInputMethodListener
public void addInputMethodListener(java.awt.event.InputMethodListener inputMethodListener)
MapsComponent.addInputMethodListener(InputMethodListener)through queue
-
addKeyListener
public void addKeyListener(java.awt.event.KeyListener keyListener)
MapsComponent.addKeyListener(KeyListener)through queue
-
addMouseListener
public void addMouseListener(java.awt.event.MouseListener mouseListener)
MapsComponent.addMouseListener(MouseListener)through queue
-
addMouseMotionListener
public void addMouseMotionListener(java.awt.event.MouseMotionListener mouseMotionListener)
MapsComponent.addMouseMotionListener(MouseMotionListener)through queue
-
addNotify
public void addNotify()
MapsComponent.addNotify()through queue
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
MapsComponent.addPropertyChangeListener(PropertyChangeListener)through queue
-
addPropertyChangeListener
public void addPropertyChangeListener(java.lang.String string, java.beans.PropertyChangeListener propertyChangeListener)MapsComponent.addPropertyChangeListener(String, PropertyChangeListener)through queue
-
checkImage
public int checkImage(java.awt.Image image, int i, int i1, java.awt.image.ImageObserver imageObserver)MapsComponent.checkImage(Image, int, int, ImageObserver)through queue
-
checkImage
public int checkImage(java.awt.Image image, java.awt.image.ImageObserver imageObserver)MapsComponent.checkImage(Image, ImageObserver)through queue
-
contains
public boolean contains(int i, int i1)MapsComponent.contains(int, int)through queue
-
contains
public boolean contains(java.awt.Point point)
MapsComponent.contains(Point)through queue
-
createImage
public java.awt.Image createImage(int i, int i1)MapsComponent.createImage(int, int)through queue
-
createImage
public java.awt.Image createImage(java.awt.image.ImageProducer imageProducer)
MapsComponent.createImage(ImageProducer)through queue
-
dispatchEvent
public void dispatchEvent(java.awt.AWTEvent aWTEvent)
MapsComponent.dispatchEvent(AWTEvent)through queue
-
doLayout
public void doLayout()
MapsComponent.doLayout()through queue
-
enableInputMethods
public void enableInputMethods(boolean b)
MapsComponent.enableInputMethods(boolean)through queue
-
getAlignmentX
public float getAlignmentX()
MapsComponent.getAlignmentX()through queue
-
getAlignmentY
public float getAlignmentY()
MapsComponent.getAlignmentY()through queue
-
getBackground
public java.awt.Color getBackground()
MapsComponent.getBackground()through queue
-
getBounds
public java.awt.Rectangle getBounds()
MapsComponent.getBounds()through queue
-
getBounds
public java.awt.Rectangle getBounds(java.awt.Rectangle rectangle)
MapsComponent.getBounds(Rectangle)through queue
-
getColorModel
public java.awt.image.ColorModel getColorModel()
MapsComponent.getColorModel()through queue
-
getComponentAt
public java.awt.Component getComponentAt(int i, int i1)MapsComponent.getComponentAt(int, int)through queue
-
getComponentAt
public java.awt.Component getComponentAt(java.awt.Point point)
MapsComponent.getComponentAt(Point)through queue
-
getComponentOrientation
public java.awt.ComponentOrientation getComponentOrientation()
MapsComponent.getComponentOrientation()through queue
-
getCursor
public java.awt.Cursor getCursor()
MapsComponent.getCursor()through queue
-
getDropTarget
public java.awt.dnd.DropTarget getDropTarget()
MapsComponent.getDropTarget()through queue
-
getFont
public java.awt.Font getFont()
MapsComponent.getFont()through queue
-
getFontMetrics
public java.awt.FontMetrics getFontMetrics(java.awt.Font font)
MapsComponent.getFontMetrics(Font)through queue
-
getForeground
public java.awt.Color getForeground()
MapsComponent.getForeground()through queue
-
getGraphics
public java.awt.Graphics getGraphics()
MapsComponent.getGraphics()through queue
-
getHeight
public int getHeight()
MapsComponent.getHeight()through queue
-
getInputContext
public java.awt.im.InputContext getInputContext()
MapsComponent.getInputContext()through queue
-
getInputMethodRequests
public java.awt.im.InputMethodRequests getInputMethodRequests()
MapsComponent.getInputMethodRequests()through queue
-
getLocale
public java.util.Locale getLocale()
MapsComponent.getLocale()through queue
-
getLocation
public java.awt.Point getLocation()
MapsComponent.getLocation()through queue
-
getLocation
public java.awt.Point getLocation(java.awt.Point point)
MapsComponent.getLocation(Point)through queue
-
getLocationOnScreen
public java.awt.Point getLocationOnScreen()
MapsComponent.getLocationOnScreen()through queue
-
getMaximumSize
public java.awt.Dimension getMaximumSize()
MapsComponent.getMaximumSize()through queue
-
getMinimumSize
public java.awt.Dimension getMinimumSize()
MapsComponent.getMinimumSize()through queue
-
getName
public java.lang.String getName()
MapsComponent.getName()through queue
-
getParent
public java.awt.Container getParent()
MapsComponent.getParent()through queue
-
getPreferredSize
public java.awt.Dimension getPreferredSize()
MapsComponent.getPreferredSize()through queue
-
getSize
public java.awt.Dimension getSize()
MapsComponent.getSize()through queue
-
getSize
public java.awt.Dimension getSize(java.awt.Dimension dimension)
MapsComponent.getSize(Dimension)through queue
-
getToolkit
public java.awt.Toolkit getToolkit()
MapsComponent.getToolkit()through queue
-
getTreeLock
public java.lang.Object getTreeLock()
MapsComponent.getTreeLock()through queue
-
getWidth
public int getWidth()
MapsComponent.getWidth()through queue
-
getX
public int getX()
MapsComponent.getX()through queue
-
getY
public int getY()
MapsComponent.getY()through queue
-
hasFocus
public boolean hasFocus()
MapsComponent.hasFocus()through queue
-
imageUpdate
public boolean imageUpdate(java.awt.Image image, int i, int i1, int i2, int i3, int i4)MapsComponent.imageUpdate(Image, int, int, int, int, int)through queue
-
invalidate
public void invalidate()
MapsComponent.invalidate()through queue
-
isDisplayable
public boolean isDisplayable()
MapsComponent.isDisplayable()through queue
-
isDoubleBuffered
public boolean isDoubleBuffered()
MapsComponent.isDoubleBuffered()through queue
-
isEnabled
public boolean isEnabled()
MapsComponent.isEnabled()through queue
-
isFocusTraversable
public boolean isFocusTraversable()
MapsComponent.isFocusTraversable()through queue
-
isLightweight
public boolean isLightweight()
MapsComponent.isLightweight()through queue
-
isOpaque
public boolean isOpaque()
MapsComponent.isOpaque()through queue
-
isShowing
public boolean isShowing()
MapsComponent.isShowing()through queue
-
isValid
public boolean isValid()
MapsComponent.isValid()through queue
-
isVisible
public boolean isVisible()
MapsComponent.isVisible()through queue
-
list
public void list()
MapsComponent.list()through queue
-
list
public void list(java.io.PrintStream printStream)
MapsComponent.list(PrintStream)through queue
-
list
public void list(java.io.PrintStream printStream, int i)MapsComponent.list(PrintStream, int)through queue
-
list
public void list(java.io.PrintWriter printWriter)
MapsComponent.list(PrintWriter)through queue
-
list
public void list(java.io.PrintWriter printWriter, int i)MapsComponent.list(PrintWriter, int)through queue
-
paint
public void paint(java.awt.Graphics graphics)
MapsComponent.paint(Graphics)through queue
-
paintAll
public void paintAll(java.awt.Graphics graphics)
MapsComponent.paintAll(Graphics)through queue
-
prepareImage
public boolean prepareImage(java.awt.Image image, int i, int i1, java.awt.image.ImageObserver imageObserver)MapsComponent.prepareImage(Image, int, int, ImageObserver)through queue
-
prepareImage
public boolean prepareImage(java.awt.Image image, java.awt.image.ImageObserver imageObserver)MapsComponent.prepareImage(Image, ImageObserver)through queue
-
print
public void print(java.awt.Graphics graphics)
MapsComponent.print(Graphics)through queue
-
printAll
public void printAll(java.awt.Graphics graphics)
MapsComponent.printAll(Graphics)through queue
-
remove
public void remove(java.awt.MenuComponent menuComponent)
MapsComponent.remove(MenuComponent)through queue
-
removeComponentListener
public void removeComponentListener(java.awt.event.ComponentListener componentListener)
MapsComponent.removeComponentListener(ComponentListener)through queue
-
removeFocusListener
public void removeFocusListener(java.awt.event.FocusListener focusListener)
MapsComponent.removeFocusListener(FocusListener)through queue
-
removeInputMethodListener
public void removeInputMethodListener(java.awt.event.InputMethodListener inputMethodListener)
MapsComponent.removeInputMethodListener(InputMethodListener)through queue
-
removeKeyListener
public void removeKeyListener(java.awt.event.KeyListener keyListener)
MapsComponent.removeKeyListener(KeyListener)through queue
-
removeMouseListener
public void removeMouseListener(java.awt.event.MouseListener mouseListener)
MapsComponent.removeMouseListener(MouseListener)through queue
-
removeMouseMotionListener
public void removeMouseMotionListener(java.awt.event.MouseMotionListener mouseMotionListener)
MapsComponent.removeMouseMotionListener(MouseMotionListener)through queue
-
removeNotify
public void removeNotify()
MapsComponent.removeNotify()through queue
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
MapsComponent.removePropertyChangeListener(PropertyChangeListener)through queue
-
removePropertyChangeListener
public void removePropertyChangeListener(java.lang.String string, java.beans.PropertyChangeListener propertyChangeListener)MapsComponent.removePropertyChangeListener(String, PropertyChangeListener)through queue
-
repaint
public void repaint()
MapsComponent.repaint()through queue
-
repaint
public void repaint(int i, int i1, int i2, int i3)MapsComponent.repaint(int, int, int, int)through queue
-
repaint
public void repaint(long l)
MapsComponent.repaint(long)through queue
-
repaint
public void repaint(long l, int i, int i1, int i2, int i3)MapsComponent.repaint(long, int, int, int, int)through queue
-
requestFocus
public void requestFocus()
MapsComponent.requestFocus()through queue
-
setBackground
public void setBackground(java.awt.Color color)
MapsComponent.setBackground(Color)through queue
-
setBounds
public void setBounds(int i, int i1, int i2, int i3)MapsComponent.setBounds(int, int, int, int)through queue
-
setBounds
public void setBounds(java.awt.Rectangle rectangle)
MapsComponent.setBounds(Rectangle)through queue
-
setComponentOrientation
public void setComponentOrientation(java.awt.ComponentOrientation componentOrientation)
MapsComponent.setComponentOrientation(ComponentOrientation)through queue
-
setCursor
public void setCursor(java.awt.Cursor cursor)
MapsComponent.setCursor(Cursor)through queue
-
setDropTarget
public void setDropTarget(java.awt.dnd.DropTarget dropTarget)
MapsComponent.setDropTarget(DropTarget)through queue
-
setEnabled
public void setEnabled(boolean b)
MapsComponent.setEnabled(boolean)through queue
-
setFont
public void setFont(java.awt.Font font)
MapsComponent.setFont(Font)through queue
-
setForeground
public void setForeground(java.awt.Color color)
MapsComponent.setForeground(Color)through queue
-
setLocale
public void setLocale(java.util.Locale locale)
MapsComponent.setLocale(Locale)through queue
-
setLocation
public void setLocation(int i, int i1)MapsComponent.setLocation(int, int)through queue
-
setLocation
public void setLocation(java.awt.Point point)
MapsComponent.setLocation(Point)through queue
-
setName
public void setName(java.lang.String string)
MapsComponent.setName(String)through queue
-
setSize
public void setSize(int i, int i1)MapsComponent.setSize(int, int)through queue
-
setSize
public void setSize(java.awt.Dimension dimension)
MapsComponent.setSize(Dimension)through queue
-
setVisible
public void setVisible(boolean b)
MapsComponent.setVisible(boolean)through queue
-
transferFocus
public void transferFocus()
MapsComponent.transferFocus()through queue
-
update
public void update(java.awt.Graphics graphics)
MapsComponent.update(Graphics)through queue
-
validate
public void validate()
MapsComponent.validate()through queue
-
-