本文整理了Java中javax.swing.JMenuBar.getComponent()
方法的一些代码示例,展示了JMenuBar.getComponent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMenuBar.getComponent()
方法的具体详情如下:
包路径:javax.swing.JMenuBar
类名称:JMenuBar
方法名:getComponent
暂无
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction(jsDoc = CHILD_JSDOC, params = {"index"})
@Override
public JComponent child(int aIndex) {
return (JComponent) super.getComponent(aIndex);
}
代码示例来源:origin: net.java.dev.laf-widget/laf-widget
/**
* Returns all occurences of the specified string in the menus and menu
* items of the associated menu bar.
*
* @param searchPattern
* Pattern to search (no wildcards yet).
* @return All occurences of the specified string in the menus and menu
* items of the associated menu bar.
*/
private LinkedList<SearchResult> findOccurences(String searchPattern) {
LinkedList<SearchResult> result = new LinkedList<SearchResult>();
LinkedList<JMenu> currentPath = new LinkedList<JMenu>();
for (int i = 0; i < jcomp.getComponentCount(); i++) {
Component component = jcomp.getComponent(i);
if (component instanceof JMenu) {
JMenu menu = (JMenu) component;
this.checkMenu(currentPath, menu, searchPattern, result);
}
}
return result;
}
代码示例来源:origin: bcdev/beam
/**
* Overrides the base class version in order to create and configure the VISAT's main pane.
*/
@Override
protected JComponent createMainPane() {
final JMenuBar menuBar = getMainFrame().getJMenuBar();
JMenu windowMenu = null;
for (int i = 0; i < menuBar.getComponentCount(); i++) {
final Component component = menuBar.getComponent(i);
if (component instanceof JMenu && "window".equals(component.getName())) {
windowMenu = (JMenu) menuBar.getComponent(i);
}
}
desktopPane.setWindowMenu(windowMenu);
return desktopPane;
}
代码示例来源:origin: net.java.dev.laf-widget/laf-widget
for (int i = 0; i < MenuSearchWidget.this.jcomp
.getComponentCount(); i++) {
if (MenuSearchWidget.this.jcomp.getComponent(i) instanceof SearchPanel) {
removed = MenuSearchWidget.this.jcomp
.getComponent(i);
break;
内容来源于网络,如有侵权,请联系作者删除!