org.eclipse.jubula.rc.swing.swing.implclasses
Class AbstractSwingImplClass

java.lang.Object
  extended by org.eclipse.jubula.rc.swing.swing.implclasses.AbstractSwingImplClass
All Implemented Interfaces:
org.eclipse.jubula.rc.common.implclasses.IBaseImplementationClass, IImplementationClass
Direct Known Subclasses:
AbstractButtonImplClass, JComboBoxImplClass, JLabelImplClass, JListImplClass, JMenuBarImplClass, JMenuItemImplClass, JTabbedPaneImplClass, JTableHeaderImplClass, JTableImplClass, JTextComponentImplClass, JTreeImplClass, SimpleExtendedComponentImplClass

public abstract class AbstractSwingImplClass
extends java.lang.Object
implements IImplementationClass

Created:
08.03.2005

Field Summary
static char INDEX_LIST_SEP_CHAR
          The default separator for enumerations of list values.
protected static java.lang.String POS_UNI_PERCENT
          constants for communication
protected static java.lang.String POS_UNIT_PIXEL
          constants for communication
static java.lang.String RENDERER_FALLBACK_TEXT_GETTER_METHOD_1
          RENDERER_FALLBACK_TEXT_GETTER_METHOD_1
static java.lang.String RENDERER_FALLBACK_TEXT_GETTER_METHOD_2
          RENDERER_FALLBACK_TEXT_GETTER_METHOD_2
static char VALUE_SEPARATOR
          The dafault separator of a list of values
 
Constructor Summary
AbstractSwingImplClass()
           
 
Method Summary
 void gdClick(int count, int button)
          Clicks the center of the component.
 void gdClickDirect(int count, int button, int xPos, java.lang.String xUnits, int yPos, java.lang.String yUnits)
          clicks into a component.
 void gdDrag(int mouseButton, java.lang.String modifier, int xPos, java.lang.String xUnits, int yPos, java.lang.String yUnits)
          Performs a Drag.
 void gdDrop(int xPos, java.lang.String xUnits, int yPos, java.lang.String yUnits, int delayBeforeDrop)
          Performs a Drop.
 void gdPopupSelectByIndexPath(int xPos, int yPos, java.lang.String units, java.lang.String indexPath)
          Deprecated. Will be removed with gdPopupSelectByIndexPath with int parameter for MouseButton
 void gdPopupSelectByIndexPath(int xPos, java.lang.String xUnits, int yPos, java.lang.String yUnits, java.lang.String indexPath, int button)
          Opens the popup menu at the given position relative the current component and selects an item at the given position in the popup menu
 void gdPopupSelectByIndexPath(java.lang.String indexPath)
          Deprecated. Will be removed with gdPopupSelectByIndexPath with int parameter for MouseButton
 void gdPopupSelectByIndexPath(java.lang.String indexPath, int button)
          Select an item in the popup menu
 void gdPopupSelectByTextPath(int xPos, int yPos, java.lang.String units, java.lang.String textPath, java.lang.String operator)
          Deprecated. Will be removed with gdPopupSelectByTextPath with int parameter for MouseButton
 void gdPopupSelectByTextPath(int xPos, java.lang.String xUnits, int yPos, java.lang.String yUnits, java.lang.String textPath, java.lang.String operator, int button)
          Selects an item in the popup menu
 void gdPopupSelectByTextPath(java.lang.String textPath, java.lang.String operator)
          Deprecated. Will be removed with gdPopupSelectByTextPath with int parameter for MouseButton
 void gdPopupSelectByTextPath(java.lang.String textPath, java.lang.String operator, int button)
          Selects an item in the popup menu
 void gdPopupVerifyEnabledByIndexPath(int xPos, java.lang.String xUnits, int yPos, java.lang.String yUnits, java.lang.String indexPath, boolean enabled, int button)
          Opens the popup menu at the given position relative the current component and checks if the specified context menu entry is enabled.
 void gdPopupVerifyEnabledByIndexPath(java.lang.String indexPath, boolean enabled, int button)
          Checks if the specified context menu entry is enabled.
 void gdPopupVerifyEnabledByTextPath(int xPos, java.lang.String xUnits, int yPos, java.lang.String yUnits, java.lang.String textPath, java.lang.String operator, boolean enabled, int button)
          Opens the popup menu at the given position relative the current component and checks if the specified context menu entry is enabled.
 void gdPopupVerifyEnabledByTextPath(java.lang.String textPath, java.lang.String operator, boolean enabled, int button)
          Checks if the specified context menu entry is enabled.
 void gdPopupVerifyExistsByIndexPath(int xPos, java.lang.String xUnits, int yPos, java.lang.String yUnits, java.lang.String indexPath, boolean exists, int button)
          Opens the popup menu at the given position relative the current component and checks if the specified context menu entry exists.
 void gdPopupVerifyExistsByIndexPath(java.lang.String indexPath, boolean exists, int button)
          Checks if the specified context menu entry exists.
 void gdPopupVerifyExistsByTextPath(int xPos, java.lang.String xUnits, int yPos, java.lang.String yUnits, java.lang.String textPath, java.lang.String operator, boolean exists, int button)
          Opens the popup menu at the given position relative the current component and checks if the specified context menu entry exists.
 void gdPopupVerifyExistsByTextPath(java.lang.String textPath, java.lang.String operator, boolean exists, int button)
          Checks if the specified context menu entry exists.
 void gdPopupVerifySelectedByIndexPath(int xPos, java.lang.String xUnits, int yPos, java.lang.String yUnits, java.lang.String indexPath, boolean selected, int button)
          Opens the popup menu at the given position relative the current component and checks if the specified context menu entry is selected.
 void gdPopupVerifySelectedByIndexPath(java.lang.String indexPath, boolean selected, int button)
          Checks if the specified context menu entry is selected.
 void gdPopupVerifySelectedByTextPath(int xPos, java.lang.String xUnits, int yPos, java.lang.String yUnits, java.lang.String textPath, java.lang.String operator, boolean selected, int button)
          Opens the popup menu at the given position relative the current component and checks if the specified context menu entry is selected.
 void gdPopupVerifySelectedByTextPath(java.lang.String textPath, java.lang.String operator, boolean selected, int button)
          Checks if the specified context menu entry is selected.
 void gdShowText(java.lang.String text, int textSize, int timePerWord, int windowWidth)
          Simulates a tooltip for demonstration purposes.
 java.lang.String gdStorePropertyValue(java.lang.String variableName, java.lang.String propertyName)
          Stores the value of the property with the name name.
 void gdVerifyEnabled(boolean enabled)
          Verifies the enabled property.
 void gdVerifyExists(boolean exists)
          Verifies that the component exists and is visible.
 void gdVerifyFocus(boolean hasFocus)
          Verifies if the component has the focus.
 void gdVerifyProperty(java.lang.String name, java.lang.String value, java.lang.String operator)
          Verifies the value of the property with the name name.
 void gdWaitForComponent(int timeout, int delay)
          dummy method for "wait for component"
protected  org.eclipse.jubula.rc.common.driver.ClickOptions.ClickModifier getClickModifier(java.lang.String extendSelection)
           
abstract  javax.swing.JComponent getComponent()
           
protected  org.eclipse.jubula.rc.common.driver.IEventThreadQueuer getEventThreadQueuer()
           
static java.lang.String getRenderedText(java.awt.Component renderer)
           
protected  java.lang.String getRenderedText(java.awt.Component renderer, boolean queueInEventThread)
          Casts the passed renderer component to a known type and extracts the rendered text.
protected  org.eclipse.jubula.rc.common.driver.IRobot getRobot()
          Gets the IEventThreadQueuer.
protected  org.eclipse.jubula.rc.common.driver.IRobotFactory getRobotFactory()
          Gets the Robot factory.
protected abstract  java.lang.String getText()
          Get a String representation of the "text" of the component.
protected  boolean hasFocus()
           
 void highLight(java.awt.Component component, java.awt.Color border)
          High light the given component, called during object mapping
 void lowLight(java.awt.Component component)
          Low light the given component, called during object mapping
protected  void pressOrReleaseModifiers(java.lang.String modifier, boolean press)
          Presses or releases the given modifier.
static java.lang.String resolveRenderedText(java.awt.Component renderer)
           
protected  javax.swing.JPopupMenu showPopup(int button)
          Shows and returns the popup menu
protected  void verify(boolean expected, java.lang.String name, org.eclipse.jubula.rc.common.driver.IRunnable runnable)
          Checks wether two boolean values are equal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jubula.rc.common.implclasses.IBaseImplementationClass
getTextArrayFromComponent, setComponent
 

Field Detail

RENDERER_FALLBACK_TEXT_GETTER_METHOD_1

public static final java.lang.String RENDERER_FALLBACK_TEXT_GETTER_METHOD_1
RENDERER_FALLBACK_TEXT_GETTER_METHOD_1

See Also:
Constant Field Values

RENDERER_FALLBACK_TEXT_GETTER_METHOD_2

public static final java.lang.String RENDERER_FALLBACK_TEXT_GETTER_METHOD_2
RENDERER_FALLBACK_TEXT_GETTER_METHOD_2

See Also:
Constant Field Values

INDEX_LIST_SEP_CHAR

public static final char INDEX_LIST_SEP_CHAR
The default separator for enumerations of list values.

See Also:
Constant Field Values

VALUE_SEPARATOR

public static final char VALUE_SEPARATOR
The dafault separator of a list of values

See Also:
Constant Field Values

POS_UNIT_PIXEL

protected static final java.lang.String POS_UNIT_PIXEL
constants for communication

See Also:
Constant Field Values

POS_UNI_PERCENT

protected static final java.lang.String POS_UNI_PERCENT
constants for communication

See Also:
Constant Field Values
Constructor Detail

AbstractSwingImplClass

public AbstractSwingImplClass()
Method Detail

getComponent

public abstract javax.swing.JComponent getComponent()
Returns:
The component passed to the implementation class by calling IBaseImplementationClass.setComponent(Object)

getRobotFactory

protected org.eclipse.jubula.rc.common.driver.IRobotFactory getRobotFactory()
Gets the Robot factory. The factory is created once per instance.

Returns:
The Robot factory.

getRobot

protected org.eclipse.jubula.rc.common.driver.IRobot getRobot()
                                                       throws org.eclipse.jubula.rc.common.exception.RobotException
Gets the IEventThreadQueuer.

Returns:
The Robot
Throws:
org.eclipse.jubula.rc.common.exception.RobotException - If the Robot cannot be created.

getEventThreadQueuer

protected org.eclipse.jubula.rc.common.driver.IEventThreadQueuer getEventThreadQueuer()
Returns:
The event thread queuer.

verify

protected void verify(boolean expected,
                      java.lang.String name,
                      org.eclipse.jubula.rc.common.driver.IRunnable runnable)
               throws org.eclipse.jubula.rc.common.exception.StepVerifyFailedException
Checks wether two boolean values are equal. The first boolean value is passed to the method, the second one is expected to be returned by the runnable.

Parameters:
expected - The expected value.
name - The runnable name.
runnable - The runnable.
Throws:
org.eclipse.jubula.rc.common.exception.StepVerifyFailedException - If the values are not equal.

highLight

public void highLight(java.awt.Component component,
                      java.awt.Color border)
High light the given component, called during object mapping

Specified by:
highLight in interface IImplementationClass
Parameters:
component - the component to high light
border - the color we want to highlight with

lowLight

public void lowLight(java.awt.Component component)
Low light the given component, called during object mapping

Specified by:
lowLight in interface IImplementationClass
Parameters:
component - the component to remove the 'hight light'

getRenderedText

public static java.lang.String getRenderedText(java.awt.Component renderer)
                                        throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Parameters:
renderer - The component which is used as the renderer
Returns:
The string that the renderer displays.
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - If the renderer component is not of type JLabel, JToggleButton, AbstractButton, JTextComponent or supports one of the fallback methods

resolveRenderedText

public static java.lang.String resolveRenderedText(java.awt.Component renderer)
Parameters:
renderer - The component which is used as the renderer
Returns:
The string that the renderer displays or null if it could not be resolved.

getRenderedText

protected java.lang.String getRenderedText(java.awt.Component renderer,
                                           boolean queueInEventThread)
                                    throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Casts the passed renderer component to a known type and extracts the rendered text.

Parameters:
renderer - The renderer.
queueInEventThread - If true, the text extraction is executed in the event queue thread.
Returns:
The rendered text.
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - If the passed renderer is not supported. Supported types are JLabel, JToggleButton, AbstractButton and JTextComponent

getText

protected abstract java.lang.String getText()
Get a String representation of the "text" of the component. This String is used in all compare actions and all other places where a simple "as text" view is needed. This has to be replaced either with simple getText() calls on the components or by calls to the cell (or other) renderers of the component using getRenderedText()

Returns:
A String representing the text value of the component. If no such value can be found, null is returned.

gdVerifyEnabled

public void gdVerifyEnabled(boolean enabled)
Verifies the enabled property.

Parameters:
enabled - The enabled property value to verify

gdVerifyExists

public void gdVerifyExists(boolean exists)
Verifies that the component exists and is visible.

Parameters:
exists - True if the component is expected to exist and be visible, otherwise false.

gdVerifyFocus

public void gdVerifyFocus(boolean hasFocus)
Verifies if the component has the focus.

Parameters:
hasFocus - The hasFocus property to verify.

gdVerifyProperty

public void gdVerifyProperty(java.lang.String name,
                             java.lang.String value,
                             java.lang.String operator)
Verifies the value of the property with the name name. The name of the property has be specified according to the JavaBean specification. The value returned by the property is converted into a string by calling toString() and is compared to the passed value.

Parameters:
name - The name of the property
value - The value of the property as a string
operator - The operator used to verify

gdStorePropertyValue

public java.lang.String gdStorePropertyValue(java.lang.String variableName,
                                             java.lang.String propertyName)
Stores the value of the property with the name name. The name of the property has be specified according to the JavaBean specification. The value returned by the property is converted into a string by calling toString() and is stored to the passed variable.

Parameters:
variableName - The name of the variable to store the property value in
propertyName - The name of the property
Returns:
the property value.

gdClick

public void gdClick(int count,
                    int button)
Clicks the center of the component.

Parameters:
count - Number of mouse clicks
button - Pressed button

gdClickDirect

public void gdClickDirect(int count,
                          int button,
                          int xPos,
                          java.lang.String xUnits,
                          int yPos,
                          java.lang.String yUnits)
                   throws org.eclipse.jubula.rc.common.exception.StepExecutionException
clicks into a component.

Parameters:
count - amount of clicks
button - what mouse button should be used
xPos - what x position
xUnits - should x position be pixel or percent values
yPos - what y position
yUnits - should y position be pixel or percent values
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - error

gdPopupSelectByIndexPath

public void gdPopupSelectByIndexPath(java.lang.String indexPath)
                              throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Deprecated. Will be removed with gdPopupSelectByIndexPath with int parameter for MouseButton

Select an item in the popup menu

Parameters:
indexPath - path of item indices
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - error

gdPopupSelectByIndexPath

public void gdPopupSelectByIndexPath(java.lang.String indexPath,
                                     int button)
                              throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Select an item in the popup menu

Parameters:
indexPath - path of item indices
button - MouseButton
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - error

gdPopupSelectByIndexPath

public void gdPopupSelectByIndexPath(int xPos,
                                     int yPos,
                                     java.lang.String units,
                                     java.lang.String indexPath)
                              throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Deprecated. Will be removed with gdPopupSelectByIndexPath with int parameter for MouseButton

Opens the popup menu at the given position relative the current component and selects an item at the given position in the popup menu

Parameters:
xPos - what x position
yPos - what y position
units - should x,y position be pixel or percent values
indexPath - path of item indices
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - error

gdPopupSelectByIndexPath

public void gdPopupSelectByIndexPath(int xPos,
                                     java.lang.String xUnits,
                                     int yPos,
                                     java.lang.String yUnits,
                                     java.lang.String indexPath,
                                     int button)
                              throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Opens the popup menu at the given position relative the current component and selects an item at the given position in the popup menu

Parameters:
xPos - what x position
xUnits - should x position be pixel or percent values
yPos - what y position
yUnits - should y position be pixel or percent values
indexPath - path of item indices
button - MouseButton
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - error

gdWaitForComponent

public void gdWaitForComponent(int timeout,
                               int delay)
dummy method for "wait for component"

Parameters:
timeout - the maximum amount of time to wait for the component
delay - the time to wait after the component is found

gdPopupSelectByTextPath

public void gdPopupSelectByTextPath(java.lang.String textPath,
                                    java.lang.String operator)
                             throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Deprecated. Will be removed with gdPopupSelectByTextPath with int parameter for MouseButton

Selects an item in the popup menu

Parameters:
textPath - path of item texts
operator - operator used for matching
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - error

gdPopupSelectByTextPath

public void gdPopupSelectByTextPath(java.lang.String textPath,
                                    java.lang.String operator,
                                    int button)
                             throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Selects an item in the popup menu

Parameters:
textPath - path of item texts
operator - operator used for matching
button - MouseButton
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - error

gdPopupSelectByTextPath

public void gdPopupSelectByTextPath(int xPos,
                                    int yPos,
                                    java.lang.String units,
                                    java.lang.String textPath,
                                    java.lang.String operator)
                             throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Deprecated. Will be removed with gdPopupSelectByTextPath with int parameter for MouseButton

Selects an item in the popup menu

Parameters:
xPos - what x position
yPos - what y position
units - should x,y position be pixel or percent values
textPath - path of item texts
operator - operator used for matching
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - error

gdPopupSelectByTextPath

public void gdPopupSelectByTextPath(int xPos,
                                    java.lang.String xUnits,
                                    int yPos,
                                    java.lang.String yUnits,
                                    java.lang.String textPath,
                                    java.lang.String operator,
                                    int button)
                             throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Selects an item in the popup menu

Parameters:
xPos - what x position
xUnits - should x position be pixel or percent values
yPos - what y position
yUnits - should y position be pixel or percent values
textPath - path of item texts
operator - operator used for matching
button - MouseButton
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - error

gdPopupVerifyEnabledByIndexPath

public void gdPopupVerifyEnabledByIndexPath(java.lang.String indexPath,
                                            boolean enabled,
                                            int button)
                                     throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Checks if the specified context menu entry is enabled.

Parameters:
indexPath - the menu item to verify
enabled - for checking enabled or disabled
button - MouseButton
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException

gdPopupVerifyEnabledByIndexPath

public void gdPopupVerifyEnabledByIndexPath(int xPos,
                                            java.lang.String xUnits,
                                            int yPos,
                                            java.lang.String yUnits,
                                            java.lang.String indexPath,
                                            boolean enabled,
                                            int button)
                                     throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Opens the popup menu at the given position relative the current component and checks if the specified context menu entry is enabled.

Parameters:
xPos - what x position
xUnits - should x position be pixel or percent values
yPos - what y position
yUnits - should y position be pixel or percent values
indexPath - the menu item to verify
enabled - for checking enabled or disabled
button - MouseButton
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException

gdPopupVerifyEnabledByTextPath

public void gdPopupVerifyEnabledByTextPath(java.lang.String textPath,
                                           java.lang.String operator,
                                           boolean enabled,
                                           int button)
                                    throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Checks if the specified context menu entry is enabled.

Parameters:
textPath - the menu item to verify
operator - operator used for matching
enabled - for checking enabled or disabled
button - MouseButton
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException

gdPopupVerifyEnabledByTextPath

public void gdPopupVerifyEnabledByTextPath(int xPos,
                                           java.lang.String xUnits,
                                           int yPos,
                                           java.lang.String yUnits,
                                           java.lang.String textPath,
                                           java.lang.String operator,
                                           boolean enabled,
                                           int button)
                                    throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Opens the popup menu at the given position relative the current component and checks if the specified context menu entry is enabled.

Parameters:
xPos - what x position
xUnits - should x position be pixel or percent values
yPos - what y position
yUnits - should y position be pixel or percent values
textPath - the menu item to verify
operator - operator used for matching
enabled - for checking enabled or disabled
button - MouseButton
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException

gdPopupVerifyExistsByIndexPath

public void gdPopupVerifyExistsByIndexPath(java.lang.String indexPath,
                                           boolean exists,
                                           int button)
                                    throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Checks if the specified context menu entry exists.

Parameters:
indexPath - the menu item to verify
exists - for checking if entry exists
button - MouseButton
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException

gdPopupVerifyExistsByIndexPath

public void gdPopupVerifyExistsByIndexPath(int xPos,
                                           java.lang.String xUnits,
                                           int yPos,
                                           java.lang.String yUnits,
                                           java.lang.String indexPath,
                                           boolean exists,
                                           int button)
                                    throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Opens the popup menu at the given position relative the current component and checks if the specified context menu entry exists.

Parameters:
xPos - what x position
xUnits - should x position be pixel or percent values
yPos - what y position
yUnits - should y position be pixel or percent values
indexPath - the menu item to verify
exists - for checking if entry exists
button - MouseButton
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException

gdPopupVerifyExistsByTextPath

public void gdPopupVerifyExistsByTextPath(java.lang.String textPath,
                                          java.lang.String operator,
                                          boolean exists,
                                          int button)
                                   throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Checks if the specified context menu entry exists.

Parameters:
textPath - the menu item to verify
operator - operator used for matching
exists - for checking if entry exists
button - MouseButton
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException

gdPopupVerifyExistsByTextPath

public void gdPopupVerifyExistsByTextPath(int xPos,
                                          java.lang.String xUnits,
                                          int yPos,
                                          java.lang.String yUnits,
                                          java.lang.String textPath,
                                          java.lang.String operator,
                                          boolean exists,
                                          int button)
                                   throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Opens the popup menu at the given position relative the current component and checks if the specified context menu entry exists.

Parameters:
xPos - what x position
xUnits - should x position be pixel or percent values
yPos - what y position
yUnits - should y position be pixel or percent values
textPath - the menu item to verify
operator - operator used for matching
exists - for checking if entry exists
button - MouseButton
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException

gdPopupVerifySelectedByIndexPath

public void gdPopupVerifySelectedByIndexPath(java.lang.String indexPath,
                                             boolean selected,
                                             int button)
                                      throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Checks if the specified context menu entry is selected.

Parameters:
indexPath - the menu item to verify
selected - for checking if entry is selected
button - MouseButton
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException

gdPopupVerifySelectedByIndexPath

public void gdPopupVerifySelectedByIndexPath(int xPos,
                                             java.lang.String xUnits,
                                             int yPos,
                                             java.lang.String yUnits,
                                             java.lang.String indexPath,
                                             boolean selected,
                                             int button)
                                      throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Opens the popup menu at the given position relative the current component and checks if the specified context menu entry is selected.

Parameters:
xPos - what x position
xUnits - should x position be pixel or percent values
yPos - what y position
yUnits - should y position be pixel or percent values
indexPath - the menu item to verify
selected - for checking if entry is selected
button - MouseButton
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException

gdPopupVerifySelectedByTextPath

public void gdPopupVerifySelectedByTextPath(java.lang.String textPath,
                                            java.lang.String operator,
                                            boolean selected,
                                            int button)
                                     throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Checks if the specified context menu entry is selected.

Parameters:
textPath - the menu item to verify
operator - operator used for matching
selected - for checking if entry is selected
button - MouseButton
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException

gdPopupVerifySelectedByTextPath

public void gdPopupVerifySelectedByTextPath(int xPos,
                                            java.lang.String xUnits,
                                            int yPos,
                                            java.lang.String yUnits,
                                            java.lang.String textPath,
                                            java.lang.String operator,
                                            boolean selected,
                                            int button)
                                     throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Opens the popup menu at the given position relative the current component and checks if the specified context menu entry is selected.

Parameters:
xPos - what x position
xUnits - should x position be pixel or percent values
yPos - what y position
yUnits - should y position be pixel or percent values
textPath - the menu item to verify
operator - operator used for matching
selected - for checking if entry is selected
button - MouseButton
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException

showPopup

protected javax.swing.JPopupMenu showPopup(int button)
Shows and returns the popup menu

Parameters:
button - MouseButton
Returns:
the popup menu

hasFocus

protected boolean hasFocus()
Returns:
true if the component is the focusowner

gdShowText

public void gdShowText(java.lang.String text,
                       int textSize,
                       int timePerWord,
                       int windowWidth)
Simulates a tooltip for demonstration purposes.

Parameters:
text - The text to show in the tooltip
textSize - The size of the text in points
timePerWord - The amount of time, in milliseconds, used to display a single word. A word is defined as a string surrounded by whitespace.
windowWidth - The width of the tooltip window in pixels.

gdDrag

public void gdDrag(int mouseButton,
                   java.lang.String modifier,
                   int xPos,
                   java.lang.String xUnits,
                   int yPos,
                   java.lang.String yUnits)
Performs a Drag. Moves into the middle of the Component and presses and holds the given modifier and the given mouse button.

Parameters:
mouseButton - the mouse button.
modifier - the modifier, e.g. shift, ctrl, etc.
xPos - what x position
xUnits - should x position be pixel or percent values
yPos - what y position
yUnits - should y position be pixel or percent values

gdDrop

public void gdDrop(int xPos,
                   java.lang.String xUnits,
                   int yPos,
                   java.lang.String yUnits,
                   int delayBeforeDrop)
Performs a Drop. Moves into the middle of the Component and releases the modifier and mouse button pressed by gdDrag.

Parameters:
xPos - what x position
xUnits - should x position be pixel or percent values
yPos - what y position
yUnits - should y position be pixel or percent values
delayBeforeDrop - the amount of time (in milliseconds) to wait between moving the mouse to the drop point and releasing the mouse button

pressOrReleaseModifiers

protected void pressOrReleaseModifiers(java.lang.String modifier,
                                       boolean press)
Presses or releases the given modifier.

Parameters:
modifier - the modifier.
press - if true, the modifier will be pressed. if false, the modifier will be released.

getClickModifier

protected org.eclipse.jubula.rc.common.driver.ClickOptions.ClickModifier getClickModifier(java.lang.String extendSelection)
Parameters:
extendSelection - the string to indicate that the selection should be extended
Returns:
a ClickModifier for the given extend selection