diff options
author | Sven Gothel <[email protected]> | 2012-05-02 01:20:46 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-05-02 01:20:46 +0200 |
commit | 935523a8c58efced1c0845bd60e08e2acb9e5aee (patch) | |
tree | 3719897e3c2804abff130e299858df7c09f84588 /src/nativewindow/classes/jogamp | |
parent | 969567663c08597c2c2effe6128f4810ec252513 (diff) |
NEWT API Change 'WindowClosingProtocol': Use 'enum WindowClosingMode' instead of static final int values.
Diffstat (limited to 'src/nativewindow/classes/jogamp')
-rw-r--r-- | src/nativewindow/classes/jogamp/nativewindow/awt/AWTMisc.java | 12 |
1 files changed, 6 insertions, 6 deletions
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); } } |