javax.swing.JMenu.getAccessibleContext()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(137)

本文整理了Java中javax.swing.JMenu.getAccessibleContext()方法的一些代码示例,展示了JMenu.getAccessibleContext()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMenu.getAccessibleContext()方法的具体详情如下:
包路径:javax.swing.JMenu
类名称:JMenu
方法名:getAccessibleContext

JMenu.getAccessibleContext介绍

暂无

代码示例

代码示例来源:origin: apache/geode

private void createMenu() {
 JMenuBar menuBar = new JMenuBar();
 JMenu sequenceMenu = new JMenu("Sequence");
 sequenceMenu.setMnemonic(KeyEvent.VK_S);
 sequenceMenu.getAccessibleContext()
   .setAccessibleDescription("The only menu in this program that has menu items");
 menuBar.add(sequenceMenu);
 JMenuItem selectGraphs = new JMenuItem("Choose Graphs", KeyEvent.VK_G);
 selectGraphs.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_G, ActionEvent.ALT_MASK));
 selectGraphs.getAccessibleContext().setAccessibleDescription("Select what graphs to display");
 selectGraphs.setActionCommand("selectgraphs");
 selectGraphs.addActionListener(new ActionListener() {
  @Override
  public void actionPerformed(ActionEvent e) {
   showGraphSelector();
  }
 });
 sequenceMenu.add(selectGraphs);
 frame.setJMenuBar(menuBar);
}

代码示例来源:origin: fossasia/neurolab-desktop

fileMenu.getAccessibleContext().setAccessibleDescription("File menu, for opening and saving files.");

代码示例来源:origin: io.snappydata/gemfire-hydra-tests

private void createMenu() {
 JMenuBar menuBar = new JMenuBar();
 JMenu sequenceMenu = new JMenu("Sequence");
 sequenceMenu.setMnemonic(KeyEvent.VK_S);
 sequenceMenu.getAccessibleContext().setAccessibleDescription(
   "The only menu in this program that has menu items");
 menuBar.add(sequenceMenu);
 JMenuItem selectGraphs = new JMenuItem("Choose Graphs",
   KeyEvent.VK_G);
 selectGraphs.setAccelerator(KeyStroke.getKeyStroke(
   KeyEvent.VK_G, ActionEvent.ALT_MASK));
 selectGraphs.getAccessibleContext().setAccessibleDescription(
   "Select what graphs to display");
 selectGraphs.setActionCommand("selectgraphs");
 selectGraphs.addActionListener(new ActionListener() {
  public void actionPerformed(ActionEvent e) {
   showGraphSelector();
  }
 });
 sequenceMenu.add(selectGraphs);
 frame.setJMenuBar(menuBar);
}

代码示例来源:origin: stackoverflow.com

menu.getAccessibleContext().setAccessibleDescription(
    "File menu");
menuBar.add(menu);

代码示例来源:origin: org.appdapter/org.appdapter.lib.gui

private void resetMenu() {
  JMenuBar menuBar;
  JMenu menu, submenu;
  menuBar = myTopFrameMenu = Utility.getMenuBar();
  myTopFrameMenu.removeAll();
  menuBar.add(Utility.clipBoardUtil.getFileMenu());
  menu = Utility.toolsMenu = new SafeJMenu(false, "Tools", this);
  menu.setMnemonic(KeyEvent.VK_T);
  menu.getAccessibleContext().setAccessibleDescription("Tool menu items");
  menuBar.add(menu);
  menu = Utility.lastResultsMenu = new SafeJMenu(false, "Results", this);
  menu.setMnemonic(KeyEvent.VK_R);
  menu.getAccessibleContext().setAccessibleDescription("Last returns");
  menuBar.add(menu);
  if (Utility.isLAFSafe())
    createLookAndFeelMenu();
  if (oldJMenuBar != null && oldJMenuBar != menuBar)
    menuBar.add(oldJMenuBar);
}

代码示例来源:origin: GrammarViz2/grammarviz2_src

fileMenu.getAccessibleContext().setAccessibleDescription("The file menu");
settingsMenu.getAccessibleContext().setAccessibleDescription("Settings menu");
helpMenu.getAccessibleContext().setAccessibleDescription("Help & About");

代码示例来源:origin: biojava/biojava

file.getAccessibleContext().setAccessibleDescription("File Menu");

代码示例来源:origin: biojava/biojava

public static JMenuBar initAlignmentGUIMenu(JFrame frame) {
  file.getAccessibleContext().setAccessibleDescription("File Menu");

代码示例来源:origin: biojava/biojava

file.getAccessibleContext().setAccessibleDescription("File Menu");
menu.add(file);
view.getAccessibleContext().setAccessibleDescription("View Menu");
view.setMnemonic(KeyEvent.VK_V);
menu.add(view);

代码示例来源:origin: stackoverflow.com

menu.getAccessibleContext().setAccessibleDescription("File Menu Items");
menuBar.add(menu);
menu.getAccessibleContext().setAccessibleDescription("Edit Menu Items");
menuBar.add(menu);
menu.getAccessibleContext().setAccessibleDescription("Edit Menu Items");
menuBar.add(menu);
menu.getAccessibleContext().setAccessibleDescription("Edit Menu Items");
menuBar.add(menu);
menu.getAccessibleContext().setAccessibleDescription("Edit Menu Items");
menuBar.add(menu);

代码示例来源:origin: stackoverflow.com

menuBar = new JMenuBar();
menu = new JMenu("A Menu");
menu.getAccessibleContext().setAccessibleDescription("The only menu in this program that has menu items");
menuBar.add(menu);
menuItem = new JMenuItem("A text-only menu item", KeyEvent.VK_T);

代码示例来源:origin: biojava/biojava

file.getAccessibleContext().setAccessibleDescription("File Menu");
menu.add(file);
view.getAccessibleContext().setAccessibleDescription("View Menu");
view.setMnemonic(KeyEvent.VK_V);
menu.add(view);

代码示例来源:origin: org.ostermiller/utils

JMenu editMenu = new JMenu("Edit");
editMenu.setMnemonic(KeyEvent.VK_E);
editMenu.getAccessibleContext().setAccessibleDescription(
  "Change how passwords are generated."
);

代码示例来源:origin: stackoverflow.com

menu.getAccessibleContext().setAccessibleDescription("The only menu in this program that has menu items");
menuBar.add(menu);
menu.getAccessibleContext().setAccessibleDescription("This menu does nothing");
menuBar.add(menu);
return menuBar;

代码示例来源:origin: stackoverflow.com

filemenu.getAccessibleContext().setAccessibleDescription("This is the File menu.");
menuBar.add(filemenu);
editmenu.getAccessibleContext().setAccessibleDescription("This is the Edit menu.");
menuBar.add(editmenu);

代码示例来源:origin: biojava/biojava

file.getAccessibleContext().setAccessibleDescription("File Menu");
view.getAccessibleContext().setAccessibleDescription("View Menu");
view.setMnemonic(KeyEvent.VK_V);

代码示例来源:origin: stackoverflow.com

menu.getAccessibleContext().setAccessibleDescription(
    "The only menu in this program that has menu items");
menuBar.add(menu);
menu.getAccessibleContext().setAccessibleDescription(
    "This menu does nothing");
menuBar.add(menu);

相关文章