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

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

public class JTabbedPaneImplClass
extends AbstractSwingImplClass

This class implements actions on the Swing JTabbedPane.

Created:
20.05.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
JTabbedPaneImplClass()
           
 
Method Summary
 void gdSelectTab(java.lang.String title, java.lang.String operator)
          Selects the tab with the passed title.
 void gdSelectTabByIndex(int index)
          Selects the tab with the passed index.
 void gdVerifyEnabled(java.lang.String title, java.lang.String operator, boolean isEnabled)
          Verifies if the tab with the passed title is enabled.
 void gdVerifyEnabledByIndex(int index, boolean enabled)
          Verifies if the tab with the passed index is enabled.
 void gdVerifyExistenceOfTab(java.lang.String tab, java.lang.String operator, boolean exists)
          Verifies existence of tab by index/value
 void gdVerifySelectedTab(java.lang.String tabTitlePattern, java.lang.String operator, boolean selected)
          Verifies the selection of the tab with the passed title.
 void gdVerifySelectedTabByIndex(int index, boolean selected)
          Verifies the selection of the tab with the passed index.
 void gdVerifyTextOfTabByIndex(int index, java.lang.String text, java.lang.String operator)
          Verifies the text of the tab by index
 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

JTabbedPaneImplClass

public JTabbedPaneImplClass()
Method Detail

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.

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)

gdSelectTabByIndex

public void gdSelectTabByIndex(int index)
                        throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Selects the tab with the passed index. The method doesn't care if the tab is enabled or not.

Parameters:
index - The tab index
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - If the tab index is invalid.

gdSelectTab

public void gdSelectTab(java.lang.String title,
                        java.lang.String operator)
                 throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Selects the tab with the passed title. The method doesn't care if the tab is enabled or not.

Parameters:
title - The tab title
operator - using regex
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - If the tab title is invalid.

gdVerifySelectedTabByIndex

public void gdVerifySelectedTabByIndex(int index,
                                       boolean selected)
                                throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Verifies the selection of the tab with the passed index.

Parameters:
index - The tab index
selected - Should the tab be selected?
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - If the tab index is invalid.

gdVerifySelectedTab

public void gdVerifySelectedTab(java.lang.String tabTitlePattern,
                                java.lang.String operator,
                                boolean selected)
                         throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Verifies the selection of the tab with the passed title.

Parameters:
tabTitlePattern - The tab title pattern to use for checking
operator - Operator to be executed
selected - Should the tab be selected?
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - If the tab title is invalid.

gdVerifyEnabled

public void gdVerifyEnabled(java.lang.String title,
                            java.lang.String operator,
                            boolean isEnabled)
                     throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Verifies if the tab with the passed title is enabled.

Parameters:
title - The tab title
operator - operation to be executed
isEnabled - wether to test if the tab is enabled or not
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - If the tab title is invalid.

gdVerifyEnabledByIndex

public void gdVerifyEnabledByIndex(int index,
                                   boolean enabled)
                            throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Verifies if the tab with the passed index is enabled.

Parameters:
index - The tab index
enabled - Should the tab be enabled?
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - If the tab index is invalid.

gdVerifyTextOfTabByIndex

public void gdVerifyTextOfTabByIndex(int index,
                                     java.lang.String text,
                                     java.lang.String operator)
                              throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Verifies the text of the tab by index

Parameters:
index - index of tab
text - The tab title
operator - Operator to be executed
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - If the tab title is invalid.

gdVerifyExistenceOfTab

public void gdVerifyExistenceOfTab(java.lang.String tab,
                                   java.lang.String operator,
                                   boolean exists)
                            throws org.eclipse.jubula.rc.common.exception.StepExecutionException
Verifies existence of tab by index/value

Parameters:
tab - index/value of tab
operator - Operator to be executed
exists - boolean, tab exists
Throws:
org.eclipse.jubula.rc.common.exception.StepExecutionException - if tab does not exist.

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:
always null
See Also:
AbstractSwingImplClass.getText()