requestFocus() -> requestFocusInWindow()
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3450 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -117,7 +117,7 @@ public class ChatPanel
|
||||
addAncestorListener(new AncestorAdapter() {
|
||||
public void ancestorAdded (AncestorEvent e) {
|
||||
if (_focus) {
|
||||
_entry.requestFocus();
|
||||
_entry.requestFocusInWindow();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -291,7 +291,7 @@ public class ChatPanel
|
||||
_entry.setEnabled(true);
|
||||
_send.setEnabled(true);
|
||||
if (_focus) {
|
||||
_entry.requestFocus();
|
||||
_entry.requestFocusInWindow();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: LogonPanel.java,v 1.11 2004/08/27 02:12:49 mdb Exp $
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||
@@ -131,14 +131,14 @@ public class LogonPanel extends JPanel
|
||||
_ctx.getClient().addClientObserver(this);
|
||||
|
||||
// start with focus in the username field
|
||||
_username.requestFocus();
|
||||
_username.requestFocusInWindow();
|
||||
}
|
||||
|
||||
public void actionPerformed (ActionEvent e)
|
||||
{
|
||||
String cmd = e.getActionCommand();
|
||||
if (cmd.equals("skipToPassword")) {
|
||||
_password.requestFocus();
|
||||
_password.requestFocusInWindow();
|
||||
|
||||
} else if (cmd.equals("logon")) {
|
||||
logon();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: PuzzlePanel.java,v 1.9 2004/10/29 00:48:37 eric Exp $
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||
@@ -171,7 +171,7 @@ public abstract class PuzzlePanel extends JPanel
|
||||
// enable or disable the key manager appropriately
|
||||
_ctx.getKeyboardManager().setEnabled(puzgrabs);
|
||||
if (puzgrabs) {
|
||||
getBoardView().requestFocus();
|
||||
getBoardView().requestFocusInWindow();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -513,7 +513,7 @@ public class EditorFrame extends ManagedJFrame
|
||||
// event queue to flush before we can transfer focus
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
public void run () {
|
||||
_sceneInfoPanel.requestFocus();
|
||||
_sceneInfoPanel.requestFocusInWindow();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ public class ObjectEditorDialog extends JInternalFrame
|
||||
// select the text edit field and focus it
|
||||
_action.setCaretPosition(0);
|
||||
_action.moveCaretPosition(atext.length());
|
||||
_action.requestFocus();
|
||||
_action.requestFocusInWindow();
|
||||
}
|
||||
|
||||
protected Object[] computeZations (String[] zations, int index)
|
||||
|
||||
@@ -97,7 +97,7 @@ public class PortalDialog extends JInternalFrame
|
||||
|
||||
// request the keyboard focus so that the destination scene
|
||||
// name can be typed immediately
|
||||
_portalText.requestFocus();
|
||||
_portalText.requestFocusInWindow();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: KeyDispatcher.java,v 1.3 2004/09/30 23:35:13 ray Exp $
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||
@@ -106,7 +106,7 @@ public class KeyDispatcher
|
||||
// and request to give the new component the focus since that's a
|
||||
// sensible thing to do as it's aiming to nab all key events
|
||||
// henceforth
|
||||
comp.requestFocus();
|
||||
comp.requestFocusInWindow();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -161,7 +161,7 @@ public class KeyDispatcher
|
||||
!isTypableTarget(target)) {
|
||||
// focus our grabby component, and redirect this
|
||||
// key event there
|
||||
_curChatGrabber.requestFocus();
|
||||
_curChatGrabber.requestFocusInWindow();
|
||||
KeyboardFocusManager.getCurrentKeyboardFocusManager().
|
||||
redispatchEvent(_curChatGrabber, e);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user