OSDN Git Service

refactoring: removed AnyAction.bindAction
authorargius <argius.net@gmail.com>
Tue, 7 May 2013 14:52:59 +0000 (23:52 +0900)
committerargius <argius.net@gmail.com>
Tue, 7 May 2013 16:27:40 +0000 (01:27 +0900)
src/net/argius/stew/ui/window/AnyAction.java

index 1298683..01a4ef6 100644 (file)
@@ -230,17 +230,10 @@ final class AnyAction extends AbstractAction implements Runnable {
                              Object actionKey,
                              KeyStroke... keyStrokes) {
         final String key = String.valueOf(actionKey);
-        bindAction(src, dst, key, keyStrokes);
+        src.getActionMap().put(key, new AnyAction(dst, key));
         bindKeyStroke(src, whenAncestor, key, keyStrokes);
     }
 
-    private static void bindAction(JComponent src,
-                                   AnyActionListener dst,
-                                   String actionKeyString,
-                                   KeyStroke... keyStrokes) {
-        src.getActionMap().put(actionKeyString, new AnyAction(dst, actionKeyString));
-    }
-
     private static void bindKeyStroke(JComponent src,
                                       boolean whenAncestor,
                                       String actionKeyString,