Example usage for java.awt.event KeyEvent VK_TAB

List of usage examples for java.awt.event KeyEvent VK_TAB

Introduction

In this page you can find the example usage for java.awt.event KeyEvent VK_TAB.

Prototype

int VK_TAB

To view the source code for java.awt.event KeyEvent VK_TAB.

Click Source Link

Document

Constant for the TAB virtual key.

Usage

From source file:org.sikuli.ide.SikuliIDE.java

private void initEditMenu() throws NoSuchMethodException {
    int scMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
    _editMenu.setMnemonic(java.awt.event.KeyEvent.VK_E);
    JMenuItem undoItem = _editMenu.add(_undoAction);
    undoItem.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z, scMask));
    JMenuItem redoItem = _editMenu.add(_redoAction);
    redoItem.setAccelerator(//  www . jav a 2s .c om
            KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z, scMask | InputEvent.SHIFT_MASK));
    _editMenu.addSeparator();

    _editMenu.add(createMenuItem(_I("menuEditCut"),
            KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, scMask), new EditAction(EditAction.CUT)));
    _editMenu.add(createMenuItem(_I("menuEditCopy"),
            KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, scMask), new EditAction(EditAction.COPY)));
    _editMenu.add(createMenuItem(_I("menuEditPaste"),
            KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, scMask), new EditAction(EditAction.PASTE)));
    _editMenu.add(createMenuItem(_I("menuEditSelectAll"),
            KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, scMask),
            new EditAction(EditAction.SELECT_ALL)));

    if (!Settings.isMac10()) {
        _editMenu.addSeparator();
        JMenu findMenu = new JMenu(_I("menuFind"));
        _findHelper = new FindAction();
        findMenu.setMnemonic(KeyEvent.VK_F);
        findMenu.add(createMenuItem(_I("menuFindFind"),
                KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, scMask), new FindAction(FindAction.FIND)));
        findMenu.add(createMenuItem(_I("menuFindFindNext"),
                KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G, scMask),
                new FindAction(FindAction.FIND_NEXT)));
        findMenu.add(createMenuItem(_I("menuFindFindPrev"),
                KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G, scMask | InputEvent.SHIFT_MASK),
                new FindAction(FindAction.FIND_PREV)));
        _editMenu.add(findMenu);
    }

    _editMenu.addSeparator();
    _editMenu.add(createMenuItem(_I("menuEditIndent"),
            KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_TAB, 0), new EditAction(EditAction.INDENT)));
    _editMenu.add(createMenuItem(_I("menuEditUnIndent"),
            KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_TAB, InputEvent.SHIFT_MASK),
            new EditAction(EditAction.UNINDENT)));
}

From source file:processing.app.Editor.java

protected JMenu buildEditMenu() {
    JMenu menu = new JMenu(_("Edit"));
    menu.setName("menuEdit");

    undoItem = newJMenuItem(_("Undo"), 'Z');
    undoItem.setName("menuEditUndo");
    undoItem.addActionListener(undoAction = new UndoAction());
    menu.add(undoItem);/*from w  w w .ja  va2  s.  c  om*/

    if (!OSUtils.isMacOS()) {
        redoItem = newJMenuItem(_("Redo"), 'Y');
    } else {
        redoItem = newJMenuItemShift(_("Redo"), 'Z');
    }
    redoItem.setName("menuEditRedo");
    redoItem.addActionListener(redoAction = new RedoAction());
    menu.add(redoItem);

    menu.addSeparator();

    // TODO "cut" and "copy" should really only be enabled
    // if some text is currently selected
    JMenuItem cutItem = newJMenuItem(_("Cut"), 'X');
    cutItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            handleCut();
        }
    });
    menu.add(cutItem);

    JMenuItem copyItem = newJMenuItem(_("Copy"), 'C');
    copyItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            textarea.copy();
        }
    });
    menu.add(copyItem);

    JMenuItem copyForumItem = newJMenuItemShift(_("Copy for Forum"), 'C');
    copyForumItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            //          SwingUtilities.invokeLater(new Runnable() {
            //              public void run() {
            new DiscourseFormat(Editor.this, false).show();
            //              }
            //            });
        }
    });
    menu.add(copyForumItem);

    JMenuItem copyHTMLItem = newJMenuItemAlt(_("Copy as HTML"), 'C');
    copyHTMLItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            //          SwingUtilities.invokeLater(new Runnable() {
            //              public void run() {
            new DiscourseFormat(Editor.this, true).show();
            //              }
            //            });
        }
    });
    menu.add(copyHTMLItem);

    JMenuItem pasteItem = newJMenuItem(_("Paste"), 'V');
    pasteItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            textarea.paste();
            sketch.setModified(true);
        }
    });
    menu.add(pasteItem);

    JMenuItem selectAllItem = newJMenuItem(_("Select All"), 'A');
    selectAllItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            textarea.selectAll();
        }
    });
    menu.add(selectAllItem);

    menu.addSeparator();

    JMenuItem commentItem = newJMenuItem(_("Comment/Uncomment"), '/');
    commentItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            handleCommentUncomment();
        }
    });
    menu.add(commentItem);

    JMenuItem increaseIndentItem = new JMenuItem(_("Increase Indent"));
    increaseIndentItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0));
    increaseIndentItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            handleIndentOutdent(true);
        }
    });
    menu.add(increaseIndentItem);

    JMenuItem decreseIndentItem = new JMenuItem(_("Decrease Indent"));
    decreseIndentItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK));
    decreseIndentItem.setName("menuDecreaseIndent");
    decreseIndentItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            handleIndentOutdent(false);
        }
    });
    menu.add(decreseIndentItem);

    menu.addSeparator();

    JMenuItem findItem = newJMenuItem(_("Find..."), 'F');
    findItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            if (find == null) {
                find = new FindReplace(Editor.this);
            }
            if (!OSUtils.isMacOS()) {
                find.setFindText(getSelectedText());
            }
            find.setLocationRelativeTo(Editor.this);
            find.setVisible(true);
        }
    });
    menu.add(findItem);

    JMenuItem findNextItem = newJMenuItem(_("Find Next"), 'G');
    findNextItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            if (find != null) {
                find.findNext();
            }
        }
    });
    menu.add(findNextItem);

    JMenuItem findPreviousItem = newJMenuItemShift(_("Find Previous"), 'G');
    findPreviousItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            if (find != null) {
                find.findPrevious();
            }
        }
    });
    menu.add(findPreviousItem);

    if (OSUtils.isMacOS()) {
        JMenuItem useSelectionForFindItem = newJMenuItem(_("Use Selection For Find"), 'E');
        useSelectionForFindItem.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (find == null) {
                    find = new FindReplace(Editor.this);
                }
                find.setFindText(getSelectedText());
            }
        });
        menu.add(useSelectionForFindItem);
    }

    return menu;
}

From source file:org.safs.selenium.webdriver.lib.WDLibrary.java

/**
 * Convert a Java KEYCODE to a Selenium WebDriver Keys Enum
 * @param keycode int, a java keycode//from  w w  w  . j a  v  a2  s . c  o  m
 * @return Keys enum for (primarily) non-printable (control) characters, or null.
 */
public static Keys convertToKeys(int keycode) {
    Keys key = null;
    switch (keycode) {
    case java.awt.event.KeyEvent.VK_ADD:
        key = Keys.ADD;
        break;
    case java.awt.event.KeyEvent.VK_ALT:
        key = Keys.ALT;
        break;
    case java.awt.event.KeyEvent.VK_KP_DOWN:
        key = Keys.ARROW_DOWN;
        break;
    case java.awt.event.KeyEvent.VK_KP_LEFT:
        key = Keys.ARROW_LEFT;
        break;
    case java.awt.event.KeyEvent.VK_KP_RIGHT:
        key = Keys.ARROW_RIGHT;
        break;
    case java.awt.event.KeyEvent.VK_KP_UP:
        key = Keys.ARROW_UP;
        break;
    case java.awt.event.KeyEvent.VK_BACK_SPACE:
        key = Keys.BACK_SPACE;
        break;
    case java.awt.event.KeyEvent.VK_CANCEL:
        key = Keys.CANCEL;
        break;
    case java.awt.event.KeyEvent.VK_CLEAR:
        key = Keys.CLEAR;
        break;
    case java.awt.event.KeyEvent.VK_WINDOWS:
        key = Keys.COMMAND;
        break;
    case java.awt.event.KeyEvent.VK_CONTROL:
        key = Keys.CONTROL;
        break;
    case java.awt.event.KeyEvent.VK_DECIMAL:
        key = Keys.DECIMAL;
        break;
    case java.awt.event.KeyEvent.VK_DELETE:
        key = Keys.DELETE;
        break;
    case java.awt.event.KeyEvent.VK_DIVIDE:
        key = Keys.DIVIDE;
        break;
    case java.awt.event.KeyEvent.VK_DOWN:
        key = Keys.DOWN;
        break;
    case java.awt.event.KeyEvent.VK_END:
        key = Keys.END;
        break;
    case java.awt.event.KeyEvent.VK_ENTER:
        key = Keys.ENTER;
        break;
    case java.awt.event.KeyEvent.VK_EQUALS:
        key = Keys.EQUALS;
        break;
    case java.awt.event.KeyEvent.VK_ESCAPE:
        key = Keys.ESCAPE;
        break;
    case java.awt.event.KeyEvent.VK_F1:
        key = Keys.F1;
        break;
    case java.awt.event.KeyEvent.VK_F2:
        key = Keys.F2;
        break;
    case java.awt.event.KeyEvent.VK_F3:
        key = Keys.F3;
        break;
    case java.awt.event.KeyEvent.VK_F4:
        key = Keys.F4;
        break;
    case java.awt.event.KeyEvent.VK_F5:
        key = Keys.F5;
        break;
    case java.awt.event.KeyEvent.VK_F6:
        key = Keys.F6;
        break;
    case java.awt.event.KeyEvent.VK_F7:
        key = Keys.F7;
        break;
    case java.awt.event.KeyEvent.VK_F8:
        key = Keys.F8;
        break;
    case java.awt.event.KeyEvent.VK_F9:
        key = Keys.F9;
        break;
    case java.awt.event.KeyEvent.VK_F10:
        key = Keys.F10;
        break;
    case java.awt.event.KeyEvent.VK_F11:
        key = Keys.F11;
        break;
    case java.awt.event.KeyEvent.VK_F12:
        key = Keys.F12;
        break;
    case java.awt.event.KeyEvent.VK_HELP:
        key = Keys.HELP;
        break;
    case java.awt.event.KeyEvent.VK_HOME:
        key = Keys.HOME;
        break;
    case java.awt.event.KeyEvent.VK_INSERT:
        key = Keys.INSERT;
        break;
    case java.awt.event.KeyEvent.VK_LEFT:
        key = Keys.LEFT;
        break;
    case java.awt.event.KeyEvent.VK_META:
        key = Keys.META;
        break;
    case java.awt.event.KeyEvent.VK_MULTIPLY:
        key = Keys.MULTIPLY;
        break;
    case java.awt.event.KeyEvent.VK_NUMPAD0:
        key = Keys.NUMPAD0;
        break;
    case java.awt.event.KeyEvent.VK_NUMPAD1:
        key = Keys.NUMPAD1;
        break;
    case java.awt.event.KeyEvent.VK_NUMPAD2:
        key = Keys.NUMPAD2;
        break;
    case java.awt.event.KeyEvent.VK_NUMPAD3:
        key = Keys.NUMPAD3;
        break;
    case java.awt.event.KeyEvent.VK_NUMPAD4:
        key = Keys.NUMPAD4;
        break;
    case java.awt.event.KeyEvent.VK_NUMPAD5:
        key = Keys.NUMPAD5;
        break;
    case java.awt.event.KeyEvent.VK_NUMPAD6:
        key = Keys.NUMPAD6;
        break;
    case java.awt.event.KeyEvent.VK_NUMPAD7:
        key = Keys.NUMPAD7;
        break;
    case java.awt.event.KeyEvent.VK_NUMPAD8:
        key = Keys.NUMPAD8;
        break;
    case java.awt.event.KeyEvent.VK_NUMPAD9:
        key = Keys.NUMPAD9;
        break;
    case java.awt.event.KeyEvent.VK_PAGE_DOWN:
        key = Keys.PAGE_DOWN;
        break;
    case java.awt.event.KeyEvent.VK_PAGE_UP:
        key = Keys.PAGE_UP;
        break;
    case java.awt.event.KeyEvent.VK_PAUSE:
        key = Keys.PAUSE;
        break;
    case java.awt.event.KeyEvent.VK_RIGHT:
        key = Keys.RIGHT;
        break;
    case java.awt.event.KeyEvent.VK_SEMICOLON:
        key = Keys.SEMICOLON;
        break;
    case java.awt.event.KeyEvent.VK_SEPARATOR:
        key = Keys.SEPARATOR;
        break;
    case java.awt.event.KeyEvent.VK_SHIFT:
        key = Keys.SHIFT;
        break;
    case java.awt.event.KeyEvent.VK_SPACE:
        key = Keys.SPACE;
        break;
    case java.awt.event.KeyEvent.VK_SUBTRACT:
        key = Keys.SUBTRACT;
        break;
    case java.awt.event.KeyEvent.VK_TAB:
        key = Keys.TAB;
        break;
    case java.awt.event.KeyEvent.VK_UP:
        key = Keys.UP;
        break;
    }
    return key;
}

From source file:SwiftSeleniumWeb.WebHelper.java

/**
 * This class performs the reuired action on an element
 * //  w ww .  j  a  v  a2s . c  o m
 * @param imageType
 * @param controlType
 * @param controlId
 * @param controlName
 * @param ctrlValue
 * @param logicalName
 * @param action
 * @param webElement
 * @param Results
 * @param strucSheet
 * @param valSheet
 * @param rowIndex
 * @param rowcount
 * @param rowNo
 * @param colNo
 * @return
 * @throws Exception
 */
@SuppressWarnings("incomplete-switch")
public static String doAction(String imageType, String controlType, String controlId, String controlName,
        String ctrlValue, String logicalName, String action, WebElement webElement, Boolean Results,
        HSSFSheet strucSheet, HSSFSheet valSheet, int rowIndex, int rowcount, String rowNo, String colNo)
        throws Exception {
    List<WebElement> WebElementList = null;
    String currentValue = null;
    String uniqueNumber = "";
    ControlTypeEnum controlTypeEnum = ControlTypeEnum.valueOf(controlType);
    ControlTypeEnum actionName = ControlTypeEnum.valueOf(action.toString());
    if (controlType.contains("Robot") && !isIntialized) {
        robot = new Robot();
        isIntialized = true;
    }

    if (action.toString().equalsIgnoreCase("I") && !ctrlValue.equalsIgnoreCase("")
            || action.toString().equalsIgnoreCase("Read") || action.toString().equalsIgnoreCase("Write")
            || action.toString().equalsIgnoreCase("V") && !ctrlValue.equalsIgnoreCase("")
            || action.toString().equalsIgnoreCase("NC")
            || action.toString().equalsIgnoreCase("T") && !ctrlValue.equalsIgnoreCase("")) {
        try {
            switch (controlTypeEnum) {

            case WebEdit:
                switch (actionName) {
                case Read:
                    uniqueNumber = ReadFromExcel(ctrlValue);
                    webElement.clear();
                    webElement.sendKeys(uniqueNumber);
                    break;
                case Write:
                    writeToExcel(ctrlValue, webElement, controlId, controlType, controlName, rowNo, colNo);
                    break;
                case I:
                    if (!ctrlValue.equalsIgnoreCase("null")) {
                        webElement = wait.until(ExpectedConditions.elementToBeClickable(webElement));
                        webElement.clear();
                        webElement.sendKeys(ctrlValue);
                    } else {
                        webElement.clear();
                    }
                    break;
                case V:
                    currentValue = webElement.getText();
                    break;
                }
                break;

            case WebButton:
                switch (actionName) {
                case I:
                    if (ctrlValue.equalsIgnoreCase("Y") || ctrlValue.equalsIgnoreCase("Yes")) {
                        webElement = wait.until(ExpectedConditions.elementToBeClickable(webElement));
                        webElement.click();
                    }
                    break;
                case NC:
                    webElement = wait.until(ExpectedConditions.elementToBeClickable(webElement));
                    webElement.click();
                    break;
                case V:
                    if (webElement.isDisplayed()) {
                        if (webElement.isEnabled() == true)
                            currentValue = "True";
                        else
                            currentValue = "False";
                    }
                }
                break;

            case WebElement:
                switch (actionName) {
                case I:
                    webElement = wait.until(ExpectedConditions.elementToBeClickable(webElement));
                    webElement.click();
                    break;

                case Read:
                    uniqueNumber = ReadFromExcel(ctrlValue);
                    webElement.clear();
                    webElement.sendKeys(uniqueNumber);
                    break;
                case Write:
                    writeToExcel(ctrlValue, webElement, controlId, controlType, controlName, rowNo, colNo);
                    break;
                case V:
                    boolean textPresent = false;
                    textPresent = webElement.getText().contains(ctrlValue);
                    if (textPresent == false)
                        currentValue = webElement.getText();
                    else
                        currentValue = ctrlValue;
                    break;
                }
                break;

            case JSScript:
                ((JavascriptExecutor) Automation.driver).executeScript(controlName, ctrlValue);
                break;

            case Wait:
                Thread.sleep(Integer.parseInt(controlName) * 1000);
                break;

            case CheckBox:
                switch (actionName) {
                case I:
                    if (ctrlValue.equalsIgnoreCase("Y") || ctrlValue.equalsIgnoreCase("Yes")) {
                        webElement = wait.until(ExpectedConditions.elementToBeClickable(webElement));
                        webElement.click();
                    }
                    break;
                case NC:
                    webElement = wait.until(ExpectedConditions.elementToBeClickable(webElement));
                    webElement.click();
                    break;
                }
                break;

            case Radio:
                switch (actionName) {
                case I:
                    if (ctrlValue.equalsIgnoreCase("Y") || ctrlValue.equalsIgnoreCase("Yes")) {
                        webElement = wait.until(ExpectedConditions.elementToBeClickable(webElement));
                        if (!webElement.isSelected()) {
                            webElement.click();
                        }
                    }
                    break;
                case NC:
                    webElement = wait.until(ExpectedConditions.elementToBeClickable(webElement));
                    if (!webElement.isSelected()) {
                        webElement.click();
                    }
                    break;
                case V:
                    if (webElement.isSelected()) {
                        currentValue = webElement.getAttribute(controlName.toString());
                    }
                    break;
                }
                break;

            case WebLink:
            case CloseWindow://added this Case to bypass page loading after clicking the event
                switch (actionName) {
                case Read:
                    uniqueNumber = ReadFromExcel(ctrlValue);
                    WebElementList = getElementsByType(controlId, controlName, controlType, imageType,
                            uniqueNumber);
                    webElement = GetControlByIndex("", WebElementList, controlId, controlName, controlType,
                            uniqueNumber);
                    webElement.click();
                    break;
                case Write:
                    writeToExcel(ctrlValue, webElement, controlId, controlType, controlName, rowNo, colNo);
                    break;
                case I:
                    if (controlId.equalsIgnoreCase("LinkValue")) {
                        webElement.click();
                    } else {
                        if (ctrlValue.equalsIgnoreCase("Y") || ctrlValue.equalsIgnoreCase("Yes")) {
                            webElement.click();
                        }
                    }
                    break;
                case NC:
                    webElement.click();
                    break;
                }
                break;

            case WaitForJS:
                waitForCondition();
                break;

            case ListBox:
            case WebList:
                switch (actionName) {
                case Read:
                    uniqueNumber = ReadFromExcel(ctrlValue);
                    new Select(webElement).selectByVisibleText(uniqueNumber);
                    break;
                case Write:
                    writeToExcel(ctrlValue, webElement, controlId, controlType, controlName, rowNo, colNo);
                    break;
                case I:
                    webElement = wait.until(ExpectedConditions.elementToBeClickable(webElement));
                    ExpectedCondition<Boolean> isTextPresent = CommonExpectedConditions
                            .textToBePresentInElement(webElement, ctrlValue);
                    if (isTextPresent != null) {
                        if (webElement != null) {
                            new Select(webElement).selectByVisibleText(ctrlValue);
                        }
                    }
                    break;
                case V:
                    currentValue = new Select(webElement).getFirstSelectedOption().getText();
                    if (currentValue.isEmpty()) {
                        currentValue = new Select(webElement).getFirstSelectedOption().getAttribute("value");
                    }
                    break;
                }
                break;

            case IFrame:
                Automation.driver = Automation.driver.switchTo().frame(controlName);
                break;

            case Browser:
                //Thread.sleep(3000); //DS:Check if required
                Set<String> handlers = Automation.driver.getWindowHandles();
                handlers = Automation.driver.getWindowHandles();
                for (String handler : handlers) {
                    Automation.driver = Automation.driver.switchTo().window(handler);
                    if (Automation.driver.getTitle().equalsIgnoreCase(controlName)) {
                        System.out.println("Focus on window with title: " + Automation.driver.getTitle());
                        break;
                    }
                }
                break;

            case URL:
                switch (actionName) {
                case I:
                    Automation.driver.navigate().to(ctrlValue);
                    break;
                case NC:
                    break;
                }
                break;

            case Menu:
                webElement = wait.until(ExpectedConditions.elementToBeClickable(webElement));
                webElement.click();
                break;

            case Alert:
                switch (actionName) {
                case V:
                    Alert alert = Automation.driver.switchTo().alert();
                    if (alert != null) {
                        currentValue = alert.getText();
                        System.out.println(currentValue);
                        alert.accept();
                    }
                    break;
                }
                break;

            case WebImage:
                webElement = wait.until(ExpectedConditions.elementToBeClickable(webElement));
                webElement.click();
                Thread.sleep(5000);
                for (int Seconds = 0; Seconds <= Integer
                        .parseInt(Automation.configHashMap.get("TIMEOUT").toString()); Seconds++) {
                    if (!((Automation.driver.getWindowHandles().size()) > 1)) {
                        webElement.click();
                        Thread.sleep(5000);
                    } else {
                        break;
                    }
                }
                break;

            case ActionClick:
                webElement = wait.until(ExpectedConditions.elementToBeClickable(webElement));
                Actions builderClick = new Actions(Automation.driver);
                Action clickAction = builderClick.moveToElement(webElement).clickAndHold().release().build();
                clickAction.perform();
                break;

            case ActionDoubleClick:
                webElement = wait.until(ExpectedConditions.elementToBeClickable(webElement));
                Actions builderdoubleClick = new Actions(Automation.driver);
                Action doubleClickAction = builderdoubleClick.moveToElement(webElement).click().build();
                doubleClickAction.perform();
                doubleClickAction.perform();
                break;

            case ActionClickandEsc:
                webElement = wait.until(ExpectedConditions.elementToBeClickable(webElement));
                Actions clickandEsc = new Actions(Automation.driver);
                Action clickEscAction = clickandEsc.moveToElement(webElement).click()
                        .sendKeys(Keys.ENTER, Keys.ESCAPE).build();
                clickEscAction.perform();
                break;

            case ActionMouseOver:
                Actions builderMouserOver = new Actions(Automation.driver);
                Action mouseOverAction = builderMouserOver.moveToElement(webElement).build();
                mouseOverAction.perform();
                break;

            case CalendarNew:
                Boolean isCalendarDisplayed = Automation.driver.switchTo().activeElement().isDisplayed();
                System.out.println(isCalendarDisplayed);
                if (isCalendarDisplayed == true) {

                    String[] dtMthYr = ctrlValue.split("/");
                    Thread.sleep(2000);
                    //String[] CurrentDate = dtFormat.format(frmDate).split("/");
                    WebElement Monthyear = Automation.driver.findElement(By.xpath("//table/thead/tr/td[2]"));
                    String Monthyear1 = Monthyear.getText();
                    String[] Monthyear2 = Monthyear1.split(",");
                    Monthyear2[1] = Monthyear2[1].trim();

                    month = CalendarSnippet.getMonthForString(Monthyear2[0]);

                    while (!Monthyear2[1].equalsIgnoreCase(dtMthYr[2])) {
                        if (Integer.parseInt(Monthyear2[1]) > Integer.parseInt(dtMthYr[2])) {
                            WebElement yearButton = Automation.driver
                                    .findElement(By.cssSelector("td:contains('')"));
                            yearButton.click();
                            Monthyear2[1] = Integer.toString(Integer.parseInt(Monthyear2[1]) - 1);
                        } else if (Integer.parseInt(Monthyear2[1]) < Integer.parseInt(dtMthYr[2])) {
                            WebElement yearButton = Automation.driver
                                    .findElement(By.cssSelector("td:contains('')"));
                            yearButton.click();
                            Monthyear2[1] = Integer.toString(Integer.parseInt(Monthyear2[1]) + 1);
                        }
                    }

                    while (!month.equalsIgnoreCase(dtMthYr[1])) {
                        if (Integer.parseInt(month) > Integer.parseInt(dtMthYr[1])) {
                            WebElement monthButton = Automation.driver
                                    .findElement(By.cssSelector("td:contains('')"));
                            monthButton.click();
                            if (Integer.parseInt(month) < 11) {
                                month = "0" + Integer.toString(Integer.parseInt(month) - 1);
                            } else {
                                month = Integer.toString(Integer.parseInt(month) - 1);
                            }

                        } else if (Integer.parseInt(month) < Integer.parseInt(dtMthYr[1])) {
                            WebElement monthButton = Automation.driver
                                    .findElement(By.cssSelector("td:contains('')"));
                            monthButton.click();
                            if (Integer.parseInt(month) < 9) {
                                month = "0" + Integer.toString(Integer.parseInt(month) + 1);
                            } else {
                                month = Integer.toString(Integer.parseInt(month) + 1);
                            }
                        }
                    }

                    WebElement dateButton = Automation.driver
                            .findElement(By.cssSelector("td.day:contains('" + dtMthYr[0] + "')"));
                    System.out.println(dateButton);
                    dateButton.click();

                } else {
                    System.out.println("Calendar not Diplayed");
                }
                break;

            case CalendarIPF:
                String[] dtMthYr = ctrlValue.split("/");
                Thread.sleep(2000);
                String year = dtMthYr[2];
                String monthNum = dtMthYr[1];
                String day = dtMthYr[0];

                //Xpath for Year, mMnth & Days
                String xpathYear = "//div[@class='datepicker datepicker-dropdown dropdown-menu datepicker-orient-left datepicker-orient-bottom']/div[@class='datepicker-years']";
                String xpathMonth = "//div[@class='datepicker datepicker-dropdown dropdown-menu datepicker-orient-left datepicker-orient-bottom']/div[@class='datepicker-months']";
                String xpathDay = "//div[@class='datepicker datepicker-dropdown dropdown-menu datepicker-orient-left datepicker-orient-bottom']/div[@class='datepicker-days']";

                //Selecting year in 3 steps
                Automation.driver.findElement(By.xpath(xpathDay + "/table/thead/tr[1]/th[2]")).click();
                Automation.driver.findElement(By.xpath(xpathMonth + "/table/thead/tr/th[2]")).click();
                Automation.driver
                        .findElement(By.xpath(xpathYear
                                + "/table/tbody/tr/td/span[@class='year'][contains(text()," + year + ")]"))
                        .click();

                //Selecting month in 1 step   
                Automation.driver
                        .findElement(By.xpath(xpathMonth + "/table/tbody/tr/td/span[" + monthNum + "]"))
                        .click();

                //Selecting day in 1 step
                Automation.driver
                        .findElement(By.xpath(
                                xpathDay + "/table/tbody/tr/td[@class='day'][contains(text()," + day + ")]"))
                        .click();

            case CalendarEBP:
                String[] dtMthYrEBP = ctrlValue.split("/");
                Thread.sleep(2000);
                String yearEBP = dtMthYrEBP[2];
                String monthNumEBP = CalendarSnippet.getMonthForInt(Integer.parseInt(dtMthYrEBP[1]))
                        .substring(0, 3);
                String dayEBP = dtMthYrEBP[0];

                //common path used for most of the elements
                String pathToVisibleCalendar = "//div[@class='ajax__calendar'][contains(@style, 'visibility: visible;')]/div";

                //following is to click the title once to reach the year page
                wait.until(ExpectedConditions.elementToBeClickable(
                        By.xpath(pathToVisibleCalendar + "/div[@class='ajax__calendar_header']/div[3]/div")))
                        .click();
                //check if 'Dec' is visibly clickable after refreshing
                wait.until(ExpectedConditions.elementToBeClickable(By.xpath(
                        pathToVisibleCalendar + "/div/div/table/tbody/tr/td/div[contains(text(), 'Dec')]")));
                //following is to click the title once again to reach the year page
                Automation.driver
                        .findElement(By.xpath(
                                pathToVisibleCalendar + "/div[@class='ajax__calendar_header']/div[3]/div"))
                        .click();

                //common path used for most of the elements while selection of year, month and date
                pathToVisibleCalendar = "//div[@class='ajax__calendar'][contains(@style, 'visibility: visible;')]/div/div/div/table/tbody/tr/td";

                //each of the following line selects the year, month and date
                wait.until(ExpectedConditions.elementToBeClickable(
                        By.xpath(pathToVisibleCalendar + "/div[contains(text()," + yearEBP + ")]"))).click();
                wait.until(ExpectedConditions.elementToBeClickable(By.xpath(pathToVisibleCalendar
                        + "/div[@class='ajax__calendar_month'][contains(text(),'" + monthNumEBP + "')]")))
                        .click();
                wait.until(ExpectedConditions.elementToBeClickable(By.xpath(pathToVisibleCalendar
                        + "/div[@class='ajax__calendar_day'][contains(text()," + dayEBP + ")]"))).click();

                break;

            /**Code for window popups**/
            case Window:
                switch (actionName) {
                case O:
                    String parentHandle = Automation.driver.getWindowHandle();
                    for (String winHandle : Automation.driver.getWindowHandles()) {
                        Automation.driver.switchTo().window(winHandle);
                        if (Automation.driver.getTitle().equalsIgnoreCase(controlName)) {
                            Automation.driver.close();
                        }
                    }
                    Automation.driver.switchTo().window(parentHandle);
                    break;
                }
                break;

            case WebTable:
                switch (actionName) {
                case Read:
                    ReadFromExcel(ctrlValue);
                    break;
                case Write:
                    writeToExcel(ctrlValue, webElement, controlId, controlType, controlName, rowNo, colNo);
                    break;
                case NC:
                    WebElement table = webElement;
                    List<WebElement> tableRows = table.findElements(By.tagName("tr"));
                    int tableRowIndex = 0;
                    //int tableColumnIndex = 0;
                    boolean matchFound = false;
                    for (WebElement tableRow : tableRows) {
                        tableRowIndex += 1;
                        List<WebElement> tableColumns = tableRow.findElements(By.tagName("td"));
                        if (tableColumns.size() > 0) {
                            for (WebElement tableColumn : tableColumns)
                                if (tableColumn.getText().equals(ctrlValue)) {
                                    matchFound = true;
                                    System.out.println(tableRowIndex);
                                    List<Object> elementProperties = getPropertiesOfWebElement(
                                            tableColumns.get(Integer.parseInt(colNo)), imageType);
                                    controlName = elementProperties.get(0).toString();
                                    if (controlName.equals("")) {
                                        controlName = elementProperties.get(1).toString();
                                    }
                                    controlType = elementProperties.get(2).toString();
                                    webElement = (WebElement) elementProperties.get(3);
                                    doAction(imageType, controlType, controlId, controlName, ctrlValue,
                                            logicalName, action, webElement, Results, strucSheet, valSheet,
                                            tableRowIndex, rowcount, rowNo, colNo);
                                    break;
                                }
                            if (matchFound) {
                                break;
                            }
                        }

                    }
                    break;
                case V:
                    WriteToDetailResults(ctrlValue, "", logicalName);
                    try {
                        Thread.sleep(2000);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    break;
                }
                break;

            case Robot:
                if (controlName.equalsIgnoreCase("SetFilePath")) {
                    StringSelection stringSelection = new StringSelection(ctrlValue);
                    Toolkit.getDefaultToolkit().getSystemClipboard().setContents(stringSelection, null);
                    robot.delay(1000);
                    robot.keyPress(KeyEvent.VK_CONTROL);
                    robot.keyPress(KeyEvent.VK_V);
                    robot.keyRelease(KeyEvent.VK_V);
                    robot.keyRelease(KeyEvent.VK_CONTROL);

                } else if (controlName.equalsIgnoreCase("TAB")) {
                    robot.keyPress(KeyEvent.VK_TAB);
                    robot.keyRelease(KeyEvent.VK_TAB);
                } else if (controlName.equalsIgnoreCase("SPACE")) {
                    robot.keyPress(KeyEvent.VK_SPACE);
                    robot.keyRelease(KeyEvent.VK_SPACE);
                } else if (controlName.equalsIgnoreCase("ENTER")) {
                    robot.keyPress(KeyEvent.VK_ENTER);
                    robot.keyRelease(KeyEvent.VK_ENTER);
                }
                break;

            case WaitForEC:
                wait.until(CommonExpectedConditions.elementToBeClickable(webElement));
                break;

            case SikuliType:
                sikuliScreen.type(controlName, ctrlValue);
                break;

            case SikuliButton:
                sikuliScreen.click(controlName);
                System.out.println("Done");
                break;

            case Date:
                Calendar cal = new GregorianCalendar();
                int i = cal.get(Calendar.DAY_OF_MONTH);
                if (i >= 31) {
                    i = i - 10;
                }
                break;

            case FileUpload:
                webElement.sendKeys(ctrlValue);
                break;

            case ScrollTo:
                Locatable element = (Locatable) webElement;
                Point p = element.getCoordinates().onScreen();
                JavascriptExecutor js = (JavascriptExecutor) Automation.driver;
                js.executeScript("window.scrollTo(" + p.getX() + "," + (p.getY() + 150) + ");");
                break;

            default:
                System.out.println("U r in Default");
                break;
            }
        } catch (WebDriverException we) {
            throw new Exception("Error Occurred from Do Action " + controlName + we.getMessage());
        } catch (Exception e) {
            throw new Exception(e.getMessage());
        }
    }

    if (action.toString().equalsIgnoreCase("V") && !ctrlValue.equalsIgnoreCase("")) {
        if (Results == true) {
            SwiftSeleniumWeb.WebDriver.report = WriteToDetailResults(ctrlValue, currentValue, logicalName);
        }
    }

    return currentValue;

}

From source file:org.isatools.isacreator.spreadsheet.Spreadsheet.java

/**
 * Setup the JTable with its desired characteristics
 *///from   ww w .  j  a v a2 s .co m
private void setupTable() {
    table = new CustomTable(spreadsheetModel);
    table.setShowGrid(true);
    table.setGridColor(Color.BLACK);
    table.setShowVerticalLines(true);
    table.setShowHorizontalLines(true);
    table.setGridColor(UIHelper.LIGHT_GREEN_COLOR);
    table.setRowSelectionAllowed(true);
    table.setColumnSelectionAllowed(true);
    table.setAutoCreateColumnsFromModel(false);
    table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    table.getSelectionModel().addListSelectionListener(this);
    table.getColumnModel().getSelectionModel().addListSelectionListener(this);
    table.getTableHeader().setReorderingAllowed(true);
    table.getColumnModel().addColumnModelListener(this);
    try {
        table.setDefaultRenderer(Class.forName("java.lang.Object"), new SpreadsheetCellRenderer());
    } catch (ClassNotFoundException e) {
        // ignore this error
    }

    table.addMouseListener(this);
    table.getTableHeader().addMouseMotionListener(new MouseMotionListener() {
        public void mouseDragged(MouseEvent event) {
        }

        public void mouseMoved(MouseEvent event) {
            // display a tooltip when user hovers over a column. tooltip is derived
            // from the description of a field from the TableReferenceObject.
            JTable table = ((JTableHeader) event.getSource()).getTable();
            TableColumnModel colModel = table.getColumnModel();
            int colIndex = colModel.getColumnIndexAtX(event.getX());

            // greater than 1 to account for the row no. being the first col
            if (colIndex >= 1) {
                TableColumn tc = colModel.getColumn(colIndex);
                if (tc != null) {
                    try {
                        table.getTableHeader().setToolTipText(getFieldDescription(tc));
                    } catch (Exception e) {
                        // ignore this error
                    }
                }
            }
        }
    });

    //table.getColumnModel().addColumnModelListener(this);
    InputMap im = table.getInputMap(JTable.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
    KeyStroke tab = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0);

    //  Override the default tab behaviour
    //  Tab to the next editable cell. When no editable cells goto next cell.
    final Action previousTabAction = table.getActionMap().get(im.get(tab));
    Action newTabAction = new AbstractAction() {
        public void actionPerformed(ActionEvent e) {
            // maintain previous tab action procedure
            previousTabAction.actionPerformed(e);

            JTable table = (JTable) e.getSource();
            int row = table.getSelectedRow();
            int originalRow = row;
            int column = table.getSelectedColumn();
            int originalColumn = column;

            while (!table.isCellEditable(row, column)) {
                previousTabAction.actionPerformed(e);
                row = table.getSelectedRow();
                column = table.getSelectedColumn();

                //  Back to where we started, get out.
                if ((row == originalRow) && (column == originalColumn)) {
                    break;
                }
            }

            if (table.editCellAt(row, column)) {
                table.getEditorComponent().requestFocusInWindow();
            }
        }
    };

    table.getActionMap().put(im.get(tab), newTabAction);
    TableColumnModel model = table.getColumnModel();

    String previousColumnName = null;
    for (int columnIndex = 0; columnIndex < tableReferenceObject.getHeaders().size(); columnIndex++) {
        if (!model.getColumn(columnIndex).getHeaderValue().toString()
                .equals(TableReferenceObject.ROW_NO_TEXT)) {
            model.getColumn(columnIndex).setHeaderRenderer(columnRenderer);
            model.getColumn(columnIndex).setPreferredWidth(spreadsheetFunctions
                    .calcColWidths(model.getColumn(columnIndex).getHeaderValue().toString()));
            // add appropriate cell editor for cell.
            spreadsheetFunctions.addCellEditor(model.getColumn(columnIndex), previousColumnName);
            previousColumnName = model.getColumn(columnIndex).getHeaderValue().toString();
        } else {
            model.getColumn(columnIndex).setHeaderRenderer(new RowNumberCellRenderer());
        }
    }

    JTableHeader header = table.getTableHeader();
    header.setBackground(UIHelper.BG_COLOR);
    header.addMouseListener(new HeaderListener(header, columnRenderer));

    table.addNotify();
}

From source file:faa.cucumber.pages.FaaHomePage.java

public void switchPressControlTab() {
    waitABit(2000);//from   w  w w.j  a v a  2  s  .c  om
    Robot robot;
    try {
        robot = new Robot();
        System.out.println("Switching Tabs, Keypress Control Tab");
        robot.keyPress(KeyEvent.VK_CONTROL);
        System.out.println("Control Key Pressed");
        robot.keyPress(KeyEvent.VK_TAB);
        System.out.println("TAB Key Pressed");
        //         robot.keyRelease(KeyEvent.VK_CONTROL);
        //         System.out.println("Control Key Released" );
        //         robot.keyRelease(KeyEvent.VK_TAB);   
        //         System.out.println("TAB Key Released" );
        //         System.out.println("Browser Tabs have been switched.");

    } catch (AWTException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}

From source file:faa.cucumber.pages.FaaHomePage.java

public void switchReleaseControlTab() {
    waitABit(2000);/*from w w w.  j a v  a  2  s  . c o m*/
    Robot robot;
    try {
        robot = new Robot();
        System.out.println("Release Control Tab Keys");
        System.out.println("TAB Key keyRelease");
        robot.keyRelease(KeyEvent.VK_TAB);
        System.out.println("TAB Key keyRelease");
        robot.keyRelease(KeyEvent.VK_CONTROL);
        System.out.println("Control Key keyRelease");
        //         robot.keyRelease(KeyEvent.VK_TAB);   
        //         System.out.println("TAB Key keyRelease" );
        //   robot.keyRelease(KeyEvent.VK_CONTROL);
        //   System.out.println("Control Key Released" );
        //   robot.keyRelease(KeyEvent.VK_TAB);   
        //   System.out.println("TAB Key Released" );
        //   System.out.println("Browser Tabs have been switched.");

    } catch (AWTException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}

From source file:org.domainmath.gui.MainFrame.java

/** This method is called from within the constructor to
 * initialize the form.//from w w w  .j a  va2  s . co m
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    buttonGroup1 = new javax.swing.ButtonGroup();
    jToolBar1 = new javax.swing.JToolBar();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jButton3 = new javax.swing.JButton();
    jSeparator4 = new javax.swing.JToolBar.Separator();
    connectButton = new javax.swing.JButton();
    disconnectButton = new javax.swing.JButton();
    jSeparator9 = new javax.swing.JToolBar.Separator();
    jButton4 = new javax.swing.JButton();
    jButton5 = new javax.swing.JButton();
    jSeparator15 = new javax.swing.JToolBar.Separator();
    jButton6 = new javax.swing.JButton();
    jButton7 = new javax.swing.JButton();
    jButton8 = new javax.swing.JButton();
    jSeparator13 = new javax.swing.JToolBar.Separator();
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    dirComboBox = new javax.swing.JComboBox();
    folderUpButton = new javax.swing.JButton();
    browseButton = new javax.swing.JButton();
    addButton = new javax.swing.JButton();
    jMenuBar1 = new javax.swing.JMenuBar();
    fileMenu = new javax.swing.JMenu();
    newFileItem = new javax.swing.JMenuItem();
    openItem = new javax.swing.JMenuItem();
    jSeparator17 = new javax.swing.JPopupMenu.Separator();
    saveFileItem = new javax.swing.JMenuItem();
    saveAsItem = new javax.swing.JMenuItem();
    savePlotItem = new javax.swing.JMenuItem();
    saveAllItem = new javax.swing.JMenuItem();
    jSeparator1 = new javax.swing.JPopupMenu.Separator();
    printFileItem = new javax.swing.JMenuItem();
    printItem = new javax.swing.JMenuItem();
    jSeparator19 = new javax.swing.JPopupMenu.Separator();
    preferencesItem = new javax.swing.JMenuItem();
    jSeparator2 = new javax.swing.JPopupMenu.Separator();
    connectItem = new javax.swing.JMenuItem();
    disconnectItem = new javax.swing.JMenuItem();
    jSeparator3 = new javax.swing.JPopupMenu.Separator();
    exitItem = new javax.swing.JMenuItem();
    editMenu = new javax.swing.JMenu();
    undoItem = new javax.swing.JMenuItem();
    redoItem = new javax.swing.JMenuItem();
    jSeparator20 = new javax.swing.JPopupMenu.Separator();
    cutItem = new javax.swing.JMenuItem();
    copyItem = new javax.swing.JMenuItem();
    pasteItem = new javax.swing.JMenuItem();
    jSeparator21 = new javax.swing.JPopupMenu.Separator();
    deleteItem = new javax.swing.JMenuItem();
    selectAllItem = new javax.swing.JMenuItem();
    jSeparator22 = new javax.swing.JPopupMenu.Separator();
    jMenuItem2 = new javax.swing.JMenuItem();
    jMenuItem3 = new javax.swing.JMenuItem();
    jSeparator23 = new javax.swing.JPopupMenu.Separator();
    jMenuItem4 = new javax.swing.JMenuItem();
    jMenuItem5 = new javax.swing.JMenuItem();
    jSeparator24 = new javax.swing.JPopupMenu.Separator();
    jMenuItem6 = new javax.swing.JMenuItem();
    jMenuItem1 = new javax.swing.JMenuItem();
    jSeparator11 = new javax.swing.JPopupMenu.Separator();
    clearOutWindowItem = new javax.swing.JMenuItem();
    jMenu3 = new javax.swing.JMenu();
    consoleItem = new javax.swing.JMenuItem();
    historyItem = new javax.swing.JMenuItem();
    filesItem = new javax.swing.JMenuItem();
    workspaceItem = new javax.swing.JMenuItem();
    codeEditorItem = new javax.swing.JMenuItem();
    pathsItem = new javax.swing.JMenuItem();
    pkgsItem = new javax.swing.JMenuItem();
    arrayEditItem = new javax.swing.JMenuItem();
    jMenuItem7 = new javax.swing.JMenuItem();
    jMenu1 = new javax.swing.JMenu();
    findItem = new javax.swing.JMenuItem();
    replaceItem = new javax.swing.JMenuItem();
    gotoItem = new javax.swing.JMenuItem();
    jSeparator25 = new javax.swing.JPopupMenu.Separator();
    googleItem = new javax.swing.JMenuItem();
    wikiItem = new javax.swing.JMenuItem();
    pkgMenu = new javax.swing.JMenu();
    debugMenu = new javax.swing.JMenu();
    runScriptItem = new javax.swing.JMenuItem();
    runScriptCItem = new javax.swing.JMenuItem();
    jMenuItem8 = new javax.swing.JMenuItem();
    jSeparator8 = new javax.swing.JPopupMenu.Separator();
    debugScriptMenuItem = new javax.swing.JMenuItem();
    testScriptMenuItem = new javax.swing.JMenuItem();
    toggleBreakpointItem = new javax.swing.JMenuItem();
    removeToggleBreakpointItem = new javax.swing.JMenuItem();
    clearAllBreakpointsItem = new javax.swing.JMenuItem();
    jSeparator10 = new javax.swing.JPopupMenu.Separator();
    stepItem = new javax.swing.JMenuItem();
    stepInItem = new javax.swing.JMenuItem();
    stepOutItem = new javax.swing.JMenuItem();
    continueItem = new javax.swing.JMenuItem();
    jSeparator5 = new javax.swing.JPopupMenu.Separator();
    finishDebugItem = new javax.swing.JMenuItem();
    toolsMenu = new javax.swing.JMenu();
    fltkplotItem = new javax.swing.JMenuItem();
    octaveCmdItem = new javax.swing.JMenuItem();
    jMenu2 = new javax.swing.JMenu();
    previousWindowItem = new javax.swing.JMenuItem();
    nextWindowItem = new javax.swing.JMenuItem();
    jSeparator29 = new javax.swing.JPopupMenu.Separator();
    closeItem = new javax.swing.JMenuItem();
    closeAllItem = new javax.swing.JMenuItem();
    jSeparator18 = new javax.swing.JPopupMenu.Separator();
    windowsItem = new javax.swing.JMenuItem();
    helpMenu = new javax.swing.JMenu();
    forumItem = new javax.swing.JMenuItem();
    octaveInfoItem = new javax.swing.JMenuItem();
    jSeparator12 = new javax.swing.JPopupMenu.Separator();
    quickHelpItem = new javax.swing.JMenuItem();
    jMenuItem9 = new javax.swing.JMenuItem();
    docPkgItem = new javax.swing.JMenuItem();
    referenceMenu = new javax.swing.JMenu();
    referenceItem = new javax.swing.JMenuItem();
    jSeparator6 = new javax.swing.JPopupMenu.Separator();
    checkForUpdatesMenuItem = new javax.swing.JMenuItem();
    onlineHelpItem = new javax.swing.JMenuItem();
    faqItem = new javax.swing.JMenuItem();
    jSeparator14 = new javax.swing.JPopupMenu.Separator();
    reportBugItem = new javax.swing.JMenuItem();
    feedBackItem = new javax.swing.JMenuItem();
    jSeparator7 = new javax.swing.JPopupMenu.Separator();
    AboutItem = new javax.swing.JMenuItem();

    setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
    java.util.ResourceBundle bundle = java.util.ResourceBundle
            .getBundle("org/domainmath/gui/resources/DomainMath_en"); // NOI18N
    setTitle(bundle.getString("DomainMath.title")); // NOI18N
    addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent evt) {
            formWindowClosing(evt);
        }

        public void windowOpened(java.awt.event.WindowEvent evt) {
            formWindowOpened(evt);
        }
    });

    jToolBar1.setRollover(true);
    jToolBar1.setName("Standard"); // NOI18N

    jButton1.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/document-new.png"))); // NOI18N
    jButton1.setFocusable(false);
    jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton1);

    jButton2.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/document-open.png"))); // NOI18N
    jButton2.setFocusable(false);
    jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton2);

    jButton3.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/document-save-all.png"))); // NOI18N
    jButton3.setFocusable(false);
    jButton3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton3.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton3.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton3ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton3);
    jToolBar1.add(jSeparator4);

    connectButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/connect.png"))); // NOI18N
    connectButton.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("connectItem.mnemonic").charAt(0));
    connectButton.setToolTipText(bundle.getString("connectItem.tooltip")); // NOI18N
    connectButton.setFocusable(false);
    connectButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    connectButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    connectButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            connectButtonActionPerformed(evt);
        }
    });
    jToolBar1.add(connectButton);

    disconnectButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/disconnect.png"))); // NOI18N
    disconnectButton
            .setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
                    .getString("disconnectItem.mnemonic").charAt(0));
    disconnectButton.setToolTipText(bundle.getString("disconnectItem.tooltip")); // NOI18N
    disconnectButton.setFocusable(false);
    disconnectButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    disconnectButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    disconnectButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            disconnectButtonActionPerformed(evt);
        }
    });
    jToolBar1.add(disconnectButton);
    jToolBar1.add(jSeparator9);

    jButton4.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-undo.png"))); // NOI18N
    jButton4.setFocusable(false);
    jButton4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton4.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton4.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton4ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton4);

    jButton5.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-redo.png"))); // NOI18N
    jButton5.setFocusable(false);
    jButton5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton5.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton5.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton5ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton5);
    jToolBar1.add(jSeparator15);

    jButton6.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-cut.png"))); // NOI18N
    jButton6.setFocusable(false);
    jButton6.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton6.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton6.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton6ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton6);

    jButton7.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-copy.png"))); // NOI18N
    jButton7.setFocusable(false);
    jButton7.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton7.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton7.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton7ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton7);

    jButton8.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-paste.png"))); // NOI18N
    jButton8.setFocusable(false);
    jButton8.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    jButton8.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    jButton8.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton8ActionPerformed(evt);
        }
    });
    jToolBar1.add(jButton8);
    jToolBar1.add(jSeparator13);

    jLabel1.setText("Current Directory:");

    dirComboBox.setEditable(true);
    dirComboBox.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            dirComboBoxItemStateChanged(evt);
        }
    });

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout
            .setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup().addGap(1, 1, 1).addComponent(jLabel1)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(dirComboBox, 0, 112, Short.MAX_VALUE).addGap(1, 1, 1)));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addGap(5, 5, 5).addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1)
                    .addComponent(dirComboBox, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(3, 3, 3)));

    jToolBar1.add(jPanel1);

    folderUpButton.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/size22x22/go-up.png"))); // NOI18N
    folderUpButton.setToolTipText("Up");
    folderUpButton.setFocusable(false);
    folderUpButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    folderUpButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    folderUpButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            folderUpButtonActionPerformed(evt);
        }
    });
    jToolBar1.add(folderUpButton);

    browseButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/document-open.png"))); // NOI18N
    browseButton.setToolTipText(bundle.getString("browseButton.title")); // NOI18N
    browseButton.setFocusable(false);
    browseButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    browseButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    browseButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            browseButtonActionPerformed(evt);
        }
    });
    jToolBar1.add(browseButton);

    addButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-add.png"))); // NOI18N
    addButton.setToolTipText(bundle.getString("addButton.title")); // NOI18N
    addButton.setFocusable(false);
    addButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    addButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    addButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            addButtonActionPerformed(evt);
        }
    });
    jToolBar1.add(addButton);

    getContentPane().add(jToolBar1, java.awt.BorderLayout.PAGE_START);

    fileMenu.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("fileMenu.mnemonic").charAt(0));
    fileMenu.setText(bundle.getString("fileMenu.name")); // NOI18N

    newFileItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N,
            java.awt.event.InputEvent.CTRL_MASK));
    newFileItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/document-new.png"))); // NOI18N
    newFileItem.setText("New");
    newFileItem.setToolTipText(bundle.getString("newMenuItem.tooltip")); // NOI18N
    newFileItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            newFileItemActionPerformed(evt);
        }
    });
    fileMenu.add(newFileItem);

    openItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O,
            java.awt.event.InputEvent.CTRL_MASK));
    openItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/document-open.png"))); // NOI18N
    openItem.setText("Open...");
    openItem.setToolTipText("Open File");
    openItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            openItemActionPerformed(evt);
        }
    });
    fileMenu.add(openItem);
    fileMenu.add(jSeparator17);

    saveFileItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S,
            java.awt.event.InputEvent.CTRL_MASK));
    saveFileItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/document-save.png"))); // NOI18N
    saveFileItem.setText("Save ");
    saveFileItem.setToolTipText(bundle.getString("saveMenuItem.tooltp")); // NOI18N
    saveFileItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            saveFileItemActionPerformed(evt);
        }
    });
    fileMenu.add(saveFileItem);

    saveAsItem.setText("Save As...");
    saveAsItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            saveAsItemActionPerformed(evt);
        }
    });
    fileMenu.add(saveAsItem);

    savePlotItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("savePlotItem.mnemonic").charAt(0));
    savePlotItem.setText(bundle.getString("savePlotItem.name")); // NOI18N
    savePlotItem.setToolTipText(bundle.getString("savePlotItem.tooltip")); // NOI18N
    savePlotItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            savePlotItemActionPerformed(evt);
        }
    });
    fileMenu.add(savePlotItem);

    saveAllItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    saveAllItem.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/document-save-all.png"))); // NOI18N
    saveAllItem.setText(bundle.getString("saveAllMenuItem.text")); // NOI18N
    saveAllItem.setToolTipText(bundle.getString("saveAllMenuItem.tooltip")); // NOI18N
    saveAllItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            saveAllItemActionPerformed(evt);
        }
    });
    fileMenu.add(saveAllItem);
    fileMenu.add(jSeparator1);

    printFileItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P,
            java.awt.event.InputEvent.CTRL_MASK));
    printFileItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/document-print2.png"))); // NOI18N
    printFileItem.setText("Print");
    printFileItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            printFileItemActionPerformed(evt);
        }
    });
    fileMenu.add(printFileItem);

    printItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    printItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("printItem.mnemonic").charAt(0));
    printItem.setText(bundle.getString("printItem.name")); // NOI18N
    printItem.setToolTipText(bundle.getString("printItem.tooltip")); // NOI18N
    printItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            printItemActionPerformed(evt);
        }
    });
    fileMenu.add(printItem);
    fileMenu.add(jSeparator19);

    preferencesItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/preferences.png"))); // NOI18N
    preferencesItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("preferecesItem.mnemonic").charAt(0));
    preferencesItem.setText(bundle.getString("preferencesItem.name")); // NOI18N
    preferencesItem.setToolTipText(bundle.getString("preferencesItem.tooltip")); // NOI18N
    preferencesItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            preferencesItemActionPerformed(evt);
        }
    });
    fileMenu.add(preferencesItem);
    fileMenu.add(jSeparator2);

    connectItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/connect.png"))); // NOI18N
    connectItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("connectItem.mnemonic").charAt(0));
    connectItem.setText(bundle.getString("connectItem.name")); // NOI18N
    connectItem.setToolTipText(bundle.getString("connectItem.tooltip")); // NOI18N
    connectItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            connectItemActionPerformed(evt);
        }
    });
    fileMenu.add(connectItem);

    disconnectItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/disconnect.png"))); // NOI18N
    disconnectItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("disconnectItem.mnemonic").charAt(0));
    disconnectItem.setText(bundle.getString("disconnectItem.name")); // NOI18N
    disconnectItem.setToolTipText(bundle.getString("disconnectItem.tooltip")); // NOI18N
    disconnectItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            disconnectItemActionPerformed(evt);
        }
    });
    fileMenu.add(disconnectItem);
    fileMenu.add(jSeparator3);

    exitItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("exitItem.mnemonic").charAt(0));
    exitItem.setText(bundle.getString("exitItem.name")); // NOI18N
    exitItem.setToolTipText(bundle.getString("exitItem.tooltip")); // NOI18N
    exitItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exitItemActionPerformed(evt);
        }
    });
    fileMenu.add(exitItem);

    jMenuBar1.add(fileMenu);

    editMenu.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("editMenu.mnemonic").charAt(0));
    editMenu.setText("Edit");

    undoItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z,
            java.awt.event.InputEvent.CTRL_MASK));
    undoItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-undo.png"))); // NOI18N
    undoItem.setText("Undo");
    undoItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            undoItemActionPerformed(evt);
        }
    });
    editMenu.add(undoItem);

    redoItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Y,
            java.awt.event.InputEvent.CTRL_MASK));
    redoItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-redo.png"))); // NOI18N
    redoItem.setText("Redo");
    redoItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            redoItemActionPerformed(evt);
        }
    });
    editMenu.add(redoItem);
    editMenu.add(jSeparator20);

    cutItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X,
            java.awt.event.InputEvent.CTRL_MASK));
    cutItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-cut.png"))); // NOI18N
    cutItem.setText("Cut");
    cutItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cutItemActionPerformed(evt);
        }
    });
    editMenu.add(cutItem);

    copyItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C,
            java.awt.event.InputEvent.CTRL_MASK));
    copyItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-copy.png"))); // NOI18N
    copyItem.setText("Copy");
    copyItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            copyItemActionPerformed(evt);
        }
    });
    editMenu.add(copyItem);

    pasteItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V,
            java.awt.event.InputEvent.CTRL_MASK));
    pasteItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-paste.png"))); // NOI18N
    pasteItem.setText("Paste");
    pasteItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            pasteItemActionPerformed(evt);
        }
    });
    editMenu.add(pasteItem);
    editMenu.add(jSeparator21);

    deleteItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-delete.png"))); // NOI18N
    deleteItem.setText("Delete");
    deleteItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            deleteItemActionPerformed(evt);
        }
    });
    editMenu.add(deleteItem);

    selectAllItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A,
            java.awt.event.InputEvent.CTRL_MASK));
    selectAllItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-select-all.png"))); // NOI18N
    selectAllItem.setText("Select All");
    selectAllItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            selectAllItemActionPerformed(evt);
        }
    });
    editMenu.add(selectAllItem);
    editMenu.add(jSeparator22);

    jMenuItem2.setAction(new RSyntaxTextAreaEditorKit.InsertTabAction());
    jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_TAB,
            java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem2.setText("Increase Indent");
    editMenu.add(jMenuItem2);

    jMenuItem3.setAction(new RSyntaxTextAreaEditorKit.DecreaseIndentAction());
    jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_TAB,
            java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem3.setText("Decrease Indent");
    editMenu.add(jMenuItem3);
    editMenu.add(jSeparator23);

    jMenuItem4.setAction(new RTextAreaEditorKit.UpperSelectionCaseAction());
    jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U,
            java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem4.setText("Make Uppercase");
    editMenu.add(jMenuItem4);

    jMenuItem5.setAction(new RTextAreaEditorKit.LowerSelectionCaseAction());
    jMenuItem5.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem5.setText("Make Lowercase");
    editMenu.add(jMenuItem5);
    editMenu.add(jSeparator24);

    jMenuItem6.setText("Clear All Marks...");
    jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem6ActionPerformed(evt);
        }
    });
    editMenu.add(jMenuItem6);

    jMenuItem1.setAction(new RSyntaxTextAreaEditorKit.ToggleCommentAction());
    jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_SLASH,
            java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem1.setText("Toggle Comment");
    jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem1ActionPerformed(evt);
        }
    });
    editMenu.add(jMenuItem1);
    editMenu.add(jSeparator11);

    clearOutWindowItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W,
            java.awt.event.InputEvent.CTRL_MASK));
    clearOutWindowItem
            .setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
                    .getString("clearOutputWindowItem.mnemonic").charAt(0));
    clearOutWindowItem.setText(bundle.getString("clearOutputWindowItem.name")); // NOI18N
    clearOutWindowItem.setToolTipText(bundle.getString("clearOutputWindowItem.tooltip")); // NOI18N
    clearOutWindowItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            clearOutWindowItemActionPerformed(evt);
        }
    });
    editMenu.add(clearOutWindowItem);

    jMenuBar1.add(editMenu);

    jMenu3.setText(bundle.getString("viewMenu.title")); // NOI18N

    consoleItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_0,
            java.awt.event.InputEvent.CTRL_MASK));
    consoleItem.setText(bundle.getString("consoleItem.title")); // NOI18N
    consoleItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            consoleItemActionPerformed(evt);
        }
    });
    jMenu3.add(consoleItem);

    historyItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_1,
            java.awt.event.InputEvent.CTRL_MASK));
    historyItem.setText(bundle.getString("historyItem.title")); // NOI18N
    historyItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            historyItemActionPerformed(evt);
        }
    });
    jMenu3.add(historyItem);

    filesItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_2,
            java.awt.event.InputEvent.CTRL_MASK));
    filesItem.setText(bundle.getString("filesItem.title")); // NOI18N
    filesItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            filesItemActionPerformed(evt);
        }
    });
    jMenu3.add(filesItem);

    workspaceItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_3,
            java.awt.event.InputEvent.CTRL_MASK));
    workspaceItem.setText(bundle.getString("worksaceItem.title")); // NOI18N
    workspaceItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            workspaceItemActionPerformed(evt);
        }
    });
    jMenu3.add(workspaceItem);

    codeEditorItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_4,
            java.awt.event.InputEvent.CTRL_MASK));
    codeEditorItem.setText(bundle.getString("codeEditorItem.title")); // NOI18N
    codeEditorItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            codeEditorItemActionPerformed(evt);
        }
    });
    jMenu3.add(codeEditorItem);

    pathsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_5,
            java.awt.event.InputEvent.CTRL_MASK));
    pathsItem.setText(bundle.getString("setPathsItem.title")); // NOI18N
    pathsItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            pathsItemActionPerformed(evt);
        }
    });
    jMenu3.add(pathsItem);

    pkgsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_6,
            java.awt.event.InputEvent.CTRL_MASK));
    pkgsItem.setText(bundle.getString("pkgsItem.title")); // NOI18N
    pkgsItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            pkgsItemActionPerformed(evt);
        }
    });
    jMenu3.add(pkgsItem);

    arrayEditItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_7,
            java.awt.event.InputEvent.CTRL_MASK));
    arrayEditItem.setText(bundle.getString("arrayEidtorItem.title")); // NOI18N
    arrayEditItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            arrayEditItemActionPerformed(evt);
        }
    });
    jMenu3.add(arrayEditItem);

    jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_8,
            java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem7.setText("Debugger Window");
    jMenuItem7.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem7ActionPerformed(evt);
        }
    });
    jMenu3.add(jMenuItem7);

    jMenuBar1.add(jMenu3);

    jMenu1.setMnemonic('S');
    jMenu1.setText("Search");

    findItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F,
            java.awt.event.InputEvent.CTRL_MASK));
    findItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-find.png"))); // NOI18N
    findItem.setMnemonic('F');
    findItem.setText("Find...");
    findItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            findItemActionPerformed(evt);
        }
    });
    jMenu1.add(findItem);

    replaceItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H,
            java.awt.event.InputEvent.CTRL_MASK));
    replaceItem.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/domainmath/gui/icons/edit-find-replace.png"))); // NOI18N
    replaceItem.setText("Replace...");
    replaceItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            replaceItemActionPerformed(evt);
        }
    });
    jMenu1.add(replaceItem);

    gotoItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    gotoItem.setText("Go To...");
    gotoItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            gotoItemActionPerformed(evt);
        }
    });
    jMenu1.add(gotoItem);
    jMenu1.add(jSeparator25);

    googleItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G,
            java.awt.event.InputEvent.CTRL_MASK));
    googleItem.setText("Google Search");
    googleItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            googleItemActionPerformed(evt);
        }
    });
    jMenu1.add(googleItem);

    wikiItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    wikiItem.setText("Wikipedia Search");
    wikiItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            wikiItemActionPerformed(evt);
        }
    });
    jMenu1.add(wikiItem);

    jMenuBar1.add(jMenu1);

    pkgMenu.setText(bundle.getString("pkgMenu.name")); // NOI18N
    jMenuBar1.add(pkgMenu);

    debugMenu.setText("Debug");

    runScriptItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F6, 0));
    runScriptItem
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/Run.png"))); // NOI18N
    runScriptItem.setText("Run Script");
    runScriptItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            runScriptItemActionPerformed(evt);
        }
    });
    debugMenu.add(runScriptItem);

    runScriptCItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F6,
            java.awt.event.InputEvent.SHIFT_MASK));
    runScriptCItem.setText("Run Script from Console");
    runScriptCItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            runScriptCItemActionPerformed(evt);
        }
    });
    debugMenu.add(runScriptCItem);

    jMenuItem8.setText("Edit Run Configuration");
    jMenuItem8.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem8ActionPerformed(evt);
        }
    });
    debugMenu.add(jMenuItem8);
    debugMenu.add(jSeparator8);

    debugScriptMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5,
            java.awt.event.InputEvent.CTRL_MASK));
    debugScriptMenuItem.setText("Debug Script");
    debugScriptMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            debugScriptMenuItemActionPerformed(evt);
        }
    });
    debugMenu.add(debugScriptMenuItem);

    testScriptMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    testScriptMenuItem.setText("Test Script");
    testScriptMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            testScriptMenuItemActionPerformed(evt);
        }
    });
    debugMenu.add(testScriptMenuItem);

    toggleBreakpointItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F9, 0));
    toggleBreakpointItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/resources/stop.png"))); // NOI18N
    toggleBreakpointItem.setText("Toggle Breakpoint");
    toggleBreakpointItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            toggleBreakpointItemActionPerformed(evt);
        }
    });
    debugMenu.add(toggleBreakpointItem);

    removeToggleBreakpointItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F9,
            java.awt.event.InputEvent.SHIFT_MASK));
    removeToggleBreakpointItem.setText("Remove Toggle Breakpoint");
    removeToggleBreakpointItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            removeToggleBreakpointItemActionPerformed(evt);
        }
    });
    debugMenu.add(removeToggleBreakpointItem);

    clearAllBreakpointsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F9,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    clearAllBreakpointsItem.setText("Clear All Breakpoints...");
    clearAllBreakpointsItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            clearAllBreakpointsItemActionPerformed(evt);
        }
    });
    debugMenu.add(clearAllBreakpointsItem);
    debugMenu.add(jSeparator10);

    stepItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F10,
            java.awt.event.InputEvent.SHIFT_MASK));
    stepItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/step.png"))); // NOI18N
    stepItem.setText("Step");
    stepItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            stepItemActionPerformed(evt);
        }
    });
    debugMenu.add(stepItem);

    stepInItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F11, 0));
    stepInItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/step-in.png"))); // NOI18N
    stepInItem.setText("Step in");
    stepInItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            stepInItemActionPerformed(evt);
        }
    });
    debugMenu.add(stepInItem);

    stepOutItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F11,
            java.awt.event.InputEvent.SHIFT_MASK));
    stepOutItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/step-out.png"))); // NOI18N
    stepOutItem.setText("Step out");
    stepOutItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            stepOutItemActionPerformed(evt);
        }
    });
    debugMenu.add(stepOutItem);

    continueItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F8, 0));
    continueItem.setText("Continue");
    continueItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            continueItemActionPerformed(evt);
        }
    });
    debugMenu.add(continueItem);
    debugMenu.add(jSeparator5);

    finishDebugItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5,
            java.awt.event.InputEvent.SHIFT_MASK));
    finishDebugItem
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/finish.png"))); // NOI18N
    finishDebugItem.setText("Finish Debugger Session");
    finishDebugItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            finishDebugItemActionPerformed(evt);
        }
    });
    debugMenu.add(finishDebugItem);

    jMenuBar1.add(debugMenu);

    toolsMenu.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("ToolsMenu.mnemonic").charAt(0));
    toolsMenu.setText(bundle.getString("ToolsMenu.name")); // NOI18N

    fltkplotItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R,
            java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
    fltkplotItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("fltkPlotItem.mnemonic").charAt(0));
    fltkplotItem.setText(bundle.getString("fltkPlotItem.name")); // NOI18N
    fltkplotItem.setToolTipText(bundle.getString("fltkPlotItem.tooltip")); // NOI18N
    fltkplotItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            fltkplotItemActionPerformed(evt);
        }
    });
    toolsMenu.add(fltkplotItem);

    octaveCmdItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("octaveCmdItem.mnemonic").charAt(0));
    octaveCmdItem.setText(bundle.getString("octaveCmdItem.name")); // NOI18N
    octaveCmdItem.setToolTipText(bundle.getString("octaveCmdItem.tooltip")); // NOI18N
    octaveCmdItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            octaveCmdItemActionPerformed(evt);
        }
    });
    toolsMenu.add(octaveCmdItem);

    jMenuBar1.add(toolsMenu);

    jMenu2.setText(bundle.getString("windowMenu.title")); // NOI18N

    previousWindowItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_PAGE_DOWN,
            java.awt.event.InputEvent.CTRL_MASK));
    previousWindowItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/go-previous.png"))); // NOI18N
    previousWindowItem.setText(bundle.getString("previousWindowItem.title")); // NOI18N
    previousWindowItem.setToolTipText(bundle.getString("previousWindowItem.tooltip")); // NOI18N
    previousWindowItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            previousWindowItemActionPerformed(evt);
        }
    });
    jMenu2.add(previousWindowItem);

    nextWindowItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_PAGE_UP,
            java.awt.event.InputEvent.CTRL_MASK));
    nextWindowItem.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/go-next.png"))); // NOI18N
    nextWindowItem.setText(bundle.getString("nextWindowItem.title")); // NOI18N
    nextWindowItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            nextWindowItemActionPerformed(evt);
        }
    });
    jMenu2.add(nextWindowItem);
    jMenu2.add(jSeparator29);

    closeItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W,
            java.awt.event.InputEvent.ALT_MASK));
    closeItem.setText(bundle.getString("closeMenuItem.name")); // NOI18N
    closeItem.setToolTipText(bundle.getString("closeItem.tooltip")); // NOI18N
    closeItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            closeItemActionPerformed(evt);
        }
    });
    jMenu2.add(closeItem);

    closeAllItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W,
            java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.SHIFT_MASK));
    closeAllItem.setText(bundle.getString("closeAllItem.name")); // NOI18N
    closeAllItem.setToolTipText(bundle.getString("closeAllItem.tooltip")); // NOI18N
    closeAllItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            closeAllItemActionPerformed(evt);
        }
    });
    jMenu2.add(closeAllItem);
    jMenu2.add(jSeparator18);

    windowsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4,
            java.awt.event.InputEvent.SHIFT_MASK));
    windowsItem.setText(bundle.getString("windowsItem.title")); // NOI18N
    windowsItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            windowsItemActionPerformed(evt);
        }
    });
    jMenu2.add(windowsItem);

    jMenuBar1.add(jMenu2);

    helpMenu.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("helpMenu.mnemonic").charAt(0));
    helpMenu.setText(bundle.getString("helpMenu.name")); // NOI18N

    forumItem.setText("Forum");
    forumItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            forumItemActionPerformed(evt);
        }
    });
    helpMenu.add(forumItem);

    octaveInfoItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("octInfoItem.mnemonic").charAt(0));
    octaveInfoItem.setText(bundle.getString("octInfoItem.name")); // NOI18N
    octaveInfoItem.setToolTipText(bundle.getString("octInfoItem.tooltip")); // NOI18N
    octaveInfoItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            octaveInfoItemActionPerformed(evt);
        }
    });
    helpMenu.add(octaveInfoItem);
    helpMenu.add(jSeparator12);

    quickHelpItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
    quickHelpItem.setText(bundle.getString("quickHelpItem.name")); // NOI18N
    quickHelpItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            quickHelpItemActionPerformed(evt);
        }
    });
    helpMenu.add(quickHelpItem);

    jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1,
            java.awt.event.InputEvent.SHIFT_MASK));
    jMenuItem9.setText("Package  Documentation");
    jMenuItem9.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem9ActionPerformed(evt);
        }
    });
    helpMenu.add(jMenuItem9);

    docPkgItem.setText("Package Online  Documentation");
    docPkgItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            docPkgItemActionPerformed(evt);
        }
    });
    helpMenu.add(docPkgItem);

    referenceMenu.setText(bundle.getString("referencesMenu.name")); // NOI18N
    helpMenu.add(referenceMenu);

    referenceItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("addReferencesItem.mnemonic").charAt(0));
    referenceItem.setText(bundle.getString("addReferencesItem.name")); // NOI18N
    referenceItem.setToolTipText(bundle.getString("addReferencesItem.tooltip")); // NOI18N
    referenceItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            referenceItemActionPerformed(evt);
        }
    });
    helpMenu.add(referenceItem);
    helpMenu.add(jSeparator6);

    checkForUpdatesMenuItem.setText(bundle.getString("checkForUpdatesMenuItem.text")); // NOI18N
    checkForUpdatesMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkForUpdatesMenuItemActionPerformed(evt);
        }
    });
    helpMenu.add(checkForUpdatesMenuItem);

    onlineHelpItem.setText("Help and Support");
    onlineHelpItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            onlineHelpItemActionPerformed(evt);
        }
    });
    helpMenu.add(onlineHelpItem);

    faqItem.setText("Online FAQ");
    faqItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            faqItemActionPerformed(evt);
        }
    });
    helpMenu.add(faqItem);
    helpMenu.add(jSeparator14);

    reportBugItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("reportBugItem.mnemonic").charAt(0));
    reportBugItem.setText(bundle.getString("reportBugItem.name")); // NOI18N
    reportBugItem.setToolTipText(bundle.getString("reportBugItem.tooltip")); // NOI18N
    reportBugItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            reportBugItemActionPerformed(evt);
        }
    });
    helpMenu.add(reportBugItem);

    feedBackItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("yourFeedbackItem.mnemonic").charAt(0));
    feedBackItem.setText(bundle.getString("yourFeedbackItem.name")); // NOI18N
    feedBackItem.setToolTipText(bundle.getString("yourFeedbackItem.tooltip")); // NOI18N
    feedBackItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            feedBackItemActionPerformed(evt);
        }
    });
    helpMenu.add(feedBackItem);
    helpMenu.add(jSeparator7);

    AboutItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en")
            .getString("aboutItem.mnemonic").charAt(0));
    AboutItem.setText(bundle.getString("aboutItem.name")); // NOI18N
    AboutItem.setToolTipText(bundle.getString("aboutItem.tooltip")); // NOI18N
    AboutItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            AboutItemActionPerformed(evt);
        }
    });
    helpMenu.add(AboutItem);

    jMenuBar1.add(helpMenu);

    setJMenuBar(jMenuBar1);

    pack();
}

From source file:faa.cucumber.pages.FaaHomePage.java

public void switchFaaBrowserTabs() {
    waitABit(2000);// w ww  .  j ava2s. c o  m
    Robot robot;
    try {

        //         //Navigate from Left to Right
        //         Actions action= new Actions(driver);
        //         action.keyDown(Keys.CONTROL).sendKeys(Keys.TAB).build().perform();

        robot = new Robot();
        System.out.println("Switching Tabs");
        robot.keyPress(java.awt.event.KeyEvent.VK_CONTROL);
        System.out.println("Control Key Pressed");
        waitABit(1000);
        robot.keyPress(java.awt.event.KeyEvent.VK_TAB);
        System.out.println("TAB Key Pressed");
        robot.keyRelease(java.awt.event.KeyEvent.VK_TAB);
        System.out.println("TAB Key Released");
        robot.keyRelease(java.awt.event.KeyEvent.VK_CONTROL);
        System.out.println("Control Key Released");

        //         robot.keyPress(java.awt.event.KeyEvent.VK_TAB);   
        //         waitABit(1000);
        //         System.out.println("TAB Key Pressed..Second Time" );
        //         robot.keyPress(java.awt.event.KeyEvent.VK_TAB);   
        //         System.out.println("TAB Key Pressed..third Time" );
        //         waitABit(1000);

        //         System.out.println("Switching Tabs Again" );
        //         robot.keyPress(java.awt.event.KeyEvent.VK_CONTROL);
        //         System.out.println("Control Key Pressed" );
        //         waitABit(1000);
        //         robot.keyPress(java.awt.event.KeyEvent.VK_TAB);   
        //         System.out.println("TAB Key Pressed" );
        //         waitABit(1000);
        //         robot.keyRelease(java.awt.event.KeyEvent.VK_CONTROL);
        //         System.out.println("Control Key Released" );
        //         robot.keyRelease(java.awt.event.KeyEvent.VK_TAB);   
        //         System.out.println("TAB Key Released" );
        //         
        //         
        //         //Navigate from Left to Right
        //         Actions action= new Actions(driver);
        //         action.keyDown(Keys.CONTROL).sendKeys(Keys.TAB).build().perform();

        //
        //         System.out.println("Switching Tabs" );
        //         robot.keyPress(java.awt.event.KeyEvent.VK_CONTROL);
        //         System.out.println("Control Key Pressed 2" );
        //         robot.keyPress(java.awt.event.KeyEvent.VK_TAB);   
        //         System.out.println("TAB Key Pressed2 " );
        //         robot.keyRelease(java.awt.event.KeyEvent.VK_CONTROL);
        //         System.out.println("Control Key Released 2" );
        //         robot.keyRelease(java.awt.event.KeyEvent.VK_TAB);   
        //         System.out.println("TAB Key Released 2" );

        //         robot.keyPress(java.awt.event.KeyEvent.VK_CONTROL);
        //         System.out.println("Control Key Pressed" );
        //         robot.keyPress(java.awt.event.KeyEvent.VK_W);
        //         System.out.println("W Key Pressed" );
        //         robot.keyRelease(java.awt.event.KeyEvent.VK_CONTROL);
        //         System.out.println("Control Key Released" );
        //         robot.keyRelease(java.awt.event.KeyEvent.VK_W);   
        //         System.out.println("W Key Released" );
    } catch (AWTException e) {
        System.out.println("Error has occured when attempting to Switch Browser Tabs!!");
        e.printStackTrace();
    }
}

From source file:faa.cucumber.pages.FaaHomePage.java

public void switchBrowserTabs() {
    waitABit(2000);// ww w  . ja  v  a  2 s.co  m
    Robot robot;
    try {
        robot = new Robot();
        System.out.println("Switching Tabs");
        robot.keyPress(KeyEvent.VK_CONTROL);
        System.out.println("Control Key Pressed");
        robot.keyPress(KeyEvent.VK_TAB);
        System.out.println("TAB Key Pressed");
        robot.keyRelease(KeyEvent.VK_CONTROL);
        System.out.println("Control Key Released");
        robot.keyRelease(KeyEvent.VK_TAB);
        System.out.println("TAB Key Released");
        System.out.println("Browser Tabs have been switched.");

    } catch (AWTException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}