339 * Obtains an image of this application's icon.
340 *
341 * @return an image of this application's icon
342 * @throws SecurityException if a security manager exists and it denies the
343 * {@code AWTPermission("showWindowWithoutWarningBanner")} permission.
344 * @throws UnsupportedOperationException if the current platform
345 * does not support the {@link Taskbar.Feature#ICON_IMAGE} feature
346 */
347 public Image getIconImage() {
348 checkAWTPermission();
349 checkFeatureSupport(Feature.ICON_IMAGE);
350 return peer.getIconImage();
351 }
352
353 /**
354 * Affixes a small system-provided badge to this application's icon.
355 * Usually a number.
356 *
357 * Some platforms do not support string values and accept only integer
358 * values. In this case, pass an integer represented as a string as parameter.
359 * This can be tested by {@code Feature.ICON_BADGE_STRING} and
360 * {@code Feature.ICON_BADGE_NUMBER}.
361 *
362 * Passing {@code null} as parameter hides the badge.
363 * @param badge label to affix to the icon
364 * @throws SecurityException if a security manager exists and it denies the
365 * {@code AWTPermission("showWindowWithoutWarningBanner")} permission.
366 * @throws UnsupportedOperationException if the current platform
367 * does not support the {@link Taskbar.Feature#ICON_BADGE_NUMBER} feature
368 */
369 public void setIconBadge(final String badge) {
370 checkAWTPermission();
371 checkFeatureSupport(Feature.ICON_BADGE_NUMBER);
372 peer.setIconBadge(badge);
373 }
374
375 /**
376 * Affixes a small badge to this application's icon in the task area
377 * for the specified window.
378 * It may be disabled by system settings.
379 *
|
339 * Obtains an image of this application's icon.
340 *
341 * @return an image of this application's icon
342 * @throws SecurityException if a security manager exists and it denies the
343 * {@code AWTPermission("showWindowWithoutWarningBanner")} permission.
344 * @throws UnsupportedOperationException if the current platform
345 * does not support the {@link Taskbar.Feature#ICON_IMAGE} feature
346 */
347 public Image getIconImage() {
348 checkAWTPermission();
349 checkFeatureSupport(Feature.ICON_IMAGE);
350 return peer.getIconImage();
351 }
352
353 /**
354 * Affixes a small system-provided badge to this application's icon.
355 * Usually a number.
356 *
357 * Some platforms do not support string values and accept only integer
358 * values. In this case, pass an integer represented as a string as parameter.
359 * This can be tested by {@code Feature.ICON_BADGE_TEXT} and
360 * {@code Feature.ICON_BADGE_NUMBER}.
361 *
362 * Passing {@code null} as parameter hides the badge.
363 * @param badge label to affix to the icon
364 * @throws SecurityException if a security manager exists and it denies the
365 * {@code AWTPermission("showWindowWithoutWarningBanner")} permission.
366 * @throws UnsupportedOperationException if the current platform
367 * does not support the {@link Taskbar.Feature#ICON_BADGE_NUMBER} feature
368 */
369 public void setIconBadge(final String badge) {
370 checkAWTPermission();
371 checkFeatureSupport(Feature.ICON_BADGE_NUMBER);
372 peer.setIconBadge(badge);
373 }
374
375 /**
376 * Affixes a small badge to this application's icon in the task area
377 * for the specified window.
378 * It may be disabled by system settings.
379 *
|