org.viewaframework.test
Class ButtonTrapper

java.lang.Object
  extended by org.viewaframework.test.component.AbstractComponentTrapper<T>
      extended by org.viewaframework.test.component.AbstractButtonTrapper<JButton>
          extended by org.viewaframework.test.ButtonTrapper
All Implemented Interfaces:
ApplicationTrapperAware, ViewTrapperAware, Trapper<JButton>

public class ButtonTrapper
extends AbstractButtonTrapper<JButton>

Author:
Mario Garcia

Constructor Summary
ButtonTrapper(ApplicationTrapper applicationTrapper, String componentName)
           
ButtonTrapper(ApplicationTrapper applicationTrapper, String viewId, String componentName)
           
 
Method Summary
 AbstractButtonTrapper<JButton> click()
           
 ButtonTrapper click(long millis)
           
 Class<JButton> getType()
           
 ButtonTrapper log(String message)
           
 ButtonTrapper requireEnabled()
          Checks that the component is enabled otherwise the test will fail
 ButtonTrapper requireEnabled(boolean enabled)
          Checks whether the component is enabled or not
 ButtonTrapper requireText(String text)
           
 ButtonTrapper requireToolTipText(String text)
           
 ButtonTrapper requireVisible()
          Checks the component is visible otherwise the test will fail
 ButtonTrapper requireVisible(boolean visible)
          Checks whether the component is visible or not
 
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
 

Constructor Detail

ButtonTrapper

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

ButtonTrapper

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

click

public AbstractButtonTrapper<JButton> click()
Overrides:
click in class AbstractButtonTrapper<JButton>
Returns:

click

public ButtonTrapper click(long millis)
Overrides:
click in class AbstractButtonTrapper<JButton>
Returns:

getType

public Class<JButton> getType()
Returns:

log

public ButtonTrapper log(String message)
Returns:

requireEnabled

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

Overrides:
requireEnabled in class AbstractButtonTrapper<JButton>
Returns:

requireEnabled

public ButtonTrapper requireEnabled(boolean enabled)
Description copied from class: AbstractComponentTrapper
Checks whether the component is enabled or not

Overrides:
requireEnabled in class AbstractButtonTrapper<JButton>
Returns:

requireText

public ButtonTrapper requireText(String text)
Overrides:
requireText in class AbstractButtonTrapper<JButton>
Returns:

requireToolTipText

public ButtonTrapper requireToolTipText(String text)
Overrides:
requireToolTipText in class AbstractButtonTrapper<JButton>
Returns:

requireVisible

public ButtonTrapper requireVisible()
Description copied from class: AbstractComponentTrapper
Checks the component is visible otherwise the test will fail

Overrides:
requireVisible in class AbstractButtonTrapper<JButton>
Returns:

requireVisible

public ButtonTrapper requireVisible(boolean visible)
Description copied from class: AbstractComponentTrapper
Checks whether the component is visible or not

Overrides:
requireVisible in class AbstractButtonTrapper<JButton>
Returns:


Copyright © 2010. All Rights Reserved.