From 935523a8c58efced1c0845bd60e08e2acb9e5aee Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 2 May 2012 01:20:46 +0200 Subject: NEWT API Change 'WindowClosingProtocol': Use 'enum WindowClosingMode' instead of static final int values. --- .../classes/jogamp/nativewindow/awt/AWTMisc.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/nativewindow/classes/jogamp') diff --git a/src/nativewindow/classes/jogamp/nativewindow/awt/AWTMisc.java b/src/nativewindow/classes/jogamp/nativewindow/awt/AWTMisc.java index 834d8a703..d77cd75ef 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/awt/AWTMisc.java +++ b/src/nativewindow/classes/jogamp/nativewindow/awt/AWTMisc.java @@ -75,22 +75,22 @@ public class AWTMisc { MenuSelectionManager.defaultManager().clearSelectedPath(); } - public static int AWT2NWClosingOperation(int awtClosingOperation) { + public static WindowClosingProtocol.WindowClosingMode AWT2NWClosingOperation(int awtClosingOperation) { switch (awtClosingOperation) { case WindowConstants.DISPOSE_ON_CLOSE: case WindowConstants.EXIT_ON_CLOSE: - return WindowClosingProtocol.DISPOSE_ON_CLOSE; + return WindowClosingProtocol.WindowClosingMode.DISPOSE_ON_CLOSE; case WindowConstants.DO_NOTHING_ON_CLOSE: case WindowConstants.HIDE_ON_CLOSE: - return WindowClosingProtocol.DO_NOTHING_ON_CLOSE; + return WindowClosingProtocol.WindowClosingMode.DO_NOTHING_ON_CLOSE; default: throw new NativeWindowException("Unhandled AWT Closing Operation: " + awtClosingOperation); } } - public static int getNWClosingOperation(Component c) { - JFrame jf = getJFrame(c); - int op = (null != jf) ? jf.getDefaultCloseOperation() : WindowConstants.DO_NOTHING_ON_CLOSE ; + public static WindowClosingProtocol.WindowClosingMode getNWClosingOperation(Component c) { + final JFrame jf = getJFrame(c); + final int op = (null != jf) ? jf.getDefaultCloseOperation() : WindowConstants.DO_NOTHING_ON_CLOSE ; return AWT2NWClosingOperation(op); } } -- cgit v1.2.3