org.netbeans.modules.jellytools.ide/3 3.14.0

org.netbeans.jellytools
Class EditorWindowOperator

java.lang.Object
  extended by org.netbeans.jellytools.EditorWindowOperator

public class EditorWindowOperator
extends Object

Handle documents area of NetBeans IDE. It holds editor top components which can be tested by 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 Summary
EditorWindowOperator()
          Deprecated. Use static methods instead.
 
Method Summary
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditorWindowOperator

public EditorWindowOperator()
Deprecated. Use static methods instead.

Creates new instance of EditorWindowOperator.

Method Detail

btLeft

public 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.

Returns:
JButtonOperator instance

btRight

public 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.

Returns:
JButtonOperator instance

btDown

public 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.

Returns:
JButtonOperator instance

closeDiscard

public static void closeDiscard()
Close all opened documents and discard all changes. It works also if no file is modified, so it is a safe way how to close documents and no block further execution.


closeDiscard

public static void closeDiscard(Mode mode)
Close all opened documents and discard all changes. It works also if no file is modified, so it is a safe way how to close documents and no block further execution.


selectPage

public static EditorOperator selectPage(String label)
Selects page by its label. If only one file is open in Editor, it does nothing.

Parameters:
label - label of page to switch to
Returns:
instance of selected EditorOperator

selectPage

public static EditorOperator selectPage(int index)
Selects page by its index. If only one file is open in Editor, it does nothing.

Parameters:
index - index of page to be selected
Returns:
instance of selected EditorOperator
See Also:
EditorOperator

getEditor

public static EditorOperator getEditor()
Returns EditorOperator instance of currently selected document.

Returns:
EditorOperator instance of the selected document
See Also:
EditorOperator

getEditor

public static EditorOperator getEditor(String label)
Selects page with given label and returns EditorOperator instance of that page.

Parameters:
label - label of page to be selected
Returns:
EditorOperator instance of requested page
See Also:
EditorOperator

getEditor

public static EditorOperator getEditor(int index)
Selects page with given index and returns EditorOperator instance of that page.

Parameters:
index - index of page to be selected
Returns:
EditorOperator instance of requested page
See Also:
EditorOperator

jumpLeft

public static boolean jumpLeft()
If the leftmost visible tab is partially hidden, it clicks on it. Otherwise it does nothing.

Returns:
true if tabs were moved, false otherwise

moveTabsRight

public static void moveTabsRight()
Pushes rigth arrow control button in top right corner intended to move tabs to be visible right ones. If the button is not enabled, it does nothing.


moveTabsLeft

public static void moveTabsLeft()
Pushes left arrow control button in top right corner intended to move tabs to be visible left ones. If the button is not enabled, it does nothing.


selectDocument

public 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.


selectDocument

public 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.


verify

public static void verify()
Performs verification by accessing all sub-components


org.netbeans.modules.jellytools.ide/3 3.14.0

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.