|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.uispec4j.AbstractUIComponent
org.uispec4j.AbstractSwingUIComponent
org.uispec4j.TextBox
public class TextBox
Wrapper for JTextComponent/JLabel components.
| Field Summary | |
|---|---|
static java.lang.Class[] |
SWING_CLASSES
|
static java.lang.String |
TYPE_NAME
|
| Constructor Summary | |
|---|---|
TextBox(javax.swing.JLabel label)
|
|
TextBox(javax.swing.text.JTextComponent textComponent)
|
|
| Method Summary | |
|---|---|
void |
appendText(java.lang.String text)
Inserts text at the given position without pressing Enter. |
void |
clear()
Clears the text without validating. |
void |
clickOnHyperlink(java.lang.String link)
Simulates a click on an hyperlink given a part of the link text. |
void |
focusLost()
Simulates losing the focus., by calling directly the focus listeners of the component without going through the focus mechanim. |
javax.swing.JComponent |
getAwtComponent()
Returns the Java GUI component represented by this object. |
java.lang.String |
getDescriptionTypeName()
Returns the name of the component as it will appear in the XML representation returned by UIComponent.getDescription(). |
java.lang.String |
getText()
|
Assertion |
htmlEquals(java.lang.String html)
Checks the displayed text in cases where HTML text is used. |
Assertion |
iconEquals(javax.swing.Icon icon)
Checks the icon displayed by the component. |
void |
insertText(java.lang.String text,
int position)
Inserts text at the given position without pressing Enter. |
Assertion |
isEditable()
|
void |
setText(java.lang.String text)
Replaces the text box contents and simulates pressing the Enter key. |
void |
setText(java.lang.String text,
boolean pressEnter)
Replaces the text box contents and simulates pressing Enter if pressEnter is set to true. |
Assertion |
textContains(java.lang.String... orderedTexts)
Checks that the text box contains a number of substrings, in a given order. |
Assertion |
textContains(java.lang.String text)
|
Assertion |
textDoesNotContain(java.lang.String text)
|
Assertion |
textEquals(java.lang.String text)
|
Assertion |
textIsEmpty()
|
Trigger |
triggerClickOnHyperlink(java.lang.String name)
|
| Methods inherited from class org.uispec4j.AbstractSwingUIComponent |
|---|
tooltipContains, tooltipEquals |
| Methods inherited from class org.uispec4j.AbstractUIComponent |
|---|
addAttributes, backgroundEquals, backgroundNear, foregroundEquals, foregroundNear, getContainer, getContainer, getDescription, getDescription, getLabel, getName, getSubDescription, isEnabled, isVisible, pressKey, releaseKey, typeKey |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TYPE_NAME
public static final java.lang.Class[] SWING_CLASSES
| Constructor Detail |
|---|
public TextBox(javax.swing.text.JTextComponent textComponent)
public TextBox(javax.swing.JLabel label)
| Method Detail |
|---|
public java.lang.String getDescriptionTypeName()
UIComponentUIComponent.getDescription().
public javax.swing.JComponent getAwtComponent()
UIComponent
getAwtComponent in interface UIComponentgetAwtComponent in class AbstractSwingUIComponentpublic void setText(java.lang.String text)
public void setText(java.lang.String text,
boolean pressEnter)
public void insertText(java.lang.String text,
int position)
public void appendText(java.lang.String text)
public void clear()
setText("") to achieve the same effect with validation.
public java.lang.String getText()
public Assertion textIsEmpty()
public Assertion htmlEquals(java.lang.String html)
textEquals(String) in that whitespaces, carriage return
and other formatting adjustments are ignored.
public Assertion textContains(java.lang.String... orderedTexts)
public Assertion textEquals(java.lang.String text)
public Assertion textContains(java.lang.String text)
public Assertion textDoesNotContain(java.lang.String text)
public Assertion isEditable()
public Assertion iconEquals(javax.swing.Icon icon)
public void clickOnHyperlink(java.lang.String link)
public Trigger triggerClickOnHyperlink(java.lang.String name)
clickOnHyperlink(String)public void focusLost()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||