diff --git a/src/main/java/org/jcnc/jnotepad/api/core/views/sidebar/bottom/AbstractFunctionChildrenBox.java b/src/main/java/org/jcnc/jnotepad/api/core/views/sidebar/bottom/AbstractFunctionChildrenBox.java index 294de08..59e3fba 100644 --- a/src/main/java/org/jcnc/jnotepad/api/core/views/sidebar/bottom/AbstractFunctionChildrenBox.java +++ b/src/main/java/org/jcnc/jnotepad/api/core/views/sidebar/bottom/AbstractFunctionChildrenBox.java @@ -6,9 +6,14 @@ import javafx.scene.control.MenuBar; import org.jcnc.jnotepad.views.root.bottom.function.FunctionBox; /** - * 子功能栏抽象类(用于构建一个基本的子功能栏) + * 子功能栏抽象类 + * + *
+ * 此抽象类用于构建一个基本的子功能栏,包括功能按钮的初始化和添加到功能栏中。 + *
* * @author gewuyou + * */ public abstract class AbstractFunctionChildrenBox { protected final FunctionBox functionBox; @@ -19,11 +24,17 @@ public abstract class AbstractFunctionChildrenBox { protected Menu menu = new Menu(); + /** + * 构造子功能栏抽象类 + */ protected AbstractFunctionChildrenBox() { functionBox = FunctionBox.getInstance(); menuBar = FunctionBox.getMenuBar(); } + /** + * 初始化子功能栏,包括将功能按钮添加到菜单栏中 + */ public void initialize() { menu.setGraphic(label); menuBar.getMenus().add(menu);