本文整理了Java中javax.swing.JMenu.addMenuListener()
方法的一些代码示例,展示了JMenu.addMenuListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMenu.addMenuListener()
方法的具体详情如下:
包路径:javax.swing.JMenu
类名称: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;
}
内容来源于网络,如有侵权,请联系作者删除!