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

java.lang.Object
  extended by org.eclipse.jubula.rc.swing.swing.implclasses.JListHelper

public class JListHelper
extends java.lang.Object

A helper class for robot operations and method calls on JList.

Created:
12.08.2005

Constructor Summary
JListHelper(AbstractSwingImplClass implClass)
          The constructor.
 
Method Summary
 void clickOnIndex(javax.swing.JList list, java.lang.Integer i)
          Clicks on the index of the passed list.
 void clickOnIndex(javax.swing.JList list, java.lang.Integer i, org.eclipse.jubula.rc.common.driver.ClickOptions co)
          Clicks on the index of the passed list.
 void clickOnIndex(javax.swing.JList list, java.lang.Integer i, org.eclipse.jubula.rc.common.driver.ClickOptions co, double maxWidth)
          Clicks on the index of the passed list.
 boolean containsValue(javax.swing.JList list, java.lang.String value)
           
 boolean containsValue(javax.swing.JList list, java.lang.String value, java.lang.String operator)
           
 java.lang.Integer[] findIndicesOfValues(javax.swing.JList list, java.lang.String[] values, java.lang.String operator)
          Finds the indices of the list elements that are rendered with the passed values.
 java.lang.Integer[] findIndicesOfValues(javax.swing.JList list, java.lang.String[] values, java.lang.String operator, java.lang.String searchType)
          Finds the indices of the list elements that are rendered with the passed values.
 int[] getSelectedIndices(javax.swing.JList list)
           
 java.lang.String[] getSelectedValues(javax.swing.JList list)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JListHelper

public JListHelper(AbstractSwingImplClass implClass)
The constructor.

Parameters:
implClass - The implementation class
Method Detail

clickOnIndex

public void clickOnIndex(javax.swing.JList list,
                         java.lang.Integer i,
                         org.eclipse.jubula.rc.common.driver.ClickOptions co,
                         double maxWidth)
Clicks on the index of the passed list.

Parameters:
list - The list to click on
i - The index to click
co - the click options to use
maxWidth - the maximal width which is used to select the item

clickOnIndex

public void clickOnIndex(javax.swing.JList list,
                         java.lang.Integer i,
                         org.eclipse.jubula.rc.common.driver.ClickOptions co)
Clicks on the index of the passed list.

Parameters:
list - The list to click on
i - The index to click
co - the click options to use

clickOnIndex

public void clickOnIndex(javax.swing.JList list,
                         java.lang.Integer i)
Clicks on the index of the passed list.

Parameters:
list - The list to click on
i - The index to click

findIndicesOfValues

public java.lang.Integer[] findIndicesOfValues(javax.swing.JList list,
                                               java.lang.String[] values,
                                               java.lang.String operator,
                                               java.lang.String searchType)
Finds the indices of the list elements that are rendered with the passed values.

Parameters:
list - The list
values - The values
operator - operator to use
searchType - Determines where the search begins ("relative" or "absolute")
Returns:
The array of indices. It's length is equal to the length of the values array, but may contains null elements for all values that are not found in the list

findIndicesOfValues

public java.lang.Integer[] findIndicesOfValues(javax.swing.JList list,
                                               java.lang.String[] values,
                                               java.lang.String operator)
Finds the indices of the list elements that are rendered with the passed values.

Parameters:
list - The list
values - The values
operator - operator to use
Returns:
The array of indices. It's length is equal to the length of the values array, but may contains null elements for all values that are not found in the list

containsValue

public boolean containsValue(javax.swing.JList list,
                             java.lang.String value)
Parameters:
list - The list
value - The value
Returns:
true if the list contains an element that is rendered with value

containsValue

public boolean containsValue(javax.swing.JList list,
                             java.lang.String value,
                             java.lang.String operator)
Parameters:
list - The list
value - The value
operator - The operator used to verify
Returns:
true if the list contains an element that is rendered with value

getSelectedIndices

public int[] getSelectedIndices(javax.swing.JList list)
Parameters:
list - The list
Returns:
The array of selected indices

getSelectedValues

public java.lang.String[] getSelectedValues(javax.swing.JList list)
Parameters:
list - The list
Returns:
The array of selected values as the renderer shows them