org.uispec4j
Class AbstractUIComponent

java.lang.Object
  extended byorg.uispec4j.AbstractUIComponent
All Implemented Interfaces:
UIComponent
Direct Known Subclasses:
AbstractButton, ComboBox, Desktop, ListBox, MenuBar, MenuItem, Panel, PasswordField, ProgressBar, Slider, Spinner, TabGroup, Table, TextBox, Tree

public abstract class AbstractUIComponent
extends Object
implements UIComponent

Base class for UIComponent implementations.


Constructor Summary
AbstractUIComponent()
           
 
Method Summary
protected  void addAttributes(Component component, org.uispec4j.xml.XmlWriter.Tag tag)
           
 Assertion backgroundEquals(String expectedColor)
          Checks the background color of the component The color can be given in either hexadecimal ("FF45C0") or human-readable ("red") format.
 Assertion foregroundEquals(String expectedColor)
          Checks the foreground color of the component.
 String getDescription()
          Returns an XML representation of the component and its subcomponents.
protected  void getDescription(Component component, org.uispec4j.xml.XmlWriter.Tag tag, boolean showVisibleOnly)
           
 String getLabel()
          Returns the label displayed on this component, or null if this has no sense for this kind of components.
 String getName()
          Returns the internal name with which can be used to identify the component.
protected  void getSubDescription(Container container, org.uispec4j.xml.XmlWriter.Tag tag)
           
 Assertion isEnabled()
          Checks if the component is enabled.
 Assertion isVisible()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.uispec4j.UIComponent
getAwtComponent, getDescriptionTypeName
 

Constructor Detail

AbstractUIComponent

public AbstractUIComponent()
Method Detail

getDescription

public final String getDescription()
Description copied from interface: UIComponent
Returns an XML representation of the component and its subcomponents.

Specified by:
getDescription in interface UIComponent

getSubDescription

protected void getSubDescription(Container container,
                                 org.uispec4j.xml.XmlWriter.Tag tag)

getDescription

protected void getDescription(Component component,
                              org.uispec4j.xml.XmlWriter.Tag tag,
                              boolean showVisibleOnly)

addAttributes

protected void addAttributes(Component component,
                             org.uispec4j.xml.XmlWriter.Tag tag)

getName

public String getName()
Description copied from interface: UIComponent
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.

Specified by:
getName in interface UIComponent

getLabel

public String getLabel()
Description copied from interface: UIComponent
Returns the label displayed on this component, or null if this has no sense for this kind of components.

Specified by:
getLabel in interface UIComponent

isVisible

public Assertion isVisible()

isEnabled

public Assertion isEnabled()
Description copied from interface: UIComponent
Checks if the component is enabled.

Specified by:
isEnabled in interface UIComponent

foregroundEquals

public Assertion foregroundEquals(String expectedColor)
Checks the foreground color of the component.

The color can be given in either hexadecimal ("FF45C0") or human-readable ("red") format.

See Also:
Using colors

backgroundEquals

public Assertion backgroundEquals(String expectedColor)
Checks the background color of the component The color can be given in either hexadecimal ("FF45C0") or human-readable ("red") format.

See Also:
Using colors


Copyright © 2004-2007 Design-up. All Rights Reserved.