com.appperfect.devcommon.script.javaelement
Interface SwingTextArea

All Superinterfaces:
AwtComponent, AwtContainer, IScript, JavaComponent, SwingComponent, SwingTextComponent

public interface SwingTextArea
extends SwingTextComponent

SwingTextArea is created to represent javax.swing.JTextArea component

The following code fragment illustrates how to create an SwingTextArea element.

 var element = engine.createSwingTextArea(1, 5);
 
where engine is object of IScriptEngine


Method Summary
 boolean append(java.lang.String text)
 Appends the given text to the text area's current text.
 int getColumns()
 Returns the number of columns in this text area.
 int getLineCount()
 Determines the number of lines contained in the area.
 int getRows()
 Returns the number of rows in the text area.
 boolean insert(java.lang.String text, int pos)
 Inserts the specified text at the specified position in this text area.
 boolean replaceRange(java.lang.String text, int start, int end)
 Replaces text between the indicated start and end positions with the specified replacement text.
 boolean setColumns(int columns)
 Sets the number of columns for this text area.
 boolean setRows(int rows)
 Sets the number of rows for this text area.
 
Methods inherited from interface com.appperfect.devcommon.script.javaelement.SwingTextComponent
getCaretPos, getSelectedText, getSelectionEnd, getSelectionStart, isEditable, setCaretPos, setEditable, setSelection
 
Methods inherited from interface com.appperfect.devcommon.script.javaelement.AwtContainer
getComponentCount
 
Methods inherited from interface com.appperfect.devcommon.script.javaelement.JavaComponent
activate, addAttribute, captureImage, click, close, dblClick, drag, drop, getName, getText, getToolTipText, maximize, minimize, mouseMove, restore, rightClick, set, setBreakPoint, setIgnored, setImagePath, setName, setThinkTime, setTitle, type
 
Methods inherited from interface com.appperfect.devcommon.script.IScript
getReasonForFailure, isIgnored, isTaskSuccessful, isTaskTimedOut, setReasonForFailure, setTaskSuccessful, setTaskTimedout, setTimeout
 

Method Detail

append

boolean append(java.lang.String text)
Appends the given text to the text area's current text.

Note that passing null or inconsistent parameters is invalid and will result in unspecified behavior.

Parameters:
text - the non-null text to append
Returns:
true if event was executed successfully, returns false if there is any failure during execution

getColumns

int getColumns()
Returns the number of columns in this text area.

Returns:
the number of columns in the text area

getLineCount

int getLineCount()
Determines the number of lines contained in the area.

Returns:
the number of lines > 0

getRows

int getRows()
Returns the number of rows in the text area.

Returns:
the number of rows in the text area

insert

boolean insert(java.lang.String text,
               int pos)
Inserts the specified text at the specified position in this text area.

Note that passing null or inconsistent parameters is invalid and will result in unspecified behavior.

Parameters:
text - the non-null text to insert
pos - the position at which to insert
Returns:
true if event was executed successfully, returns false if there is any failure during execution

replaceRange

boolean replaceRange(java.lang.String text,
                     int start,
                     int end)
Replaces text between the indicated start and end positions with the specified replacement text. The text at the end position will not be replaced. The text at the start position will be replaced (unless the start position is the same as the end position). The text position is zero-based. The inserted substring may be of a different length than the text it replaces.

Note that passing null or inconsistent parameters is invalid and will result in unspecified behavior.

Parameters:
text - the non-null text to use as the replacement
start - the start position
end - the end position
Returns:
true if event was executed successfully, returns false if there is any failure during execution

setColumns

boolean setColumns(int columns)
Sets the number of columns for this text area.

Parameters:
columns - the number of columns
Returns:
true if event was executed successfully, returns false if there is any failure during execution

setRows

boolean setRows(int rows)
Sets the number of rows for this text area.

Parameters:
rows - the number of rows
Returns:
true if event was executed successfully, returns false if there is any failure during execution


Copyright © 2003-2011 AppPerfect Corporation. All Rights Reserved.