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

java.lang.Object
  extended by org.eclipse.jubula.rc.swing.swing.implclasses.AbstractSwingImplClass
      extended by org.eclipse.jubula.rc.swing.swing.implclasses.JListImplClass
All Implemented Interfaces:
org.eclipse.jubula.rc.common.implclasses.IBaseImplementationClass, IImplementationClass

public class JListImplClass
extends AbstractSwingImplClass

The implementation class for JList.

Created:
11.08.2005

Field Summary
 
Fields inherited from class org.eclipse.jubula.rc.swing.swing.implclasses.AbstractSwingImplClass
INDEX_LIST_SEP_CHAR, POS_UNI_PERCENT, POS_UNIT_PIXEL, RENDERER_FALLBACK_TEXT_GETTER_METHOD_1, RENDERER_FALLBACK_TEXT_GETTER_METHOD_2, VALUE_SEPARATOR
 
Constructor Summary
JListImplClass()
           
 
Method Summary
 void gdDragIndex(int mouseButton, java.lang.String modifier, int index)
          Drags the passed index.
 void gdDragValue(int mouseButton, java.lang.String modifier, java.lang.String value, java.lang.String operator, java.lang.String searchType)
          Drags the passed value.
 void gdDropIndex(int index, int delayBeforeDrop)
          Drops onto the passed index.
 void gdDropValue(java.lang.String value, java.lang.String operator, java.lang.String searchType, int delayBeforeDrop)
          Drops on the passed value.
 java.lang.String gdReadValue(java.lang.String variable)
          Action to read the value of the current selected item of the JList to store it in a variable in the Client
 void gdSelectIndex(java.lang.String indexList, java.lang.String extendSelection, int button)
          Selects the passed index or enumeration of indices.
 void gdSelectValue(java.lang.String valueList, java.lang.String operator, java.lang.String searchType, java.lang.String isExtendSelection, int button)
          Selects the passed value or enumeration of values.
 void gdSelectValue(java.lang.String valueList, java.lang.String separator, java.lang.String operator, java.lang.String searchType, int clickCount, java.lang.String extendSelection)
          Selects the passed value or enumeration of values.
 void gdVerifyContainsValue(java.lang.String value)
          Verifies if the list contains an element that renderes value.
 void gdVerifyContainsValue(java.lang.String value, java.lang.String operator, boolean exists)
          Verifies if the list contains an element that renderes value.
 void gdVerifySelectedIndex(java.lang.String indexList, boolean isSelected)
          Verifies if the passed index or enumeration of indices is selected.
 void gdVerifySelectedValue(java.lang.String valueList)
          Verifies if the passed value or enumeration of values is selected.
 void gdVerifySelectedValue(java.lang.String valueList, java.lang.String operator, boolean isSelected)
          Verifies if the passed value or enumeration of values is selected.
 void gdVerifySelectedValue(java.lang.String valueList, java.lang.String operator, java.lang.String separator, boolean isSelected)
          Verifies if the passed value or enumeration of values is selected.
 void gdVerifyText(java.lang.String text, java.lang.String operator)
          Verifies if all selected elements of a list match a text.
 javax.swing.JComponent getComponent()
          
protected  java.lang.String getText()
          Get a String representation of the "text" of the component.
 java.lang.String[] getTextArrayFromComponent()
          Returns a descriptive text array that represents the given gui component.
 void setComponent(java.lang.Object graphicsComponent)
          Set the component the methods this implementation class implements have to work with.
 
Methods inherited from class org.eclipse.jubula.rc.swing.swing.implclasses.AbstractSwingImplClass
gdClick, gdClickDirect, gdDrag, gdDrop, gdPopupSelectByIndexPath, gdPopupSelectByIndexPath, gdPopupSelectByIndexPath, gdPopupSelectByIndexPath, gdPopupSelectByTextPath, gdPopupSelectByTextPath, gdPopupSelectByTextPath, gdPopupSelectByTextPath, gdPopupVerifyEnabledByIndexPath, gdPopupVerifyEnabledByIndexPath, gdPopupVerifyEnabledByTextPath, gdPopupVerifyEnabledByTextPath, gdPopupVerifyExistsByIndexPath, gdPopupVerifyExistsByIndexPath, gdPopupVerifyExistsByTextPath, gdPopupVerifyExistsByTextPath, gdPopupVerifySelectedByIndexPath, gdPopupVerifySelectedByIndexPath, gdPopupVerifySelectedByTextPath, gdPopupVerifySelectedByTextPath, gdShowText, gdStorePropertyValue, gdVerifyEnabled, gdVerifyExists, gdVerifyFocus, gdVerifyProperty, gdWaitForComponent, getClickModifier, getEventThreadQueuer, getRenderedText, getRenderedText, getRobot, getRobotFactory, hasFocus, highLight, lowLight, pressOrReleaseModifiers, resolveRenderedText, showPopup, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JListImplClass

public JListImplClass()
Method Detail

getComponent

public javax.swing.JComponent getComponent()

Specified by:
getComponent in class AbstractSwingImplClass
Returns:
The component passed to the implementation class by calling IBaseImplementationClass.setComponent(Object)

setComponent

public void setComponent(java.lang.Object graphicsComponent)
Set the component the methods this implementation class implements have to work with.
The methods are declared by the configuration file for supported components.

Parameters:
graphicsComponent - the component from the AUT
Notice: Every changes made to control affects the AUT.

gdVerifySelectedIndex

public void gdVerifySelectedIndex(java.lang.String indexList,
                                  boolean isSelected)
Verifies if the passed index or enumeration of indices is selected. The enumeration must be separated by ,, e.g. 1, 3,6.

Parameters:
indexList - The index or indices to verify
isSelected - Whether the index or indices should be selected or not.

gdVerifySelectedValue

public void gdVerifySelectedValue(java.lang.String valueList)
Verifies if the passed value or enumeration of values is selected. By default, the enumeration separator is ,

Parameters:
valueList - The value or list of values to verify

gdVerifySelectedValue

public void gdVerifySelectedValue(java.lang.String valueList,
                                  java.lang.String operator,
                                  boolean isSelected)
Verifies if the passed value or enumeration of values is selected. By default, the enumeration separator is ,, but may be changed by separator.

Parameters:
valueList - The value or list of values to verify
operator - The operator to use when comparing the expected and actual values.
isSelected - if the value(s) should be selected or not.

gdVerifySelectedValue

public void gdVerifySelectedValue(java.lang.String valueList,
                                  java.lang.String operator,
                                  java.lang.String separator,
                                  boolean isSelected)
Verifies if the passed value or enumeration of values is selected. By default, the enumeration separator is ,, but may be changed by separator.

Parameters:
valueList - The value or list of values to verify
operator - The operator to use when comparing the expected and actual values.
separator - The separator
isSelected - if the value(s) should be selected or not.

gdVerifyText

public void gdVerifyText(java.lang.String text,
                         java.lang.String operator)
Verifies if all selected elements of a list match a text.

Parameters:
text - The text to verify
operator - The operator used to verify

gdSelectIndex

public void gdSelectIndex(java.lang.String indexList,
                          java.lang.String extendSelection,
                          int button)
Selects the passed index or enumeration of indices. The enumeration must be separated by ,, e.g. 1, 3,6.

Parameters:
indexList - The index or indices to select
extendSelection - Whether this selection extends a previous selection.
button - what mouse button should be used

gdSelectValue

public void gdSelectValue(java.lang.String valueList,
                          java.lang.String operator,
                          java.lang.String searchType,
                          java.lang.String isExtendSelection,
                          int button)
Selects the passed value or enumeration of values. By default, the enumeration separator is ,.

Parameters:
valueList - The value or list of values to select
operator - If regular expressions are used
searchType - Determines where the search begins ("relative" or "absolute")
isExtendSelection - Whether this selection extends a previous selection. If true, the first element will be selected with CONTROL as a modifier.
button - what mouse button should be used

gdDragValue

public void gdDragValue(int mouseButton,
                        java.lang.String modifier,
                        java.lang.String value,
                        java.lang.String operator,
                        java.lang.String searchType)
Drags the passed value.

Parameters:
mouseButton - the mouseButton.
modifier - the modifier.
value - The value to drag
operator - If regular expressions are used
searchType - Determines where the search begins ("relative" or "absolute")

gdDropValue

public void gdDropValue(java.lang.String value,
                        java.lang.String operator,
                        java.lang.String searchType,
                        int delayBeforeDrop)
Drops on the passed value.

Parameters:
value - The value on which to drop
operator - If regular expressions are used
searchType - Determines where the search begins ("relative" or "absolute")
delayBeforeDrop - the amount of time (in milliseconds) to wait between moving the mouse to the drop point and releasing the mouse button

gdDragIndex

public void gdDragIndex(int mouseButton,
                        java.lang.String modifier,
                        int index)
Drags the passed index.

Parameters:
mouseButton - the mouseButton.
modifier - the modifier.
index - The index to drag

gdDropIndex

public void gdDropIndex(int index,
                        int delayBeforeDrop)
Drops onto the passed index.

Parameters:
index - The index on which to drop
delayBeforeDrop - the amount of time (in milliseconds) to wait between moving the mouse to the drop point and releasing the mouse button

gdSelectValue

public void gdSelectValue(java.lang.String valueList,
                          java.lang.String separator,
                          java.lang.String operator,
                          java.lang.String searchType,
                          int clickCount,
                          java.lang.String extendSelection)
Selects the passed value or enumeration of values. By default, the enumeration separator is ,, but may be changed by separator.

Parameters:
valueList - The value or list of values to select
separator - The separator, optional
operator - If regular expressions are used
searchType - Determines where the search begins ("relative" or "absolute")
clickCount - the amount of clicks to use
extendSelection - Whether this selection extends a previous selection.

gdVerifyContainsValue

public void gdVerifyContainsValue(java.lang.String value)
Verifies if the list contains an element that renderes value.

Parameters:
value - The text to verify

gdVerifyContainsValue

public void gdVerifyContainsValue(java.lang.String value,
                                  java.lang.String operator,
                                  boolean exists)
Verifies if the list contains an element that renderes value.

Parameters:
value - The text to verify
operator - The operator used to verify
exists - if the wanted value should exist or not.

gdReadValue

public java.lang.String gdReadValue(java.lang.String variable)
Action to read the value of the current selected item of the JList to store it in a variable in the Client

Parameters:
variable - the name of the variable
Returns:
the text value.

getTextArrayFromComponent

public java.lang.String[] getTextArrayFromComponent()
Returns a descriptive text array that represents the given gui component.
Descriptive texts can be received for example from buttons, labels and table headers. If text is obviously data (for example in text input components) then it is not considered a descriptive text.
If the component has no descriptive text then null, an empty array or an array with length one and null or an empty string as content has to be returned.

Returns:
array containing none, one or many texts representing the
gui component or null

getText

protected java.lang.String getText()
Description copied from class: AbstractSwingImplClass
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()

Specified by:
getText in class AbstractSwingImplClass
Returns:
JListHelper#getText value
See Also:
AbstractSwingImplClass.getText()