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

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

public class JComboBoxHelper
extends java.lang.Object

This is a helper class of JComboBoxImplClass.

Created:
21.03.2005

Constructor Summary
JComboBoxHelper(JComboBoxImplClass implClass)
          Creates a new instance.
 
Method Summary
 void click(java.lang.Integer count)
          performs a count -click on the textfield.
 boolean containsValue(java.lang.String value)
           
 boolean containsValue(java.lang.String value, java.lang.String operator)
           
 java.lang.String getText()
           
 void input(java.lang.String text, boolean replace)
          Inputs text to component.
 boolean isEditable()
           
 void select(int index, double maxWidth)
          Selects the combobox element with the passed index.
 void select(java.lang.String[] values, java.lang.String operator, java.lang.String searchType, double maxWidth)
          Selects the specified item in the combobox.
 void selectAll()
          select the whole text of the textfield by clicking three times.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JComboBoxHelper

public JComboBoxHelper(JComboBoxImplClass implClass)
Creates a new instance.

Parameters:
implClass - The implementation class of JComboBox.
Method Detail

input

public void input(java.lang.String text,
                  boolean replace)
           throws org.eclipse.jubula.rc.common.exception.StepExecutionException,
                  java.lang.IllegalArgumentException
Inputs text to component.

Parameters:
text - the text to type in
replace - whether to rplace the text or not
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - if an error occurs during typing text
java.lang.IllegalArgumentException - if component or text are null

select

public void select(java.lang.String[] values,
                   java.lang.String operator,
                   java.lang.String searchType,
                   double maxWidth)
            throws org.eclipse.jubula.rc.common.exception.StepExecutionException,
                   java.lang.IllegalArgumentException
Selects the specified item in the combobox.

Parameters:
values - the values which should be (not) selected
operator - if regular expressions are used
searchType - Determines where the search begins ("relative" or "absolute")
maxWidth - the maximal width which is used to select the item
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - if an error occurs during selecting the item
java.lang.IllegalArgumentException - if component or text are null

select

public void select(int index,
                   double maxWidth)
Selects the combobox element with the passed index.

Parameters:
index - The index to select
maxWidth - the maximal width which is used to select the item

selectAll

public void selectAll()
select the whole text of the textfield by clicking three times.


click

public void click(java.lang.Integer count)
performs a count -click on the textfield.

Parameters:
count - the number of clicks

containsValue

public boolean containsValue(java.lang.String value,
                             java.lang.String operator)
Parameters:
value - The value to check
operator - The operator used to verify
Returns:
true if the combobox contains an element rendered with the passed value

containsValue

public boolean containsValue(java.lang.String value)
Parameters:
value - The value to check
Returns:
true if the combobox contains an element rendered with the passed value

isEditable

public boolean isEditable()
Returns:
If the combobox is editable

getText

public java.lang.String getText()
Returns:
the String from the Cell Renderer