📄 helpcommand.java
字号:
package core;import java.util.*;public class HelpCommand extends SimpleCommand{ public static CommandMap s_commandMap; public static void setCommands (CommandMap cmdMap) { s_commandMap = cmdMap; } public String getMenuName () { return "Help"; } public String getName () { return "help"; } public String getDescription () { return "Displays a list of legal commands"; } public void executeCommand () { displayResults ("Legal commands", db.DBUtilities.toList(s_commandMap.values())); } protected void displayResultsText (String title, List results) { System.out.println (title); for (Iterator iter = results.iterator(); iter.hasNext(); ) { Command cmd = (Command) iter.next(); if (!cmd.getName().equals("_unknown")) { System.out.print (cmd.getName () + ": "); System.out.println (cmd.getDescription ()); } } } public void displayResultsGUI (List result) { } public Command makeInstance () { return new HelpCommand (); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -