本文整理了Java中javax.swing.JMenu.isPopupMenuVisible()
方法的一些代码示例,展示了JMenu.isPopupMenuVisible()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMenu.isPopupMenuVisible()
方法的具体详情如下:
包路径:javax.swing.JMenu
类名称:JMenu
方法名:isPopupMenuVisible
暂无
代码示例来源:origin: deathmarine/Luyten
private void refreshMenuPopup(JMenu menu) {
try {
if (menu.isPopupMenuVisible()) {
menu.getPopupMenu().setVisible(false);
menu.getPopupMenu().setVisible(true);
}
} catch (Exception e) {
Luyten.showExceptionDialog("Exception!", e);
}
}
}.start();
代码示例来源:origin: blurpy/kouchat
/**
* Checks if any of the menus are visible.
*
* @return True if at least one menu is visible.
*/
public boolean isPopupMenuVisible() {
return fileMenu.isPopupMenuVisible() || toolsMenu.isPopupMenuVisible() || helpMenu.isPopupMenuVisible();
}
代码示例来源:origin: org.appdapter/org.appdapter.lib.gui
@Override public boolean isPopupMenuVisible() {
return super.isPopupMenuVisible();
}
代码示例来源:origin: blurpy/kouchat
/**
* Make sure the menubar gets focus when navigating with the keyboard.
*
* {@inheritDoc}
*/
@Override
public void focusLost(final FocusEvent e) {
if (fileMenu.isPopupMenuVisible() || toolsMenu.isPopupMenuVisible()) {
getRootPane().requestFocusInWindow();
}
}
代码示例来源:origin: abbot/abbot
/** Returns true if there is an active menu on the JFrame (if any)
containing the given component. */
public static boolean isMenuActive(Component c) {
Frame f = getFrame(c);
if (f instanceof JFrame) {
JFrame frame = (JFrame)f;
JMenuBar mb = frame.getJMenuBar();
if (mb != null) {
for (int i=0;i < mb.getMenuCount();i++) {
JMenu menu = mb.getMenu(i);
if (menu == null)
continue;
if (menu.isSelected() || menu.isPopupMenuVisible())
return true;
}
}
}
return false;
}
代码示例来源:origin: javax.help/javahelp
break;
if (c instanceof JMenu && ((JMenu)c).isPopupMenuVisible()) {
comp = c;
内容来源于网络,如有侵权,请联系作者删除!