本文整理了Java中javax.swing.JMenu.setSelected()
方法的一些代码示例,展示了JMenu.setSelected()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMenu.setSelected()
方法的具体详情如下:
包路径:javax.swing.JMenu
类名称:JMenu
方法名:setSelected
暂无
代码示例来源:origin: marytts/marytts
public void deselectSpeakerWindow() {
// Deselect Speaker Window in Window menu now that window has been closed by the user
this.jMenu_Window.setSelected(false);
}
代码示例来源:origin: stackoverflow.com
@Override
public void menuSelected(MenuEvent mEvt) {
// show JOptionPane
// if yes selected, exit.
// Otherwise...
final JMenu menu = (JMenu) mEvt.getSource();
new Timer(200, new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
menu.setSelected(false);
((Timer)e.getSource()).stop();
}
}).start();
}
代码示例来源:origin: stackoverflow.com
public void mouseEntered(MouseEvent e)
fileBtn.setSelected(true);
fileBtn.setSelected(false);
代码示例来源:origin: stackoverflow.com
MenuButton.this.setSelected(true);
pressed = true;
MenuButton.this.setSelected(false);
if (action != null && within && pressed) {
action.actionPerformed(new ActionEvent(this,
ActionEvent.ACTION_PERFORMED, null));
MenuButton.this.setSelected(false);
代码示例来源: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;
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!