APIdia Launch Partner
Top Description Methods
java.awt.peer

public Interface TaskbarPeer

Known Direct Implementers
sun.awt.X11.XTaskbarPeer
Imports
java.awt.Image, .PopupMenu, .Taskbar, .Taskbar.Feature, .Taskbar.State, .Window

The TaskbarPeer interface provides methods for interacting with system task area.

Method Summary

Modifier and TypeMethod and Description
public default Image

Returns:

an image of this application's icon
getIconImage
()

Obtains an image of this application's icon.

public default PopupMenu

Returns:

the PopupMenu
getMenu
()

Gets PopupMenu used to add items to this application's icon in system task area.

public default boolean

Returns:

true if feature supported supported
isSupported
(Taskbar.Feature
feature to test
f
)

Tests support of Feature on current platform.

public default void
requestUserAttention(boolean
disables this request if false
enabled
,
final boolean
if this is an important request
critical
)

Requests user attention to this application.

public default void
requestWindowUserAttention(Window
window
w
)

Requests user attention to the specified window.

public default void
setIconBadge(final String
label to affix to the icon
badge
)

Affixes a small system-provided badge to this application's icon.

public default void
setIconImage(final Image
to change
image
)

Changes this application's icon to the provided image.

public default void
setMenu(final PopupMenu
the PopupMenu to attach to this application
menu
)

Attaches the contents of the provided PopupMenu to the application icon in system task area.

public default void
setProgressValue(int
from 0 to 100, other to disable progress indication
value
)

Affixes a small system-provided progress bar to this application's icon.

public default void
setWindowIconBadge(Window
window to update
w
,
final Image
image to affix to the icon
badge
)

Affixes a small badge to this application's icon in task area for the specified window.

public default void
setWindowProgressState(Window
window
w
,
Taskbar.State
to change to
state
)

Sets a progress state for a specified window.

public default void
setWindowProgressValue(Window
window to update
w
,
int
from 0 to 100, other to disable progress indication
value
)

Displays progress for specified window.

Method Detail

getIconImageback to summary
public default Image getIconImage()

Obtains an image of this application's icon.

Returns:Image

an image of this application's icon

getMenuback to summary
public default PopupMenu getMenu()

Gets PopupMenu used to add items to this application's icon in system task area.

Returns:PopupMenu

the PopupMenu

isSupportedback to summary
public default boolean isSupported(Taskbar.Feature f)

Tests support of Feature on current platform.

Parameters
f:Taskbar.Feature

feature to test

Returns:boolean

true if feature supported supported

requestUserAttentionback to summary
public default void requestUserAttention(boolean enabled, final boolean critical)

Requests user attention to this application.

Parameters
enabled:boolean

disables this request if false

critical:boolean

if this is an important request

See Also
Taskbar#requestUserAttention
requestWindowUserAttentionback to summary
public default void requestWindowUserAttention(Window w)

Requests user attention to the specified window.

Parameters
w:Window

window

setIconBadgeback to summary
public default void setIconBadge(final String badge)

Affixes a small system-provided badge to this application's icon. Usually a number.

Parameters
badge:String

label to affix to the icon

setIconImageback to summary
public default void setIconImage(final Image image)

Changes this application's icon to the provided image.

Parameters
image:Image

to change

setMenuback to summary
public default void setMenu(final PopupMenu menu)

Attaches the contents of the provided PopupMenu to the application icon in system task area.

Parameters
menu:PopupMenu

the PopupMenu to attach to this application

setProgressValueback to summary
public default void setProgressValue(int value)

Affixes a small system-provided progress bar to this application's icon.

Parameters
value:int

from 0 to 100, other to disable progress indication

setWindowIconBadgeback to summary
public default void setWindowIconBadge(Window w, final Image badge)

Affixes a small badge to this application's icon in task area for the specified window.

Parameters
w:Window

window to update

badge:Image

image to affix to the icon

setWindowProgressStateback to summary
public default void setWindowProgressState(Window w, Taskbar.State state)

Sets a progress state for a specified window.

Parameters
w:Window

window

state:Taskbar.State

to change to

See Also
Taskbar#setWindowProgressState
setWindowProgressValueback to summary
public default void setWindowProgressValue(Window w, int value)

Displays progress for specified window.

Parameters
w:Window

window to update

value:int

from 0 to 100, other to disable progress indication