public class EditorWindowOperator extends Object
EditorOperator
. This operator only enables
to switch between editors and to manipulate control buttons.
Usage:
EditorWindowOperator ewo = new EditorWindowOperator(); String filename = "MyClass"; EditorOperator eo1 = ewo.selectPage(filename); // gets currently selected editor EditorOperator eo2 = ewo.getEditor(); // switches to requested editor and gets EditorOperator instance EditorOperator eo3 = ewo.getEditor(filename); // manipulate control buttons ewo.moveTabsLeft(); ewo.moveTabsRight(); ewo.jumpLeft(); // selects document from the list ewo.selectDocument(filename);
Constructor and Description |
---|
EditorWindowOperator()
Deprecated.
Use static methods instead.
|
Modifier and Type | Method and Description |
---|---|
static org.netbeans.jemmy.operators.JButtonOperator |
btDown()
Returns operator of down arrow button in top right corner intended to
show list of opened documents and selects a document in the list.
|
static org.netbeans.jemmy.operators.JButtonOperator |
btLeft()
Returns operator of left arrow button in top right corner intended to
move tabs to be visible left ones.
|
static org.netbeans.jemmy.operators.JButtonOperator |
btRight()
Returns operator of right arrow button in top right corner intended to
move tabs to be visible right ones.
|
static void |
closeDiscard()
Close all opened documents and discard all changes.
|
static void |
closeDiscard(Mode mode)
Close all opened documents and discard all changes.
|
static EditorOperator |
getEditor()
Returns EditorOperator instance of currently selected document.
|
static EditorOperator |
getEditor(int index)
Selects page with given index and returns EditorOperator instance of
that page.
|
static EditorOperator |
getEditor(String label)
Selects page with given label and returns EditorOperator instance of
that page.
|
static boolean |
jumpLeft()
If the leftmost visible tab is partially hidden, it clicks on it.
|
static void |
moveTabsLeft()
Pushes left arrow control button in top right corner intended to
move tabs to be visible left ones.
|
static void |
moveTabsRight()
Pushes rigth arrow control button in top right corner intended to
move tabs to be visible right ones.
|
static void |
selectDocument(int index)
Pushes down arrow control button in top right corner intended to
show list of opened documents and selects index-th documents in the list.
|
static void |
selectDocument(String name)
Pushes down arrow control button in top right corner intended to
show list of opened documents and selects document with given name
in the list.
|
static EditorOperator |
selectPage(int index)
Selects page by its index.
|
static EditorOperator |
selectPage(String label)
Selects page by its label.
|
static void |
verify()
Performs verification by accessing all sub-components
|
@Deprecated public EditorWindowOperator()
public static org.netbeans.jemmy.operators.JButtonOperator btLeft()
public static org.netbeans.jemmy.operators.JButtonOperator btRight()
public static org.netbeans.jemmy.operators.JButtonOperator btDown()
public static void closeDiscard()
public static void closeDiscard(Mode mode)
public static EditorOperator selectPage(String label)
label
- label of page to switch topublic static EditorOperator selectPage(int index)
index
- index of page to be selectedEditorOperator
public static EditorOperator getEditor()
EditorOperator
public static EditorOperator getEditor(String label)
label
- label of page to be selectedEditorOperator
public static EditorOperator getEditor(int index)
index
- index of page to be selectedEditorOperator
public static boolean jumpLeft()
public static void moveTabsRight()
public static void moveTabsLeft()
public static void selectDocument(int index)
public static void selectDocument(String name)
public static void verify()