本文整理汇总了Java中org.rev317.min.callback.MenuAction类的典型用法代码示例。如果您正苦于以下问题:Java MenuAction类的具体用法?Java MenuAction怎么用?Java MenuAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MenuAction类属于org.rev317.min.callback包,在下文中一共展示了MenuAction类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: BotMenu
import org.rev317.min.callback.MenuAction; //导入依赖的package包/类
public BotMenu(JMenuBar bar) {
PaintDebugger debugger = Context.getInstance().getPaintDebugger();
JMenu debug = new JMenu("Debug");
JMenu actions = new JMenu("Actions");
JMenuItem enableActions = newItem("Enable Actions");
JMenuItem animation = newItem("Animation");
JMenuItem bank = newItem("Bank");
JMenuItem flags = newItem("Collision flags");
JMenuItem items = newItem("GroundItems");
JMenuItem interfaces = newItem("Interfaces");
JMenuItem inventory = newItem("Inventory");
JMenuItem map = newItem("Map");
JMenuItem messages = newItem("Messages");
JMenuItem mouse = newItem("Mouse");
JMenuItem npcs = newItem("Npcs");
JMenuItem objects = newItem("Objects");
JMenuItem players = newItem("Players");
debugger.addDebugger("Enable Actions", new DActions());
debugger.addDebugger("Animation", new DAnimation());
debugger.addDebugger("Bank", new DBank());
debugger.addDebugger("Collision flags", new DCollisionFlags());
debugger.addDebugger("GroundItems", new DGroundItems());
debugger.addDebugger("Interfaces", new DInterfaces());
debugger.addDebugger("Inventory", new DInventory());
debugger.addDebugger("Map", new DMap());
debugger.addDebugger("Messages", new DMessages());
debugger.addDebugger("Mouse", new DMouse());
debugger.addDebugger("Npcs", new DNpcs());
debugger.addDebugger("Objects", new DSceneObjects());
debugger.addDebugger("Players", new DPlayers());
debug.add(actions);
actions.add(enableActions);
debug.add(animation);
debug.add(bank);
debug.add(flags);
debug.add(items);
debug.add(interfaces);
debug.add(inventory);
debug.add(map);
debug.add(messages);
debug.add(mouse);
debug.add(npcs);
debug.add(objects);
debug.add(players);
actions.addSeparator();
ButtonGroup group = new ButtonGroup();
for (int i = 0; i < MenuAction.getOutputs().length; i++) {
final int index = i;
JMenuItem debugOutput = new JRadioButtonMenuItem("Output: " + index);
debugOutput.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
MenuAction.setCurrentOutputIndex(index);
}
});
group.add(debugOutput);
actions.add(debugOutput);
}
bar.add(debug);
}