📄 jremcontextdata.java
字号:
package fildiv.jremcntl.common.core;/* * JRemCntl - Copyright (C) 2007 Filippo Di Vattimo <fildiv@gmail.com> * See COPYING */import java.util.Vector;public class JRemContextData implements Context { private Config config; private int id; private String desc = ""; private String baseDir = ""; private short defView; private Extension ext; private Vector commands; public JRemContextData(Config config) { if (config == null) throw new IllegalArgumentException(); this.config = config; commands = new Vector(); } public JRemContextData(Config config, int id, String desc, short defView, String baseDir) { this(config); this.id = id; this.desc = desc; this.baseDir = baseDir; this.defView = defView; } public Config getConfig() { return config; } public String getBaseDir() { return baseDir; } public void setBaseDir(String baseDir) { this.baseDir = baseDir; } public int getID() { return id; } public void setID(int id) { this.id = id; } public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public short getDefView() { return defView; } public void setDefView(short defView) { this.defView = defView; } public Command addCommand(Command command) { return null; } public Command insertCommand(Command newCommand, Command command, boolean insertAfter) { return null; } public Command appendCommand(Command command) { JRemCommandData cmd = (JRemCommandData) command; commands.addElement(cmd); return command; } public Vector getCommands() { return commands; } public Command removeCommand(Command cmd) { return null; } public Command findCommand(int cmdID) { Vector commands = getCommands(); for (int index = 0; index < commands.size(); ++index) { Command cmd = (Command) commands.elementAt(index); if (cmd.getID() == cmdID) return cmd; } return null; } public Extension getExtension(boolean parentRecursion) { if (ext == null && parentRecursion) return getConfig().getExtension(false); return ext; } public void setExtension(Extension ext) { this.ext = ext; } public boolean isInHerited() { return ext == null; } public SupportExtension getParent() { return config; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -