org.uispec4j
Interface UIComponent

All Known Implementing Classes:
AbstractButton, AbstractSwingUIComponent, AbstractUIComponent, Button, CheckBox, ComboBox, DateSpinner, Desktop, ListBox, ListSpinner, MenuBar, MenuItem, NumberSpinner, Panel, PasswordField, ProgressBar, RadioButton, Slider, Spinner, TabGroup, Table, Table.Cell, TextBox, ToggleButton, Tree, Window

public interface UIComponent

Interface for all UI (user interface) components.


Method Summary
 java.awt.Component getAwtComponent()
          Returns the Java GUI component represented by this object.
 Panel getContainer(java.lang.String parentName)
          Returns the first container named parentName or null if not found
 java.lang.String getDescription()
          Returns an XML representation of the component and its subcomponents.
 java.lang.String getDescriptionTypeName()
          Returns the name of the component as it will appear in the XML representation returned by getDescription().
 java.lang.String getLabel()
          Returns the label displayed on this component, or null if this has no sense for this kind of components.
 java.lang.String getName()
          Returns the internal name with which can be used to identify the component.
 Assertion isEnabled()
           
 Assertion isVisible()
           
 UIComponent pressKey(Key key)
          Simulates pressing a key while the focus is on the component.
 UIComponent releaseKey(Key key)
          Simulates releasing a key while the focus is on the component.
 UIComponent typeKey(Key key)
          Simulates typing a key while the focus is on the component.
 

Method Detail

getAwtComponent

java.awt.Component getAwtComponent()
Returns the Java GUI component represented by this object.


getDescription

java.lang.String getDescription()
Returns an XML representation of the component and its subcomponents.


getDescriptionTypeName

java.lang.String getDescriptionTypeName()
Returns the name of the component as it will appear in the XML representation returned by getDescription().


isEnabled

Assertion isEnabled()

isVisible

Assertion isVisible()

getLabel

java.lang.String getLabel()
Returns the label displayed on this component, or null if this has no sense for this kind of components.


getName

java.lang.String getName()
Returns the internal name with which can be used to identify the component. This can be null if no name was set by the developers.


getContainer

Panel getContainer(java.lang.String parentName)
Returns the first container named parentName or null if not found


typeKey

UIComponent typeKey(Key key)
Simulates typing a key while the focus is on the component.


pressKey

UIComponent pressKey(Key key)
Simulates pressing a key while the focus is on the component.


releaseKey

UIComponent releaseKey(Key key)
Simulates releasing a key while the focus is on the component.



Copyright © 2004-2010. All Rights Reserved.