X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fevent%2FTKeypressEvent.java;h=f49936910d95d68694c101623bb50998f35a904f;hb=615a0d99fd0aa4437116dd083147f9150d5e6527;hp=bdf5e84283ace79ea5b41f75afdb4c2ef8ab3194;hpb=7d922e0dfd9a6da42b84e01d52adeec6fff10025;p=nikiroo-utils.git diff --git a/src/jexer/event/TKeypressEvent.java b/src/jexer/event/TKeypressEvent.java index bdf5e84..f499369 100644 --- a/src/jexer/event/TKeypressEvent.java +++ b/src/jexer/event/TKeypressEvent.java @@ -35,19 +35,18 @@ import jexer.TKeypress; */ public class TKeypressEvent extends TInputEvent { + // ------------------------------------------------------------------------ + // Variables -------------------------------------------------------------- + // ------------------------------------------------------------------------ + /** * Keystroke received. */ private TKeypress key; - /** - * Get keystroke. - * - * @return keystroke - */ - public TKeypress getKey() { - return key; - } + // ------------------------------------------------------------------------ + // Constructors ----------------------------------------------------------- + // ------------------------------------------------------------------------ /** * Public contructor. @@ -89,15 +88,9 @@ public class TKeypressEvent extends TInputEvent { alt, ctrl, shift); } - /** - * Create a duplicate instance. - * - * @return duplicate intance - */ - public TKeypressEvent dup() { - TKeypressEvent keypress = new TKeypressEvent(key.dup()); - return keypress; - } + // ------------------------------------------------------------------------ + // TInputEvent ------------------------------------------------------------ + // ------------------------------------------------------------------------ /** * Comparison check. All fields must match to return true. @@ -147,4 +140,28 @@ public class TKeypressEvent extends TInputEvent { public String toString() { return String.format("Keypress: %s", key.toString()); } + + // ------------------------------------------------------------------------ + // TKeypressEvent --------------------------------------------------------- + // ------------------------------------------------------------------------ + + /** + * Get keystroke. + * + * @return keystroke + */ + public TKeypress getKey() { + return key; + } + + /** + * Create a duplicate instance. + * + * @return duplicate intance + */ + public TKeypressEvent dup() { + TKeypressEvent keypress = new TKeypressEvent(key.dup()); + return keypress; + } + }