本文整理了Java中javax.swing.JInternalFrame.setComponentPopupMenu()
方法的一些代码示例,展示了JInternalFrame.setComponentPopupMenu()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JInternalFrame.setComponentPopupMenu()
方法的具体详情如下:
包路径:javax.swing.JInternalFrame
类名称:JInternalFrame
方法名:setComponentPopupMenu
暂无
代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf
public void propertyChange(PropertyChangeEvent evt) {
Content content = (Content) evt.getSource();
if (content.isMinimized())
return;
if (!content.isDetached()) {
JInternalFrame internalFrame = getInternalFrame(content);
if (internalFrame != null)
internalFrame.setComponentPopupMenu((JPopupMenu) evt.getNewValue());
else
throw new IllegalStateException("Invalid content ui state.");
}
}
}
代码示例来源:origin: khuxtable/seaglass
protected void uninstallComponents() {
if (frame.getComponentPopupMenu() instanceof UIResource) {
frame.setComponentPopupMenu(null);
}
super.uninstallComponents();
}
代码示例来源:origin: khuxtable/seaglass
/**
* Create the system menu.
*/
private void assembleSystemMenu() {
systemPopupMenu = new JPopupMenuUIResource();
addSystemMenuItems(systemPopupMenu);
enableActions();
menuButton = new NoFocusButton("InternalFrameTitlePane.menuButtonAccessibleName");
updateMenuIcon();
menuButton.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
try {
frame.setSelected(true);
} catch (PropertyVetoException pve) {
}
showSystemMenu();
}
});
JPopupMenu p = frame.getComponentPopupMenu();
if (p == null || p instanceof UIResource) {
frame.setComponentPopupMenu(systemPopupMenu);
}
if (frame.getDesktopIcon() != null) {
p = frame.getDesktopIcon().getComponentPopupMenu();
if (p == null || p instanceof UIResource) {
frame.getDesktopIcon().setComponentPopupMenu(systemPopupMenu);
}
}
setInheritsPopupMenu(true);
}
内容来源于网络,如有侵权,请联系作者删除!