org.viewaframework.test.component
Class AbstractTextTrapper<T extends JTextComponent>

java.lang.Object
  extended by org.viewaframework.test.component.AbstractComponentTrapper<T>
      extended by org.viewaframework.test.component.AbstractTextTrapper<T>
Type Parameters:
T -
All Implemented Interfaces:
ApplicationTrapperAware, ViewTrapperAware, Trapper<T>
Direct Known Subclasses:
TextTrapper

public abstract class AbstractTextTrapper<T extends JTextComponent>
extends AbstractComponentTrapper<T>

Author:
Mario Garcia

Constructor Summary
AbstractTextTrapper(ApplicationTrapper applicationTrapper, String componentName)
           
AbstractTextTrapper(ApplicationTrapper applicationTrapper, String viewId, String componentName)
           
 
Method Summary
 AbstractTextTrapper<T> requireEnabled()
          Checks that the component is enabled otherwise the test will fail
 AbstractTextTrapper<T> requireEnabled(boolean enabled)
          Checks whether the component is enabled or not
 AbstractTextTrapper<T> requireText(String textRequired)
           
 AbstractTextTrapper<T> requireText(String textRequired, int offs, int len)
           
 AbstractTextTrapper<T> requireVisible()
          Checks the component is visible otherwise the test will fail
 AbstractTextTrapper<T> requireVisible(boolean visible)
          Checks whether the component is visible or not
 AbstractTextTrapper<T> setText(String text)
           
 AbstractTextTrapper<T> setText(String text, long millis)
           
 
Methods inherited from class org.viewaframework.test.component.AbstractComponentTrapper
applicationTrapper, getTarget, setTarget, view, view
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.viewaframework.test.Trapper
getType, log
 

Constructor Detail

AbstractTextTrapper

public AbstractTextTrapper(ApplicationTrapper applicationTrapper,
                           String componentName)
Parameters:
applicationTrapper -
componentName -

AbstractTextTrapper

public AbstractTextTrapper(ApplicationTrapper applicationTrapper,
                           String viewId,
                           String componentName)
Parameters:
applicationTrapper -
viewId -
componentName -
Method Detail

requireEnabled

public AbstractTextTrapper<T> requireEnabled()
Description copied from class: AbstractComponentTrapper
Checks that the component is enabled otherwise the test will fail

Specified by:
requireEnabled in class AbstractComponentTrapper<T extends JTextComponent>
Returns:

requireEnabled

public AbstractTextTrapper<T> requireEnabled(boolean enabled)
Description copied from class: AbstractComponentTrapper
Checks whether the component is enabled or not

Specified by:
requireEnabled in class AbstractComponentTrapper<T extends JTextComponent>
Returns:

requireText

public AbstractTextTrapper<T> requireText(String textRequired)
Parameters:
textRequired -

requireText

public AbstractTextTrapper<T> requireText(String textRequired,
                                          int offs,
                                          int len)
Parameters:
textRequired -

requireVisible

public AbstractTextTrapper<T> requireVisible()
Description copied from class: AbstractComponentTrapper
Checks the component is visible otherwise the test will fail

Specified by:
requireVisible in class AbstractComponentTrapper<T extends JTextComponent>
Returns:

requireVisible

public AbstractTextTrapper<T> requireVisible(boolean visible)
Description copied from class: AbstractComponentTrapper
Checks whether the component is visible or not

Specified by:
requireVisible in class AbstractComponentTrapper<T extends JTextComponent>
Returns:

setText

public AbstractTextTrapper<T> setText(String text)
Parameters:
text -
Returns:

setText

public AbstractTextTrapper<T> setText(String text,
                                      long millis)
Parameters:
text -
millis -
Returns:


Copyright © 2010. All Rights Reserved.