public interface CefMenuModel
限定符和类型 | 接口和说明 |
---|---|
static class |
CefMenuModel.MenuId |
static class |
CefMenuModel.MenuItemType
Supported menu item types.
(支持的菜单项类型。)
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
addCheckItem(int command_id, java.lang.String label)
Add a check item to the menu.
(将检查项添加到菜单。)
|
boolean |
addItem(int command_id, java.lang.String label)
Add an item to the menu.
(将一个项目添加到菜单。)
|
boolean |
addRadioItem(int command_id, java.lang.String label, int group_id)
Add a radio item to the menu.
(将单选项目添加到菜单。)
|
boolean |
addSeparator()
Add a separator to the menu.
(在菜单中添加一个分隔符。)
|
CefMenuModel |
addSubMenu(int command_id, java.lang.String label)
Add a sub-menu to the menu.
(在菜单中添加一个子菜单。)
|
boolean |
clear()
Clears the menu.
(清除菜单。)
|
boolean |
getAccelerator(int command_id, IntRef key_code, BoolRef shift_pressed, BoolRef ctrl_pressed, BoolRef alt_pressed)
Retrieves the keyboard accelerator for the specified |command_id|.
(检索指定的| command_id |的键盘加速器。)
|
boolean |
getAcceleratorAt(int index, IntRef key_code, BoolRef shift_pressed, BoolRef ctrl_pressed, BoolRef alt_pressed)
Retrieves the keyboard accelerator for the specified |index|.
(检索指定的| index |的键盘加速器。)
|
int |
getCommandIdAt(int index)
Returns the command id at the specified |index| or -1 if not found due to invalid range or the index being a separator.
(返回指定| index |处的命令ID。或-1(如果由于范围无效或索引是分隔符而未找到)。)
|
int |
getCount()
Returns the number of items in this menu.
(返回此菜单中的项目数。)
|
int |
getGroupId(int command_id)
Returns the group id for the specified |command_id| or -1 if invalid.
(返回指定的| command_id |的组ID。或-1(如果无效)。)
|
int |
getGroupIdAt(int index)
Returns the group id at the specified |index| or -1 if invalid.
(返回指定| index |处的组ID。或-1(如果无效)。)
|
int |
getIndexOf(int command_id)
Returns the index associated with the specified |command_id| or -1 if not found due to the command id not existing in the menu.
(返回与指定的| command_id |相关的索引或-1(如果由于菜单中不存在命令ID而未找到)。)
|
java.lang.String |
getLabel(int command_id)
Returns the label for the specified |command_id| or empty if not found.
(返回指定的| command_id |的标签或如果找不到则为空。)
|
java.lang.String |
getLabelAt(int index)
Returns the label at the specified |index| or empty if not found due to invalid range or the index being a separator.
(返回指定| index |处的标签或为空(如果由于范围无效或索引是分隔符而未找到)。)
|
CefMenuModel |
getSubMenu(int command_id)
Returns the submenu for the specified |command_id| or empty if invalid.
(返回指定的| command_id |的子菜单或为空(如果无效)。)
|
CefMenuModel |
getSubMenuAt(int index)
Returns the submenu at the specified |index| or empty if invalid.
(返回指定| index |下的子菜单或为空(如果无效)。)
|
CefMenuModel.MenuItemType |
getType(int command_id)
Returns the item type for the specified |command_id|.
(返回指定的| command_id |的项目类型。)
|
CefMenuModel.MenuItemType |
getTypeAt(int index)
Returns the item type at the specified |index|.
(返回指定| index |处的项目类型。)
|
boolean |
hasAccelerator(int command_id)
Returns true if the specified |command_id| has a keyboard accelerator assigned.
(如果指定| command_id |,则返回true分配了键盘加速器。)
|
boolean |
hasAcceleratorAt(int index)
Returns true if the specified |index| has a keyboard accelerator assigned.
(如果指定的| index |,则返回true分配了键盘加速器。)
|
boolean |
insertCheckItemAt(int index, int command_id, java.lang.String label)
Insert a check item in the menu at the specified |index|.
(在菜单中的指定| index |处插入一个检查项。)
|
boolean |
insertItemAt(int index, int command_id, java.lang.String label)
Insert an item in the menu at the specified |index|.
(在菜单中的指定| index |处插入一个项目。)
|
boolean |
insertRadioItemAt(int index, int command_id, java.lang.String label, int group_id)
Insert a radio item in the menu at the specified |index|.
(在菜单中的指定| index |处插入一个单选项目。)
|
boolean |
insertSeparatorAt(int index)
Insert a separator in the menu at the specified |index|.
(在菜单中的指定| index |处插入分隔符。)
|
CefMenuModel |
insertSubMenuAt(int index, int command_id, java.lang.String label)
Insert a sub-menu in the menu at the specified |index|.
(在菜单中的指定| index |处插入一个子菜单。)
|
boolean |
isChecked(int command_id)
Returns true if the specified |command_id| is checked.
(如果指定| command_id |,则返回true被检查。)
|
boolean |
isCheckedAt(int index)
Returns true if the specified |index| is checked.
(如果指定的| index |,则返回true被检查。)
|
boolean |
isEnabled(int command_id)
Returns true if the specified |command_id| is enabled.
(如果指定| command_id |,则返回true已启用。)
|
boolean |
isEnabledAt(int index)
Returns true if the specified |index| is enabled.
(如果指定的| index |,则返回true已启用。)
|
boolean |
isVisible(int command_id)
Returns true if the specified |command_id| is visible.
(如果指定| command_id |,则返回true是可见的。)
|
boolean |
isVisibleAt(int index)
Returns true if the specified |index| is visible.
(如果指定的| index |,则返回true是可见的。)
|
boolean |
remove(int command_id)
Removes the item with the specified |command_id|.
(除去具有指定的| command_id |的项目。)
|
boolean |
removeAccelerator(int command_id)
Remove the keyboard accelerator for the specified |command_id|.
(删除指定的| command_id |的键盘加速器。)
|
boolean |
removeAcceleratorAt(int index)
Remove the keyboard accelerator at the specified |index|.
(在指定的| index |处卸下键盘加速器。)
|
boolean |
removeAt(int index)
Removes the item at the specified |index|.
(删除指定| index |处的项目。)
|
boolean |
setAccelerator(int command_id, int key_code, boolean shift_pressed, boolean ctrl_pressed, boolean alt_pressed)
Set the keyboard accelerator for the specified |command_id|.
(为指定的| command_id |设置键盘加速器。)
|
boolean |
setAcceleratorAt(int index, int key_code, boolean shift_pressed, boolean ctrl_pressed, boolean alt_pressed)
Set the keyboard accelerator at the specified |index|.
(将键盘加速器设置为指定的| index |。)
|
boolean |
setChecked(int command_id, boolean checked)
Check the specified |command_id|.
(检查指定的| command_id |。)
|
boolean |
setCheckedAt(int index, boolean checked)
Check the specified |index|.
(检查指定的| index |。)
|
boolean |
setCommandIdAt(int index, int command_id)
Sets the command id at the specified |index|.
(将命令ID设置为指定的| index |。)
|
boolean |
setEnabled(int command_id, boolean enabled)
Change the enabled status of the specified |command_id|.
(更改指定的| command_id |的启用状态。)
|
boolean |
setEnabledAt(int index, boolean enabled)
Change the enabled status at the specified |index|.
(在指定的| index |更改启用状态。)
|
boolean |
setGroupId(int command_id, int group_id)
Sets the group id for the specified |command_id|.
(设置指定的| command_id |的组ID。)
|
boolean |
setGroupIdAt(int index, int group_id)
Sets the group id at the specified |index|.
(将组ID设置为指定的| index |。)
|
boolean |
setLabel(int command_id, java.lang.String label)
Sets the label for the specified |command_id|.
(为指定的| command_id |设置标签。)
|
boolean |
setLabelAt(int index, java.lang.String label)
Set the label at the specified |index|.
(将标签设置为指定的| index |。)
|
boolean |
setVisible(int command_id, boolean visible)
Change the visibility of the specified |command_id|.
(更改指定的| command_id |的可见性。)
|
boolean |
setVisibleAt(int index, boolean visible)
Change the visibility at the specified |index|.
(在指定的| index |处更改可见性。)
|
boolean addCheckItem(int command_id, java.lang.String label)
boolean addItem(int command_id, java.lang.String label)
boolean addRadioItem(int command_id, java.lang.String label, int group_id)
boolean addSeparator()
CefMenuModel addSubMenu(int command_id, java.lang.String label)
boolean clear()
boolean getAccelerator(int command_id, IntRef key_code, BoolRef shift_pressed, BoolRef ctrl_pressed, BoolRef alt_pressed)
boolean getAcceleratorAt(int index, IntRef key_code, BoolRef shift_pressed, BoolRef ctrl_pressed, BoolRef alt_pressed)
int getCommandIdAt(int index)
int getCount()
int getGroupId(int command_id)
int getGroupIdAt(int index)
int getIndexOf(int command_id)
java.lang.String getLabel(int command_id)
java.lang.String getLabelAt(int index)
CefMenuModel getSubMenu(int command_id)
CefMenuModel getSubMenuAt(int index)
CefMenuModel.MenuItemType getType(int command_id)
CefMenuModel.MenuItemType getTypeAt(int index)
boolean hasAccelerator(int command_id)
boolean hasAcceleratorAt(int index)
boolean insertCheckItemAt(int index, int command_id, java.lang.String label)
boolean insertItemAt(int index, int command_id, java.lang.String label)
boolean insertRadioItemAt(int index, int command_id, java.lang.String label, int group_id)
boolean insertSeparatorAt(int index)
CefMenuModel insertSubMenuAt(int index, int command_id, java.lang.String label)
boolean isChecked(int command_id)
boolean isCheckedAt(int index)
boolean isEnabled(int command_id)
boolean isEnabledAt(int index)
boolean isVisible(int command_id)
boolean isVisibleAt(int index)
boolean remove(int command_id)
boolean removeAccelerator(int command_id)
boolean removeAcceleratorAt(int index)
boolean removeAt(int index)
boolean setAccelerator(int command_id, int key_code, boolean shift_pressed, boolean ctrl_pressed, boolean alt_pressed)
boolean setAcceleratorAt(int index, int key_code, boolean shift_pressed, boolean ctrl_pressed, boolean alt_pressed)
boolean setChecked(int command_id, boolean checked)
boolean setCheckedAt(int index, boolean checked)
boolean setCommandIdAt(int index, int command_id)
boolean setEnabled(int command_id, boolean enabled)
boolean setEnabledAt(int index, boolean enabled)
boolean setGroupId(int command_id, int group_id)
boolean setGroupIdAt(int index, int group_id)
boolean setLabel(int command_id, java.lang.String label)
boolean setLabelAt(int index, java.lang.String label)
boolean setVisible(int command_id, boolean visible)
boolean setVisibleAt(int index, boolean visible)