--- old/src/java.desktop/share/classes/java/awt/Taskbar.java 2017-03-14 14:55:17.000000000 +0300
+++ new/src/java.desktop/share/classes/java/awt/Taskbar.java 2017-03-14 14:55:17.000000000 +0300
@@ -91,7 +91,7 @@
/**
* Represents a progress state feature for a specified window.
- * @see #setWindowProgressState(java.awt.Window, State)
+ * @see #setWindowProgressState(java.awt.Frame, State)
*/
PROGRESS_STATE_WINDOW,
@@ -103,7 +103,7 @@
/**
* Represents a progress value feature for a specified window.
- * @see #setWindowProgressValue(java.awt.Window, int)
+ * @see #setWindowProgressValue(java.awt.Frame, int)
*/
PROGRESS_VALUE_WINDOW,
@@ -115,7 +115,7 @@
/**
* Represents a user attention request feature for a specified window.
- * @see #requestWindowUserAttention(java.awt.Window)
+ * @see #requestWindowUserAttention(java.awt.Frame)
*/
USER_ATTENTION_WINDOW
}
@@ -123,7 +123,7 @@
/**
* Kinds of available window progress states.
*
- * @see #setWindowProgressState(java.awt.Window, java.awt.Taskbar.State)
+ * @see #setWindowProgressState(java.awt.Frame, java.awt.Taskbar.State)
*/
public static enum State {
/**
@@ -274,13 +274,15 @@
/**
* Requests user attention to the specified window.
*
+ * Has no effect if this window is not visible in the task area.
+ *
* @param w window
* @throws SecurityException if a security manager exists and it denies the
* {@code RuntimePermission("canProcessApplicationEvents")} permission.
* @throws UnsupportedOperationException if the current platform
* does not support the {@link Taskbar.Feature#USER_ATTENTION_WINDOW} feature
*/
- public void requestWindowUserAttention(Window w) {
+ public void requestWindowUserAttention(Frame w) {
checkEventsProcessingPermission();
checkFeatureSupport(Feature.USER_ATTENTION_WINDOW);
peer.requestWindowUserAttention(w);
@@ -375,6 +377,8 @@
* for the specified window.
* It may be disabled by system settings.
*
+ * Has no effect if this window is not visible in the task area.
+ *
* @param w window to update
* @param badge image to affix to the icon
* @throws SecurityException if a security manager exists and it denies the
@@ -382,7 +386,7 @@
* @throws UnsupportedOperationException if the current platform
* does not support the {@link Taskbar.Feature#ICON_BADGE_IMAGE_WINDOW} feature
*/
- public void setWindowIconBadge(Window w, final Image badge) {
+ public void setWindowIconBadge(Frame w, final Image badge) {
checkEventsProcessingPermission();
checkFeatureSupport(Feature.ICON_BADGE_IMAGE_WINDOW);
if (w != null) {
@@ -409,6 +413,8 @@
/**
* Displays a determinate progress bar in the task area for the specified
* window.
+ *
+ * Has no effect if this window is not visible in the task area.
*
* The visual behavior is platform and {@link State} dependent.
*
@@ -421,13 +427,13 @@
* @param w window to update
* @param value from 0 to 100, other to switch to {@link State#OFF} state
* and disable progress indication
- * @see #setWindowProgressState(java.awt.Window, State)
+ * @see #setWindowProgressState(java.awt.Frame, State)
* @throws SecurityException if a security manager exists and it denies the
* {@code RuntimePermission("canProcessApplicationEvents")} permission.
* @throws UnsupportedOperationException if the current platform
* does not support the {@link Taskbar.Feature#PROGRESS_VALUE_WINDOW} feature
*/
- public void setWindowProgressValue(Window w, int value) {
+ public void setWindowProgressValue(Frame w, int value) {
checkEventsProcessingPermission();
checkFeatureSupport(Feature.PROGRESS_VALUE_WINDOW);
if (w != null) {
@@ -437,6 +443,8 @@
/**
* Sets a progress state for a specified window.
+ *
+ * Has no effect if this window is not visible in the task area.
*
* Each state displays a progress in a platform-dependent way.
*
@@ -451,13 +459,13 @@
* @see State#PAUSED
* @see State#ERROR
* @see State#INDETERMINATE
- * @see #setWindowProgressValue(java.awt.Window, int)
+ * @see #setWindowProgressValue(java.awt.Frame, int)
* @throws SecurityException if a security manager exists and it denies the
* {@code RuntimePermission("canProcessApplicationEvents")} permission.
* @throws UnsupportedOperationException if the current platform
* does not support the {@link Taskbar.Feature#PROGRESS_STATE_WINDOW} feature
*/
- public void setWindowProgressState(Window w, State state) {
+ public void setWindowProgressState(Frame w, State state) {
checkEventsProcessingPermission();
checkFeatureSupport(Feature.PROGRESS_STATE_WINDOW);
if (w != null) {