final class WinMenuItemDelegate extends java.lang.Object implements MenuItemDelegate
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
WinMenuItemDelegate.CommandIDManager |
| Modifier and Type | Field and Description |
|---|---|
private int |
cmdID |
private MenuItem |
owner |
private WinMenuImpl |
parent |
| Constructor and Description |
|---|
WinMenuItemDelegate(MenuItem item) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
createMenuItem(java.lang.String title,
MenuItem.Callback callback,
int shortcutKey,
int shortcutModifiers,
Pixels pixels,
boolean enabled,
boolean checked) |
(package private) int |
getCmdID() |
MenuItem |
getOwner() |
(package private) WinMenuImpl |
getParent() |
private java.lang.String |
getTitle(java.lang.String title,
int key,
int modifiers)
Obtains title for the specified title & shortcut
|
boolean |
setCallback(MenuItem.Callback callback) |
boolean |
setChecked(boolean checked) |
boolean |
setEnabled(boolean enabled) |
(package private) void |
setParent(WinMenuImpl newParent) |
boolean |
setPixels(Pixels pixels) |
boolean |
setShortcut(int shortcutKey,
int shortcutModifiers) |
boolean |
setTitle(java.lang.String title) |
private final MenuItem owner
private WinMenuImpl parent
private int cmdID
public WinMenuItemDelegate(MenuItem item)
public MenuItem getOwner()
public boolean createMenuItem(java.lang.String title,
MenuItem.Callback callback,
int shortcutKey,
int shortcutModifiers,
Pixels pixels,
boolean enabled,
boolean checked)
createMenuItem in interface MenuItemDelegatepublic boolean setTitle(java.lang.String title)
setTitle in interface MenuItemDelegatepublic boolean setCallback(MenuItem.Callback callback)
setCallback in interface MenuItemDelegatepublic boolean setShortcut(int shortcutKey,
int shortcutModifiers)
setShortcut in interface MenuItemDelegatepublic boolean setPixels(Pixels pixels)
setPixels in interface MenuItemDelegatepublic boolean setEnabled(boolean enabled)
setEnabled in interface MenuItemDelegatepublic boolean setChecked(boolean checked)
setChecked in interface MenuItemDelegateprivate java.lang.String getTitle(java.lang.String title,
int key,
int modifiers)
WinMenuImpl getParent()
void setParent(WinMenuImpl newParent)
int getCmdID()