public class MenuDef extends ShortCut
限定符和类型 | 字段和说明 |
---|---|
protected UIButton |
createdButton |
protected UIMenu |
createdJMenu |
protected boolean |
enabled |
protected java.lang.String |
iconPath |
protected java.lang.Boolean |
isEastAttr |
protected char |
mnemonic |
protected java.lang.String |
name |
protected javax.swing.JPopupMenu |
popupMenu |
protected java.lang.String |
tooltip |
CURRENT_LEVEL, TEMPLATE_TREE
构造器和说明 |
---|
MenuDef() |
MenuDef(java.lang.Boolean rePaint) |
MenuDef(java.lang.String name) |
MenuDef(java.lang.String name,
char mnemonic) |
限定符和类型 | 方法和说明 |
---|---|
void |
addShortCut(ShortCut... shortcut)
用可变参数,方便添加数组
|
void |
clearShortCuts()
清理
|
UIMenu |
createJMenu()
生成JMenu
|
javax.swing.JPopupMenu |
createJPopupMenu()
生成 JPopupMenu
|
UIButton |
createUIButton()
生成UIButton
|
java.lang.String |
getAnchor() |
protected java.awt.event.ContainerListener |
getContainerListener() |
java.lang.String |
getIconPath() |
char |
getMnemonic() |
java.lang.String |
getName() |
javax.swing.JPopupMenu |
getPopupMenu() |
boolean |
getRePaint() |
ShortCut |
getShortCut(int index) |
int |
getShortCutCount() |
java.util.List<ShortCut> |
getShortcutList() |
void |
insertShortCut(int index,
ShortCut shortCut)
插入菜单项
|
void |
intoJPopupMenu(javax.swing.JPopupMenu menu)
添加菜单项
|
void |
intoJToolBar(javax.swing.JToolBar toolBar)
添加
|
boolean |
isEnabled()
按钮状态
|
void |
removeComponent(javax.swing.JPopupMenu popupMenu)
删除所有组件 除了滚动条
|
void |
removeShortCut(ShortCut shortCut) |
void |
setAnchor(java.lang.String anchor) |
void |
setEnabled(boolean b)
设置是否可用
|
void |
setHasRecMenu(boolean headMenu) |
void |
setHasScrollSubMenu(boolean scrollSubMenu) |
void |
setIconPath(java.lang.String iconPath) |
void |
setMnemonic(char mnemonic) |
void |
setName(java.lang.String name) |
void |
setPopupMenu(javax.swing.JPopupMenu popupMenu) |
void |
setRePaint(boolean rePaint) |
void |
setTooltip(java.lang.String text) |
protected void |
updateEastPopupMenu(javax.swing.JPopupMenu popupMenu)
更新右侧属性面板菜单
|
void |
updateMenu()
更新菜单
|
protected void |
updatePopupMenu(javax.swing.JPopupMenu popupMenu)
更新菜单
|
asToolBarDef, currentAPILevel, getMenuKeySet, mark4Provider, notifyFromAuhtorityChange, setMenuKeySet
equals, hashCode
protected java.lang.String name
protected java.lang.Boolean isEastAttr
protected char mnemonic
protected java.lang.String iconPath
protected java.lang.String tooltip
protected boolean enabled
protected UIMenu createdJMenu
protected UIButton createdButton
protected javax.swing.JPopupMenu popupMenu
public MenuDef()
public MenuDef(java.lang.String name)
public MenuDef(java.lang.Boolean rePaint)
public MenuDef(java.lang.String name, char mnemonic)
public java.lang.String getName()
public void setName(java.lang.String name)
public boolean getRePaint()
public void setRePaint(boolean rePaint)
public char getMnemonic()
public void setMnemonic(char mnemonic)
public void setHasScrollSubMenu(boolean scrollSubMenu)
public void setHasRecMenu(boolean headMenu)
public java.lang.String getIconPath()
public void setIconPath(java.lang.String iconPath)
public int getShortCutCount()
public ShortCut getShortCut(int index)
public java.lang.String getAnchor()
public void setAnchor(java.lang.String anchor)
public java.util.List<ShortCut> getShortcutList()
public void insertShortCut(int index, ShortCut shortCut)
index
- 插入的位置shortCut
- 菜单信息public void addShortCut(ShortCut... shortcut)
shortcut
- 参数 存储菜单项信息public void removeShortCut(ShortCut shortCut)
public void clearShortCuts()
public UIButton createUIButton()
public void setTooltip(java.lang.String text)
public UIMenu createJMenu()
protected java.awt.event.ContainerListener getContainerListener()
public javax.swing.JPopupMenu createJPopupMenu()
public void setEnabled(boolean b)
setEnabled
在类中 ShortCut
b
- 布尔型public void updateMenu()
protected void updatePopupMenu(javax.swing.JPopupMenu popupMenu)
popupMenu
- 菜单protected void updateEastPopupMenu(javax.swing.JPopupMenu popupMenu)
popupMenu
- 菜单public void removeComponent(javax.swing.JPopupMenu popupMenu)
popupMenu
- 菜单public void intoJPopupMenu(javax.swing.JPopupMenu menu)
intoJPopupMenu
在类中 ShortCut
menu
- 菜单public void intoJToolBar(javax.swing.JToolBar toolBar)
intoJToolBar
在类中 ShortCut
toolBar
- 菜单条public javax.swing.JPopupMenu getPopupMenu()
public void setPopupMenu(javax.swing.JPopupMenu popupMenu)