public abstract class AbstractUIComponent extends Object implements UIComponent
Constructor and Description |
---|
AbstractUIComponent() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAttributes(Component component,
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 |
backgroundNear(String expectedColor)
Checks that the background color of the component is close to the given value.
|
Assertion |
foregroundEquals(String expectedColor)
Checks the foreground color of the component.
|
Assertion |
foregroundNear(String expectedColor)
Checks that the foreground color of the component is close to the given value.
|
Panel |
getContainer() |
Panel |
getContainer(String parentName)
Returns the first container named parentName or null if not found
|
String |
getDescription()
Returns an XML representation of the component and its subcomponents.
|
protected void |
getDescription(Component component,
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,
XmlWriter.Tag tag) |
Assertion |
isEnabled() |
Assertion |
isVisible() |
AbstractUIComponent |
pressKey(Key key)
Simulates pressing a key while the focus is on the component.
|
AbstractUIComponent |
releaseKey(Key key)
Simulates releasing a key while the focus is on the component.
|
AbstractUIComponent |
typeKey(Key key)
Simulates typing a key while the focus is on the component.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAwtComponent, getDescriptionTypeName
public final String getDescription()
UIComponent
getDescription
in interface UIComponent
protected void getSubDescription(Container container, XmlWriter.Tag tag)
protected void getDescription(Component component, XmlWriter.Tag tag, boolean showVisibleOnly)
protected void addAttributes(Component component, XmlWriter.Tag tag)
public String getName()
UIComponent
getName
in interface UIComponent
public String getLabel()
UIComponent
getLabel
in interface UIComponent
public Assertion isVisible()
isVisible
in interface UIComponent
public Assertion isEnabled()
isEnabled
in interface UIComponent
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.public Assertion foregroundNear(String expectedColor)
Checks that the foreground color of the component is close to the given value.
The color can be given in either hexadecimal ("FF45C0") or human-readable ("red") format.public Assertion backgroundEquals(String expectedColor)
public Assertion backgroundNear(String expectedColor)
Checks that the background color of the component is close to the given value.
The color can be given in either hexadecimal ("FF45C0") or human-readable ("red") format.public Panel getContainer()
public Panel getContainer(String parentName)
UIComponent
getContainer
in interface UIComponent
public AbstractUIComponent typeKey(Key key)
UIComponent
typeKey
in interface UIComponent
public AbstractUIComponent pressKey(Key key)
UIComponent
pressKey
in interface UIComponent
public AbstractUIComponent releaseKey(Key key)
UIComponent
releaseKey
in interface UIComponent
Copyright © 2004–2016. All rights reserved.