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
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 like
.
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 like
Operator.wait"something happened"(*)
.
- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
-
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
FieldsModifier and TypeFieldDescriptionstatic final String
Identifier for a height property.static final String
Identifier for a showing property.static final String
Identifier for a visible property.static final String
Identifier for a name property.static final String
Identifier for a width property.static final String
Identifier for a x coordinate property.static final String
Identifier for a y coordinate property.Fields inherited from class org.netbeans.jemmy.operators.Operator
CLASS_DPROP, TO_STRING_DPROP
-
Constructor Summary
ConstructorsConstructorDescriptionComponentOperator
(Component comp) Constructor.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
Modifier and TypeMethodDescriptionvoid
Deprecated.Use makeComponentVisible() instead.void
MapsComponent.add(PopupMenu)
through queuevoid
addComponentListener
(ComponentListener componentListener) MapsComponent.addComponentListener(ComponentListener)
through queuevoid
addFocusListener
(FocusListener focusListener) MapsComponent.addFocusListener(FocusListener)
through queuevoid
addInputMethodListener
(InputMethodListener inputMethodListener) MapsComponent.addInputMethodListener(InputMethodListener)
through queuevoid
addKeyListener
(KeyListener keyListener) MapsComponent.addKeyListener(KeyListener)
through queuevoid
addMouseListener
(MouseListener mouseListener) MapsComponent.addMouseListener(MouseListener)
through queuevoid
addMouseMotionListener
(MouseMotionListener mouseMotionListener) MapsComponent.addMouseMotionListener(MouseMotionListener)
through queuevoid
MapsComponent.addNotify()
through queuevoid
addPropertyChangeListener
(PropertyChangeListener propertyChangeListener) MapsComponent.addPropertyChangeListener(PropertyChangeListener)
through queuevoid
addPropertyChangeListener
(String string, PropertyChangeListener propertyChangeListener) MapsComponent.addPropertyChangeListener(String, PropertyChangeListener)
through queueint
checkImage
(Image image, int i, int i1, ImageObserver imageObserver) MapsComponent.checkImage(Image, int, int, ImageObserver)
through queueint
checkImage
(Image image, ImageObserver imageObserver) MapsComponent.checkImage(Image, ImageObserver)
through queuevoid
Clicks for popup by popup mouse button at the component center.void
clickForPopup
(int mouseButton) Clicks for popup at the component center.void
clickForPopup
(int x, int y) Clicks for popup by popup mouse button.void
clickForPopup
(int x, int y, int mouseButton) Clicks for popup.void
Makes siple mouse click on the component center by default mouse button with 0 modifiers.void
clickMouse
(int clickCount) Makes mouse click on the component center by default mouse button with 0 modifiers.void
clickMouse
(int clickCount, int mouseButton) Makes mouse click on the component center with 0 modifiers.void
clickMouse
(int x, int y, int clickCount) Makes mouse click by default mouse button with 0 modifiers.void
clickMouse
(int x, int y, int clickCount, int mouseButton) Makes mouse click with 0 modifiers.void
clickMouse
(int x, int y, int clickCount, int mouseButton, int modifiers) Makes mouse click.void
clickMouse
(int x, int y, int clickCount, int mouseButton, int modifiers, boolean forPopup) Makes mouse click.boolean
contains
(int i, int i1) MapsComponent.contains(int, int)
through queueboolean
MapsComponent.contains(Point)
through queuevoid
copyEnvironment
(Operator anotherOperator) Copies all environment (output, timeouts, visualizer) from another operator.createImage
(int i, int i1) MapsComponent.createImage(int, int)
through queuecreateImage
(ImageProducer imageProducer) MapsComponent.createImage(ImageProducer)
through queuevoid
dispatchEvent
(AWTEvent aWTEvent) MapsComponent.dispatchEvent(AWTEvent)
through queuevoid
doLayout()
MapsComponent.doLayout()
through queuevoid
dragMouse
(int x, int y) Drag mouse over the component with 0 modifiers and default mose button pressed.void
dragMouse
(int x, int y, int mouseButton) Drag mouse over the component with 0 modifiers.void
dragMouse
(int x, int y, int mouseButton, int modifiers) Drag mouse over the component.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.void
dragNDrop
(int start_x, int start_y, int end_x, int end_y, int mouseButton) Makes drag'n'drop operation with 0 modifiers.void
dragNDrop
(int start_x, int start_y, int end_x, int end_y, int mouseButton, int modifiers) Makes drag'n'drop operation.void
enableInputMethods
(boolean b) MapsComponent.enableInputMethods(boolean)
through queuevoid
Move mouse inside the component.void
Move mouse outside the component.static Component
findComponent
(Container cont, ComponentChooser chooser) Searches Component in container.static Component
findComponent
(Container cont, ComponentChooser chooser, int index) Searches Component in container.float
MapsComponent.getAlignmentX()
through queuefloat
MapsComponent.getAlignmentY()
through queueMapsComponent.getBackground()
through queueMapsComponent.getBounds()
through queueMapsComponent.getBounds(Rectangle)
through queueint
Return the center x coordinate.int
Return the x coordinate which should be used for mouse operations by default.int
Return the center y coordinate.int
Return the y coordinate which should be used for mouse operations by default.MapsComponent.getColorModel()
through queuegetComponentAt
(int i, int i1) MapsComponent.getComponentAt(int, int)
through queuegetComponentAt
(Point point) MapsComponent.getComponentAt(Point)
through queueMapsComponent.getComponentOrientation()
through queuegetContainer
(ComponentChooser chooser) Searches a container.Returns an array of containers for this component.MapsComponent.getCursor()
through queueMapsComponent.getDropTarget()
through queuegetDump()
Returns information about component.Returnes org.netbeans.jemmy.EventDispatcher instance which is used to dispatch events.void
getFocus()
Gives input focus to the component.getFont()
MapsComponent.getFont()
through queuegetFontMetrics
(Font font) MapsComponent.getFontMetrics(Font)
through queueMapsComponent.getForeground()
through queueMapsComponent.getGraphics()
through queueint
MapsComponent.getHeight()
through queueMapsComponent.getInputContext()
through queueMapsComponent.getInputMethodRequests()
through queueMapsComponent.getLocale()
through queueMapsComponent.getLocation()
through queuegetLocation
(Point point) MapsComponent.getLocation(Point)
through queueMapsComponent.getLocationOnScreen()
through queueMapsComponent.getMaximumSize()
through queueMapsComponent.getMinimumSize()
through queuegetName()
MapsComponent.getName()
through queueReturns print output streams or writers.MapsComponent.getParent()
through queueMapsComponent.getPreferredSize()
through queuegetSize()
MapsComponent.getSize()
through queueMapsComponent.getSize(Dimension)
through queueReturns component.Return current timeouts.MapsComponent.getToolkit()
through queueMapsComponent.getTreeLock()
through queueint
getWidth()
MapsComponent.getWidth()
through queueSearches the window under component.int
getX()
MapsComponent.getX()
through queueint
getY()
MapsComponent.getY()
through queueboolean
hasFocus()
MapsComponent.hasFocus()
through queueboolean
imageUpdate
(Image image, int i, int i1, int i2, int i3, int i4) MapsComponent.imageUpdate(Image, int, int, int, int, int)
through queuevoid
MapsComponent.invalidate()
through queueboolean
MapsComponent.isDisplayable()
through queueboolean
MapsComponent.isDoubleBuffered()
through queueboolean
MapsComponent.isEnabled()
through queueboolean
MapsComponent.isFocusTraversable()
through queueboolean
MapsComponent.isLightweight()
through queueboolean
isOpaque()
MapsComponent.isOpaque()
through queueboolean
MapsComponent.isShowing()
through queueboolean
isValid()
MapsComponent.isValid()
through queueboolean
MapsComponent.isVisible()
through queuevoid
list()
MapsComponent.list()
through queuevoid
list
(PrintStream printStream) MapsComponent.list(PrintStream)
through queuevoid
list
(PrintStream printStream, int i) MapsComponent.list(PrintStream, int)
through queuevoid
list
(PrintWriter printWriter) MapsComponent.list(PrintWriter)
through queuevoid
list
(PrintWriter printWriter, int i) MapsComponent.list(PrintWriter, int)
through queuevoid
Prepares component for user input.void
moveMouse
(int x, int y) Move mouse over the component.void
MapsComponent.paint(Graphics)
through queuevoid
MapsComponent.paintAll(Graphics)
through queueboolean
prepareImage
(Image image, int i, int i1, ImageObserver imageObserver) MapsComponent.prepareImage(Image, int, int, ImageObserver)
through queueboolean
prepareImage
(Image image, ImageObserver imageObserver) MapsComponent.prepareImage(Image, ImageObserver)
through queuevoid
pressKey
(int keyCode) Press key with no modifiers.void
pressKey
(int keyCode, int modifiers) Press key.void
Press mouse.void
pressMouse
(int x, int y) Press mouse.void
MapsComponent.print(Graphics)
through queuevoid
MapsComponent.printAll(Graphics)
through queuevoid
pushKey
(int keyCode) Pushs key.void
pushKey
(int keyCode, int modifiers) Pushs key.void
releaseKey
(int keyCode) Releases key with no modifiers.void
releaseKey
(int keyCode, int modifiers) Releases key.void
Releases mouse.void
releaseMouse
(int x, int y) Releases mouse.void
remove
(MenuComponent menuComponent) MapsComponent.remove(MenuComponent)
through queuevoid
removeComponentListener
(ComponentListener componentListener) MapsComponent.removeComponentListener(ComponentListener)
through queuevoid
removeFocusListener
(FocusListener focusListener) MapsComponent.removeFocusListener(FocusListener)
through queuevoid
removeInputMethodListener
(InputMethodListener inputMethodListener) MapsComponent.removeInputMethodListener(InputMethodListener)
through queuevoid
removeKeyListener
(KeyListener keyListener) MapsComponent.removeKeyListener(KeyListener)
through queuevoid
removeMouseListener
(MouseListener mouseListener) MapsComponent.removeMouseListener(MouseListener)
through queuevoid
removeMouseMotionListener
(MouseMotionListener mouseMotionListener) MapsComponent.removeMouseMotionListener(MouseMotionListener)
through queuevoid
MapsComponent.removeNotify()
through queuevoid
removePropertyChangeListener
(PropertyChangeListener propertyChangeListener) MapsComponent.removePropertyChangeListener(PropertyChangeListener)
through queuevoid
removePropertyChangeListener
(String string, PropertyChangeListener propertyChangeListener) MapsComponent.removePropertyChangeListener(String, PropertyChangeListener)
through queuevoid
repaint()
MapsComponent.repaint()
through queuevoid
repaint
(int i, int i1, int i2, int i3) MapsComponent.repaint(int, int, int, int)
through queuevoid
repaint
(long l) MapsComponent.repaint(long)
through queuevoid
repaint
(long l, int i, int i1, int i2, int i3) MapsComponent.repaint(long, int, int, int, int)
through queuevoid
MapsComponent.requestFocus()
through queuevoid
setBackground
(Color color) MapsComponent.setBackground(Color)
through queuevoid
setBounds
(int i, int i1, int i2, int i3) MapsComponent.setBounds(int, int, int, int)
through queuevoid
MapsComponent.setBounds(Rectangle)
through queuevoid
setComponentOrientation
(ComponentOrientation componentOrientation) MapsComponent.setComponentOrientation(ComponentOrientation)
through queuevoid
MapsComponent.setCursor(Cursor)
through queuevoid
setDropTarget
(DropTarget dropTarget) MapsComponent.setDropTarget(DropTarget)
through queuevoid
setEnabled
(boolean b) MapsComponent.setEnabled(boolean)
through queuevoid
MapsComponent.setFont(Font)
through queuevoid
setForeground
(Color color) MapsComponent.setForeground(Color)
through queuevoid
MapsComponent.setLocale(Locale)
through queuevoid
setLocation
(int i, int i1) MapsComponent.setLocation(int, int)
through queuevoid
setLocation
(Point point) MapsComponent.setLocation(Point)
through queuevoid
MapsComponent.setName(String)
through queuevoid
Defines print output streams or writers.void
setSize
(int i, int i1) MapsComponent.setSize(int, int)
through queuevoid
MapsComponent.setSize(Dimension)
through queuevoid
setTimeouts
(Timeouts timeouts) Defines current timeouts.void
setVisible
(boolean b) MapsComponent.setVisible(boolean)
through queuevoid
MapsComponent.transferFocus()
through queuevoid
typeKey
(char keyChar) Types one char.void
typeKey
(char keyChar, int modifiers) Types one char.void
typeKey
(int keyCode, char keyChar, int modifiers) Types one char.void
MapsComponent.update(Graphics)
through queuevoid
validate()
MapsComponent.validate()
through queuestatic Component
waitComponent
(Container cont, ComponentChooser chooser) Waits Component in container.static Component
waitComponent
(Container cont, ComponentChooser chooser, int index) Waits Component in container.protected static Component
waitComponent
(Container cont, ComponentChooser chooser, int index, Timeouts timeouts, TestOut output) A method to be used from subclasses.protected static Component
waitComponent
(ContainerOperator contOper, ComponentChooser chooser, int index) A method to be used from subclasses.void
Waits for the component to be enabled.void
waitComponentShowing
(boolean visibility) void
waitComponentVisible
(boolean visibility) Waits for the component to be visible or unvisible.void
Waits for this Component has the keyboard focus.void
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 Details
-
NAME_DPROP
Identifier for a name property.- See Also:
-
IS_VISIBLE_DPROP
Identifier for a visible property.- See Also:
-
IS_SHOWING_DPROP
Identifier for a showing property.- See Also:
-
X_DPROP
Identifier for a x coordinate property.- See Also:
-
Y_DPROP
Identifier for a y coordinate property.- See Also:
-
WIDTH_DPROP
Identifier for a width property.- See Also:
-
HEIGHT_DPROP
Identifier for a height property.- See Also:
-
-
Constructor Details
-
ComponentOperator
Constructor.- Parameters:
comp
- a component
-
ComponentOperator
Constructs a ComponentOperator object.- Parameters:
cont
- containerchooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.
-
ComponentOperator
Constructs a ComponentOperator object.- Parameters:
cont
- containerchooser
- a component chooser specifying searching criteria.
-
ComponentOperator
Constructor. Waits for a component in a container to show. The component is iis theindex+1
'thjava.awt.Component
that 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
Constructor. Waits for a component in a container to show. The component is is the firstjava.awt.Component
that 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 Details
-
findComponent
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
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
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
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 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 Component waitComponent(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
Returns component. -
getEventDispatcher
Returnes org.netbeans.jemmy.EventDispatcher instance which is used to dispatch events.- Returns:
- the dispatcher.
- See Also:
-
setOutput
Description copied from interface:Outputable
Defines print output streams or writers.- Specified by:
setOutput
in interfaceOutputable
- Overrides:
setOutput
in classOperator
- Parameters:
out
- Identify the streams or writers used for print output.- See Also:
-
getOutput
Description copied from interface:Outputable
Returns print output streams or writers.- Specified by:
getOutput
in interfaceOutputable
- Overrides:
getOutput
in classOperator
- Returns:
- an object that contains references to objects for printing to output and err streams.
- See Also:
-
setTimeouts
Description copied from interface:Timeoutable
Defines current timeouts.- Specified by:
setTimeouts
in interfaceTimeoutable
- Overrides:
setTimeouts
in classOperator
- Parameters:
timeouts
- A collection of timeout assignments.- See Also:
-
getTimeouts
Description copied from interface:Timeoutable
Return current timeouts.- Specified by:
getTimeouts
in interfaceTimeoutable
- Overrides:
getTimeouts
in classOperator
- Returns:
- the collection of current timeout assignments.
- See Also:
-
copyEnvironment
Description copied from class:Operator
Copies all environment (output, timeouts, visualizer) from another operator.- Overrides:
copyEnvironment
in 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
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
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:
-
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
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:
-
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
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:
-
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:
-
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:
-
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
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
public void clickMouse()Makes siple mouse click on the component center by default mouse button with 0 modifiers. -
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
public void clickForPopup()Clicks for popup by popup mouse button at the component center. -
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:
-
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:
-
activateWindow
public void activateWindow()Deprecated.Use makeComponentVisible() instead.Activates component's window.- See Also:
-
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
Waits for the component to be enabled. -
wtComponentEnabled
public void wtComponentEnabled()Waits for the component to be enabled. per request: 37831- Throws:
TimeoutExpiredException
-
getContainers
Returns an array of containers for this component.- Returns:
- an array of containers
-
getContainer
Searches a container.- Parameters:
chooser
- a chooser specifying the searching criteria.- Returns:
- a containers specified by searching criteria.
-
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
Returns information about component. -
add
MapsComponent.add(PopupMenu)
through queue -
addComponentListener
MapsComponent.addComponentListener(ComponentListener)
through queue -
addFocusListener
MapsComponent.addFocusListener(FocusListener)
through queue -
addInputMethodListener
MapsComponent.addInputMethodListener(InputMethodListener)
through queue -
addKeyListener
MapsComponent.addKeyListener(KeyListener)
through queue -
addMouseListener
MapsComponent.addMouseListener(MouseListener)
through queue -
addMouseMotionListener
MapsComponent.addMouseMotionListener(MouseMotionListener)
through queue -
addNotify
public void addNotify()MapsComponent.addNotify()
through queue -
addPropertyChangeListener
MapsComponent.addPropertyChangeListener(PropertyChangeListener)
through queue -
addPropertyChangeListener
MapsComponent.addPropertyChangeListener(String, PropertyChangeListener)
through queue -
checkImage
MapsComponent.checkImage(Image, int, int, ImageObserver)
through queue -
checkImage
MapsComponent.checkImage(Image, ImageObserver)
through queue -
contains
public boolean contains(int i, int i1) MapsComponent.contains(int, int)
through queue -
contains
MapsComponent.contains(Point)
through queue -
createImage
MapsComponent.createImage(int, int)
through queue -
createImage
MapsComponent.createImage(ImageProducer)
through queue -
dispatchEvent
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
MapsComponent.getBackground()
through queue -
getBounds
MapsComponent.getBounds()
through queue -
getBounds
MapsComponent.getBounds(Rectangle)
through queue -
getColorModel
MapsComponent.getColorModel()
through queue -
getComponentAt
MapsComponent.getComponentAt(int, int)
through queue -
getComponentAt
MapsComponent.getComponentAt(Point)
through queue -
getComponentOrientation
MapsComponent.getComponentOrientation()
through queue -
getCursor
MapsComponent.getCursor()
through queue -
getDropTarget
MapsComponent.getDropTarget()
through queue -
getFont
MapsComponent.getFont()
through queue -
getFontMetrics
MapsComponent.getFontMetrics(Font)
through queue -
getForeground
MapsComponent.getForeground()
through queue -
getGraphics
MapsComponent.getGraphics()
through queue -
getHeight
public int getHeight()MapsComponent.getHeight()
through queue -
getInputContext
MapsComponent.getInputContext()
through queue -
getInputMethodRequests
MapsComponent.getInputMethodRequests()
through queue -
getLocale
MapsComponent.getLocale()
through queue -
getLocation
MapsComponent.getLocation()
through queue -
getLocation
MapsComponent.getLocation(Point)
through queue -
getLocationOnScreen
MapsComponent.getLocationOnScreen()
through queue -
getMaximumSize
MapsComponent.getMaximumSize()
through queue -
getMinimumSize
MapsComponent.getMinimumSize()
through queue -
getName
MapsComponent.getName()
through queue -
getParent
MapsComponent.getParent()
through queue -
getPreferredSize
MapsComponent.getPreferredSize()
through queue -
getSize
MapsComponent.getSize()
through queue -
getSize
MapsComponent.getSize(Dimension)
through queue -
getToolkit
MapsComponent.getToolkit()
through queue -
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
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
MapsComponent.list(PrintStream)
through queue -
list
MapsComponent.list(PrintStream, int)
through queue -
list
MapsComponent.list(PrintWriter)
through queue -
list
MapsComponent.list(PrintWriter, int)
through queue -
paint
MapsComponent.paint(Graphics)
through queue -
paintAll
MapsComponent.paintAll(Graphics)
through queue -
prepareImage
MapsComponent.prepareImage(Image, int, int, ImageObserver)
through queue -
prepareImage
MapsComponent.prepareImage(Image, ImageObserver)
through queue -
print
MapsComponent.print(Graphics)
through queue -
printAll
MapsComponent.printAll(Graphics)
through queue -
remove
MapsComponent.remove(MenuComponent)
through queue -
removeComponentListener
MapsComponent.removeComponentListener(ComponentListener)
through queue -
removeFocusListener
MapsComponent.removeFocusListener(FocusListener)
through queue -
removeInputMethodListener
MapsComponent.removeInputMethodListener(InputMethodListener)
through queue -
removeKeyListener
MapsComponent.removeKeyListener(KeyListener)
through queue -
removeMouseListener
MapsComponent.removeMouseListener(MouseListener)
through queue -
removeMouseMotionListener
MapsComponent.removeMouseMotionListener(MouseMotionListener)
through queue -
removeNotify
public void removeNotify()MapsComponent.removeNotify()
through queue -
removePropertyChangeListener
MapsComponent.removePropertyChangeListener(PropertyChangeListener)
through queue -
removePropertyChangeListener
public void removePropertyChangeListener(String string, 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
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
MapsComponent.setBounds(Rectangle)
through queue -
setComponentOrientation
MapsComponent.setComponentOrientation(ComponentOrientation)
through queue -
setCursor
MapsComponent.setCursor(Cursor)
through queue -
setDropTarget
MapsComponent.setDropTarget(DropTarget)
through queue -
setEnabled
public void setEnabled(boolean b) MapsComponent.setEnabled(boolean)
through queue -
setFont
MapsComponent.setFont(Font)
through queue -
setForeground
MapsComponent.setForeground(Color)
through queue -
setLocale
MapsComponent.setLocale(Locale)
through queue -
setLocation
public void setLocation(int i, int i1) MapsComponent.setLocation(int, int)
through queue -
setLocation
MapsComponent.setLocation(Point)
through queue -
setName
MapsComponent.setName(String)
through queue -
setSize
public void setSize(int i, int i1) MapsComponent.setSize(int, int)
through queue -
setSize
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
MapsComponent.update(Graphics)
through queue -
validate
public void validate()MapsComponent.validate()
through queue
-