增加设置按钮
This commit is contained in:
parent
69922ea846
commit
dc7ead7d8d
@ -2,7 +2,6 @@ package org.jcnc.jnotepad.ui.root.top;
|
||||
|
||||
import javafx.scene.layout.VBox;
|
||||
import org.jcnc.jnotepad.ui.root.top.menu.JNotepadMenuBar;
|
||||
import org.jcnc.jnotepad.ui.root.top.tools.ToolBorderPane;
|
||||
import org.jcnc.jnotepad.ui.root.top.tools.ToolHBox;
|
||||
|
||||
public class RootTopVBox extends VBox {
|
||||
@ -11,7 +10,7 @@ public class RootTopVBox extends VBox {
|
||||
private RootTopVBox() {
|
||||
// 在构造函数中初始化
|
||||
getChildren().add(JNotepadMenuBar.getInstance());
|
||||
getChildren().add(ToolBorderPane.getInstance());
|
||||
getChildren().add(ToolHBox.getInstance());
|
||||
}
|
||||
|
||||
public static RootTopVBox getInstance() {
|
||||
|
||||
@ -4,9 +4,6 @@ import javafx.scene.control.Button;
|
||||
import javafx.scene.control.ToolBar;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.Priority;
|
||||
|
||||
import static javafx.scene.layout.HBox.setHgrow;
|
||||
|
||||
public class JNotepadToolBar extends ToolBar {
|
||||
private static final JNotepadToolBar INSTANCE = new JNotepadToolBar();
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
package org.jcnc.jnotepad.ui.root.top.tools;
|
||||
|
||||
import org.jcnc.jnotepad.ui.module.AbstractBorderPane;
|
||||
import org.jcnc.jnotepad.ui.root.top.menu.JNotepadMenuBar;
|
||||
|
||||
public class ToolBorderPane extends AbstractBorderPane {
|
||||
|
||||
private static final ToolBorderPane ToolBorderPane = new ToolBorderPane();
|
||||
|
||||
public ToolBorderPane() {
|
||||
|
||||
setRightComponent(ToolHBox.getInstance());
|
||||
|
||||
}
|
||||
|
||||
public static ToolBorderPane getInstance() {
|
||||
return ToolBorderPane;
|
||||
}
|
||||
}
|
||||
@ -9,7 +9,6 @@ public class ToolHBox extends HBox {
|
||||
|
||||
|
||||
private ToolHBox() {
|
||||
setHgrow(this, Priority.ALWAYS);
|
||||
|
||||
HBox.setHgrow(JNotepadToolBar.getInstance(), Priority.ALWAYS); // 设置子节点水平拉伸
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user