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"; | 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 final static public int RESCALE = 513; 31 32 final static public int CLOSE = 521; 33 final static public int DESTROY = 522; 34 35 final static public int MINIMIZE = 531; 36 final static public int MAXIMIZE = 532; 37 final static public int RESTORE = 533; 38 39 final static public int _FOCUS_MIN = 541; 40 final static public int FOCUS_LOST = 541; 41 final static public int FOCUS_GAINED = 542; 42 final static public int FOCUS_GAINED_FORWARD = 543; 43 final static public int FOCUS_GAINED_BACKWARD = 544; 44 final static public int _FOCUS_MAX = 544; 45 46 final static public int FOCUS_DISABLED = 545; 47 final static public int FOCUS_UNGRAB = 546; 48 49 public static String getEventName(final int eventType) { 50 switch(eventType) { 51 case WindowEvent.RESIZE: 52 return "RESIZE"; 53 case WindowEvent.MOVE: 54 return "MOVE"; 55 case WindowEvent.RESCALE: 56 return "RESCALE"; 57 case WindowEvent.CLOSE: 58 return "CLOSE"; 59 case WindowEvent.DESTROY: 60 return "DESTROY"; 61 case WindowEvent.MINIMIZE: 62 return "MINIMIZE"; 63 case WindowEvent.MAXIMIZE: 64 return "MAXIMIZE"; 65 case WindowEvent.RESTORE: 66 return "RESTORE"; 67 case WindowEvent.FOCUS_LOST: 68 return "FOCUS_LOST"; 69 case WindowEvent.FOCUS_GAINED: 70 return "FOCUS_GAINED"; 71 case WindowEvent.FOCUS_GAINED_FORWARD: 72 return "FOCUS_GAINED_FORWARD"; 73 case WindowEvent.FOCUS_GAINED_BACKWARD: 74 return "FOCUS_GAINED_BACKWARD"; 75 case WindowEvent.FOCUS_DISABLED: 76 return "FOCUS_DISABLED"; |