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 MenuItemDelegate
public boolean setTitle(java.lang.String title)
setTitle
in interface MenuItemDelegate
public boolean setCallback(MenuItem.Callback callback)
setCallback
in interface MenuItemDelegate
public boolean setShortcut(int shortcutKey, int shortcutModifiers)
setShortcut
in interface MenuItemDelegate
public boolean setPixels(Pixels pixels)
setPixels
in interface MenuItemDelegate
public boolean setEnabled(boolean enabled)
setEnabled
in interface MenuItemDelegate
public boolean setChecked(boolean checked)
setChecked
in interface MenuItemDelegate
private java.lang.String getTitle(java.lang.String title, int key, int modifiers)
WinMenuImpl getParent()
void setParent(WinMenuImpl newParent)
int getCmdID()