--- old/src/java.desktop/share/classes/java/awt/desktop/AboutEvent.java 2018-12-04 16:22:17.000000000 -0800 +++ new/src/java.desktop/share/classes/java/awt/desktop/AboutEvent.java 2018-12-04 16:22:16.000000000 -0800 @@ -33,11 +33,13 @@ * Event sent when the application is asked to open its about window. * * @see AboutHandler#handleAbout - * * @since 9 */ public final class AboutEvent extends AppEvent { + /** + * Use serialVersionUID from JDK 9 for interoperability. + */ private static final long serialVersionUID = -5987180734802756477L; /** --- old/src/java.desktop/share/classes/java/awt/desktop/AboutHandler.java 2018-12-04 16:22:18.000000000 -0800 +++ new/src/java.desktop/share/classes/java/awt/desktop/AboutHandler.java 2018-12-04 16:22:18.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,8 +29,7 @@ * An implementer receives notification when the app is asked to show its about * dialog. * - * @see java.awt.Desktop#setAboutHandler(java.awt.desktop.AboutHandler) - * + * @see java.awt.Desktop#setAboutHandler(AboutHandler) * @since 9 */ public interface AboutHandler { @@ -38,7 +37,7 @@ /** * Called when the application is asked to show its about dialog. * - * @param e the request to show the about dialog. + * @param e the request to show the about dialog */ - public void handleAbout(final AboutEvent e); + public void handleAbout(AboutEvent e); } --- old/src/java.desktop/share/classes/java/awt/desktop/AppEvent.java 2018-12-04 16:22:20.000000000 -0800 +++ new/src/java.desktop/share/classes/java/awt/desktop/AppEvent.java 2018-12-04 16:22:19.000000000 -0800 @@ -38,6 +38,9 @@ */ public class AppEvent extends EventObject { + /** + * Use serialVersionUID from JDK 9 for interoperability. + */ private static final long serialVersionUID = -5958503993556009432L; /** --- old/src/java.desktop/share/classes/java/awt/desktop/AppForegroundEvent.java 2018-12-04 16:22:21.000000000 -0800 +++ new/src/java.desktop/share/classes/java/awt/desktop/AppForegroundEvent.java 2018-12-04 16:22:21.000000000 -0800 @@ -35,11 +35,13 @@ * * @see AppForegroundListener#appRaisedToForeground(AppForegroundEvent) * @see AppForegroundListener#appMovedToBackground(AppForegroundEvent) - * * @since 9 */ public final class AppForegroundEvent extends AppEvent { + /** + * Use serialVersionUID from JDK 9 for interoperability. + */ private static final long serialVersionUID = -5513582555740533911L; /** --- old/src/java.desktop/share/classes/java/awt/desktop/AppForegroundListener.java 2018-12-04 16:22:23.000000000 -0800 +++ new/src/java.desktop/share/classes/java/awt/desktop/AppForegroundListener.java 2018-12-04 16:22:23.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,17 +34,19 @@ * @since 9 */ public interface AppForegroundListener extends SystemEventListener { + /** * Called when the app becomes the foreground app. - * @param e event + * + * @param e event */ - public void appRaisedToForeground(final AppForegroundEvent e); + public void appRaisedToForeground(AppForegroundEvent e); /** * Called when the app becomes the background app and another app becomes * the foreground app. * - * @param e event + * @param e event */ - public void appMovedToBackground(final AppForegroundEvent e); + public void appMovedToBackground(AppForegroundEvent e); } --- old/src/java.desktop/share/classes/java/awt/desktop/AppHiddenEvent.java 2018-12-04 16:22:24.000000000 -0800 +++ new/src/java.desktop/share/classes/java/awt/desktop/AppHiddenEvent.java 2018-12-04 16:22:24.000000000 -0800 @@ -34,11 +34,13 @@ * * @see AppHiddenListener#appHidden(AppHiddenEvent) * @see AppHiddenListener#appUnhidden(AppHiddenEvent) - * * @since 9 */ public final class AppHiddenEvent extends AppEvent { + /** + * Use serialVersionUID from JDK 9 for interoperability. + */ private static final long serialVersionUID = 2637465279476429224L; /** --- old/src/java.desktop/share/classes/java/awt/desktop/AppHiddenListener.java 2018-12-04 16:22:26.000000000 -0800 +++ new/src/java.desktop/share/classes/java/awt/desktop/AppHiddenListener.java 2018-12-04 16:22:26.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,17 +35,17 @@ public interface AppHiddenListener extends SystemEventListener { /** - * Called the app is hidden. + * Called when the app is hidden. * - * @param e event + * @param e event */ - public void appHidden(final AppHiddenEvent e); + public void appHidden(AppHiddenEvent e); /** * Called when the hidden app is shown again (but not necessarily brought to * the foreground). * - * @param e event + * @param e event */ - public void appUnhidden(final AppHiddenEvent e); + public void appUnhidden(AppHiddenEvent e); } --- old/src/java.desktop/share/classes/java/awt/desktop/AppReopenedEvent.java 2018-12-04 16:22:28.000000000 -0800 +++ new/src/java.desktop/share/classes/java/awt/desktop/AppReopenedEvent.java 2018-12-04 16:22:27.000000000 -0800 @@ -33,11 +33,13 @@ * Event sent when the application is asked to re-open itself. * * @see AppReopenedListener#appReopened(AppReopenedEvent) - * * @since 9 */ public final class AppReopenedEvent extends AppEvent { + /** + * Use serialVersionUID from JDK 9 for interoperability. + */ private static final long serialVersionUID = 1503238361530407990L; /** --- old/src/java.desktop/share/classes/java/awt/desktop/AppReopenedListener.java 2018-12-04 16:22:29.000000000 -0800 +++ new/src/java.desktop/share/classes/java/awt/desktop/AppReopenedListener.java 2018-12-04 16:22:29.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,15 +27,18 @@ /** * Implementors receive notification when the app has been asked to open again. - * - * This notification is useful for showing a new document when your app has no open windows. + *
+ * This notification is useful for showing a new document when your app has no
+ * open windows.
*
* @since 9
*/
public interface AppReopenedListener extends SystemEventListener {
+
/**
- * Called when the app has been reopened
- * @param e the request to reopen the app
+ * Called when the app has been reopened.
+ *
+ * @param e the request to reopen the app
*/
- public void appReopened(final AppReopenedEvent e);
+ public void appReopened(AppReopenedEvent e);
}
--- old/src/java.desktop/share/classes/java/awt/desktop/FilesEvent.java 2018-12-04 16:22:31.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/FilesEvent.java 2018-12-04 16:22:30.000000000 -0800
@@ -39,7 +39,14 @@
*/
public class FilesEvent extends AppEvent {
+ /**
+ * Use serialVersionUID from JDK 9 for interoperability.
+ */
private static final long serialVersionUID = 5271763715462312871L;
+
+ /**
+ * The list of files.
+ */
final List
* This is useful for highlighting the search term in the documents when
* they are opened.
--- old/src/java.desktop/share/classes/java/awt/desktop/OpenFilesHandler.java 2018-12-04 16:22:34.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/OpenFilesHandler.java 2018-12-04 16:22:33.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,18 +25,20 @@
package java.awt.desktop;
-
/**
- * An implementor is notified when the application is asked to open a list of files.
- *
- * @see java.awt.Desktop#setOpenFileHandler(java.awt.desktop.OpenFilesHandler)
+ * An implementor is notified when the application is asked to open a list of
+ * files.
*
+ * @see java.awt.Desktop#setOpenFileHandler(OpenFilesHandler)
* @since 9
*/
public interface OpenFilesHandler {
+
/**
* Called when the application is asked to open a list of files.
- * @param e the request to open a list of files, and the search term used to find them, if any.
+ *
+ * @param e the request to open a list of files, and the search term used
+ * to find them, if any
*/
- public void openFiles(final OpenFilesEvent e);
+ public void openFiles(OpenFilesEvent e);
}
--- old/src/java.desktop/share/classes/java/awt/desktop/OpenURIEvent.java 2018-12-04 16:22:35.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/OpenURIEvent.java 2018-12-04 16:22:35.000000000 -0800
@@ -34,12 +34,18 @@
* Event sent when the app is asked to open a {@code URI}.
*
* @see OpenURIHandler#openURI(OpenURIEvent)
- *
* @since 9
*/
public final class OpenURIEvent extends AppEvent {
+ /**
+ * Use serialVersionUID from JDK 9 for interoperability.
+ */
private static final long serialVersionUID = 221209100935933476L;
+
+ /**
+ * The {@code URI} the app was asked to open.
+ */
final URI uri;
/**
@@ -58,7 +64,8 @@
}
/**
- * Get the {@code URI} the app was asked to open
+ * Get the {@code URI} the app was asked to open.
+ *
* @return the {@code URI}
*/
public URI getURI() {
--- old/src/java.desktop/share/classes/java/awt/desktop/OpenURIHandler.java 2018-12-04 16:22:37.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/OpenURIHandler.java 2018-12-04 16:22:36.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,14 +28,15 @@
/**
* An implementor is notified when the application is asked to open a URI.
*
- * @see java.awt.Desktop#setOpenURIHandler(java.awt.desktop.OpenURIHandler)
- *
+ * @see java.awt.Desktop#setOpenURIHandler(OpenURIHandler)
* @since 9
*/
public interface OpenURIHandler {
+
/**
- * Called when the application is asked to open a {@code URI}
- * @param e the request to open a {@code URI}
+ * Called when the application is asked to open a {@code URI}.
+ *
+ * @param e the request to open a {@code URI}
*/
- public void openURI(final OpenURIEvent e);
+ public void openURI(OpenURIEvent e);
}
--- old/src/java.desktop/share/classes/java/awt/desktop/PreferencesEvent.java 2018-12-04 16:22:38.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/PreferencesEvent.java 2018-12-04 16:22:38.000000000 -0800
@@ -33,11 +33,13 @@
* Event sent when the application is asked to open its preferences window.
*
* @see PreferencesHandler#handlePreferences
- *
* @since 9
*/
public final class PreferencesEvent extends AppEvent {
+ /**
+ * Use serialVersionUID from JDK 9 for interoperability.
+ */
private static final long serialVersionUID = -6398607097086476160L;
/**
--- old/src/java.desktop/share/classes/java/awt/desktop/PreferencesHandler.java 2018-12-04 16:22:40.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/PreferencesHandler.java 2018-12-04 16:22:40.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,14 +28,15 @@
/**
* An implementor is notified when the app is asked to show its preferences UI.
*
- * @see java.awt.Desktop#setPreferencesHandler(java.awt.desktop.PreferencesHandler)
- *
+ * @see java.awt.Desktop#setPreferencesHandler(PreferencesHandler)
* @since 9
*/
public interface PreferencesHandler {
+
/**
* Called when the app is asked to show its preferences UI.
- * @param e the request to show preferences.
+ *
+ * @param e the request to show preferences
*/
- public void handlePreferences(final PreferencesEvent e);
+ public void handlePreferences(PreferencesEvent e);
}
--- old/src/java.desktop/share/classes/java/awt/desktop/PrintFilesEvent.java 2018-12-04 16:22:41.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/PrintFilesEvent.java 2018-12-04 16:22:41.000000000 -0800
@@ -39,6 +39,9 @@
*/
public final class PrintFilesEvent extends FilesEvent {
+ /**
+ * Use serialVersionUID from JDK 9 for interoperability.
+ */
private static final long serialVersionUID = -5752560876153618618L;
/**
--- old/src/java.desktop/share/classes/java/awt/desktop/PrintFilesHandler.java 2018-12-04 16:22:43.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/PrintFilesHandler.java 2018-12-04 16:22:43.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,16 +26,18 @@
package java.awt.desktop;
/**
- * An implementor can respond to requests to print documents that the app has been registered to handle.
- *
- * @see java.awt.Desktop#setPrintFileHandler(java.awt.desktop.PrintFilesHandler)
+ * An implementor can respond to requests to print documents that the app has
+ * been registered to handle.
*
+ * @see java.awt.Desktop#setPrintFileHandler(PrintFilesHandler)
* @since 9
*/
public interface PrintFilesHandler {
+
/**
* Called when the application is asked to print a list of files.
- * @param e the request to print a list of files.
+ *
+ * @param e the request to print a list of files
*/
- public void printFiles(final PrintFilesEvent e);
+ public void printFiles(PrintFilesEvent e);
}
--- old/src/java.desktop/share/classes/java/awt/desktop/QuitEvent.java 2018-12-04 16:22:45.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/QuitEvent.java 2018-12-04 16:22:44.000000000 -0800
@@ -33,11 +33,13 @@
* Event sent when the application is asked to quit.
*
* @see QuitHandler#handleQuitRequestWith(QuitEvent, QuitResponse)
- *
* @since 9
*/
public final class QuitEvent extends AppEvent {
+ /**
+ * Use serialVersionUID from JDK 9 for interoperability.
+ */
private static final long serialVersionUID = -256100795532403146L;
/**
--- old/src/java.desktop/share/classes/java/awt/desktop/QuitHandler.java 2018-12-04 16:22:46.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/QuitHandler.java 2018-12-04 16:22:46.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,26 +26,32 @@
package java.awt.desktop;
/**
- * An implementor determines if requests to quit this application should proceed or cancel.
- *
- * @see java.awt.Desktop#setQuitHandler(java.awt.desktop.QuitHandler)
- * @see java.awt.Desktop#setQuitStrategy(java.awt.desktop.QuitStrategy)
+ * An implementor determines if requests to quit this application should proceed
+ * or cancel.
*
+ * @see java.awt.Desktop#setQuitHandler(QuitHandler)
+ * @see java.awt.Desktop#setQuitStrategy(QuitStrategy)
* @since 9
*/
public interface QuitHandler {
+
/**
* Invoked when the application is asked to quit.
+ *
+ * Implementors must call either {@link QuitResponse#cancelQuit()},
+ * {@link QuitResponse#performQuit()}, or ensure the application terminates.
+ * The process (or log-out) requesting this app to quit will be blocked
+ * until the {@link QuitResponse} is handled. Apps that require complex UI
+ * to shutdown may call the {@link QuitResponse} from any thread. Your app
+ * may be asked to quit multiple times before you have responded to the
+ * initial request. This handler is called each time a quit is requested,
+ * and the same {@link QuitResponse} object is passed until it is handled.
+ * Once used, the {@link QuitResponse} cannot be used again to change the
+ * decision.
*
- * Implementors must call either {@link QuitResponse#cancelQuit()}, {@link QuitResponse#performQuit()}, or ensure the application terminates.
- * The process (or log-out) requesting this app to quit will be blocked until the {@link QuitResponse} is handled.
- * Apps that require complex UI to shutdown may call the {@link QuitResponse} from any thread.
- * Your app may be asked to quit multiple times before you have responded to the initial request.
- * This handler is called each time a quit is requested, and the same {@link QuitResponse} object is passed until it is handled.
- * Once used, the {@link QuitResponse} cannot be used again to change the decision.
- *
- * @param e the request to quit this application.
- * @param response the one-shot response object used to cancel or proceed with the quit action.
+ * @param e the request to quit this application
+ * @param response the one-shot response object used to cancel or proceed
+ * with the quit action
*/
- public void handleQuitRequestWith(final QuitEvent e, final QuitResponse response);
+ public void handleQuitRequestWith(QuitEvent e, QuitResponse response);
}
--- old/src/java.desktop/share/classes/java/awt/desktop/QuitResponse.java 2018-12-04 16:22:48.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/QuitResponse.java 2018-12-04 16:22:47.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,21 +28,23 @@
/**
* Used to respond to a request to quit the application.
*
- * @see java.awt.Desktop#setQuitHandler(java.awt.desktop.QuitHandler)
- * @see java.awt.desktop.QuitHandler
- * @see java.awt.Desktop#setQuitStrategy(java.awt.desktop.QuitStrategy)
- *
+ * @see java.awt.Desktop#setQuitHandler(QuitHandler)
+ * @see QuitHandler
+ * @see java.awt.Desktop#setQuitStrategy(QuitStrategy)
* @since 9
*/
public interface QuitResponse {
/**
- * Notifies the external quit requester that the quit will proceed, and performs the default {@link java.awt.desktop.QuitStrategy}.
+ * Notifies the external quit requester that the quit will proceed, and
+ * performs the default {@link QuitStrategy}.
*/
public void performQuit();
/**
- * Notifies the external quit requester that the user has explicitly canceled the pending quit, and leaves the application running.
+ * Notifies the external quit requester that the user has explicitly
+ * canceled the pending quit, and leaves the application running.
+ *
* Note: this will cancel a pending log-out, restart, or shutdown.
*/
public void cancelQuit();
--- old/src/java.desktop/share/classes/java/awt/desktop/QuitStrategy.java 2018-12-04 16:22:49.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/QuitStrategy.java 2018-12-04 16:22:49.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,18 +26,19 @@
package java.awt.desktop;
/**
- * The strategy used to shut down the application, if Sudden Termination is not enabled.
+ * The strategy used to shut down the application, if Sudden Termination is not
+ * enabled.
*
- * @see java.awt.Desktop#setQuitHandler(java.awt.desktop.QuitHandler)
- * @see java.awt.Desktop#setQuitStrategy(java.awt.desktop.QuitStrategy)
+ * @see java.awt.Desktop#setQuitHandler(QuitHandler)
+ * @see java.awt.Desktop#setQuitStrategy(QuitStrategy)
* @see java.awt.Desktop#enableSuddenTermination()
* @see java.awt.Desktop#disableSuddenTermination()
- *
* @since 9
*/
public enum QuitStrategy {
/**
- * Shuts down the application by calling {@code System.exit(0)}. This is the default strategy.
+ * Shuts down the application by calling {@code System.exit(0)}. This is the
+ * default strategy.
*/
NORMAL_EXIT,
--- old/src/java.desktop/share/classes/java/awt/desktop/ScreenSleepEvent.java 2018-12-04 16:22:51.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/ScreenSleepEvent.java 2018-12-04 16:22:50.000000000 -0800
@@ -35,11 +35,13 @@
*
* @see ScreenSleepListener#screenAboutToSleep(ScreenSleepEvent)
* @see ScreenSleepListener#screenAwoke(ScreenSleepEvent)
- *
* @since 9
*/
public final class ScreenSleepEvent extends AppEvent {
+ /**
+ * Use serialVersionUID from JDK 9 for interoperability.
+ */
private static final long serialVersionUID = 7521606180376544150L;
/**
--- old/src/java.desktop/share/classes/java/awt/desktop/ScreenSleepListener.java 2018-12-04 16:22:52.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/ScreenSleepListener.java 2018-12-04 16:22:52.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,11 @@
package java.awt.desktop;
/**
- * Implementors receive notification when the displays attached to the system have entered power save sleep.
- *
- * This notification is useful for discontinuing a costly animation, or indicating that the user is no longer present on a network service.
+ * Implementors receive notification when the displays attached to the system
+ * have entered power save sleep.
+ *
+ * This notification is useful for discontinuing a costly animation, or
+ * indicating that the user is no longer present on a network service.
*
* @since 9
*/
@@ -36,13 +38,15 @@
/**
* Called when the system displays have entered power save sleep.
- * @param e the screen sleep event
+ *
+ * @param e the screen sleep event
*/
- public void screenAboutToSleep(final ScreenSleepEvent e);
+ public void screenAboutToSleep(ScreenSleepEvent e);
/**
* Called when the system displays have awoken from power save sleep.
- * @param e the screen sleep event
+ *
+ * @param e the screen sleep event
*/
- public void screenAwoke(final ScreenSleepEvent e);
+ public void screenAwoke(ScreenSleepEvent e);
}
--- old/src/java.desktop/share/classes/java/awt/desktop/SystemEventListener.java 2018-12-04 16:22:54.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/SystemEventListener.java 2018-12-04 16:22:53.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,9 +28,8 @@
import java.util.EventListener;
/**
- * Common interface for all event listener sub-types.
- *
- * Implementors may implement multiple sub-types, but only need to call
+ * Common interface for all event listener sub-types. Implementors may implement
+ * multiple sub-types, but only need to call
* {@link java.awt.Desktop#addAppEventListener(SystemEventListener)} once to
* receive all notifications.
*
--- old/src/java.desktop/share/classes/java/awt/desktop/SystemSleepEvent.java 2018-12-04 16:22:55.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/SystemSleepEvent.java 2018-12-04 16:22:55.000000000 -0800
@@ -34,11 +34,13 @@
*
* @see SystemSleepListener#systemAboutToSleep(SystemSleepEvent)
* @see SystemSleepListener#systemAwoke(SystemSleepEvent)
- *
* @since 9
*/
public final class SystemSleepEvent extends AppEvent {
+ /**
+ * Use serialVersionUID from JDK 9 for interoperability.
+ */
private static final long serialVersionUID = 11372269824930549L;
/**
--- old/src/java.desktop/share/classes/java/awt/desktop/SystemSleepListener.java 2018-12-04 16:22:57.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/SystemSleepListener.java 2018-12-04 16:22:57.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
/**
* Implementors receive notification as the system is entering sleep, and after
* the system wakes.
- *
+ *
* This notification is useful for disconnecting from network services prior to
* sleep, or re-establishing a connection if the network configuration has
* changed during sleep.
@@ -42,14 +42,14 @@
* delivered prior to the actual system sleep, and may be processed after
* the corresponding wake has occurred.
*
- * @param e the system sleep event
+ * @param e the system sleep event
*/
- public void systemAboutToSleep(final SystemSleepEvent e);
+ public void systemAboutToSleep(SystemSleepEvent e);
/**
* Called after the system has awoken from sleeping.
*
- * @param e the system sleep event
+ * @param e the system sleep event
*/
- public void systemAwoke(final SystemSleepEvent e);
+ public void systemAwoke(SystemSleepEvent e);
}
--- old/src/java.desktop/share/classes/java/awt/desktop/UserSessionEvent.java 2018-12-04 16:22:58.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/UserSessionEvent.java 2018-12-04 16:22:58.000000000 -0800
@@ -30,19 +30,23 @@
import java.awt.HeadlessException;
/**
- * Event sent when the user session has been changed.
- *
- * Some systems may provide a reason of a user session change.
+ * Event sent when the user session has been changed. Some systems may provide a
+ * reason of a user session change.
*
* @see UserSessionListener#userSessionActivated(UserSessionEvent)
* @see UserSessionListener#userSessionDeactivated(UserSessionEvent)
- *
* @since 9
*/
public final class UserSessionEvent extends AppEvent {
+ /**
+ * Use serialVersionUID from JDK 9 for interoperability.
+ */
private static final long serialVersionUID = 6747138462796569055L;
+ /**
+ * The reason of the user session change.
+ */
private final Reason reason;
/**
--- old/src/java.desktop/share/classes/java/awt/desktop/UserSessionListener.java 2018-12-04 16:23:00.000000000 -0800
+++ new/src/java.desktop/share/classes/java/awt/desktop/UserSessionListener.java 2018-12-04 16:23:00.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,32 +25,33 @@
package java.awt.desktop;
-
/**
* Implementors receive notification when the user session changes.
- *
- * This notification is useful for discontinuing a costly animation,
- * or indicating that the user is no longer present on a network service.
- *
+ *
+ * This notification is useful for discontinuing a costly animation, or
+ * indicating that the user is no longer present on a network service.
+ *
* Some systems may provide a reason of the user session change.
*
* @see UserSessionEvent.Reason#UNSPECIFIED
* @see UserSessionEvent.Reason#CONSOLE
* @see UserSessionEvent.Reason#REMOTE
* @see UserSessionEvent.Reason#LOCK
- *
* @since 9
*/
public interface UserSessionListener extends SystemEventListener {
+
/**
* Called when the user session has been switched away.
- * @param e the user session switch event
+ *
+ * @param e the user session switch event
*/
- public void userSessionDeactivated(final UserSessionEvent e);
+ public void userSessionDeactivated(UserSessionEvent e);
/**
* Called when the user session has been switched to.
- * @param e the user session switch event
+ *
+ * @param e the user session switch event
*/
- public void userSessionActivated(final UserSessionEvent e);
+ public void userSessionActivated(UserSessionEvent e);
}