public class TabMenuOverflowIconBridge extends java.lang.Object implements DockIconBridge
DockIconBridge
searches for TabMenuDockIcon
s and sets a custom icon using the
current size of the TabMenu
to select the icon.IconManager
using TabMenuDockIcon.KIND_TAB_MENU
as path of the type. Clients may subclass this bridge and override createIcon(TabMenu)
in order
to use a custom icon. This bridge assumes that ICON_KEY
is not set, the bridges disables itself
if the icon is set by the client.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ICON_KEY
The key of the icon that is observed by this bridge
|
Constructor and Description |
---|
TabMenuOverflowIconBridge() |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String id,
DockIcon icon)
Adds a new
UIValue that gets its resource from this bridge. |
protected javax.swing.Icon |
createIcon(TabMenu menu)
Returns an icon that represents
menu in its current state. |
void |
remove(java.lang.String id,
DockIcon icon)
Removes a value from this bridge.
|
void |
set(java.lang.String id,
javax.swing.Icon value,
DockIcon icon)
Called by the
UIProperties when one resource or UIValue
has been exchanged. |
public static final java.lang.String ICON_KEY
public void add(java.lang.String id, DockIcon icon)
UIBridge
UIValue
that gets its resource from this bridge.public void remove(java.lang.String id, DockIcon icon)
UIBridge
public void set(java.lang.String id, javax.swing.Icon value, DockIcon icon)
UIBridge
UIProperties
when one resource or UIValue
has been exchanged. Normally an UIBridge
can just
call UIValue.set(Object)
with the argument value
.UIValue
that was not added
to this UIBridge
.protected javax.swing.Icon createIcon(TabMenu menu)
menu
in its current state. This method is called
every time when the number of children of menu
changes.menu
- the menu for which an icon is requirednull