Public Member Functions | |
void | addMenuGroup (MenuGroupImpl group) |
void | addMenuItem (int groupTag, MenuItemImpl item) |
View | getContentView () |
int | getGroupVisibility (int tag) |
int | getItemVisibility (int groupTag, int itemTag) |
MenuGroupImpl | getMenuGroup (int tag) |
void | removeMenuGroup (int tag) |
void | removeMenuItem (int groupTag, int itemTag) |
void | setGroupVisibility (int visibility, int tag) |
void | setItemVisibility (int visibility, int groupTag, int itemTag) |
Control MoreMenuModule group and group's submenus display and hide, as well as add group ,or group submenus to the MoreMenuModule
You can use it through MoreMenuModule#getMenuView(), or UIExtensionsManager#getMenuView()
void com.foxit.uiextensions.controls.menu.IMenuView.addMenuGroup | ( | MenuGroupImpl | group | ) |
Add a group
Note1: We use this tag to sort/add/remove/get... group,so the tag must be unique when initializing the MenuGroupImpl . Note2: The tag must be less than 100, or more than 150, because the tag between 100 and 150 has been used or may be used in the future.
group | the group to be added to this menu view. |
void com.foxit.uiextensions.controls.menu.IMenuView.addMenuItem | ( | int | groupTag, |
MenuItemImpl | item | ||
) |
Add the item to the group according to the groupTag.
Note: We use this tag to sort/get/remove... item,so the tag must be unique when initializing the MenuItemImpl.
groupTag | the group id and is unique, it may be the existing tag or you custom tag. |
item | the item to be added to the specified group |
View com.foxit.uiextensions.controls.menu.IMenuView.getContentView | ( | ) |
the content view of the menu.
int com.foxit.uiextensions.controls.menu.IMenuView.getGroupVisibility | ( | int | tag | ) |
Returns the visibility status for this view by the groupTag.
tag | the group id and is unique, it may be the existing tag or you custom tag. |
int com.foxit.uiextensions.controls.menu.IMenuView.getItemVisibility | ( | int | groupTag, |
int | itemTag | ||
) |
Returns the visibility status for this view by the groupTag and itemTag.
Note: if the groupTag is MoreMenuConfig#GROUP_PROTECT,this method can be used only when the Doc is open success,otherwise, the use is not normal.
groupTag | the group id and is unique, it may be the existing tag or you custom tag. |
itemTag | the item id ,it belongs to the group and is unique you can customize it, but you have to make sure that the tag is unique,and we use this to sort item. |
The relationship between item and group is as follows:
MoreMenuConfig#GROUP_FILE GROUP_FILE: [
MoreMenuConfig#ITEM_DOCINFO,
MoreMenuConfig#ITEM_REDUCE_FILE_SIZE
]
MoreMenuConfig#GROUP_PROTECT GROUP_PROTECT: [
MoreMenuConfig#ITEM_PASSWORD,
MoreMenuConfig#ITEM_REMOVESECURITY_PASSWORD
],
MoreMenuConfig#GROUP_FORM GROUP_FORM: [
MoreMenuConfig#ITEM_RESET_FORM,
MoreMenuConfig#ITEM_IMPORT_FORM,
MoreMenuConfig#ITEM_EXPORT_FORM
]
MenuGroupImpl com.foxit.uiextensions.controls.menu.IMenuView.getMenuGroup | ( | int | tag | ) |
According to the tag get the group info.
tag | the group id and is unique, it may be the existing tag or you custom tag. |
void com.foxit.uiextensions.controls.menu.IMenuView.removeMenuGroup | ( | int | tag | ) |
According to the tag to remove group.
tag | the group id and is unique, it may be the existing tag or you custom tag. |
void com.foxit.uiextensions.controls.menu.IMenuView.removeMenuItem | ( | int | groupTag, |
int | itemTag | ||
) |
Remove item by grouptag and itemtag
groupTag | the group id and is unique, it may be the existing tag or you custom tag. |
itemTag | the item id ,it belongs to the group and is unique you can customize it, but you have tomake sure that the tag is unique,and we use this to sort item. |
The relationship between item and group is as follows:
MoreMenuConfig#GROUP_FILE GROUP_FILE: [
MoreMenuConfig#ITEM_DOCINFO,
MoreMenuConfig#ITEM_REDUCE_FILE_SIZE
]
MoreMenuConfig#GROUP_PROTECT GROUP_PROTECT: [
MoreMenuConfig#ITEM_PASSWORD,
MoreMenuConfig#ITEM_REMOVESECURITY_PASSWORD
]
MoreMenuConfig#GROUP_FORM GROUP_FORM: [
MoreMenuConfig#ITEM_RESET_FORM,
MoreMenuConfig#ITEM_IMPORT_FORM,
MoreMenuConfig#ITEM_EXPORT_FORM
]
void com.foxit.uiextensions.controls.menu.IMenuView.setGroupVisibility | ( | int | visibility, |
int | tag | ||
) |
According to the tag Set the enabled state of this group.
visibility | One of View#VISIBLE, View#INVISIBLE, or View#GONE. |
tag | the group id and is unique, it may be the existing tag or you custom tag. |
void com.foxit.uiextensions.controls.menu.IMenuView.setItemVisibility | ( | int | visibility, |
int | groupTag, | ||
int | itemTag | ||
) |
According to the groupTag and itemTag Set the enabled state of this item.
Note: 1:If the state of the group that the item belongs to is View.GONE
,then using this method to set the state of the item is not effective. 2: if the groupTag is MoreMenuConfig#GROUP_PROTECT,this method can be used only when the Doc is open success,otherwise, the use is not normal.
visibility | One of View#VISIBLE, View#INVISIBLE, or View#GONE. |
groupTag | the group id and is unique ,it may be the existing tag or you custom tag. |
itemTag | the item id ,it belongs to the group and is unique you can customize it, but you have tomake sure that the tag is unique,and we use this to sort item. |
The relationship between item and group is as follows:
MoreMenuConfig#GROUP_FILE GROUP_FILE: [
MoreMenuConfig#ITEM_DOCINFO,
MoreMenuConfig#ITEM_REDUCE_FILE_SIZE
]
MoreMenuConfig#GROUP_PROTECT GROUP_PROTECT: [
MoreMenuConfig#ITEM_PASSWORD,
MoreMenuConfig#ITEM_REMOVESECURITY_PASSWORD
],
MoreMenuConfig#GROUP_FORM GROUP_FORM: [
MoreMenuConfig#ITEM_RESET_FORM,
MoreMenuConfig#ITEM_IMPORT_FORM,
MoreMenuConfig#ITEM_EXPORT_FORM
]