本文整理了Java中java.awt.MenuItem.getActionCommand()
方法的一些代码示例,展示了MenuItem.getActionCommand()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MenuItem.getActionCommand()
方法的具体详情如下:
包路径:java.awt.MenuItem
类名称:MenuItem
方法名:getActionCommand
暂无
代码示例来源:origin: imagej/ImageJA
for (int i=0; i<items; i++) {
MenuItem mItem = menu.getItem(i);
String label = mItem.getActionCommand();
if (mItem instanceof Menu) {
DefaultMutableTreeNode subNode = new DefaultMutableTreeNode(label);
代码示例来源:origin: net.imagej/ij
public void parseMenu(String path, Menu menu) {
int n=menu.getItemCount();
for (int i=0; i<n; ++i) {
MenuItem m=menu.getItem(i);
String label=m.getActionCommand();
if (m instanceof Menu) {
Menu subMenu=(Menu)m;
parseMenu(path+">"+label,subMenu);
} else {
String trimmedLabel = label.trim();
if (trimmedLabel.length()==0 || trimmedLabel.equals("-"))
continue;
CommandAction ca=(CommandAction)commandsHash.get(label);
if( ca == null )
commandsHash.put(label, new CommandAction(null,m,path));
else {
ca.menuItem=m;
ca.menuLocation=path;
}
CommandAction caAfter=(CommandAction)commandsHash.get(label);
}
}
}
代码示例来源:origin: net.imagej/ij
for (int i=0; i<items; i++) {
MenuItem mItem = menu.getItem(i);
String label = mItem.getActionCommand();
if (mItem instanceof Menu) {
DefaultMutableTreeNode subNode = new DefaultMutableTreeNode(label);
代码示例来源:origin: imagej/ImageJA
public void parseMenu(String path, Menu menu) {
int n=menu.getItemCount();
for (int i=0; i<n; ++i) {
MenuItem m=menu.getItem(i);
String label=m.getActionCommand();
if (m instanceof Menu) {
Menu subMenu=(Menu)m;
parseMenu(path+">"+label,subMenu);
} else {
String trimmedLabel = label.trim();
if (trimmedLabel.length()==0 || trimmedLabel.equals("-"))
continue;
CommandAction ca=(CommandAction)commandsHash.get(label);
if( ca == null )
commandsHash.put(label, new CommandAction(null,m,path));
else {
ca.menuItem=m;
ca.menuLocation=path;
}
CommandAction caAfter=(CommandAction)commandsHash.get(label);
}
}
}
代码示例来源:origin: net.imagej/ij
if (lastSpace>0) // remove image size (e.g., " 90K")
menuItemLabel = menuItemLabel.substring(0, lastSpace);
String idString = item.getActionCommand();
int id = (int)Tools.parseDouble(idString, 0);
ImagePlus imp = WindowManager.getImage(id);
代码示例来源:origin: imagej/ImageJA
if (lastSpace>0) // remove image size (e.g., " 90K")
menuItemLabel = menuItemLabel.substring(0, lastSpace);
String idString = item.getActionCommand();
int id = (int)Tools.parseDouble(idString, 0);
ImagePlus imp = WindowManager.getImage(id);
代码示例来源:origin: sc.fiji/TrakEM2_
if (command.equals(menu.getItem(i).getActionCommand())) {
notAvailable(command);
return null;
内容来源于网络,如有侵权,请联系作者删除!