Nixed a bunch of redundant casts.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@304 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -183,7 +183,7 @@ public class KeyDispatcher
|
||||
case KeyEvent.KEY_RELEASED:
|
||||
if (lsize > 0) {
|
||||
for (int ii = 0; ii < lsize; ii++) {
|
||||
((KeyListener) _listeners.get(ii)).keyReleased(e);
|
||||
_listeners.get(ii).keyReleased(e);
|
||||
}
|
||||
// forget the key event
|
||||
_downKeys.remove(e.getKeyCode());
|
||||
@@ -195,19 +195,17 @@ public class KeyDispatcher
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the specified target component supports being typed
|
||||
* into, and thus we shouldn't steal focus away from it if the user
|
||||
* starts typing.
|
||||
* Returns true if the specified target component supports being typed into, and thus we
|
||||
* shouldn't steal focus away from it if the user starts typing.
|
||||
*/
|
||||
protected boolean isTypeableTarget (Component target)
|
||||
{
|
||||
return target.isShowing() &&
|
||||
(((target instanceof JTextComponent) &&
|
||||
((JTextComponent) target).isEditable()) ||
|
||||
(target instanceof JComboBox) ||
|
||||
(target instanceof ChatCantStealFocus) ||
|
||||
(target instanceof JTable) ||
|
||||
(target instanceof JRootPane));
|
||||
(((target instanceof JTextComponent) && ((JTextComponent) target).isEditable()) ||
|
||||
(target instanceof JComboBox) ||
|
||||
(target instanceof ChatCantStealFocus) ||
|
||||
(target instanceof JTable) ||
|
||||
(target instanceof JRootPane));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user