Example usage for java.awt.event KeyEvent VK_ADD

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

Introduction

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

Prototype

int VK_ADD

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

Click Source Link

Document

Constant for the number pad add key.

Usage

From source file:br.org.acessobrasil.ases.ferramentas_de_reparo.vista.label.PainelLabel.java

/**
 * Cria o menu editar do Frame Principal
 * //w w w .j av  a  2s .  c o m
 * @param menu
 */
private JMenu criaMenuEditar() {
    JMenu menu = new JMenu(GERAL.EDITAR);
    menu.setBackground(parentFrame.corDefault);
    menu.setMnemonic('E');
    menu.setMnemonic(KeyEvent.VK_E);

    JMenuItem btnContraste = new JMenuItem(GERAL.ALTERAR_CONTRASTE);
    btnContraste.addActionListener(this);
    btnContraste.setActionCommand("Contraste");
    // btnAumenta.setMnemonic('F');
    // btnAumenta.setMnemonic(KeyEvent.VK_F);
    // btnAumenta.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ADD,
    // ActionEvent.CTRL_MASK));
    btnContraste.setToolTipText(GERAL.DICA_CONTRASTE);
    btnContraste.getAccessibleContext().setAccessibleDescription(GERAL.DICA_CONTRASTE);
    menu.add(btnContraste);

    JMenuItem btnAumenta = new JMenuItem(GERAL.AUMENTA_FONTE);
    btnAumenta.addActionListener(this);
    btnAumenta.setActionCommand("AumentaFonte");
    // btnAumenta.setMnemonic('F');
    // btnAumenta.setMnemonic(KeyEvent.VK_F);
    btnAumenta.setAccelerator(
            javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ADD, ActionEvent.CTRL_MASK));
    btnAumenta.setToolTipText(GERAL.DICA_AUMENTA_FONTE);
    btnAumenta.getAccessibleContext().setAccessibleDescription(GERAL.DICA_AUMENTA_FONTE);
    menu.add(btnAumenta);

    JMenuItem btnDiminui = new JMenuItem(GERAL.DIMINUI_FONTE);
    btnDiminui.addActionListener(this);
    btnDiminui.setActionCommand("DiminuiFonte");
    // btnDiminui.setMnemonic('F');
    // btnDiminui.setMnemonic(KeyEvent.VK_F);
    btnDiminui.setAccelerator(
            javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_SUBTRACT, ActionEvent.CTRL_MASK));
    btnDiminui.setToolTipText(GERAL.DICA_DIMINUI_FONTE);
    btnDiminui.getAccessibleContext().setAccessibleDescription(GERAL.DICA_DIMINUI_FONTE);
    menu.add(btnDiminui);

    menu.add(new JSeparator());

    JMenuItem btnProcurar = new JMenuItem(GERAL.PROCURAR);
    btnProcurar.addActionListener(this);
    btnProcurar.setActionCommand("Procurar");
    btnProcurar.setMnemonic('P');
    btnProcurar.setMnemonic(KeyEvent.VK_P);
    btnProcurar.setAccelerator(
            javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, ActionEvent.CTRL_MASK));
    btnProcurar.setToolTipText(GERAL.DICA_PROCURAR);
    btnProcurar.getAccessibleContext().setAccessibleDescription(GERAL.DICA_PROCURAR);
    menu.add(btnProcurar);

    JMenuItem btnSelecionarTudo = new JMenuItem(GERAL.SELECIONAR_TUDO);
    btnSelecionarTudo.addActionListener(this);
    btnSelecionarTudo.setActionCommand("SelecionarTudo");
    btnSelecionarTudo.setMnemonic('T');
    btnSelecionarTudo.setMnemonic(KeyEvent.VK_T);
    btnSelecionarTudo.setAccelerator(
            javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, ActionEvent.CTRL_MASK));
    btnSelecionarTudo.setToolTipText(GERAL.DICA_SELECIONAR_TODO_CSS);
    btnSelecionarTudo.getAccessibleContext().setAccessibleDescription(GERAL.DICA_SELECIONAR_TODO_CSS);
    menu.add(btnSelecionarTudo);

    JMenuItem btnDesfazer = new JMenuItem(GERAL.DESFAZER);
    btnDesfazer.addActionListener(this);
    btnDesfazer.setActionCommand("Desfazer");
    btnDesfazer.setMnemonic('z');
    btnDesfazer.setMnemonic(KeyEvent.VK_Z);
    btnDesfazer.getAccessibleContext().setAccessibleDescription(GERAL.DICA_DESFAZER);
    btnDesfazer.setAccelerator(
            javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z, ActionEvent.CTRL_MASK));
    menu.add(btnDesfazer);
    menu.setEnabled(true);
    return menu;
}

From source file:com.monead.semantic.workbench.SemanticWorkbench.java

/**
 * Create the edit menu//from   w w w  . ja va  2s . co m
 * 
 * @return The edit menu
 */
private JMenu setupEditMenu() {
    final JMenu menu = new JMenu("Edit");

    menu.setMnemonic(KeyEvent.VK_E);
    menu.setToolTipText("Menu items related to editing the ontology");

    editFind = new JMenuItem("Find (in assertions)");
    editFind.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, KeyEvent.CTRL_MASK));
    editFind.setMnemonic(KeyEvent.VK_F);
    editFind.setToolTipText("Find text in the assertions editor");
    editFind.addActionListener(new FindAssertionsTextListener());
    menu.add(editFind);

    editFindNextMatch = new JMenuItem("Next (matching assertion text)");
    editFindNextMatch.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, KeyEvent.CTRL_MASK));
    editFindNextMatch.setMnemonic(KeyEvent.VK_N);
    editFindNextMatch.setToolTipText("Find next text match in the assertions editor");
    editFindNextMatch.addActionListener(new FindNextAssertionsTextListener());
    menu.add(editFindNextMatch);

    menu.addSeparator();

    editCommentToggle = new JMenuItem("Toggle Comment");
    editCommentToggle.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T, KeyEvent.CTRL_MASK));
    editCommentToggle.setMnemonic(KeyEvent.VK_T);
    editCommentToggle
            .setToolTipText("Switch the chosen assertion or query lines between commented and not commented");
    editCommentToggle.addActionListener(new CommentToggleListener());
    editCommentToggle.setEnabled(false);
    menu.add(editCommentToggle);

    editInsertPrefixes = new JMenuItem("Insert Prefixes");
    editInsertPrefixes.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_I, ActionEvent.CTRL_MASK));
    editInsertPrefixes.setMnemonic(KeyEvent.VK_I);
    editInsertPrefixes.setToolTipText("Insert standard prefixes (namespaces)");
    editInsertPrefixes.addActionListener(new InsertPrefixesListener());
    menu.add(editInsertPrefixes);

    menu.addSeparator();

    editExpandAllTreeNodes = new JMenuItem("Expand Entire Tree");
    editExpandAllTreeNodes.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, ActionEvent.ALT_MASK));
    editExpandAllTreeNodes.setMnemonic(KeyEvent.VK_E);
    editExpandAllTreeNodes.setToolTipText("Expand all tree nodes");
    editExpandAllTreeNodes.addActionListener(new ExpandTreeListener());
    menu.add(editExpandAllTreeNodes);

    editCollapseAllTreeNodes = new JMenuItem("Collapse Entire Tree");
    editCollapseAllTreeNodes.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, ActionEvent.ALT_MASK));
    editCollapseAllTreeNodes.setMnemonic(KeyEvent.VK_C);
    editCollapseAllTreeNodes.setToolTipText("Expand all tree nodes");
    editCollapseAllTreeNodes.addActionListener(new CollapseTreeListener());
    menu.add(editCollapseAllTreeNodes);

    menu.addSeparator();

    editEditListOfSparqlServiceUrls = new JMenuItem("Edit SPARQL Service URLs List");
    editEditListOfSparqlServiceUrls.setMnemonic(KeyEvent.VK_S);
    editEditListOfSparqlServiceUrls.setToolTipText("Remove unwanted URLs from the dropdown list");
    editEditListOfSparqlServiceUrls.addActionListener(new EditListOfSparqlServiceUrls());
    menu.add(editEditListOfSparqlServiceUrls);

    return menu;
}

From source file:com.willwinder.universalgcodesender.MainWindow.java

private void initProgram() {
    Localization.initialize(this.settings.getLanguage());
    try {/*from ww  w  .j av a2s.  c om*/
        backend.applySettings(settings);
    } catch (Exception e) {
        displayErrorDialog(e.getMessage());
    }

    this.setLocalLabels();
    this.loadPortSelector();
    this.checkScrollWindow();
    this.loadFirmwareSelector();
    this.setTitle(
            Localization.getString("title") + " (" + Localization.getString("version") + " " + VERSION + ")");

    // Command History
    this.manualCommandHistory = new ArrayList<>();

    // Add keyboard listener for manual controls.
    KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new KeyEventDispatcher() {
        @Override
        public boolean dispatchKeyEvent(KeyEvent e) {
            // Check context.
            if (((arrowMovementEnabled.isSelected()) && e.getID() == KeyEvent.KEY_PRESSED)
                    && xPlusButton.isEnabled()) {
                switch (e.getKeyCode()) {
                case KeyEvent.VK_RIGHT:
                case KeyEvent.VK_KP_RIGHT:
                case KeyEvent.VK_NUMPAD6:
                    xPlusButtonActionPerformed(null);
                    e.consume();
                    return true;
                case KeyEvent.VK_LEFT:
                case KeyEvent.VK_KP_LEFT:
                case KeyEvent.VK_NUMPAD4:
                    xMinusButtonActionPerformed(null);
                    e.consume();
                    return true;
                case KeyEvent.VK_UP:
                case KeyEvent.VK_KP_UP:
                case KeyEvent.VK_NUMPAD8:
                    yPlusButtonActionPerformed(null);
                    e.consume();
                    return true;
                case KeyEvent.VK_DOWN:
                case KeyEvent.VK_KP_DOWN:
                case KeyEvent.VK_NUMPAD2:
                    yMinusButtonActionPerformed(null);
                    e.consume();
                    return true;
                case KeyEvent.VK_PAGE_UP:
                case KeyEvent.VK_NUMPAD9:
                    zPlusButtonActionPerformed(null);
                    e.consume();
                    return true;
                case KeyEvent.VK_PAGE_DOWN:
                case KeyEvent.VK_NUMPAD3:
                    zMinusButtonActionPerformed(null);
                    e.consume();
                    return true;
                case KeyEvent.VK_ADD:
                    increaseStepActionPerformed(null);
                    e.consume();
                    return true;
                case KeyEvent.VK_SUBTRACT:
                    decreaseStepActionPerformed(null);
                    e.consume();
                    return true;
                case KeyEvent.VK_DIVIDE:
                    divideStepActionPerformed(null);
                    e.consume();
                    return true;
                case KeyEvent.VK_MULTIPLY:
                    multiplyStepActionPerformed(null);
                    e.consume();
                    return true;
                case KeyEvent.VK_INSERT:
                case KeyEvent.VK_NUMPAD0:
                    resetCoordinatesButtonActionPerformed(null);
                    e.consume();
                    return true;
                default:
                    break;
                }
            }

            return false;
        }
    });
}

From source file:com.projity.pm.graphic.frames.GraphicManager.java

public void setToolBarAndMenus(final Container contentPane) {
    JToolBar toolBar;//from  w  w  w . ja v  a2 s .com
    if (Environment.isRibbonUI()) {
        if (Environment.isNeedToRestart()) {
            contentPane.add(new JLabel(Messages.getString("Error.restart")), BorderLayout.CENTER);
            return;
        }

        setRibbon((JRibbonFrame) container, getMenuManager());

        //         JToolBar viewToolBar = getMenuManager().getToolBar(MenuManager.VIEW_TOOL_BAR_WITH_NO_SUB_VIEW_OPTION);
        //         topTabs = new TabbedNavigation();
        //         JComponent tabs = topTabs.createContentPanel(getMenuManager(),viewToolBar,0,JTabbedPane.TOP,true);
        //         tabs.setAlignmentX(0.0f); // so it is left justified
        //
        //
        //          Box top = new Box(BoxLayout.Y_AXIS);
        //          JComponent bottom;
        //         top.add(tabs);
        //         bottom = new TabbedNavigation().createContentPanel(getMenuManager(),viewToolBar,1,JTabbedPane.BOTTOM,false);
        //         contentPane.add(top, BorderLayout.BEFORE_FIRST_LINE);
        //         contentPane.add(bottom,BorderLayout.AFTER_LAST_LINE);
        //         if (Environment.isNewLaf())
        //            contentPane.setBackground(Color.WHITE);

        //         if (Environment.isMac()){
        //            //System.setProperty("apple.laf.useScreenMenuBar","true");
        //            //System.setProperty("com.apple.mrj.application.apple.menu.about.name", Messages.getMetaString("Text.ShortTitle"));
        //            JMenuBar menu = getMenuManager().getMenu(Environment.getStandAlone()?MenuManager.MAC_STANDARD_MENU:MenuManager.SERVER_STANDARD_MENU);
        //            //((JComponent)menu).setBorder(BorderFactory.createEmptyBorder());
        //
        //            ((JFrame)container).setJMenuBar(menu);
        //            projectListMenu = (JMenu) menu.getComponent(5);
        //         }

    } else if (Environment.isNewLook()) {
        if (Environment.isNeedToRestart()) {
            contentPane.add(new JLabel(Messages.getString("Error.restart")), BorderLayout.CENTER);
            return;
        }

        toolBar = getMenuManager().getToolBar(MenuManager.BIG_TOOL_BAR);
        if (!getLafManager().isToolbarOpaque())
            toolBar.setOpaque(false);
        if (!isApplet())
            getMenuManager().setActionVisible(ACTION_FULL_SCREEN, false);

        if (Environment.isExternal()) // external users only see project team
            getMenuManager().setActionVisible(ACTION_TEAM_FILTER, false);

        toolBar.addSeparator(new Dimension(20, 20));
        toolBar.add(new Box.Filler(new Dimension(0, 0), new Dimension(0, 0),
                new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE)));
        toolBar.add(((DefaultFrameManager) getFrameManager()).getProjectComboPanel());
        toolBar.add(Box.createRigidArea(new Dimension(20, 20)));
        if (Environment.isNewLaf())
            toolBar.setBackground(Color.WHITE);
        toolBar.setFloatable(false);
        toolBar.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
        Box top;
        JComponent bottom;

        top = new Box(BoxLayout.Y_AXIS);
        toolBar.setAlignmentX(0.0f); // so it is left justified
        top.add(toolBar);

        JToolBar viewToolBar = getMenuManager().getToolBar(MenuManager.VIEW_TOOL_BAR_WITH_NO_SUB_VIEW_OPTION);
        topTabs = new TabbedNavigation();
        JComponent tabs = topTabs.createContentPanel(getMenuManager(), viewToolBar, 0, JTabbedPane.TOP, true);
        tabs.setAlignmentX(0.0f); // so it is left justified

        top.add(tabs);
        bottom = new TabbedNavigation().createContentPanel(getMenuManager(), viewToolBar, 1, JTabbedPane.BOTTOM,
                false);
        contentPane.add(top, BorderLayout.BEFORE_FIRST_LINE);
        contentPane.add(bottom, BorderLayout.AFTER_LAST_LINE);
        if (Environment.isNewLaf())
            contentPane.setBackground(Color.WHITE);

        if (Environment.isMac()) {
            //System.setProperty("apple.laf.useScreenMenuBar","true");
            //System.setProperty("com.apple.mrj.application.apple.menu.about.name", Messages.getMetaString("Text.ShortTitle"));
            JMenuBar menu = getMenuManager().getMenu(Environment.getStandAlone() ? MenuManager.MAC_STANDARD_MENU
                    : MenuManager.SERVER_STANDARD_MENU);
            //((JComponent)menu).setBorder(BorderFactory.createEmptyBorder());

            ((JFrame) container).setJMenuBar(menu);
            projectListMenu = (JMenu) menu.getComponent(5);
        }

    } else {

        toolBar = getMenuManager().getToolBar(
                Environment.isMac() ? MenuManager.MAC_STANDARD_TOOL_BAR : MenuManager.STANDARD_TOOL_BAR);
        filterToolBarManager = FilterToolBarManager.create(getMenuManager());
        filterToolBarManager.addButtons(toolBar);
        contentPane.add(toolBar, BorderLayout.BEFORE_FIRST_LINE);
        JToolBar viewToolBar = getMenuManager().getToolBar(MenuManager.VIEW_TOOL_BAR);
        viewToolBar.setOrientation(JToolBar.VERTICAL);
        viewToolBar.setRollover(true);
        contentPane.add(viewToolBar, BorderLayout.WEST);

        JMenuBar menu = getMenuManager().getMenu(Environment.getStandAlone()
                ? (Environment.isMac() ? MenuManager.MAC_STANDARD_MENU : MenuManager.STANDARD_MENU)
                : MenuManager.SERVER_STANDARD_MENU);

        if (!Environment.isMac()) {
            ((JComponent) menu).setBorder(BorderFactory.createEmptyBorder());
            JMenuItem logo = (JMenuItem) menu.getComponent(0);
            logo.setBorder(BorderFactory.createEmptyBorder());
            logo.setMaximumSize(new Dimension(124, 52));
            logo.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
        }
        ((JFrame) container).setJMenuBar(menu);
        projectListMenu = (JMenu) menu.getComponent(Environment.isMac() ? 5 : 6);
    }

    //accelerators
    addCtrlAccel(KeyEvent.VK_G, ACTION_GOTO, null);
    addCtrlAccel(KeyEvent.VK_L, ACTION_GOTO, null);
    addCtrlAccel(KeyEvent.VK_F, ACTION_FIND, null);
    addCtrlAccel(KeyEvent.VK_Z, ACTION_UNDO, null); //- Sanhita
    addCtrlAccel(KeyEvent.VK_Y, ACTION_REDO, null);
    addCtrlAccel(KeyEvent.VK_N, ACTION_NEW_PROJECT, null);
    addCtrlAccel(KeyEvent.VK_O, ACTION_OPEN_PROJECT, null);
    addCtrlAccel(KeyEvent.VK_S, ACTION_SAVE_PROJECT, null);
    addCtrlAccel(KeyEvent.VK_P, ACTION_PRINT, null); //-Sanhita
    addCtrlAccel(KeyEvent.VK_I, ACTION_INSERT_TASK, null);
    addCtrlAccel(KeyEvent.VK_PERIOD, ACTION_INDENT, null);
    addCtrlAccel(KeyEvent.VK_COMMA, ACTION_OUTDENT, null);
    addCtrlAccel(KeyEvent.VK_PLUS, ACTION_EXPAND, new ExpandAction());
    addCtrlAccel(KeyEvent.VK_ADD, ACTION_EXPAND, new ExpandAction());
    addCtrlAccel(KeyEvent.VK_EQUALS, ACTION_EXPAND, new ExpandAction());
    addCtrlAccel(KeyEvent.VK_MINUS, ACTION_COLLAPSE, new CollapseAction());
    addCtrlAccel(KeyEvent.VK_SUBTRACT, ACTION_COLLAPSE, new CollapseAction());

    // To force a recalculation. This normally shouldn't be needed.
    addCtrlAccel(KeyEvent.VK_R, ACTION_RECALCULATE, new RecalculateAction());
}

From source file:org.forester.archaeopteryx.TreePanel.java

final private static boolean plusPressed(final int key_code) {
    return ((key_code == KeyEvent.VK_ADD) || (key_code == KeyEvent.VK_PLUS) || (key_code == KeyEvent.VK_EQUALS)
            || (key_code == KeyEvent.VK_SEMICOLON) || (key_code == KeyEvent.VK_1));
}

From source file:org.eclipse.jubula.client.ui.rcp.constants.InputCodeHelper.java

/**
 * private constructor//from  w  w  w  .  ja  v  a  2s . com
 *
 */
private InputCodeHelper() {

    m_modifier[0] = InputEvent.CTRL_DOWN_MASK;
    m_modifier[1] = InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK;
    m_modifier[2] = InputEvent.CTRL_DOWN_MASK | InputEvent.ALT_DOWN_MASK;
    m_modifier[3] = InputEvent.ALT_DOWN_MASK;
    m_modifier[4] = InputEvent.ALT_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK;
    m_modifier[5] = 0; // no modifier pressed

    List<UserInput> inputList = new ArrayList<UserInput>();
    List<String> inputStringList = new ArrayList<String>();
    for (int i = KeyEvent.VK_0; i <= KeyEvent.VK_9; i++) {
        inputList.add(new UserInput(i, InputConstants.TYPE_KEY_PRESS));
        inputStringList.add(KeyEvent.getKeyText(i));
    }
    for (int i = KeyEvent.VK_A; i <= KeyEvent.VK_Z; i++) {
        inputList.add(new UserInput(i, InputConstants.TYPE_KEY_PRESS));
        inputStringList.add(KeyEvent.getKeyText(i));
    }
    for (int i = KeyEvent.VK_NUMPAD0; i <= KeyEvent.VK_ADD; i++) {
        inputList.add(new UserInput(i, InputConstants.TYPE_KEY_PRESS));
        inputStringList.add(KeyEvent.getKeyText(i));
    }
    for (int i = KeyEvent.VK_SUBTRACT; i <= KeyEvent.VK_DIVIDE; i++) {
        inputList.add(new UserInput(i, InputConstants.TYPE_KEY_PRESS));
        inputStringList.add(KeyEvent.getKeyText(i));
    }
    for (int i = KeyEvent.VK_F1; i <= KeyEvent.VK_F12; i++) {
        inputList.add(new UserInput(i, InputConstants.TYPE_KEY_PRESS));
        inputStringList.add(KeyEvent.getKeyText(i));
    }

    m_modifierString = new String[m_modifier.length];
    for (int i = 0; i < m_modifier.length; i++) {
        m_modifierString[i] = InputEvent.getModifiersExText(m_modifier[i]);
    }

    m_keys = inputList.toArray(new UserInput[inputList.size()]);
    m_keyStrings = inputStringList.toArray(new String[inputStringList.size()]);

    inputList.add(new UserInput(InputConstants.MOUSE_BUTTON_LEFT, InputConstants.TYPE_MOUSE_CLICK));
    inputList.add(new UserInput(InputConstants.MOUSE_BUTTON_MIDDLE, InputConstants.TYPE_MOUSE_CLICK));
    inputList.add(new UserInput(InputConstants.MOUSE_BUTTON_RIGHT, InputConstants.TYPE_MOUSE_CLICK));

    inputStringList.add(Messages.ObjectMappingPreferencePageMouseButton1);
    inputStringList.add(Messages.ObjectMappingPreferencePageMouseButton2);
    inputStringList.add(Messages.ObjectMappingPreferencePageMouseButton3);

    m_inputs = inputList.toArray(new UserInput[inputList.size()]);
    m_inputStrings = inputStringList.toArray(new String[inputStringList.size()]);
}

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  ww .ja v  a2s .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:uk.ac.kcl.texthunter.core.AnnotationEditor.java

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

    modeChangeButtonGroup = new javax.swing.ButtonGroup();
    contextChangeButtonGroup = new javax.swing.ButtonGroup();
    xmlOutPutButtonGroup = new javax.swing.ButtonGroup();
    fullDocsOrContextOnlyButtonGroup = new javax.swing.ButtonGroup();
    xValTypeButtonGroup = new javax.swing.ButtonGroup();
    getAnnotationsButtonGroup = new javax.swing.ButtonGroup();
    xmlOrTableButtonGroup = new javax.swing.ButtonGroup();
    GATEorKnowtatorbuttonGroup = new javax.swing.ButtonGroup();
    DBConnectjDialog = new javax.swing.JDialog();
    jPanel1 = new javax.swing.JPanel();
    jdbcConnectionTextField = new javax.swing.JTextField();
    testDBConnectionButton = new javax.swing.JButton();
    databasePasswordField = new javax.swing.JPasswordField();
    databaseUserNameTextField = new javax.swing.JTextField();
    integratedSecurityCheckBox = new javax.swing.JCheckBox();
    longRunningProcessDialog = new javax.swing.JDialog();
    jPanel3 = new javax.swing.JPanel();
    longRunningProcessProgressBar = new javax.swing.JProgressBar();
    cancelButton = new javax.swing.JButton();
    jScrollPane5 = new javax.swing.JScrollPane();
    longRunningProcessInfoTextPane = new javax.swing.JTextPane();
    iAAbuttonGroup = new javax.swing.ButtonGroup();
    textHunterJTabbedPane = new javax.swing.JTabbedPane();
    createNewProjectJPanel = new javax.swing.JPanel();
    createNewProjectButton = new javax.swing.JButton();
    newProjectJTextField = new javax.swing.JTextField();
    connectToExternalDatabaseCheckBox = new javax.swing.JCheckBox();
    loadExistingProjectJPanel = new javax.swing.JPanel();
    loadProjectJFileChooser = new javax.swing.JFileChooser();
    loadProjectButton = new javax.swing.JButton();
    connectToDBJPanel = new javax.swing.JPanel();
    jScrollPane6 = new javax.swing.JScrollPane();
    projectSummaryTextPane = new javax.swing.JTextPane();
    specifyKeywordsJPanel = new javax.swing.JPanel();
    jScrollPane10 = new javax.swing.JScrollPane();
    japeKeyPhraseTextArea = new javax.swing.JTextArea();
    jScrollPane11 = new javax.swing.JScrollPane();
    japeOtherPhraseTextArea = new javax.swing.JTextArea();
    HunterJPanel = new javax.swing.JPanel();
    HunterDirJFileChooser = new javax.swing.JFileChooser();
    launchHunterTableButton = new javax.swing.JButton();
    setUpDataForAnnotationJPanel = new javax.swing.JPanel();
    jScrollPane3 = new javax.swing.JScrollPane();
    tab1SQLEditorPane = new javax.swing.JEditorPane();
    getAnnotationsButton = new javax.swing.JButton();
    modelSeedRadioButton = new javax.swing.JRadioButton();
    goldStandardRadioButton = new javax.swing.JRadioButton();
    activeLearningRadioButton = new javax.swing.JRadioButton();
    reviewTrainingRadioButton = new javax.swing.JRadioButton();
    getAnnotationsForIAA = new javax.swing.JRadioButton();
    annotateJPanel = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    annotationPane = new javax.swing.JEditorPane();
    brcIDField = new javax.swing.JTextField();
    cnDocIDField = new javax.swing.JTextField();
    srcTableField = new javax.swing.JTextField();
    probEditorPane = new javax.swing.JEditorPane();
    keyObsEditorPane = new javax.swing.JEditorPane();
    numpad1Action = new Numpad1Action("positive", new Integer(KeyEvent.VK_NUMPAD1));
    numpad0Action = new Numpad0Action("negative", new Integer(KeyEvent.VK_NUMPAD0));
    numpad2Action = new Numpad2Action("unknown", new Integer(KeyEvent.VK_NUMPAD2));
    numpad3Action = new Numpad3Action("form", new Integer(KeyEvent.VK_NUMPAD3));
    numpadPlusAction = new NumpadPlusAction("contextChange", new Integer(KeyEvent.VK_ADD));
    keyAltToPrevRecordAction = new KeyAltToPrevRecordAction("alt", new Integer(KeyEvent.VK_ALT));
    keyTabToCommentsAction = new KeyTabToCommentsAction("tab", new Integer(KeyEvent.VK_TAB));

    keyObsEditorPane.getActionMap().put("numpadPlus", numpadPlusAction);
    keyObsEditorPane.getActionMap().put("numpad1", numpad1Action);
    keyObsEditorPane.getActionMap().put("numpad0", numpad0Action);
    keyObsEditorPane.getActionMap().put("numpad2", numpad2Action);
    keyObsEditorPane.getActionMap().put("numpad3", numpad3Action);
    keyObsEditorPane.getActionMap().put("tab", keyTabToCommentsAction);
    keyObsEditorPane.getActionMap().put("alt", keyAltToPrevRecordAction);

    keyObsEditorPane.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, 0), "numpadPlus");
    keyObsEditorPane.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD1, 0), "numpad1");
    keyObsEditorPane.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD0, 0), "numpad0");
    keyObsEditorPane.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD2, 0), "numpad2");
    keyObsEditorPane.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD3, 0), "numpad3");
    keyObsEditorPane.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "tab");
    keyObsEditorPane.getInputMap()
            .put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, java.awt.event.InputEvent.SHIFT_DOWN_MASK), "alt");
    MLObsEditorPane = new javax.swing.JEditorPane();
    useNumericKeysCheckBox = new javax.swing.JCheckBox();
    keyObsContextCat = new javax.swing.JTextField();
    commentsEditorPane = new javax.swing.JEditorPane();
    commentsAltToKeyAction = new CommentsAltToKeyAction("comments to key", new Integer(KeyEvent.VK_ALT));
    commentsTabToNextRecordAction = new CommentsTabToNextRecordAction("comments to next record",
            new Integer(KeyEvent.VK_TAB));
    commentsEditorPane.getActionMap().put("tab", commentsTabToNextRecordAction);
    commentsEditorPane.getActionMap().put("alt", commentsAltToKeyAction);
    commentsEditorPane.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "tab");
    commentsEditorPane.getInputMap()
            .put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, java.awt.event.InputEvent.SHIFT_DOWN_MASK), "alt");
    nextRecordButton = new javax.swing.JButton();
    prevRecordButton = new javax.swing.JButton();
    jumpToRecordButton = new javax.swing.JButton();
    firstRecordButton = new javax.swing.JButton();
    currentRecordNumberTextField = new javax.swing.JTextField();
    totalRecordsInResultSetTextField = new javax.swing.JTextField();
    jLabel2 = new javax.swing.JLabel();
    hextextNextContext = new javax.swing.JButton();
    annotator1RadioButton = new javax.swing.JRadioButton();
    annotator2RadioButton = new javax.swing.JRadioButton();
    viewFullDocJPanel = new javax.swing.JPanel();
    jScrollPane7 = new javax.swing.JScrollPane();
    fullTextPane = new javax.swing.JEditorPane();
    svmConsoleJPanel = new javax.swing.JPanel();
    jScrollPane8 = new javax.swing.JScrollPane();
    tab2SQLEditorPane = new javax.swing.JEditorPane();
    crossValidateButton = new javax.swing.JButton();
    resultsDirTextField = new javax.swing.JTextField();
    foldNoTextField = new javax.swing.JTextField();
    trainAllButton = new javax.swing.JButton();
    applyAllButton = new javax.swing.JButton();
    xValQADRadioButton = new javax.swing.JRadioButton();
    xValSACRadioButton = new javax.swing.JRadioButton();
    resumePreviousCheckBox = new javax.swing.JCheckBox();
    removePrevCheckBox = new javax.swing.JCheckBox();
    tableToWorkOnjTextField = new javax.swing.JTextField();
    jLabel3 = new javax.swing.JLabel();
    outputConsoleJPanel = new javax.swing.JPanel();
    exportResultsButton = new javax.swing.JButton();
    withKeyAnnotationsRadioButton = new javax.swing.JRadioButton();
    noKeyAnnotationsRadioButton = new javax.swing.JRadioButton();
    outputContextOnlyRadioButton = new javax.swing.JRadioButton();
    outputFullDocumentsRadioButton = new javax.swing.JRadioButton();
    outputFileChooser = new javax.swing.JFileChooser();
    XMLradioButton = new javax.swing.JRadioButton();
    tableRadioButton = new javax.swing.JRadioButton();
    gateXMLjRadioButton = new javax.swing.JRadioButton();
    knowtatorXMLjRadioButton = new javax.swing.JRadioButton();
    licenceJPanel = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();
    jScrollPane12 = new javax.swing.JScrollPane();
    jTextPane1 = new javax.swing.JTextPane();
    quitButton = new javax.swing.JButton();
    expressModeRadioButton = new javax.swing.JRadioButton();
    advancedModeRadioButton = new javax.swing.JRadioButton();
    svmProgressBar = new javax.swing.JProgressBar();
    threadCountTextField = new javax.swing.JTextField();
    saveProjectJButton = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    targetTableTextField = new javax.swing.JTextField();
    jScrollPane2 = new javax.swing.JScrollPane();
    infoTextPane = new javax.swing.JTextPane();

    DBConnectjDialog.setMinimumSize(new java.awt.Dimension(605, 257));
    DBConnectjDialog.setModal(true);
    DBConnectjDialog.setName("DB connection"); // NOI18N
    DBConnectjDialog.setResizable(false);
    DBConnectjDialog.setType(java.awt.Window.Type.POPUP);

    jdbcConnectionTextField.setText("jdbc:jtds:sqlserver://<ipaddress>:<port>");
    jdbcConnectionTextField.setBorder(javax.swing.BorderFactory
            .createTitledBorder(javax.swing.BorderFactory.createTitledBorder(""), "JDBC Connection String"));

    testDBConnectionButton.setText("Test database connection");
    testDBConnectionButton.setActionCommand("connectToDatabase");
    testDBConnectionButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            testDBConnectionButtonActionPerformed(evt);
        }
    });

    databasePasswordField.setBorder(javax.swing.BorderFactory.createTitledBorder("Password"));
    databasePasswordField.setEnabled(false);

    databaseUserNameTextField.setBorder(javax.swing.BorderFactory
            .createTitledBorder(javax.swing.BorderFactory.createTitledBorder(""), "User Name"));
    databaseUserNameTextField.setEnabled(false);

    integratedSecurityCheckBox.setSelected(true);
    integratedSecurityCheckBox.setText("Use Integrated Security?");
    integratedSecurityCheckBox.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            integratedSecurityCheckBoxActionPerformed(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().addContainerGap()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(integratedSecurityCheckBox)
                            .addComponent(databaseUserNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    181, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(databasePasswordField, javax.swing.GroupLayout.PREFERRED_SIZE, 186,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jdbcConnectionTextField,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 373,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap())
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(testDBConnectionButton)
                                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(jdbcConnectionTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 84,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(testDBConnectionButton)
                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createSequentialGroup().addComponent(integratedSecurityCheckBox)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(databaseUserNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 70,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(databasePasswordField, javax.swing.GroupLayout.PREFERRED_SIZE, 71,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 0, Short.MAX_VALUE)))));

    javax.swing.GroupLayout DBConnectjDialogLayout = new javax.swing.GroupLayout(
            DBConnectjDialog.getContentPane());
    DBConnectjDialog.getContentPane().setLayout(DBConnectjDialogLayout);
    DBConnectjDialogLayout.setHorizontalGroup(DBConnectjDialogLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 605, Short.MAX_VALUE)
            .addGroup(DBConnectjDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            DBConnectjDialogLayout.createSequentialGroup().addContainerGap()
                                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addContainerGap())));
    DBConnectjDialogLayout.setVerticalGroup(
            DBConnectjDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGap(0, 210, Short.MAX_VALUE)
                    .addGroup(DBConnectjDialogLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(DBConnectjDialogLayout.createSequentialGroup().addContainerGap()
                                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addContainerGap())));

    longRunningProcessDialog.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
    longRunningProcessDialog.setMinimumSize(new java.awt.Dimension(605, 257));
    longRunningProcessDialog.setModal(true);
    longRunningProcessDialog.setName("DB connection"); // NOI18N
    longRunningProcessDialog.setResizable(false);
    longRunningProcessDialog.setType(java.awt.Window.Type.POPUP);

    cancelButton.setText("Cancel");
    cancelButton.setEnabled(false);
    cancelButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cancelButtonActionPerformed(evt);
        }
    });

    jScrollPane5.setViewportView(longRunningProcessInfoTextPane);

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jScrollPane5)
                            .addComponent(longRunningProcessProgressBar,
                                    javax.swing.GroupLayout.Alignment.LEADING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, 565, Short.MAX_VALUE)
                            .addComponent(cancelButton, javax.swing.GroupLayout.Alignment.LEADING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addContainerGap()));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 94, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(longRunningProcessProgressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 46,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18).addComponent(cancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 44,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));

    javax.swing.GroupLayout longRunningProcessDialogLayout = new javax.swing.GroupLayout(
            longRunningProcessDialog.getContentPane());
    longRunningProcessDialog.getContentPane().setLayout(longRunningProcessDialogLayout);
    longRunningProcessDialogLayout
            .setHorizontalGroup(
                    longRunningProcessDialogLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(longRunningProcessDialogLayout.createSequentialGroup().addContainerGap()
                                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addContainerGap()));
    longRunningProcessDialogLayout.setVerticalGroup(
            longRunningProcessDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            longRunningProcessDialogLayout.createSequentialGroup().addContainerGap()
                                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("v1.0.0");
    getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

    textHunterJTabbedPane.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            textHunterJTabbedPaneStateChanged(evt);
        }
    });

    createNewProjectButton.setText("Create new project!");
    createNewProjectButton.setActionCommand("createNewProject");
    createNewProjectButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            createNewProjectButtonActionPerformed(evt);
        }
    });

    newProjectJTextField.setToolTipText("");
    newProjectJTextField.setBorder(javax.swing.BorderFactory.createTitledBorder("New Project name"));

    connectToExternalDatabaseCheckBox.setText("Project uses external database?");
    connectToExternalDatabaseCheckBox.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            connectToExternalDatabaseCheckBoxActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout createNewProjectJPanelLayout = new javax.swing.GroupLayout(createNewProjectJPanel);
    createNewProjectJPanel.setLayout(createNewProjectJPanelLayout);
    createNewProjectJPanelLayout.setHorizontalGroup(createNewProjectJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(createNewProjectJPanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(createNewProjectJPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(newProjectJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 418,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(connectToExternalDatabaseCheckBox)
                            .addComponent(createNewProjectButton))
                    .addContainerGap(707, Short.MAX_VALUE)));
    createNewProjectJPanelLayout.setVerticalGroup(createNewProjectJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(createNewProjectJPanelLayout.createSequentialGroup().addContainerGap()
                    .addComponent(newProjectJTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 118,
                            Short.MAX_VALUE)
                    .addGap(83, 83, 83).addComponent(connectToExternalDatabaseCheckBox).addGap(97, 97, 97)
                    .addComponent(createNewProjectButton).addGap(370, 370, 370)));

    textHunterJTabbedPane.addTab("Create new project", createNewProjectJPanel);

    loadProjectJFileChooser.setControlButtonsAreShown(false);
    loadProjectJFileChooser.setCurrentDirectory(new File(relFilePath + File.separator + "projects"));
    loadProjectJFileChooser.setDialogTitle("");
    loadProjectJFileChooser.setFileSelectionMode(javax.swing.JFileChooser.DIRECTORIES_ONLY);
    loadProjectJFileChooser.setRequestFocusEnabled(false);
    loadProjectJFileChooser.setFileFilter(new DirectoryFilter());

    loadProjectButton.setText("Load Project");
    loadProjectButton.setActionCommand("loadProject");
    loadProjectButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            loadProjectButtonActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout loadExistingProjectJPanelLayout = new javax.swing.GroupLayout(
            loadExistingProjectJPanel);
    loadExistingProjectJPanel.setLayout(loadExistingProjectJPanelLayout);
    loadExistingProjectJPanelLayout.setHorizontalGroup(
            loadExistingProjectJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(loadExistingProjectJPanelLayout.createSequentialGroup().addContainerGap()
                            .addGroup(loadExistingProjectJPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(loadProjectButton).addComponent(loadProjectJFileChooser,
                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addContainerGap(566, Short.MAX_VALUE)));
    loadExistingProjectJPanelLayout.setVerticalGroup(loadExistingProjectJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(loadExistingProjectJPanelLayout.createSequentialGroup().addContainerGap()
                    .addComponent(loadProjectJFileChooser, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(loadProjectButton).addContainerGap(308, Short.MAX_VALUE)));

    textHunterJTabbedPane.addTab("Load existing project", loadExistingProjectJPanel);

    jScrollPane6.setViewportView(projectSummaryTextPane);

    javax.swing.GroupLayout connectToDBJPanelLayout = new javax.swing.GroupLayout(connectToDBJPanel);
    connectToDBJPanel.setLayout(connectToDBJPanelLayout);
    connectToDBJPanelLayout.setHorizontalGroup(connectToDBJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(connectToDBJPanelLayout.createSequentialGroup().addContainerGap()
                    .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 1115, Short.MAX_VALUE)
                    .addContainerGap()));
    connectToDBJPanelLayout.setVerticalGroup(connectToDBJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(connectToDBJPanelLayout.createSequentialGroup().addContainerGap()
                    .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 703, Short.MAX_VALUE)
                    .addContainerGap()));

    textHunterJTabbedPane.addTab("Project Overview", connectToDBJPanel);

    specifyKeywordsJPanel.setEnabled(false);
    specifyKeywordsJPanel.setFocusable(false);

    japeKeyPhraseTextArea.setColumns(20);
    japeKeyPhraseTextArea.setRows(5);
    japeKeyPhraseTextArea.setBorder(javax.swing.BorderFactory.createTitledBorder("Key Phrases/Words"));
    jScrollPane10.setViewportView(japeKeyPhraseTextArea);

    japeOtherPhraseTextArea.setColumns(20);
    japeOtherPhraseTextArea.setRows(5);
    japeOtherPhraseTextArea.setBorder(javax.swing.BorderFactory.createTitledBorder("Other Phrases/Words"));
    jScrollPane11.setViewportView(japeOtherPhraseTextArea);

    javax.swing.GroupLayout specifyKeywordsJPanelLayout = new javax.swing.GroupLayout(specifyKeywordsJPanel);
    specifyKeywordsJPanel.setLayout(specifyKeywordsJPanelLayout);
    specifyKeywordsJPanelLayout.setHorizontalGroup(
            specifyKeywordsJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(specifyKeywordsJPanelLayout.createSequentialGroup().addContainerGap()
                            .addGroup(specifyKeywordsJPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jScrollPane10, javax.swing.GroupLayout.DEFAULT_SIZE, 788,
                                            Short.MAX_VALUE)
                                    .addComponent(jScrollPane11))
                            .addContainerGap(337, Short.MAX_VALUE)));
    specifyKeywordsJPanelLayout.setVerticalGroup(
            specifyKeywordsJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(specifyKeywordsJPanelLayout.createSequentialGroup().addContainerGap()
                            .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, 264,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 226,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(218, Short.MAX_VALUE)));

    textHunterJTabbedPane.addTab("Specify Keywords", specifyKeywordsJPanel);

    HunterDirJFileChooser.setControlButtonsAreShown(false);
    HunterDirJFileChooser.setCurrentDirectory(new File(relFilePath + File.separator + "projects"));
    HunterDirJFileChooser.setFileSelectionMode(javax.swing.JFileChooser.DIRECTORIES_ONLY);

    launchHunterTableButton.setText("Launch Context Hunter");
    launchHunterTableButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            launchHunterTableButtonActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout HunterJPanelLayout = new javax.swing.GroupLayout(HunterJPanel);
    HunterJPanel.setLayout(HunterJPanelLayout);
    HunterJPanelLayout.setHorizontalGroup(HunterJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(HunterJPanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(HunterJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(launchHunterTableButton).addComponent(HunterDirJFileChooser,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(566, Short.MAX_VALUE)));
    HunterJPanelLayout.setVerticalGroup(HunterJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(HunterJPanelLayout.createSequentialGroup()
                    .addComponent(HunterDirJFileChooser, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(launchHunterTableButton).addGap(0, 319, Short.MAX_VALUE)));

    textHunterJTabbedPane.addTab("Hunter Launcher", HunterJPanel);

    tab1SQLEditorPane.setBorder(javax.swing.BorderFactory.createTitledBorder("SQL"));
    tab1SQLEditorPane.setText("SELECT  t1.* \n" + ",t2.TextContent \n" + "FROM " + targetTableName + " t1\n"
            + "join GateDB_Cris.dbo.gate t2 on t1.cn_doc_id = t2.CN_Doc_ID and t1.src_table = t2.src_table and t1.src_col = t2.src_col\n"
            + "order by t1.[id]");
    tab1SQLEditorPane.setEnabled(false);
    tab1SQLEditorPane.setMinimumSize(new java.awt.Dimension(5, 5));
    tab1SQLEditorPane.setPreferredSize(new java.awt.Dimension(5, 5));
    tab1SQLEditorPane.addFocusListener(new java.awt.event.FocusAdapter() {
        public void focusLost(java.awt.event.FocusEvent evt) {
            tab1SQLEditorPaneFocusLost(evt);
        }
    });
    tab1SQLEditorPane.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyTyped(java.awt.event.KeyEvent evt) {
            tab1SQLEditorPaneKeyTyped(evt);
        }
    });
    jScrollPane3.setViewportView(tab1SQLEditorPane);

    getAnnotationsButton.setText("Get Annotations");
    getAnnotationsButton.setActionCommand("getAnnotations");
    getAnnotationsButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            getAnnotationsButtonActionPerformed(evt);
        }
    });

    getAnnotationsButtonGroup.add(modelSeedRadioButton);
    modelSeedRadioButton.setText("Create model seed data");
    modelSeedRadioButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            modelSeedRadioButtonActionPerformed(evt);
        }
    });

    getAnnotationsButtonGroup.add(goldStandardRadioButton);
    goldStandardRadioButton.setSelected(true);
    goldStandardRadioButton.setText("Create gold standard");
    goldStandardRadioButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            goldStandardRadioButtonActionPerformed(evt);
        }
    });

    getAnnotationsButtonGroup.add(activeLearningRadioButton);
    activeLearningRadioButton.setText("Create active learning data");
    activeLearningRadioButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            activeLearningRadioButtonActionPerformed(evt);
        }
    });

    getAnnotationsButtonGroup.add(reviewTrainingRadioButton);
    reviewTrainingRadioButton.setText("Review all training data");
    reviewTrainingRadioButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            reviewTrainingRadioButtonActionPerformed(evt);
        }
    });

    getAnnotationsButtonGroup.add(getAnnotationsForIAA);
    getAnnotationsForIAA.setText("Get Annotations for IAA");

    javax.swing.GroupLayout setUpDataForAnnotationJPanelLayout = new javax.swing.GroupLayout(
            setUpDataForAnnotationJPanel);
    setUpDataForAnnotationJPanel.setLayout(setUpDataForAnnotationJPanelLayout);
    setUpDataForAnnotationJPanelLayout.setHorizontalGroup(setUpDataForAnnotationJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, setUpDataForAnnotationJPanelLayout
                    .createSequentialGroup()
                    .addGroup(setUpDataForAnnotationJPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(setUpDataForAnnotationJPanelLayout.createSequentialGroup()
                                    .addContainerGap().addComponent(getAnnotationsButton))
                            .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 597,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 30, Short.MAX_VALUE)
                    .addGroup(setUpDataForAnnotationJPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(activeLearningRadioButton).addComponent(goldStandardRadioButton)
                            .addComponent(modelSeedRadioButton).addComponent(reviewTrainingRadioButton)
                            .addComponent(getAnnotationsForIAA))
                    .addGap(351, 351, 351)));
    setUpDataForAnnotationJPanelLayout.setVerticalGroup(setUpDataForAnnotationJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(setUpDataForAnnotationJPanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(setUpDataForAnnotationJPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(getAnnotationsButton)
                            .addComponent(goldStandardRadioButton, javax.swing.GroupLayout.Alignment.TRAILING))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(modelSeedRadioButton)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(activeLearningRadioButton)
                    .addGroup(setUpDataForAnnotationJPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(setUpDataForAnnotationJPanelLayout.createSequentialGroup().addGap(6, 6, 6)
                                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 231,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(setUpDataForAnnotationJPanelLayout.createSequentialGroup()
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(reviewTrainingRadioButton)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(getAnnotationsForIAA)))
                    .addContainerGap(406, Short.MAX_VALUE)));

    textHunterJTabbedPane.addTab("Set Up Data For Annotation", setUpDataForAnnotationJPanel);

    jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    jScrollPane1.setPreferredSize(new java.awt.Dimension(0, 0));

    annotationPane.setEditable(false);
    annotationPane.setBorder(javax.swing.BorderFactory.createTitledBorder("Annotation"));
    annotationPane.setContentType("text/html"); // NOI18N
    annotationPane.setFocusable(false);
    annotationPane.setMinimumSize(new java.awt.Dimension(90, 40));
    annotationPane.setPreferredSize(new java.awt.Dimension(90, 40));
    jScrollPane1.setViewportView(annotationPane);

    brcIDField.setEditable(false);
    brcIDField.setBorder(javax.swing.BorderFactory.createTitledBorder("BrcId"));
    brcIDField.setFocusable(false);

    cnDocIDField.setEditable(false);
    cnDocIDField.setBorder(javax.swing.BorderFactory.createTitledBorder("CN_Doc_ID"));
    cnDocIDField.setFocusable(false);
    cnDocIDField.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cnDocIDFieldActionPerformed(evt);
        }
    });

    srcTableField.setEditable(false);
    srcTableField.setBorder(javax.swing.BorderFactory.createTitledBorder("src_table"));
    srcTableField.setFocusable(false);

    probEditorPane.setEditable(false);
    probEditorPane.setBorder(javax.swing.BorderFactory.createTitledBorder("Probability"));
    probEditorPane.setFocusable(false);

    keyObsEditorPane.setBorder(javax.swing.BorderFactory.createTitledBorder("Key Observation"));
    keyObsEditorPane.addFocusListener(new java.awt.event.FocusAdapter() {
        public void focusGained(java.awt.event.FocusEvent evt) {
            keyObsEditorPaneFocusGained(evt);
        }
    });
    keyObsEditorPane.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent evt) {
            keyObsEditorPaneKeyReleased(evt);
        }

        public void keyTyped(java.awt.event.KeyEvent evt) {
            keyObsEditorPaneKeyTyped(evt);
        }
    });

    MLObsEditorPane.setEditable(false);
    MLObsEditorPane.setBorder(javax.swing.BorderFactory.createTitledBorder("ML Observation"));
    MLObsEditorPane.setFocusable(false);

    useNumericKeysCheckBox.setSelected(true);
    useNumericKeysCheckBox.setText("Use numeric\n keys for\n classes");

    keyObsContextCat.setEditable(false);
    keyObsContextCat.setBorder(javax.swing.BorderFactory.createTitledBorder("Context"));

    commentsEditorPane.setBorder(javax.swing.BorderFactory.createTitledBorder("Comments"));

    nextRecordButton.setText("Next Record (tab)");
    nextRecordButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            nextRecordButtonActionPerformed(evt);
        }
    });

    prevRecordButton.setText("Previous Record\n(shift + tab)");
    prevRecordButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            prevRecordButtonActionPerformed(evt);
        }
    });

    jumpToRecordButton.setText("Jump to Record");
    jumpToRecordButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jumpToRecordButtonActionPerformed(evt);
        }
    });

    firstRecordButton.setText("First Record");
    firstRecordButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            firstRecordButtonActionPerformed(evt);
        }
    });

    totalRecordsInResultSetTextField.setEditable(false);
    totalRecordsInResultSetTextField.setText("0");

    jLabel2.setText("of");

    hextextNextContext.setText("nextContext");
    hextextNextContext.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            hextextNextContextActionPerformed(evt);
        }
    });

    iAAbuttonGroup.add(annotator1RadioButton);
    annotator1RadioButton.setSelected(true);
    annotator1RadioButton.setText("Annotator 1");
    annotator1RadioButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            annotator1RadioButtonActionPerformed(evt);
        }
    });

    iAAbuttonGroup.add(annotator2RadioButton);
    annotator2RadioButton.setText("Annotator 2");
    annotator2RadioButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            annotator2RadioButtonActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout annotateJPanelLayout = new javax.swing.GroupLayout(annotateJPanel);
    annotateJPanel.setLayout(annotateJPanelLayout);
    annotateJPanelLayout.setHorizontalGroup(annotateJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(annotateJPanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(annotateJPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(annotateJPanelLayout.createSequentialGroup()
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addContainerGap())
                            .addGroup(annotateJPanelLayout.createSequentialGroup()
                                    .addGroup(annotateJPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(brcIDField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    169, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(cnDocIDField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    169, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(srcTableField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    169, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGap(18, 18, 18)
                                    .addGroup(annotateJPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(MLObsEditorPane,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(probEditorPane,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(annotateJPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(keyObsContextCat,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 118,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(keyObsEditorPane,
                                                    javax.swing.GroupLayout.Alignment.TRAILING,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(commentsEditorPane, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            230, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addGroup(annotateJPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(annotateJPanelLayout.createSequentialGroup()
                                                    .addGroup(annotateJPanelLayout
                                                            .createParallelGroup(
                                                                    javax.swing.GroupLayout.Alignment.LEADING)
                                                            .addComponent(useNumericKeysCheckBox)
                                                            .addComponent(prevRecordButton))
                                                    .addContainerGap(277, Short.MAX_VALUE))
                                            .addGroup(annotateJPanelLayout.createSequentialGroup()
                                                    .addGroup(annotateJPanelLayout
                                                            .createParallelGroup(
                                                                    javax.swing.GroupLayout.Alignment.LEADING)
                                                            .addGroup(
                                                                    annotateJPanelLayout.createSequentialGroup()
                                                                            .addComponent(nextRecordButton)
                                                                            .addGap(95, 95, 95)
                                                                            .addComponent(hextextNextContext))
                                                            .addGroup(annotateJPanelLayout
                                                                    .createSequentialGroup()
                                                                    .addComponent(firstRecordButton)
                                                                    .addPreferredGap(
                                                                            javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                                    .addComponent(jumpToRecordButton)
                                                                    .addPreferredGap(
                                                                            javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                                    .addComponent(currentRecordNumberTextField,
                                                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                            40,
                                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                    .addPreferredGap(
                                                                            javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                    .addComponent(jLabel2,
                                                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                            30,
                                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                    .addPreferredGap(
                                                                            javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                    .addComponent(
                                                                            totalRecordsInResultSetTextField,
                                                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                            99,
                                                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                                                            .addGroup(annotateJPanelLayout
                                                                    .createSequentialGroup()
                                                                    .addComponent(annotator1RadioButton)
                                                                    .addPreferredGap(
                                                                            javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                                    .addComponent(annotator2RadioButton)))
                                                    .addGap(0, 53, Short.MAX_VALUE)))))));
    annotateJPanelLayout.setVerticalGroup(annotateJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(annotateJPanelLayout.createSequentialGroup().addContainerGap()
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 447,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(annotateJPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(annotateJPanelLayout.createSequentialGroup().addGroup(annotateJPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(keyObsEditorPane, javax.swing.GroupLayout.PREFERRED_SIZE, 59,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(MLObsEditorPane, javax.swing.GroupLayout.PREFERRED_SIZE, 57,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(brcIDField, javax.swing.GroupLayout.PREFERRED_SIZE, 68,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(annotateJPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(annotateJPanelLayout
                                                    .createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment.TRAILING)
                                                    .addComponent(keyObsContextCat,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 53,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(probEditorPane,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 59,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGroup(annotateJPanelLayout.createSequentialGroup()
                                                    .addGap(6, 6, 6).addComponent(cnDocIDField,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 68,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(srcTableField, javax.swing.GroupLayout.PREFERRED_SIZE, 68,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(annotateJPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, annotateJPanelLayout
                                            .createSequentialGroup().addComponent(useNumericKeysCheckBox)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addGroup(annotateJPanelLayout
                                                    .createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment.BASELINE)
                                                    .addComponent(nextRecordButton)
                                                    .addComponent(hextextNextContext))
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(prevRecordButton)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addGroup(annotateJPanelLayout
                                                    .createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(firstRecordButton)
                                                    .addGroup(annotateJPanelLayout
                                                            .createParallelGroup(
                                                                    javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(currentRecordNumberTextField,
                                                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(totalRecordsInResultSetTextField,
                                                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jLabel2))
                                                    .addComponent(jumpToRecordButton))
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addGroup(annotateJPanelLayout
                                                    .createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment.BASELINE)
                                                    .addComponent(annotator1RadioButton)
                                                    .addComponent(annotator2RadioButton)))
                                    .addComponent(commentsEditorPane, javax.swing.GroupLayout.Alignment.LEADING,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(45, Short.MAX_VALUE)));

    textHunterJTabbedPane.addTab("Annotate", annotateJPanel);

    jScrollPane7.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    jScrollPane7.setPreferredSize(new java.awt.Dimension(0, 0));

    fullTextPane.setEditable(false);
    fullTextPane.setBorder(javax.swing.BorderFactory.createTitledBorder("Full Text"));
    fullTextPane.setContentType("text/html"); // NOI18N
    fullTextPane.setToolTipText("");
    fullTextPane.setFocusable(false);
    fullTextPane.setMinimumSize(new java.awt.Dimension(90, 40));
    jScrollPane7.setViewportView(fullTextPane);

    javax.swing.GroupLayout viewFullDocJPanelLayout = new javax.swing.GroupLayout(viewFullDocJPanel);
    viewFullDocJPanel.setLayout(viewFullDocJPanelLayout);
    viewFullDocJPanelLayout.setHorizontalGroup(viewFullDocJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(viewFullDocJPanelLayout.createSequentialGroup().addContainerGap()
                    .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 1115, Short.MAX_VALUE)
                    .addContainerGap()));
    viewFullDocJPanelLayout.setVerticalGroup(viewFullDocJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(viewFullDocJPanelLayout.createSequentialGroup()
                    .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 714, Short.MAX_VALUE)
                    .addContainerGap()));

    textHunterJTabbedPane.addTab("View Full Doc", viewFullDocJPanel);

    tab2SQLEditorPane.setBorder(javax.swing.BorderFactory.createTitledBorder("SQL"));
    tab2SQLEditorPane
            .setText("SELECT  *\n" + "FROM " + targetTableName + "\n" + "where keyObservation1 is not null");
    tab2SQLEditorPane.setEnabled(false);
    tab2SQLEditorPane.addFocusListener(new java.awt.event.FocusAdapter() {
        public void focusLost(java.awt.event.FocusEvent evt) {
            tab2SQLEditorPaneFocusLost(evt);
        }
    });
    jScrollPane8.setViewportView(tab2SQLEditorPane);

    crossValidateButton.setText("Build Models");
    crossValidateButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            crossValidateButtonActionPerformed(evt);
        }
    });

    resultsDirTextField.setText(
            relFilePath + File.separator + targetTableName + File.separator + "results" + File.separator);
    resultsDirTextField.setBorder(javax.swing.BorderFactory.createTitledBorder("Results Directory Location"));

    foldNoTextField.setText("10");
    foldNoTextField.setBorder(javax.swing.BorderFactory.createTitledBorder("Fold Number"));

    trainAllButton.setText("Train With All Data");
    trainAllButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            trainAllButtonActionPerformed(evt);
        }
    });

    applyAllButton.setText("Apply Best Model to All Instances");
    applyAllButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            applyAllButtonActionPerformed(evt);
        }
    });

    xValTypeButtonGroup.add(xValQADRadioButton);
    xValQADRadioButton.setSelected(true);
    xValQADRadioButton.setText("Quick and Dirty");

    xValTypeButtonGroup.add(xValSACRadioButton);
    xValSACRadioButton.setText("Slow and Clean");

    resumePreviousCheckBox.setText("Resume previous X validation?");
    resumePreviousCheckBox.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            resumePreviousCheckBoxActionPerformed(evt);
        }
    });

    removePrevCheckBox.setText("Remove prev?");

    jLabel3.setText("Table to work on");

    javax.swing.GroupLayout svmConsoleJPanelLayout = new javax.swing.GroupLayout(svmConsoleJPanel);
    svmConsoleJPanel.setLayout(svmConsoleJPanelLayout);
    svmConsoleJPanelLayout.setHorizontalGroup(svmConsoleJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(svmConsoleJPanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(svmConsoleJPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(resultsDirTextField).addComponent(jScrollPane8)
                            .addComponent(foldNoTextField, javax.swing.GroupLayout.Alignment.TRAILING))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 380, Short.MAX_VALUE)
                    .addComponent(crossValidateButton).addGap(18, 18, 18)
                    .addGroup(svmConsoleJPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(resumePreviousCheckBox)
                            .addGroup(svmConsoleJPanelLayout.createSequentialGroup()
                                    .addComponent(xValQADRadioButton)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(xValSACRadioButton)))
                    .addGap(320, 320, 320))
            .addGroup(svmConsoleJPanelLayout.createSequentialGroup().addGroup(svmConsoleJPanelLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(svmConsoleJPanelLayout.createSequentialGroup().addGap(127, 127, 127)
                            .addComponent(trainAllButton))
                    .addGroup(svmConsoleJPanelLayout.createSequentialGroup().addGap(99, 99, 99)
                            .addGroup(svmConsoleJPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(svmConsoleJPanelLayout.createSequentialGroup()
                                            .addComponent(applyAllButton).addGap(11, 11, 11)
                                            .addComponent(removePrevCheckBox))
                                    .addGroup(svmConsoleJPanelLayout.createSequentialGroup()
                                            .addGap(239, 239, 239)
                                            .addComponent(tableToWorkOnjTextField,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 311,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jLabel3)))))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    svmConsoleJPanelLayout.setVerticalGroup(svmConsoleJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(svmConsoleJPanelLayout.createSequentialGroup().addGap(6, 6, 6)
                    .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 152,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(76, 76, 76)
                    .addGroup(svmConsoleJPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(svmConsoleJPanelLayout.createSequentialGroup()
                                    .addComponent(resultsDirTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            72, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(foldNoTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 64,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(36, 36, 36)
                                    .addGroup(svmConsoleJPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addGroup(svmConsoleJPanelLayout.createSequentialGroup()
                                                    .addComponent(trainAllButton)
                                                    .addPreferredGap(
                                                            javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addGroup(svmConsoleJPanelLayout
                                                            .createParallelGroup(
                                                                    javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(applyAllButton)
                                                            .addComponent(removePrevCheckBox))
                                                    .addGap(61, 61, 61))
                                            .addGroup(svmConsoleJPanelLayout
                                                    .createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment.BASELINE)
                                                    .addComponent(tableToWorkOnjTextField,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 32,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(jLabel3))))
                            .addGroup(svmConsoleJPanelLayout.createSequentialGroup().addGap(41, 41, 41)
                                    .addGroup(svmConsoleJPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(crossValidateButton)
                                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                                    svmConsoleJPanelLayout.createSequentialGroup()
                                                            .addComponent(resumePreviousCheckBox)
                                                            .addPreferredGap(
                                                                    javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                            .addGroup(svmConsoleJPanelLayout
                                                                    .createParallelGroup(
                                                                            javax.swing.GroupLayout.Alignment.BASELINE)
                                                                    .addComponent(xValQADRadioButton)
                                                                    .addComponent(xValSACRadioButton))))))
                    .addContainerGap(195, Short.MAX_VALUE)));

    textHunterJTabbedPane.addTab("SVM console", svmConsoleJPanel);

    exportResultsButton.setText("Export Results");
    exportResultsButton.setActionCommand("outputXML");
    exportResultsButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exportResultsButtonActionPerformed(evt);
        }
    });

    xmlOutPutButtonGroup.add(withKeyAnnotationsRadioButton);
    withKeyAnnotationsRadioButton.setSelected(true);
    withKeyAnnotationsRadioButton.setText("With Key Annotations");
    withKeyAnnotationsRadioButton.setEnabled(false);

    xmlOutPutButtonGroup.add(noKeyAnnotationsRadioButton);
    noKeyAnnotationsRadioButton.setText("No Key Annotations");
    noKeyAnnotationsRadioButton.setEnabled(false);

    fullDocsOrContextOnlyButtonGroup.add(outputContextOnlyRadioButton);
    outputContextOnlyRadioButton.setSelected(true);
    outputContextOnlyRadioButton.setText("Context Only");
    outputContextOnlyRadioButton.setEnabled(false);

    fullDocsOrContextOnlyButtonGroup.add(outputFullDocumentsRadioButton);
    outputFullDocumentsRadioButton.setText("Full Documents");
    outputFullDocumentsRadioButton.setEnabled(false);

    outputFileChooser.setControlButtonsAreShown(false);
    outputFileChooser.setFileSelectionMode(javax.swing.JFileChooser.DIRECTORIES_ONLY);

    xmlOrTableButtonGroup.add(XMLradioButton);
    XMLradioButton.setText("XML");
    XMLradioButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            XMLradioButtonActionPerformed(evt);
        }
    });

    xmlOrTableButtonGroup.add(tableRadioButton);
    tableRadioButton.setSelected(true);
    tableRadioButton.setText("CSV table");

    GATEorKnowtatorbuttonGroup.add(gateXMLjRadioButton);
    gateXMLjRadioButton.setSelected(true);
    gateXMLjRadioButton.setText("GATE XML");
    gateXMLjRadioButton.setEnabled(false);

    GATEorKnowtatorbuttonGroup.add(knowtatorXMLjRadioButton);
    knowtatorXMLjRadioButton.setText("Knowtator XML");
    knowtatorXMLjRadioButton.setEnabled(false);

    javax.swing.GroupLayout outputConsoleJPanelLayout = new javax.swing.GroupLayout(outputConsoleJPanel);
    outputConsoleJPanel.setLayout(outputConsoleJPanelLayout);
    outputConsoleJPanelLayout.setHorizontalGroup(outputConsoleJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(outputConsoleJPanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(outputConsoleJPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(outputFileChooser, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(outputConsoleJPanelLayout.createSequentialGroup().addGap(169, 169, 169)
                                    .addComponent(XMLradioButton).addGap(169, 169, 169)
                                    .addComponent(tableRadioButton))
                            .addGroup(outputConsoleJPanelLayout.createSequentialGroup().addGap(58, 58, 58)
                                    .addGroup(outputConsoleJPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(withKeyAnnotationsRadioButton)
                                            .addComponent(outputFullDocumentsRadioButton)
                                            .addComponent(gateXMLjRadioButton))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(outputConsoleJPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(outputConsoleJPanelLayout.createSequentialGroup()
                                                    .addGroup(outputConsoleJPanelLayout
                                                            .createParallelGroup(
                                                                    javax.swing.GroupLayout.Alignment.LEADING)
                                                            .addComponent(outputContextOnlyRadioButton)
                                                            .addComponent(noKeyAnnotationsRadioButton))
                                                    .addPreferredGap(
                                                            javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(exportResultsButton))
                                            .addComponent(knowtatorXMLjRadioButton))))
                    .addContainerGap(566, Short.MAX_VALUE)));
    outputConsoleJPanelLayout.setVerticalGroup(outputConsoleJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(outputConsoleJPanelLayout.createSequentialGroup().addGap(59, 59, 59)
                    .addComponent(outputFileChooser, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(outputConsoleJPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(outputConsoleJPanelLayout.createSequentialGroup().addGap(31, 31, 31)
                                    .addComponent(tableRadioButton))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                    outputConsoleJPanelLayout.createSequentialGroup()
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(XMLradioButton)))
                    .addGroup(outputConsoleJPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(outputConsoleJPanelLayout.createSequentialGroup().addGap(74, 74, 74)
                                    .addComponent(exportResultsButton))
                            .addGroup(outputConsoleJPanelLayout.createSequentialGroup().addGap(16, 16, 16)
                                    .addGroup(outputConsoleJPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(gateXMLjRadioButton)
                                            .addComponent(knowtatorXMLjRadioButton))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addGroup(outputConsoleJPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(withKeyAnnotationsRadioButton)
                                            .addComponent(noKeyAnnotationsRadioButton))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(outputConsoleJPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(outputFullDocumentsRadioButton)
                                            .addComponent(outputContextOnlyRadioButton))))
                    .addContainerGap(138, Short.MAX_VALUE)));

    textHunterJTabbedPane.addTab("Output console", outputConsoleJPanel);

    jTextPane1.setEditable(false);
    jTextPane1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
    jTextPane1.setContentType("text/html"); // NOI18N
    jTextPane1.setText(
            "<html>\r\n  <head>\r\n\r\n  </head>\r\n  <body>\r\n    <p style=\"margin: 10px 5px\";align=\"justify\">\r\n<br><br>Copyright (C) 2014  Richard Jackson (richgjackson@yahoo.co.uk)\n<br><br>This program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n<br><br>This program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n<br><br>You should have received a copy of the GNU General Public License\nalong with this program.  If not, see <a href=\"url\">http:www.gnu.org/licenses/</a>. \r\n    </p>\r\n  </body>\r\n</html>\r\n");
    jScrollPane12.setViewportView(jTextPane1);

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap()
                    .addComponent(jScrollPane12, javax.swing.GroupLayout.DEFAULT_SIZE, 795, Short.MAX_VALUE)
                    .addContainerGap()));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout
                    .createSequentialGroup().addContainerGap().addComponent(jScrollPane12,
                            javax.swing.GroupLayout.PREFERRED_SIZE, 317, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(64, Short.MAX_VALUE)));

    javax.swing.GroupLayout licenceJPanelLayout = new javax.swing.GroupLayout(licenceJPanel);
    licenceJPanel.setLayout(licenceJPanelLayout);
    licenceJPanelLayout.setHorizontalGroup(licenceJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(licenceJPanelLayout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(310, Short.MAX_VALUE)));
    licenceJPanelLayout.setVerticalGroup(licenceJPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(licenceJPanelLayout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(322, Short.MAX_VALUE)));

    textHunterJTabbedPane.addTab("Licence", licenceJPanel);

    getContentPane().add(textHunterJTabbedPane,
            new org.netbeans.lib.awtextra.AbsoluteConstraints(2, 121, 1140, 750));
    textHunterJTabbedPane.getAccessibleContext().setAccessibleName("Annotate");

    quitButton.setText("Quit");
    quitButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            quitButtonActionPerformed(evt);
        }
    });
    getContentPane().add(quitButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(1060, 10, -1, -1));

    modeChangeButtonGroup.add(expressModeRadioButton);
    expressModeRadioButton.setSelected(true);
    expressModeRadioButton.setText("Express Mode");
    expressModeRadioButton.setFocusable(false);
    expressModeRadioButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            expressModeRadioButtonActionPerformed(evt);
        }
    });
    getContentPane().add(expressModeRadioButton,
            new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 10, -1, -1));

    modeChangeButtonGroup.add(advancedModeRadioButton);
    advancedModeRadioButton.setText("Advanced Mode");
    advancedModeRadioButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            advancedModeRadioButtonActionPerformed(evt);
        }
    });
    getContentPane().add(advancedModeRadioButton,
            new org.netbeans.lib.awtextra.AbsoluteConstraints(690, 10, -1, -1));

    svmProgressBar.setEnabled(false);
    svmProgressBar.setFocusable(false);
    getContentPane().add(svmProgressBar, new org.netbeans.lib.awtextra.AbsoluteConstraints(800, 10, 150, 23));

    threadCountTextField.setText(Integer.toString(Runtime.getRuntime().availableProcessors()));
    threadCountTextField.setBorder(javax.swing.BorderFactory
            .createTitledBorder(javax.swing.BorderFactory.createTitledBorder(""), "Cores used"));
    getContentPane().add(threadCountTextField,
            new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 10, 80, 86));

    saveProjectJButton.setText("Save Project");
    saveProjectJButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            saveProjectJButtonActionPerformed(evt);
        }
    });
    getContentPane().add(saveProjectJButton,
            new org.netbeans.lib.awtextra.AbsoluteConstraints(960, 10, -1, -1));

    jLabel1.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/uk/ac/kcl/texthunter/resources/textHunter.jpg"))); // NOI18N
    jLabel1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
    getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, -1, -1));

    targetTableTextField.setEditable(false);
    targetTableTextField.setText("(no project loaded)");
    targetTableTextField.setBorder(javax.swing.BorderFactory.createTitledBorder(
            javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createTitledBorder("")),
            "Current Project"));
    getContentPane().add(targetTableTextField,
            new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 40, 320, 60));

    jScrollPane2.setViewportView(infoTextPane);

    getContentPane().add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 10, 300, 80));

    pack();
}

From source file:view.MainWindow.java

@Override
public boolean dispatchKeyEvent(KeyEvent e) {
    if (e.getID() == KeyEvent.KEY_PRESSED) {
        if (e.isControlDown()) {
            if (e.getKeyCode() == KeyEvent.VK_W) {
                closeDocument(true);//from ww w  . jav  a2  s.c o m
            } else if (e.getKeyCode() == KeyEvent.VK_ADD) {
                workspacePanel.zoomIn();
            } else if (e.getKeyCode() == KeyEvent.VK_SUBTRACT) {
                workspacePanel.zoomOut();
            } else if (e.getKeyCode() == KeyEvent.VK_DOWN || e.getKeyCode() == KeyEvent.VK_RIGHT) {
                workspacePanel.pageUp();
            } else if (e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_LEFT) {
                workspacePanel.pageDown();
            }
            if (e.isShiftDown()) {
                if (e.getKeyCode() == KeyEvent.VK_S) {
                    workspacePanel.changeCard(WorkspacePanel.CardEnum.SIGN_PANEL, true);
                } else if (e.getKeyCode() == KeyEvent.VK_V) {
                    workspacePanel.changeCard(WorkspacePanel.CardEnum.VALIDATE_PANEL, true);
                }
            }
        }
    } else if (e.getID() == KeyEvent.KEY_RELEASED) {
    } else if (e.getID() == KeyEvent.KEY_TYPED) {
    }
    return false;
}