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

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

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

JMenu.addMenuListener介绍

暂无

代码示例

代码示例来源:origin: skylot/jadx

recentFiles.addMenuListener(new RecentFilesMenuListener(recentFiles));

代码示例来源:origin: wiztools/rest-client

jm_open_recent.addMenuListener(new MenuListener() {
jm_history.addMenuListener(new MenuListener() {

代码示例来源:origin: protegeproject/protege

public void setMenuParent(JComponent parent) {
  if (parent instanceof JMenu) {
    parentMenu = (JMenu) parent;
    parentMenu.addMenuListener(listener);
  }
}

代码示例来源:origin: org.protege/protege-editor-core-application

public void setMenuParent(JComponent parent) {
  if (parent instanceof JMenu) {
    parentMenu = (JMenu) parent;
    parentMenu.addMenuListener(listener);
  }
}

代码示例来源:origin: edu.stanford.protege/org.protege.editor.core.application

public void setMenuParent(JComponent parent) {
  if (parent instanceof JMenu) {
    parentMenu = (JMenu) parent;
    parentMenu.addMenuListener(listener);
  }
}

代码示例来源:origin: edu.stanford.protege/org.protege.editor.core.application

public void setMenuParent(JComponent parent) {
  if (parent instanceof JMenu) {
    parentMenu = (JMenu) parent;
    parentMenu.addMenuListener(listener);
  }
}

代码示例来源:origin: protegeproject/protege

public void setMenuParent(JComponent parent) {
  if (parent instanceof JMenu) {
    parentMenu = (JMenu) parent;
    parentMenu.addMenuListener(listener);
  }
}

代码示例来源:origin: org.protege/protege-editor-core-application

public void setMenuParent(JComponent parent) {
  if (parent instanceof JMenu) {
    parentMenu = (JMenu) parent;
    parentMenu.addMenuListener(listener);
  }
}

代码示例来源:origin: org.gosu-lang.gosu/gosu-lab

private ReopenExperimentPopup( JMenu reopenExperiment )
{
 _menu = reopenExperiment;
 reopenExperiment.addMenuListener( this );
}

代码示例来源:origin: cmu-phil/tetrad

private void buildWindowMenu(final JMenu windowMenu){
  //=======================WINDOW MENU=========================//
  // These items are created on the fly based on whatever session
  // editors are available.
  WindowMenuListener windowMenuListener =
      new WindowMenuListener(windowMenu, desktop);
  windowMenu.addMenuListener(windowMenuListener);
}

代码示例来源:origin: cmu-phil/tetrad

/**
 * Builds the logging menu
 */
private void buildLoggingMenu(JMenu loggingMenu) {
  //================================= Logging Menu ==========================//
  // build the logging menu on the fly.
  loggingMenu.addMenuListener(new LoggingMenuListener());        
}

代码示例来源:origin: PortSwigger/param-miner

public void run()
{
  menuButton = new JMenu("Param Miner");
  menuButton.addMenuListener(this);
  JMenuBar burpMenuBar = Utilities.getBurpFrame().getJMenuBar();
  burpMenuBar.add(menuButton);
}

代码示例来源:origin: PortSwigger/distribute-damage

public void run()
{
  menuButton = new JMenu("Distribute Damage");
  menuButton.addMenuListener(this);
  JMenuBar burpMenuBar = Utilities.getBurpFrame().getJMenuBar();
  burpMenuBar.add(menuButton);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-debugger-common2

public JMenuItem getPopupPresenter() {
  JMenu mi = new JMenu();
  Actions.connect(mi, (Action)this, false);
  mi.addMenuListener(new FormatItemListener());
  return mi;
}

代码示例来源:origin: org.cytoscape/swing-application-impl

public LayoutMenuPopulator(CytoscapeMenuBar menuBar, CyApplicationManager appMgr, DialogTaskManager tm) {
  algorithmMap = new HashMap<CyLayoutAlgorithm,Map>();
  menuMap = new HashMap<CyLayoutAlgorithm,JMenuItem>();
  separatorMap = new HashMap<CyLayoutAlgorithm,Boolean>();
  this.appMgr = appMgr;
  this.tm = tm;
  this.gravityTracker = menuBar.getMenuTracker().getGravityTracker("Layout");
  this.layoutMenu = (JMenu)gravityTracker.getMenu();
  this.layoutMenu.addMenuListener(this);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-debugger-common2

public JMenuItem getMenuPresenter() {
JMenu mi = new JMenu();
Actions.connect(mi, (Action)this, false);
mi.addMenuListener(new MainItemListener());
return mi;
}

代码示例来源:origin: caprica/vlcj-player

public OnDemandMenu(Resource resource, boolean clearOnPrepare) {
  this.menu = new JMenu(resource.name());
  this.menu.setMnemonic(resource.mnemonic());
  this.menu.addMenuListener(this);
  this.clearOnPrepare = clearOnPrepare;
  onCreateMenu(this.menu);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-project-jsf

public JMenuItem getPopupPresenter() {
JMenu mainItem = new JMenuPlus();
  Mnemonics.setLocalizedText(mainItem, getName());
  HelpCtx.setHelpIDString (mainItem, ImportAction.class.getName());
  mainItem.addMenuListener(new MainItemListener());
  return mainItem;
}

代码示例来源:origin: org.xworker/xworker_core

public static void createMenuListeners(ActionContext actionContext){
  Thing self = (Thing) actionContext.get("self");
  JMenu parent = (JMenu) actionContext.get("parent");
  
  for(Thing child : self.getChilds()){
    MenuListener l = (MenuListener) child.doAction("create", actionContext);
    if(l != null){
      parent.addMenuListener(l);
    }
  }
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-project-jsf

public JMenuItem getMenuPresenter () {
JMenu mainItem = new JMenuPlus();
  Mnemonics.setLocalizedText(mainItem, getName());
  mainItem.setIcon (SystemAction.get(ImportAction.class).getIcon());
  HelpCtx.setHelpIDString (mainItem, ImportAction.class.getName());
  mainItem.addMenuListener(new MainItemListener());
  return mainItem;
}

相关文章