本文整理了Java中javax.swing.JMenu.repaint()
方法的一些代码示例,展示了JMenu.repaint()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMenu.repaint()
方法的具体详情如下:
包路径:javax.swing.JMenu
类名称:JMenu
方法名:repaint
暂无
代码示例来源:origin: AliView/AliView
private void rebuildRecentFilesSubmenu(){
logger.info("rebuildRecentFilesSubmenu()");
mnRecentFiles.removeAll();
// submenu
for(final File nextFile: Settings.getRecentFiles()){
JMenuItem nextItem = new JMenuItem(nextFile.getAbsolutePath());
nextItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
AliView.openAlignmentFile(nextFile);
}
});
mnRecentFiles.add(nextItem);
}
mnRecentFiles.invalidate();
mnRecentFiles.repaint();
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction(jsDoc = CLEAR_JSDOC)
@Override
public void clear() {
super.removeAll();
super.revalidate();
super.repaint();
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
public void addMenus(JMenu[] _menus)
{
if((_menus==null)||(_menus.length==0)) return;
for(int i=0;i<_menus.length;i++)
addMenu(_menus[i]);
revalidate();
if(isShowing())
for(int i=0;i<_menus.length;i++)
_menus[i].repaint(0);
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction(jsDoc = REMOVE_JSDOC, params = {"component"})
@Override
public void remove(JComponent aComp) {
if (aComp instanceof JMenuItem) {
super.remove((JMenuItem) aComp);
} else {
super.remove(aComp);
}
super.revalidate();
super.repaint();
}
代码示例来源:origin: AliView/AliView
public void rebuildSelectCharsetsSubmenu(){
logger.info("rebuildSelectCharsetsSubmenu()" + aliViewWindow.getAlignment().getAlignmentMeta().getCharsets());
mnSelectCharset.removeAll();
CharSets charsets = aliViewWindow.getAlignment().getAlignmentMeta().getCharsets();
// submenu
for(final CharSet aCharset: charsets){
JMenuItem nextItem = new JMenuItem(aCharset.getName());
nextItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
aliViewWindow.selectAll(aCharset);
}
});
mnSelectCharset.add(nextItem);
}
if(charsets != null && charsets.size() > 0){
mnSelectCharset.setEnabled(true);
}else{
mnSelectCharset.setEnabled(false);
}
mnSelectCharset.invalidate();
mnSelectCharset.repaint();
}
内容来源于网络,如有侵权,请联系作者删除!