1 /* 2 * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 package com.sun.glass.events; 26 27 public class WindowEvent { 28 final static public int RESIZE = 511; 29 final static public int MOVE = 512; 30 31 final static public int CLOSE = 521; 32 final static public int DESTROY = 522; 33 34 final static public int MINIMIZE = 531; 35 final static public int MAXIMIZE = 532; 36 final static public int RESTORE = 533; 37 38 final static public int _FOCUS_MIN = 541; 39 final static public int FOCUS_LOST = 541; 40 final static public int FOCUS_GAINED = 542; 41 final static public int FOCUS_GAINED_FORWARD = 543; 42 final static public int FOCUS_GAINED_BACKWARD = 544; 43 final static public int _FOCUS_MAX = 544; 44 45 final static public int FOCUS_DISABLED = 545; 46 final static public int FOCUS_UNGRAB = 546; 47 48 public static String getEventName(final int eventType) { 49 switch(eventType) { 50 case WindowEvent.RESIZE: 51 return "RESIZE"; 52 case WindowEvent.MOVE: 53 return "MOVE"; 54 case WindowEvent.CLOSE: 55 return "CLOSE"; 56 case WindowEvent.DESTROY: 57 return "DESTROY"; 58 case WindowEvent.MINIMIZE: 59 return "MINIMIZE"; 60 case WindowEvent.MAXIMIZE: 61 return "MAXIMIZE"; 62 case WindowEvent.RESTORE: 63 return "RESTORE"; 64 case WindowEvent.FOCUS_LOST: 65 return "FOCUS_LOST"; 66 case WindowEvent.FOCUS_GAINED: 67 return "FOCUS_GAINED"; 68 case WindowEvent.FOCUS_GAINED_FORWARD: 69 return "FOCUS_GAINED_FORWARD"; 70 case WindowEvent.FOCUS_GAINED_BACKWARD: 71 return "FOCUS_GAINED_BACKWARD"; 72 case WindowEvent.FOCUS_DISABLED: 73 return "FOCUS_DISABLED"; 74 case WindowEvent.FOCUS_UNGRAB: 75 return "FOCUS_UNGRAB"; 76 default: 77 return "UNKNOWN"; 78 } 79 } 80 }