Example usage for java.awt.event KeyEvent VK_A

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

Introduction

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

Prototype

int VK_A

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

Click Source Link

Document

Constant for the "A" key.

Usage

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

/**
 * Setup the frame's menus/*from   w  w w .j av  a2s.c o m*/
 */
private void setupMenus() {
    JMenuBar menuBar;

    menuBar = new JMenuBar();
    setJMenuBar(menuBar);

    // Assertions file menu
    fileAssertionsMenu = new JMenu("File (Assertions)");
    fileAssertionsMenu.setMnemonic(KeyEvent.VK_A);
    fileAssertionsMenu.setToolTipText("Menu items related to asserted triples file access");
    menuBar.add(fileAssertionsMenu);

    setupAssertionsFileMenu();

    // SPARQL file menu
    fileSparqlMenu = new JMenu("File (SPARQL)");
    fileSparqlMenu.setMnemonic(KeyEvent.VK_S);
    fileSparqlMenu.setToolTipText("Menu items related to SPARQL file access");
    menuBar.add(fileSparqlMenu);

    setupSparqlFileMenu();

    // Edit Menu
    menuBar.add(setupEditMenu());

    // Configuration Menu
    menuBar.add(setupConfigurationMenu());

    // Model Menu
    menuBar.add(setupModelMenu());

    // Filters Menu
    menuBar.add(setupFiltersMenu());

    // SPARQL Server Menu
    menuBar.add(setupSparqlServerMenu());

    // Help Menu
    menuBar.add(setupHelpMenu());
}

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

/**
 * Create the help menu//from  ww  w .  j  a v  a  2s  . c om
 * 
 * @return The help menu
 */
private JMenu setupHelpMenu() {
    final JMenu menu = new JMenu("Help");

    menu.setMnemonic(KeyEvent.VK_H);
    menu.setToolTipText("Menu items related to user assistance");

    helpOverviewVideo = new JMenuItem("8 Minute Overview Video");
    helpOverviewVideo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, ActionEvent.ALT_MASK));
    helpOverviewVideo.setMnemonic(KeyEvent.VK_V);
    helpOverviewVideo.setToolTipText("View an 8 minute overview of Semantic Workbench");
    helpOverviewVideo.addActionListener(new OverviewVideoListener());
    menu.add(helpOverviewVideo);

    helpAbout = new JMenuItem("About");
    helpAbout.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A, ActionEvent.ALT_MASK));
    helpAbout.setMnemonic(KeyEvent.VK_A);
    helpAbout.setToolTipText("View version information");
    helpAbout.addActionListener(new AboutListener());
    menu.add(helpAbout);

    return menu;
}