本文整理了Java中javax.swing.JPopupMenu.requestFocusInWindow()
方法的一些代码示例,展示了JPopupMenu.requestFocusInWindow()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JPopupMenu.requestFocusInWindow()
方法的具体详情如下:
包路径:javax.swing.JPopupMenu
类名称:JPopupMenu
方法名:requestFocusInWindow
暂无
代码示例来源:origin: org.cytoscape/vizmap-gui-impl
@Override
public void actionPerformed(final ActionEvent e) {
final JPopupMenu pm = getPopupMenu();
if (pm != null) {
// if (showPopup) {
pm.show(DropDownMenuButton.this, 0, DropDownMenuButton.this.getHeight());
pm.requestFocusInWindow();
// } else {
// showPopup = true;
// }
}
}
};
代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core
/**
* Display the specified popup menu at the location specified by a mouse
* event with the specified source component.
*
* @param invoker
* the source component
* @param e
* the mouse event causing this popup to be displayed
* @param popup
* the popup menu to display
*/
public void displayPopUp(Component invoker, MouseEvent e, JPopupMenu popup) {
if (popup != null) {
log.debug("Showing pop up for {} at x,y = {},{}", invoker, e.getX(), e.getY());
popup.pack();
popup.show(invoker, e.getX(), e.getY());
popup.setVisible(true);
popup.requestFocusInWindow();
}
}
代码示例来源:origin: org.cytoscape/vizmap-gui-impl
@Override
public void actionPerformed(final ActionEvent e) {
final LockedValueState state = vpSheetItem.getModel().getLockedValueState();
final JButton btn = vpSheetItem.getBypassBtn();
if (state == LockedValueState.ENABLED_NOT_SET) {
// There is only one option to execute, so do it now, rather than showing the popup menu
openLockedValueEditor(e, vpSheetItem);
} else {
bypassMenu.show(btn, 0, btn.getHeight());
bypassMenu.requestFocusInWindow();
}
}
});
内容来源于网络,如有侵权,请联系作者删除!