本文整理了Java中javax.swing.SwingUtilities.findFocusOwner()
方法的一些代码示例,展示了SwingUtilities.findFocusOwner()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SwingUtilities.findFocusOwner()
方法的具体详情如下:
包路径:javax.swing.SwingUtilities
类名称:SwingUtilities
方法名:findFocusOwner
暂无
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/**
* Finds out the monitor where the user currently has the input focus.
* This method is usually used to help the client code to figure out on
* which monitor it should place newly created windows/frames/dialogs.
*
* @return the GraphicsConfiguration of the monitor which currently has the
* input focus
*/
private static GraphicsConfiguration getCurrentGraphicsConfiguration() {
Frame[] frames = Frame.getFrames();
for (int i = 0; i < frames.length; i++) {
if (javax.swing.SwingUtilities.findFocusOwner(frames[i]) != null) {
return frames[i].getGraphicsConfiguration();
}
}
return GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/**
* Finds out the monitor where the user currently has the input focus.
* This method is usually used to help the client code to figure out on
* which monitor it should place newly created windows/frames/dialogs.
*
* @return the GraphicsConfiguration of the monitor which currently has the
* input focus
*/
private static GraphicsConfiguration getCurrentGraphicsConfiguration() {
Frame[] frames = Frame.getFrames();
for (int i = 0; i < frames.length; i++) {
if (javax.swing.SwingUtilities.findFocusOwner(frames[i]) != null) {
return frames[i].getGraphicsConfiguration();
}
}
return GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
}
代码示例来源:origin: stackoverflow.com
} else if (event instanceof KeyEvent
&& event.getSource() instanceof Component) {
source = SwingUtilities.findFocusOwner((Component) (event
.getSource()));
dfm.focusNextComponent(currentFocusOwner);
currentFocusOwner = SwingUtilities
.findFocusOwner((Component) event.getSource());
if (currentFocusOwner instanceof JComponent) {
focusNotFound = (((JComponent) currentFocusOwner)
代码示例来源:origin: com.synaptix/SynaptixSwing
if (selectedComponent != visibleComponent
&& visibleComponent != null) {
if (SwingUtilities.findFocusOwner(visibleComponent) != null) {
shouldChangeFocus = true;
代码示例来源:origin: net.sf.ingenias/ingeniasjgraphmod
GraphCellEditor oldEditor = cellEditor;
boolean requestFocus = (graph != null && (graph.hasFocus() || SwingUtilities
.findFocusOwner(editingComponent) != null));
editingCell = null;
editingComponent = null;
代码示例来源:origin: com.jtattoo/JTattoo
if (SwingUtilities.findFocusOwner(visibleComponent) != null) {
shouldChangeFocus = true;
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
if (SwingUtilities.findFocusOwner(visibleComponent)
!= null)
代码示例来源:origin: com.jtattoo/JTattoo
if (SwingUtilities.findFocusOwner(visibleComponent) != null) {
shouldChangeFocus = true;
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
if (SwingUtilities.findFocusOwner(visibleComponent)
!= null)
内容来源于网络,如有侵权,请联系作者删除!