< prev index next >

src/java.desktop/share/classes/java/awt/Taskbar.java

Print this page




 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      *
 380      * @param w window to update
 381      * @param badge image to affix to the icon
 382      * @throws SecurityException if a security manager exists and it denies the
 383      * {@code AWTPermission("showWindowWithoutWarningBanner")} permission.
 384      * @throws UnsupportedOperationException if the current platform
 385      * does not support the {@link Taskbar.Feature#ICON_BADGE_IMAGE_WINDOW} feature
 386      */
 387     public void setWindowIconBadge(Window w, final Image badge) {




 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} 
 368      * or {@link Taskbar.Feature#ICON_BADGE_TEXT} feature
 369      */
 370     public void setIconBadge(final String badge) {
 371         checkAWTPermission();
 372         checkFeatureSupport(Feature.ICON_BADGE_NUMBER);
 373         peer.setIconBadge(badge);
 374     }
 375 
 376     /**
 377      * Affixes a small badge to this application's icon in the task area
 378      * for the specified window.
 379      * It may be disabled by system settings.
 380      *
 381      * @param w window to update
 382      * @param badge image to affix to the icon
 383      * @throws SecurityException if a security manager exists and it denies the
 384      * {@code AWTPermission("showWindowWithoutWarningBanner")} permission.
 385      * @throws UnsupportedOperationException if the current platform
 386      * does not support the {@link Taskbar.Feature#ICON_BADGE_IMAGE_WINDOW} feature
 387      */
 388     public void setWindowIconBadge(Window w, final Image badge) {


< prev index next >