增加 BuildPanel.java 的注释

This commit is contained in:
许轲 2023-10-11 02:08:34 +08:00
parent 70dc245d1e
commit 9c3473a166

View File

@ -7,15 +7,27 @@ import org.jcnc.jnotepad.component.module.vbox.components.DebugBox;
import org.jcnc.jnotepad.component.module.vbox.components.RunBox; import org.jcnc.jnotepad.component.module.vbox.components.RunBox;
/** /**
* 底部Run,Debug,Cmd面板 * 底部运行调试和命令终端面板
* *
* <p>这个类实现了一个包含运行信息调试信息和命令终端的底部面板它是TabPane的子类用于将这三个组件以选项卡的形式显示在底部面板上</p>
* *
* <p>可以通过调用getInstance方法获取单例实例</p>
*
* @see CmdTerminalBox
* @see RunBox
* @see DebugBox
* @see TabPane
* @author cccqyu * @author cccqyu
*/ */
public class BuildPanel extends TabPane { public class BuildPanel extends TabPane {
private static BuildPanel instance = null; private static BuildPanel instance = null;
/**
* 获取BuildPanel的单例实例
*
* @return BuildPanel的单例实例
*/
public static BuildPanel getInstance() { public static BuildPanel getInstance() {
if (instance == null) { if (instance == null) {
@ -33,26 +45,41 @@ public class BuildPanel extends TabPane {
runBox = new RunBox(); runBox = new RunBox();
debugBox = new DebugBox(); debugBox = new DebugBox();
Tab runTab = new Tab("运行",runBox); Tab runTab = new Tab("运行", runBox);
runTab.setClosable(false); runTab.setClosable(false);
Tab buildTab = new Tab("构建", debugBox); Tab buildTab = new Tab("调试", debugBox);
buildTab.setClosable(false); buildTab.setClosable(false);
Tab cmdTab = new Tab("终端",cmdTerminalBox); Tab cmdTab = new Tab("命令终端", cmdTerminalBox);
cmdTab.setClosable(false); cmdTab.setClosable(false);
this.getTabs().addAll(runTab,buildTab,cmdTab); this.getTabs().addAll(runTab, buildTab, cmdTab);
} }
/**
* 获取命令终端组件
*
* @return CmdTerminalBox对象
*/
public CmdTerminalBox getCmdTerminalBox() { public CmdTerminalBox getCmdTerminalBox() {
return cmdTerminalBox; return cmdTerminalBox;
} }
/**
* 获取运行信息组件
*
* @return RunBox对象
*/
public RunBox getRunBox() { public RunBox getRunBox() {
return runBox; return runBox;
} }
public DebugBox getBuildBox() { /**
* 获取调试信息组件
*
* @return DebugBox对象
*/
public DebugBox getDebugBox() {
return debugBox; return debugBox;
} }
} }