From b624d11c7db596d830429786ea4dfdb2f8a72936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E8=BD=B2?= Date: Wed, 11 Oct 2023 02:08:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20AbstractFunctionChildrenBo?= =?UTF-8?q?x.java=20=E7=9A=84=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sidebar/bottom/AbstractFunctionChildrenBox.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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);