X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fevent%2FTResizeEvent.java;h=e0dcb6dec3fcab8c04d82798bf4818df431aa23c;hb=7b5261bc5b641e0769902f014e3b21f61050b02b;hp=101b8f3bd96ced30bb5413b0a905efeda87a4e2d;hpb=9edb442b712de01d1b7af81d1d57a29c2c6e7871;p=fanfix.git diff --git a/src/jexer/event/TResizeEvent.java b/src/jexer/event/TResizeEvent.java index 101b8f3..e0dcb6d 100644 --- a/src/jexer/event/TResizeEvent.java +++ b/src/jexer/event/TResizeEvent.java @@ -1,16 +1,11 @@ /** * Jexer - Java Text User Interface * - * Version: $Id$ - * - * Author: Kevin Lamonte, kevin.lamonte@gmail.com - * * License: LGPLv3 or later * - * Copyright: This module is licensed under the GNU Lesser General - * Public License Version 3. Please see the file "COPYING" in this - * directory for more information about the GNU Lesser General Public - * License Version 3. + * This module is licensed under the GNU Lesser General Public License + * Version 3. Please see the file "COPYING" in this directory for more + * information about the GNU Lesser General Public License Version 3. * * Copyright (C) 2015 Kevin Lamonte * @@ -29,6 +24,9 @@ * http://www.gnu.org/licenses/, or write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA + * + * @author Kevin Lamonte [kevin.lamonte@gmail.com] + * @version 1 */ package jexer.event; @@ -42,45 +40,81 @@ public class TResizeEvent extends TInputEvent { * widget/window resize. */ public enum Type { - Screen, - Widget + /** + * The entire screen size changed. + */ + SCREEN, + + /** + * A widget was resized. + */ + WIDGET + } + + /** + * The type of resize. + */ + private Type type; + + /** + * Get resize type. + * + * @return SCREEN or WIDGET + */ + public final Type getType() { + return type; } /** - * The type of resize + * New width. + */ + private int width; + + /** + * Get the new width. + * + * @return width */ - public Type type; + public final int getWidth() { + return width; + } /** - * New width + * New height. */ - public int width; + private int height; /** - * New height + * Get the new height. + * + * @return height */ - public int height; + public final int getHeight() { + return width; + } /** - * Public contructor + * Public contructor. * * @param type the Type of resize, Screen or Widget * @param width the new width * @param height the new height */ - public TResizeEvent(Type type, int width, int height) { - this.type = type; - this.width = width; - this.height = height; + public TResizeEvent(final Type type, final int width, final int height) { + this.type = type; + this.width = width; + this.height = height; } /** - * Make human-readable description of this event + * Make human-readable description of this TResizeEvent. + * + * @return displayable String */ @Override - public String toString() { - return String.format("Resize: %s width = %d height = %d", - type, width, height); + public final String toString() { + return String.format("Resize: %s width = %d height = %d", + type, width, height); } }