2 * Jexer - Java Text User Interface
4 * License: LGPLv3 or later
6 * This module is licensed under the GNU Lesser General Public License
7 * Version 3. Please see the file "COPYING" in this directory for more
8 * information about the GNU Lesser General Public License Version 3.
10 * Copyright (C) 2015 Kevin Lamonte
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public License
14 * as published by the Free Software Foundation; either version 3 of
15 * the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this program; if not, see
24 * http://www.gnu.org/licenses/, or write to the Free Software
25 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
28 * @author Kevin Lamonte [kevin.lamonte@gmail.com]
34 * This class encapsulates a screen or window resize event.
36 public final class TResizeEvent
extends TInputEvent
{
39 * Resize events can be generated for either a total screen resize or a
40 * widget/window resize.
44 * The entire screen size changed.
49 * A widget was resized.
62 * @return SCREEN or WIDGET
64 public Type
getType() {
78 public int getWidth() {
92 public int getHeight() {
99 * @param type the Type of resize, Screen or Widget
100 * @param width the new width
101 * @param height the new height
103 public TResizeEvent(final Type type
, final int width
, final int height
) {
106 this.height
= height
;
110 * Make human-readable description of this TResizeEvent.
112 * @return displayable String
115 public String
toString() {
116 return String
.format("Resize: %s width = %d height = %d",
117 type
, width
, height
);