aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes/javax/media
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-05-02 01:20:46 +0200
committerSven Gothel <[email protected]>2012-05-02 01:20:46 +0200
commit935523a8c58efced1c0845bd60e08e2acb9e5aee (patch)
tree3719897e3c2804abff130e299858df7c09f84588 /src/nativewindow/classes/javax/media
parent969567663c08597c2c2effe6128f4810ec252513 (diff)
NEWT API Change 'WindowClosingProtocol': Use 'enum WindowClosingMode' instead of static final int values.
Diffstat (limited to 'src/nativewindow/classes/javax/media')
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/WindowClosingProtocol.java39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/nativewindow/classes/javax/media/nativewindow/WindowClosingProtocol.java b/src/nativewindow/classes/javax/media/nativewindow/WindowClosingProtocol.java
index 949aee79c..884c916e4 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/WindowClosingProtocol.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/WindowClosingProtocol.java
@@ -32,35 +32,38 @@ package javax.media.nativewindow;
* Protocol for handling window closing events.
* <p>
* The implementation shall obey either the user value set by this interface,<br>
- * an underlying toolkit set user value or it's default, eg. {@link #DO_NOTHING_ON_CLOSE DO_NOTHING_ON_CLOSE} within an AWT environment.<br>
+ * an underlying toolkit set user value or it's default, eg. {@link WindowClosingMode#DO_NOTHING_ON_CLOSE DO_NOTHING_ON_CLOSE} within an AWT environment.<br>
* If none of the above determines the operation,
- * this protocol default behavior {@link #DISPOSE_ON_CLOSE DISPOSE_ON_CLOSE} shall be used.</p>
+ * this protocol default behavior {@link WindowClosingMode#DISPOSE_ON_CLOSE DISPOSE_ON_CLOSE} shall be used.</p>
*/
public interface WindowClosingProtocol {
- /**
- * Dispose resources on native window close operation.<br>
- * This is the default behavior in case no underlying toolkit defines otherwise.
- */
- int DISPOSE_ON_CLOSE = 1;
+ public enum WindowClosingMode {
+ /**
+ * Do nothing on native window close operation.<br>
+ * This is the default behavior within an AWT environment.
+ */
+ DO_NOTHING_ON_CLOSE,
+
+ /**
+ * Dispose resources on native window close operation.<br>
+ * This is the default behavior in case no underlying toolkit defines otherwise.
+ */
+ DISPOSE_ON_CLOSE;
+ }
- /**
- * Do nothing on native window close operation.<br>
- * This is the default behavior within an AWT environment.
- */
- int DO_NOTHING_ON_CLOSE = 0;
/**
* @return the current close operation value
- * @see #DISPOSE_ON_CLOSE
- * @see #DO_NOTHING_ON_CLOSE
+ * @see WindowClosingMode#DISPOSE_ON_CLOSE
+ * @see WindowClosingMode#DO_NOTHING_ON_CLOSE
*/
- int getDefaultCloseOperation();
+ WindowClosingMode getDefaultCloseOperation();
/**
* @param op the new close operation value
* @return the previous close operation value
- * @see #DISPOSE_ON_CLOSE
- * @see #DO_NOTHING_ON_CLOSE
+ * @see WindowClosingMode#DISPOSE_ON_CLOSE
+ * @see WindowClosingMode#DO_NOTHING_ON_CLOSE
*/
- int setDefaultCloseOperation(int op);
+ WindowClosingMode setDefaultCloseOperation(WindowClosingMode op);
}