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 |关联的索引 如果由于菜单中不存在命令ID而未找到,则返回-1
|
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|.
在指定的| index |处设置命令id
|
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|.
设置指定的| index |的组ID
|
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)