* Check if item is checked by name * 通过名称检查菜单项是否选中
(name: string)
| 214 | * 通过名称检查菜单项是否选中 |
| 215 | */ |
| 216 | public isItemChecked(name: string): boolean { |
| 217 | const item = this._list.getChild(name); |
| 218 | if (item && item instanceof GButton) { |
| 219 | const c = item.getController('checked'); |
| 220 | if (c) { |
| 221 | return c.selectedIndex === 2; |
| 222 | } |
| 223 | } |
| 224 | return false; |
| 225 | } |
| 226 | |
| 227 | /** |
| 228 | * Remove item by name |
nothing calls this directly
no test coverage detected