本文整理匯總了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);
}