本文整理了Java中java.awt.Container.requestFocusInWindow()
方法的一些代码示例,展示了Container.requestFocusInWindow()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Container.requestFocusInWindow()
方法的具体详情如下:
包路径:java.awt.Container
类名称:Container
方法名:requestFocusInWindow
暂无
代码示例来源:origin: runelite/runelite
nameInput.setPreferredSize(new Dimension(0, 24));
nameInput.getTextField().setBorder(new EmptyBorder(0, 8, 0, 0));
nameInput.addActionListener(e -> getParent().requestFocusInWindow());
displayInput.setPreferredSize(new Dimension(0, 24));
displayInput.getTextField().setHorizontalAlignment(SwingConstants.CENTER);
displayInput.addActionListener(e -> getParent().requestFocusInWindow());
代码示例来源:origin: net.sf.taverna.t2.ui-components/results-view
public void actionPerformed(ActionEvent e) {
saveButton.getParent().requestFocusInWindow();// so that the button does not stay focused after it is clicked on and did its action
}
});
代码示例来源:origin: net.sf.taverna.t2.ui-components/results-view
public void actionPerformed(ActionEvent e) {
saveButton.getParent().requestFocusInWindow();// so that the button does not stay focused after it is clicked on and did its action
}
});
代码示例来源:origin: net.sf.taverna.t2.ui-components/results-view
public void actionPerformed(ActionEvent e) {
renderResult();
refreshButton.getParent().requestFocusInWindow();// so that the button does not stay focused after it is clicked on and did its action
}
});
代码示例来源:origin: net.sf.taverna.t2.ui-components/results-view
public void actionPerformed(ActionEvent e) {
renderResult();
refreshButton.getParent().requestFocusInWindow();// so that the button does not stay focused after it is clicked on and did its action
}
});
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
@Override
public State mousePressed(Widget widget, WidgetMouseEvent event) {
// if (editor != null)
// closeEditor (true);
// return State.REJECTED;
if (editor != null) {
Container parent = editor.getParent();
if (parent != null) {
parent.requestFocusInWindow();
}
closeEditor(true);
}
return State.REJECTED;
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
@Override
public State mouseReleased(Widget widget, WidgetAction.WidgetMouseEvent event) {
// if (editor != null)
// closeEditor (true);
// return State.REJECTED;
if (editor != null) {
Container parent = editor.getParent();
if (parent != null) {
parent.requestFocusInWindow();
}
closeEditor(true);
}
return State.REJECTED;
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
@Override
public State mousePressed(Widget widget, WidgetMouseEvent event) {
// if (editor != null)
// closeEditor (true);
// return State.REJECTED;
if (editor != null) {
Container parent = editor.getParent();
if (parent != null) {
parent.requestFocusInWindow();
}
closeEditor(true);
}
return State.REJECTED;
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
@Override
public State mouseReleased(Widget widget, WidgetAction.WidgetMouseEvent event) {
// if (editor != null)
// closeEditor (true);
// return State.REJECTED;
if (editor != null) {
Container parent = editor.getParent();
if (parent != null) {
parent.requestFocusInWindow();
}
closeEditor(true);
}
return State.REJECTED;
}
代码示例来源:origin: com.jidesoft/jide-oss
container.requestFocusInWindow();
return container;
for (Component comp1 : comps) {
if (passesFocusabilityTest(comp1)) {
container.requestFocusInWindow();
return container;
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
public final void closeEditor(boolean commit) {
if (editor == null) {
return;
}
Container parent = editor.getParent();
// boolean hasFocus = editor.hasFocus();
Rectangle bounds = parent != null ? editor.getBounds() : null;
provider.notifyClosing(this, widget, editor, commit);
if (bounds != null) {
parent.remove(editor);
parent.repaint(bounds.x, bounds.y, bounds.width, bounds.height);
}
// if (hasFocus) {
if (parent != null) {
parent.requestFocusInWindow();
}
// }
editor = null;
widget = null;
rectangle = null;
invocationType = null;
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
public final void closeEditor(boolean commit) {
if (editor == null) {
return;
}
Container parent = editor.getParent();
// boolean hasFocus = editor.hasFocus();
Rectangle bounds = parent != null ? editor.getBounds() : null;
provider.notifyClosing(this, widget, editor, commit);
if (bounds != null) {
parent.remove(editor);
parent.repaint(bounds.x, bounds.y, bounds.width, bounds.height);
}
// if (hasFocus) {
if (parent != null) {
parent.requestFocusInWindow();
}
// }
editor = null;
widget = null;
rectangle = null;
invocationType = null;
}
内容来源于网络,如有侵权,请联系作者删除!