|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jubula.rc.swing.swing.implclasses.AbstractSwingImplClass
org.eclipse.jubula.rc.swing.swing.implclasses.JTextComponentImplClass
public class JTextComponentImplClass
Implementation class for JTextComponent
and subclasses.
Field Summary |
---|
Fields inherited from class org.eclipse.jubula.rc.swing.swing.implclasses.AbstractSwingImplClass |
---|
INDEX_LIST_SEP_CHAR, POS_UNI_PERCENT, POS_UNIT_PIXEL, RENDERER_FALLBACK_TEXT_GETTER_METHOD_1, RENDERER_FALLBACK_TEXT_GETTER_METHOD_2, VALUE_SEPARATOR |
Constructor Summary | |
---|---|
JTextComponentImplClass()
|
Method Summary | |
---|---|
void |
gdClick(int count)
performs a count -click with the left button on the
textfield. |
void |
gdClick(int count,
int button)
performs a count -click on the textfield. |
void |
gdInputText(java.lang.String text)
Types text into the component. |
void |
gdInsertText(java.lang.String text,
int index)
Inserts text at the position index . |
void |
gdInsertText(java.lang.String text,
java.lang.String pattern,
java.lang.String operator,
boolean after)
Inserts text before or after the first appearance of
pattern . |
java.lang.String |
gdReadValue(java.lang.String variable)
Action to read the value of a JTextComponent to store it in a variable in the Client |
void |
gdReplaceText(java.lang.String text)
Types text into the component. |
void |
gdSelect()
select the whole text of the textfield by pressing ctrl + A; in case this won't work the whole text is selected programmatically |
void |
gdSelect(java.lang.String pattern,
java.lang.String operator)
Selects the first (not)appearance of pattern in the text
component's content. |
void |
gdVerifyEditable(boolean editable)
Verifies the editable property. |
void |
gdVerifyText(java.lang.String text)
Verifies if the textfield shows the passed text. |
void |
gdVerifyText(java.lang.String text,
java.lang.String operator)
Verifies if the textfield shows the passed text. |
javax.swing.JComponent |
getComponent()
|
protected java.lang.String |
getSelectionText()
|
protected java.lang.String |
getText()
Get a String representation of the "text" of the component. |
java.lang.String[] |
getTextArrayFromComponent()
Returns a descriptive text array that represents the given gui component. |
protected javax.swing.text.JTextComponent |
getTextComponent()
|
void |
setComponent(java.lang.Object graphicsComponent)
Set the component the methods this implementation class implements have to work with. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JTextComponentImplClass()
Method Detail |
---|
protected javax.swing.text.JTextComponent getTextComponent()
JTextComponent
instance.public javax.swing.JComponent getComponent()
getComponent
in class AbstractSwingImplClass
IBaseImplementationClass.setComponent(Object)
public void setComponent(java.lang.Object graphicsComponent)
graphicsComponent
- the component from the AUT control
affects
the AUT.protected java.lang.String getText()
AbstractSwingImplClass
getText
in class AbstractSwingImplClass
JTextComponent.getText()
valueAbstractSwingImplClass.getText()
public java.lang.String gdReadValue(java.lang.String variable)
variable
- the name of the variable
public void gdVerifyText(java.lang.String text, java.lang.String operator)
text
- The text to verify.operator
- The operator used to verifypublic void gdVerifyText(java.lang.String text)
text
- The text to verify.public void gdReplaceText(java.lang.String text)
text
into the component. This replaces the shown
content.
text
- the text to type inpublic void gdInputText(java.lang.String text)
text
into the component.
text
- the text to type inpublic void gdInsertText(java.lang.String text, int index)
text
at the position index
.
text
- The text to insertindex
- The position for insertionpublic void gdInsertText(java.lang.String text, java.lang.String pattern, java.lang.String operator, boolean after) throws org.eclipse.jubula.rc.common.exception.StepExecutionException
text
before or after the first appearance of
pattern
.
text
- The text to insertpattern
- The pattern to find the position for insertionoperator
- Operator to select Matching Algorithmafter
- If true
, the text will be inserted after the
pattern, otherwise before the pattern.
org.eclipse.jubula.rc.common.exception.StepExecutionException
- If the pattern is invalid or cannot be foundpublic void gdVerifyEditable(boolean editable)
editable
- The editable property to verify.public void gdSelect()
protected java.lang.String getSelectionText()
public void gdSelect(java.lang.String pattern, java.lang.String operator) throws org.eclipse.jubula.rc.common.exception.StepExecutionException
pattern
in the text
component's content.
pattern
- The pattern to selectoperator
- operator
org.eclipse.jubula.rc.common.exception.StepExecutionException
- If the pattern is invalid or cannot be foundpublic void gdClick(int count)
count
-click with the left button on the
textfield. The click will be performed at the first caret position.
count
- the number of clickspublic void gdClick(int count, int button)
count
-click on the textfield. The click will
be performed at the left beginning of the textfield plus 3 pixels
to be sure that the click is really within the component.
gdClick
in class AbstractSwingImplClass
count
- the number of clicksbutton
- the button that was clickedpublic java.lang.String[] getTextArrayFromComponent()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |