Explorar o código

KeyNames: add/correct javadoc

Stephen Gold %!s(int64=4) %!d(string=hai) anos
pai
achega
01053ac9e5
Modificáronse 1 ficheiros con 8 adicións e 1 borrados
  1. 8 1
      jme3-core/src/main/java/com/jme3/input/KeyNames.java

+ 8 - 1
jme3-core/src/main/java/com/jme3/input/KeyNames.java

@@ -36,7 +36,7 @@ import static com.jme3.input.KeyInput.*;
 /**
  * Translate key codes (from {@link KeyInput}) to descriptive names.
  *
- * This class has no static methods, yet it can be instantiated. Here's why:
+ * This class has only static methods, yet it can be instantiated. Here's why:
  *
  * It used to be that there was no static getName() method, so the only way to
  * get names was to instantiate a KeyNames. As a consequence, we have
@@ -189,6 +189,13 @@ public class KeyNames {
         KEY_NAMES[KEY_UNLABELED] = "Unlabeled";
     }
 
+    /**
+     * Obtain a descriptive name for the specified key code. Key codes are
+     * defined in {@link KeyInput}.
+     *
+     * @param keyId a key code (≥0, ≤255)
+     * @return the corresponding name, or null if not named
+     */
     public static String getName(int keyId) {
         return KEY_NAMES[keyId];
     }