public class Menu extends Object
| 构造器和说明 |
|---|
Menu() |
| 限定符和类型 | 方法和说明 |
|---|---|
Menu |
addButton(AbstractButton button)
为菜单添加一个子按钮
|
com.alibaba.fastjson.JSONObject |
build()
生成菜单
|
static Menu |
buildMenu(com.alibaba.fastjson.JSONObject menuJson)
根据json构建菜单
|
static List<AbstractButton> |
buildSubMenu(com.alibaba.fastjson.JSONArray subButtonArray)
根据子按钮的JsonArray构建ListButton
|
List<AbstractButton> |
getButton() |
static AbstractButton |
parseButton(com.alibaba.fastjson.JSONObject jsonButton)
根据按钮类型,将jsonObject 转化成对应的对象
|
void |
setButton(List<AbstractButton> button) |
public Menu addButton(AbstractButton button)
button - buttonpublic com.alibaba.fastjson.JSONObject build()
public static Menu buildMenu(com.alibaba.fastjson.JSONObject menuJson)
menuJson - menuJsonpublic static List<AbstractButton> buildSubMenu(com.alibaba.fastjson.JSONArray subButtonArray)
subButtonArray - ButtonArraypublic static AbstractButton parseButton(com.alibaba.fastjson.JSONObject jsonButton)
jsonButton - jsonButtonpublic List<AbstractButton> getButton()
public void setButton(List<AbstractButton> button)
Copyright © 2017. All rights reserved.