本文整理了Java中javax.swing.JMenu.setPopupMenuVisible()
方法的一些代码示例,展示了JMenu.setPopupMenuVisible()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMenu.setPopupMenuVisible()
方法的具体详情如下:
包路径:javax.swing.JMenu
类名称:JMenu
方法名:setPopupMenuVisible
暂无
代码示例来源:origin: org.netbeans.api/org-openide-awt
menu.setPopupMenuVisible(false);
menu.setPopupMenuVisible(true);
} else if (usedToBeContained != willBeContained) {
代码示例来源:origin: com.jidesoft/jide-oss
void setPopupMenuVisibleImmediately(boolean b) {
super.setPopupMenuVisible(b);
}
代码示例来源:origin: org.appdapter/org.appdapter.lib.gui
@Override public void setPopupMenuVisible(boolean b) {
super.setPopupMenuVisible(b);
}
代码示例来源:origin: com.github.insubstantial/substance
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (JInternalFrame.TITLE_PROPERTY.equals(evt.getPropertyName())) {
SubstanceInternalFrameTitlePane.this
.setToolTipText((String) evt.getNewValue());
}
if ("JInternalFrame.messageType".equals(evt.getPropertyName())) {
updateOptionPaneState();
frame.repaint();
}
if ("closed".equals(evt.getPropertyName())) {
windowMenu.setPopupMenuVisible(false);
}
}
};
代码示例来源:origin: stackoverflow.com
JMenuBar mainMenuBar = new JMenuBar();
final JMenu quitMenuItem = new JMenu("Quit");
quitMenuItem.addMenuListener(new MenuListener() {
public void menuSelected(MenuEvent e) {
System.exit(0);
}
public void menuDeselected(MenuEvent e) {}
public void menuCanceled(MenuEvent e) {}
});
quitMenuItem.setPopupMenuVisible(false);
final JMenu aboutMenuItem = new JMenu("About");
aboutMenuItem.addMenuListener(new MenuListener() {
public void menuSelected(MenuEvent e) {
JOptionPane.showMessageDialog(MainFrame.this, "Assignment 3 With Swing UI. Author: T.Byrne", "About", JOptionPane.INFORMATION_MESSAGE);
aboutMenuItem.setSelected(false);//otherwise it will still be selected after the dialog box.
}
public void menuDeselected(MenuEvent e) {}
public void menuCanceled(MenuEvent e) {}
});
aboutMenuItem.setPopupMenuVisible(false);
mainMenuBar.add(quitMenuItem);
mainMenuBar.add(aboutMenuItem);
this.setJMenuBar(mainMenuBar);
代码示例来源:origin: stackoverflow.com
menuB.setPopupMenuVisible(true);
MenuSelectionManager.defaultManager().setSelectedPath(new MenuElement[]{popup, menuB, menuY});
代码示例来源:origin: org.xworker/xworker_core
public static void init(JMenu comp, Thing thing, Container parent, ActionContext actionContext){
JMenuItemCreator.init(comp, thing, parent, actionContext);
Integer delay = JavaCreator.createInteger(thing, "delay");
if(delay != null){
comp.setDelay(delay);
}
Boolean popupMenuVisible = JavaCreator.createBoolean(thing, "popupMenuVisible");
if(popupMenuVisible != null){
comp.setPopupMenuVisible(popupMenuVisible);
}
}
}
代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core
/**
* Close the currently selected menu.
*/
public void closeMenu() {
if (!menuBar.isSelected()) {
return;
}
MenuElement[] menuElement = menuBar.getSubElements();
if (menuElement != null) {
for (MenuElement element : menuElement) {
JMenu menu = (JMenu) element;
if (menu.isSelected()) {
menu.setPopupMenuVisible(false);
menu.setSelected(false);
break;
}
}
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
menu.setPopupMenuVisible(false);
menu.setPopupMenuVisible(true);
} else if (usedToBeContained != willBeContained) {
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
menu.setPopupMenuVisible(false);
menu.setPopupMenuVisible(true);
} else if (usedToBeContained != willBeContained) {
内容来源于网络,如有侵权,请联系作者删除!