| org.netbeans.modules.visualweb.gravy.debugger.TermOperator
TermOperator | public class TermOperator extends ComponentOperator (Code) | | Operator for Output pane containing one (normal output)
or more (for example JavaDoc output) output terminals
(org.netbeans.lib.terminalemulator.Term component).
Usage:
// find term with given name
TermOperator to = new TermOperator("MyClass - I/O");
// wait for a message appears in output
to.waitText("my message");
// get the text
String wholeOutput = to.getText();
to.clearOutput();
to.waitText("your message");
// close this output either way
to.close(); // or to.discard();
|
Inner Class :static class ScreenFinder implements ComponentChooser | |
Inner Class :static class TermFinder implements ComponentChooser | |
Constructor Summary | |
public | TermOperator(JComponent source) Create new instance of TermOperator from given component. | public | TermOperator(ContainerOperator contOper, String name) Waits for output term with given name in specified container. | public | TermOperator(ContainerOperator contOper, int index) | public | TermOperator(ContainerOperator contOper, String name, int index) | public | TermOperator(ContainerOperator contOper) |
Method Summary | |
public void | clearOutput() Performs clear output action. | public void | close() Closes output teby by API. | public void | copy() Performs copy action. | public void | discard() Performs discard action. | public void | discardAll() Performs discard all action. | public void | find() Performs find action. | public void | findNext() Performs find next action. | public int | findRow(String rowText) Finds a row by text in the first Term. | public int | findRow(String rowText, int termIndex) Finds a row by text. | public void | flush() Flushes buffer. | public void | flush(int termIndex) Flushes buffer. | public int | getCursorRow() Returns row where the cursor stands. | public int | getCursorRow(int termIndex) Returns row where the cursor stands. | public int | getLineCount() Returns count of filled lines of the first Term. | public int | getLineCount(int termIndex) Returns count of filled lines. | public String | getRowText(int row) Returns text from specified row. | public String | getRowText(int row, int termIndex) Returns text from specified row of termIndex-th term. | public JComponent | getTermSource() | public JComponent | getTermSource(int termIndex) | public String | getText() Invokes flush and returns text from the first Term. | public String | getText(int termIndex) Invokes flush and returns text. | public String | getText(int startRow, int endRow) | public String | getText(int startRow, int endRow, int termIndex) | public ComponentOperator | screen() Returns the topmost component lying on the first Term. | public ComponentOperator | screen(int termIndex) Returns the topmost component lying on the term. | public void | selectAll() Performs select all action. | public void | startRedirection() Performs start redirection action. | public void | stopRedirection() Performs stop redirection action. | public String | textWithin(int beginRow, int beginCol, int endRow, int endCol) Returns text within given coordinates. | public String | textWithin(int beginRow, int beginCol, int endRow, int endCol, int termIndex) Returns text within given coordinates of termIndex-th term. | public void | verify() | public void | waitText(String text) Waits for text to be displayed in output term. | public void | waitText(String text, int termIndex) Waits for text to be displayed in termIndex-th term. |
_screen | ComponentOperator[] _screen(Code) | | |
TermOperator | public TermOperator(JComponent source)(Code) | | Create new instance of TermOperator from given component.
Parameters: source - TopComponent instance with Term |
clearOutput | public void clearOutput()(Code) | | Performs clear output action.
|
close | public void close()(Code) | | Closes output teby by API.
|
copy | public void copy()(Code) | | Performs copy action.
|
discard | public void discard()(Code) | | Performs discard action.
|
discardAll | public void discardAll()(Code) | | Performs discard all action.
|
find | public void find()(Code) | | Performs find action.
|
findNext | public void findNext()(Code) | | Performs find next action.
|
findRow | public int findRow(String rowText)(Code) | | Finds a row by text in the first Term.
Parameters: rowText - String row text row number of specified text; -1 if text not found |
findRow | public int findRow(String rowText, int termIndex)(Code) | | Finds a row by text.
Parameters: rowText - String row text Parameters: termIndex - int Term index row number of specified text; -1 if text not found |
flush | public void flush()(Code) | | Flushes buffer.
Maps Term.flush() through queue for the first Term
|
flush | public void flush(int termIndex)(Code) | | Flushes buffer.
Maps Term.flush() through queue
Parameters: termIndex - int Term index |
getCursorRow | public int getCursorRow()(Code) | | Returns row where the cursor stands.
Maps Term.getCursorRow() through queue for the first Term
int cursor row |
getCursorRow | public int getCursorRow(int termIndex)(Code) | | Returns row where the cursor stands.
Maps Term.getCursorRow() through queue
Parameters: termIndex - int Term index int cursor row |
getLineCount | public int getLineCount()(Code) | | Returns count of filled lines of the first Term.
count of filled lines of the first Term. |
getLineCount | public int getLineCount(int termIndex)(Code) | | Returns count of filled lines.
Parameters: termIndex - int Term index count of filled lines. |
getRowText | public String getRowText(int row)(Code) | | Returns text from specified row.
Maps Term.getRowText(int) through queue for the first Term.
Parameters: row - row number to get text from text from the specified row |
getRowText | public String getRowText(int row, int termIndex)(Code) | | Returns text from specified row of termIndex-th term.
Maps Term.getRowText(int) through queue
Parameters: row - row number to get text from Parameters: termIndex - int Term index text from the specified row |
getTermSource | public JComponent getTermSource()(Code) | | Getter for Term object
instance of Term |
getTermSource | public JComponent getTermSource(int termIndex)(Code) | | Getter for Term object
instance of Term Parameters: termIndex - index of Term inside (usualy 0, Javadoc Output has two Terms: 0 and 1). |
getText | public String getText()(Code) | | Invokes flush and returns text from the first Term.
text from the first Term. |
getText | public String getText(int termIndex)(Code) | | Invokes flush and returns text.
Parameters: termIndex - int Term index text from termIndex-th Term |
getText | public String getText(int startRow, int endRow)(Code) | | Get text between startRow and endRow from the first Term
Parameters: startRow - first row to be included Parameters: endRow - last row to be included text between startRow and endRow from the first Term |
getText | public String getText(int startRow, int endRow, int termIndex)(Code) | | Get text between startRow and endRow
Parameters: startRow - first row to be included Parameters: endRow - last row to be included Parameters: termIndex - int Term index text between startRow and endRow |
screen | public ComponentOperator screen()(Code) | | Returns the topmost component lying on the first Term.
All events should be dispatched to this component.
the topmost component lying on the first Term. |
screen | public ComponentOperator screen(int termIndex)(Code) | | Returns the topmost component lying on the term.
All events should be dispatched to this component.
Parameters: termIndex - int Term index the topmost component lying on the termIndex-throws Term. |
selectAll | public void selectAll()(Code) | | Performs select all action.
|
startRedirection | public void startRedirection()(Code) | | Performs start redirection action.
|
stopRedirection | public void stopRedirection()(Code) | | Performs stop redirection action.
|
textWithin | public String textWithin(int beginRow, int beginCol, int endRow, int endCol)(Code) | | Returns text within given coordinates.
Maps Term.textWithin(...) through queue for the first Term.
Parameters: beginRow - starting row Parameters: beginCol - starting column Parameters: endRow - ending row Parameters: endCol - ending column text within begin and end coordinates |
textWithin | public String textWithin(int beginRow, int beginCol, int endRow, int endCol, int termIndex)(Code) | | Returns text within given coordinates of termIndex-th term.
Maps Term.textWithin(...) through queue
Parameters: beginRow - starting row Parameters: beginCol - starting column Parameters: endRow - ending row Parameters: endCol - ending column Parameters: termIndex - int Term index text within begin and end coordinates |
verify | public void verify()(Code) | | Performs verification by accessing all sub-components
|
waitText | public void waitText(String text)(Code) | | Waits for text to be displayed in output term.
Parameters: text - text to wait for |
waitText | public void waitText(String text, int termIndex)(Code) | | Waits for text to be displayed in termIndex-th term.
Parameters: text - text to wait for Parameters: termIndex - Term index |
|
|