List of usage examples for java.awt.event ActionEvent ALT_MASK
int ALT_MASK
To view the source code for java.awt.event ActionEvent ALT_MASK.
Click Source Link
From source file:com.monead.semantic.workbench.SemanticWorkbench.java
/** * Create the model menu//from w w w.j av a 2s . co m * * @return The model menu */ private JMenu setupModelMenu() { final JMenu menu = new JMenu("Model"); menu.setMnemonic(KeyEvent.VK_M); menu.setToolTipText("Menu items related to viewing the model"); modelCreateTreeView = new JMenuItem("Create Tree"); modelCreateTreeView.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T, ActionEvent.ALT_MASK)); modelCreateTreeView.setMnemonic(KeyEvent.VK_T); modelCreateTreeView.setToolTipText("Create tree representation of current model"); modelCreateTreeView.addActionListener(new GenerateTreeListener()); menu.add(modelCreateTreeView); modelListInferredTriples = new JMenuItem("Identify Inferred Triples"); modelListInferredTriples.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_I, ActionEvent.ALT_MASK)); modelListInferredTriples.setMnemonic(KeyEvent.VK_I); modelListInferredTriples.setToolTipText("Create a list of inferred triples from the current model"); modelListInferredTriples.addActionListener(new GenerateInferredTriplesListener()); menu.add(modelListInferredTriples); menu.addSeparator(); filterResetTree = new JMenuItem("Clear Tree"); filterResetTree .setToolTipText("Remove the tree view of the ontology. This may help if memory is running low"); filterResetTree.addActionListener(new ClearTreeModelListener()); menu.add(filterResetTree); return menu; }
From source file:com.monead.semantic.workbench.SemanticWorkbench.java
/** * Create the help menu/*from w w w . j av a 2 s . c o m*/ * * @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; }