X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fevent%2FTResizeEvent.java;h=ff9571084232f1891258c1b0af02758f231fabb1;hb=505be508ae7d3fb48122be548b310a238cfb91eb;hp=be76ede9bb2eac4417b3a1b82df1c22f22352b25;hpb=e16dda65585466c8987bd1efd718431450a96605;p=fanfix.git diff --git a/src/jexer/event/TResizeEvent.java b/src/jexer/event/TResizeEvent.java index be76ede..ff95710 100644 --- a/src/jexer/event/TResizeEvent.java +++ b/src/jexer/event/TResizeEvent.java @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (C) 2016 Kevin Lamonte + * Copyright (C) 2019 Kevin Lamonte * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -31,7 +31,11 @@ package jexer.event; /** * This class encapsulates a screen or window resize event. */ -public final class TResizeEvent extends TInputEvent { +public class TResizeEvent extends TInputEvent { + + // ------------------------------------------------------------------------ + // Constants -------------------------------------------------------------- + // ------------------------------------------------------------------------ /** * Resize events can be generated for either a total screen resize or a @@ -49,11 +53,46 @@ public final class TResizeEvent extends TInputEvent { WIDGET } + // ------------------------------------------------------------------------ + // Variables -------------------------------------------------------------- + // ------------------------------------------------------------------------ + /** * The type of resize. */ private Type type; + /** + * New width. + */ + private int width; + + /** + * New height. + */ + private int height; + + // ------------------------------------------------------------------------ + // Constructors ----------------------------------------------------------- + // ------------------------------------------------------------------------ + + /** + * Public contructor. + * + * @param type the Type of resize, Screen or Widget + * @param width the new width + * @param height the new height + */ + public TResizeEvent(final Type type, final int width, final int height) { + this.type = type; + this.width = width; + this.height = height; + } + + // ------------------------------------------------------------------------ + // TResizeEvent ----------------------------------------------------------- + // ------------------------------------------------------------------------ + /** * Get resize type. * @@ -63,11 +102,6 @@ public final class TResizeEvent extends TInputEvent { return type; } - /** - * New width. - */ - private int width; - /** * Get the new width. * @@ -77,11 +111,6 @@ public final class TResizeEvent extends TInputEvent { return width; } - /** - * New height. - */ - private int height; - /** * Get the new height. * @@ -91,19 +120,6 @@ public final class TResizeEvent extends TInputEvent { return height; } - /** - * Public contructor. - * - * @param type the Type of resize, Screen or Widget - * @param width the new width - * @param height the new 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 TResizeEvent. *