commit
3aec1f93cd
@ -23,13 +23,10 @@ module org.jcnc.jnotepad {
|
|||||||
exports org.jcnc.jnotepad.controller.event.handler.menuBar;
|
exports org.jcnc.jnotepad.controller.event.handler.menuBar;
|
||||||
exports org.jcnc.jnotepad.tool;
|
exports org.jcnc.jnotepad.tool;
|
||||||
exports org.jcnc.jnotepad.Interface;
|
exports org.jcnc.jnotepad.Interface;
|
||||||
exports org.jcnc.jnotepad.ui.root.center.tab;
|
|
||||||
exports org.jcnc.jnotepad.ui.root.bottom.status;
|
|
||||||
exports org.jcnc.jnotepad.ui.root.top.menu;
|
|
||||||
exports org.jcnc.jnotepad.ui.module;
|
exports org.jcnc.jnotepad.ui.module;
|
||||||
exports org.jcnc.jnotepad.ui.setStage;
|
exports org.jcnc.jnotepad.ui.setStage;
|
||||||
exports org.jcnc.jnotepad.ui.root.top.tools;
|
|
||||||
exports org.jcnc.jnotepad.view.manager;
|
exports org.jcnc.jnotepad.view.manager;
|
||||||
opens org.jcnc.jnotepad.app.config;
|
opens org.jcnc.jnotepad.app.config;
|
||||||
|
exports org.jcnc.jnotepad.root.center.main.bottom.status;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -4,9 +4,9 @@ import javafx.event.ActionEvent;
|
|||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
||||||
import org.jcnc.jnotepad.constants.TextConstants;
|
import org.jcnc.jnotepad.constants.TextConstants;
|
||||||
|
import org.jcnc.jnotepad.root.center.main.center.tab.JNotepadTab;
|
||||||
import org.jcnc.jnotepad.tool.UiUtil;
|
import org.jcnc.jnotepad.tool.UiUtil;
|
||||||
import org.jcnc.jnotepad.ui.module.LineNumberTextArea;
|
import org.jcnc.jnotepad.ui.module.LineNumberTextArea;
|
||||||
import org.jcnc.jnotepad.ui.root.center.tab.JNotepadTab;
|
|
||||||
import org.jcnc.jnotepad.view.manager.ViewManager;
|
import org.jcnc.jnotepad.view.manager.ViewManager;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,11 +6,11 @@ import javafx.event.ActionEvent;
|
|||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
import javafx.stage.FileChooser;
|
import javafx.stage.FileChooser;
|
||||||
import org.jcnc.jnotepad.manager.ThreadPoolManager;
|
import org.jcnc.jnotepad.manager.ThreadPoolManager;
|
||||||
|
import org.jcnc.jnotepad.root.center.main.center.tab.JNotepadTab;
|
||||||
import org.jcnc.jnotepad.tool.EncodingDetector;
|
import org.jcnc.jnotepad.tool.EncodingDetector;
|
||||||
import org.jcnc.jnotepad.tool.LogUtil;
|
import org.jcnc.jnotepad.tool.LogUtil;
|
||||||
import org.jcnc.jnotepad.tool.UiUtil;
|
import org.jcnc.jnotepad.tool.UiUtil;
|
||||||
import org.jcnc.jnotepad.ui.module.LineNumberTextArea;
|
import org.jcnc.jnotepad.ui.module.LineNumberTextArea;
|
||||||
import org.jcnc.jnotepad.ui.root.center.tab.JNotepadTab;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|||||||
@ -5,9 +5,9 @@ import javafx.event.EventHandler;
|
|||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
import javafx.scene.input.KeyCode;
|
import javafx.scene.input.KeyCode;
|
||||||
import javafx.stage.FileChooser;
|
import javafx.stage.FileChooser;
|
||||||
|
import org.jcnc.jnotepad.root.center.main.center.tab.JNotepadTab;
|
||||||
import org.jcnc.jnotepad.tool.LogUtil;
|
import org.jcnc.jnotepad.tool.LogUtil;
|
||||||
import org.jcnc.jnotepad.tool.UiUtil;
|
import org.jcnc.jnotepad.tool.UiUtil;
|
||||||
import org.jcnc.jnotepad.ui.root.center.tab.JNotepadTab;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|||||||
@ -4,10 +4,10 @@ import javafx.event.ActionEvent;
|
|||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
import javafx.stage.FileChooser;
|
import javafx.stage.FileChooser;
|
||||||
import org.jcnc.jnotepad.controller.i18n.LocalizationController;
|
import org.jcnc.jnotepad.controller.i18n.LocalizationController;
|
||||||
|
import org.jcnc.jnotepad.root.center.main.center.tab.JNotepadTab;
|
||||||
import org.jcnc.jnotepad.tool.LogUtil;
|
import org.jcnc.jnotepad.tool.LogUtil;
|
||||||
import org.jcnc.jnotepad.tool.SingletonUtil;
|
import org.jcnc.jnotepad.tool.SingletonUtil;
|
||||||
import org.jcnc.jnotepad.tool.UiUtil;
|
import org.jcnc.jnotepad.tool.UiUtil;
|
||||||
import org.jcnc.jnotepad.ui.root.center.tab.JNotepadTab;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|||||||
31
src/main/java/org/jcnc/jnotepad/root/RootBorderPane.java
Normal file
31
src/main/java/org/jcnc/jnotepad/root/RootBorderPane.java
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
package org.jcnc.jnotepad.root;
|
||||||
|
|
||||||
|
import org.jcnc.jnotepad.root.bottom.RootBottomSideBarVBox;
|
||||||
|
import org.jcnc.jnotepad.root.center.main.MainBorderPane;
|
||||||
|
import org.jcnc.jnotepad.root.left.sidebar.RootLeftSideBarVBox;
|
||||||
|
import org.jcnc.jnotepad.root.right.RootRightSideBarVBox;
|
||||||
|
import org.jcnc.jnotepad.root.top.RootTopSideBarVBox;
|
||||||
|
import org.jcnc.jnotepad.ui.module.AbstractBorderPane;
|
||||||
|
|
||||||
|
public class RootBorderPane extends AbstractBorderPane {
|
||||||
|
|
||||||
|
private static final RootBorderPane INSTANCE = new RootBorderPane();
|
||||||
|
|
||||||
|
private RootBorderPane() {
|
||||||
|
initRootBorderPane();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initRootBorderPane() {
|
||||||
|
setCenterComponent(MainBorderPane.getInstance());
|
||||||
|
setLeftComponent(RootLeftSideBarVBox.getInstance());
|
||||||
|
setRightComponent(RootRightSideBarVBox.getInstance());
|
||||||
|
setTopComponent(RootTopSideBarVBox.getInstance());
|
||||||
|
setBottomComponent(RootBottomSideBarVBox.getInstance());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static RootBorderPane getInstance() {
|
||||||
|
return INSTANCE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
package org.jcnc.jnotepad.root.bottom;
|
||||||
|
|
||||||
|
import org.jcnc.jnotepad.root.center.main.bottom.status.JNotepadStatusBox;
|
||||||
|
import org.jcnc.jnotepad.ui.module.AbstractVBox;
|
||||||
|
|
||||||
|
public class RootBottomSideBarVBox extends AbstractVBox {
|
||||||
|
|
||||||
|
private static final RootBottomSideBarVBox INSTANCE = new RootBottomSideBarVBox();
|
||||||
|
|
||||||
|
private RootBottomSideBarVBox() {
|
||||||
|
initSidebarVBox();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initSidebarVBox() {
|
||||||
|
getChildren().addAll(JNotepadStatusBox.getInstance());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static RootBottomSideBarVBox getInstance() {
|
||||||
|
return INSTANCE;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
package org.jcnc.jnotepad.root.center.main;
|
||||||
|
|
||||||
|
import org.jcnc.jnotepad.root.center.main.center.tab.JNotepadTabPane;
|
||||||
|
import org.jcnc.jnotepad.root.center.main.top.MainTopVBox;
|
||||||
|
import org.jcnc.jnotepad.ui.module.AbstractBorderPane;
|
||||||
|
|
||||||
|
public class MainBorderPane extends AbstractBorderPane {
|
||||||
|
|
||||||
|
private static final MainBorderPane INSTANCE = new MainBorderPane();
|
||||||
|
|
||||||
|
private MainBorderPane() {
|
||||||
|
initRootBorderPane();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initRootBorderPane() {
|
||||||
|
//setBottomComponent(JNotepadStatusBox.getInstance());
|
||||||
|
|
||||||
|
setCenter(JNotepadTabPane.getInstance());
|
||||||
|
|
||||||
|
setTopComponent(MainTopVBox.getInstance());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static MainBorderPane getInstance() {
|
||||||
|
return INSTANCE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1,13 +1,14 @@
|
|||||||
package org.jcnc.jnotepad.ui.root.bottom.status;
|
package org.jcnc.jnotepad.root.center.main.bottom.status;
|
||||||
|
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
|
import javafx.geometry.Pos;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
import javafx.scene.control.TextArea;
|
import javafx.scene.control.TextArea;
|
||||||
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
||||||
import org.jcnc.jnotepad.constants.TextConstants;
|
import org.jcnc.jnotepad.constants.TextConstants;
|
||||||
|
import org.jcnc.jnotepad.root.center.main.center.tab.JNotepadTab;
|
||||||
|
import org.jcnc.jnotepad.root.center.main.center.tab.JNotepadTabPane;
|
||||||
import org.jcnc.jnotepad.ui.module.AbstractHBox;
|
import org.jcnc.jnotepad.ui.module.AbstractHBox;
|
||||||
import org.jcnc.jnotepad.ui.root.center.tab.JNotepadTab;
|
|
||||||
import org.jcnc.jnotepad.ui.root.center.tab.JNotepadTabPane;
|
|
||||||
|
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
|
|
||||||
@ -46,6 +47,7 @@ public class JNotepadStatusBox extends AbstractHBox {
|
|||||||
* @since 2023/8/27 9:33
|
* @since 2023/8/27 9:33
|
||||||
*/
|
*/
|
||||||
public void initStatusBox() {
|
public void initStatusBox() {
|
||||||
|
|
||||||
this.getChildren().clear();
|
this.getChildren().clear();
|
||||||
// 创建状态栏
|
// 创建状态栏
|
||||||
statusLabel = new Label();
|
statusLabel = new Label();
|
||||||
@ -57,9 +59,16 @@ public class JNotepadStatusBox extends AbstractHBox {
|
|||||||
this.getChildren().add(statusLabel);
|
this.getChildren().add(statusLabel);
|
||||||
this.getChildren().add(encodingLabel);
|
this.getChildren().add(encodingLabel);
|
||||||
this.getProperties().put("borderpane-margin", new Insets(5, 10, 5, 10));
|
this.getProperties().put("borderpane-margin", new Insets(5, 10, 5, 10));
|
||||||
|
this.setAlignment(Pos.BASELINE_RIGHT);
|
||||||
UiResourceBundle.getInstance().addListener((observable, oldValue, newValue) -> updateWhenTabSelected());
|
UiResourceBundle.getInstance().addListener((observable, oldValue, newValue) -> updateWhenTabSelected());
|
||||||
|
|
||||||
|
/*
|
||||||
|
第一个参数 10 表示上边距。
|
||||||
|
第二个参数 10 表示右边距。
|
||||||
|
第三个参数 10 表示下边距。
|
||||||
|
第四个参数 10 表示左边距。
|
||||||
|
*/
|
||||||
|
setMargin(statusLabel, new Insets(5, 10, 5, 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateEncodingLabel() {
|
public void updateEncodingLabel() {
|
||||||
@ -75,7 +84,7 @@ public class JNotepadStatusBox extends AbstractHBox {
|
|||||||
if (encoding == null) {
|
if (encoding == null) {
|
||||||
encoding = Charset.defaultCharset().name();
|
encoding = Charset.defaultCharset().name();
|
||||||
}
|
}
|
||||||
this.encodingLabel.setText(getEncodingFormattedText(encoding));
|
this.encodingLabel.setText(getEncodingFormattedText(encoding) + "\t");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -155,7 +164,7 @@ public class JNotepadStatusBox extends AbstractHBox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected String getEncodingFormattedText(String encoding) {
|
protected String getEncodingFormattedText(String encoding) {
|
||||||
String encodingLabelFormat = "\t%s : %s";
|
String encodingLabelFormat = "%s : %s";
|
||||||
return String.format(encodingLabelFormat, UiResourceBundle.getContent(TextConstants.ENCODE), encoding);
|
return String.format(encodingLabelFormat, UiResourceBundle.getContent(TextConstants.ENCODE), encoding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.ui.root.center.tab;
|
package org.jcnc.jnotepad.root.center.main.center.tab;
|
||||||
|
|
||||||
import javafx.scene.control.Tab;
|
import javafx.scene.control.Tab;
|
||||||
import org.jcnc.jnotepad.controller.config.AppConfigController;
|
import org.jcnc.jnotepad.controller.config.AppConfigController;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.ui.root.center.tab;
|
package org.jcnc.jnotepad.root.center.main.center.tab;
|
||||||
|
|
||||||
import javafx.scene.control.TabPane;
|
import javafx.scene.control.TabPane;
|
||||||
import org.jcnc.jnotepad.controller.config.AppConfigController;
|
import org.jcnc.jnotepad.controller.config.AppConfigController;
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
package org.jcnc.jnotepad.root.center.main.top;
|
||||||
|
|
||||||
|
import javafx.scene.layout.VBox;
|
||||||
|
import org.jcnc.jnotepad.root.center.main.top.menu.JNotepadMenuBar;
|
||||||
|
import org.jcnc.jnotepad.root.center.main.top.tools.ToolHBox;
|
||||||
|
|
||||||
|
public class MainTopVBox extends VBox {
|
||||||
|
private static final MainTopVBox INSTANCE = new MainTopVBox();
|
||||||
|
|
||||||
|
private MainTopVBox() {
|
||||||
|
// 在构造函数中初始化
|
||||||
|
getChildren().add(JNotepadMenuBar.getInstance());
|
||||||
|
getChildren().add(ToolHBox.getInstance());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static MainTopVBox getInstance() {
|
||||||
|
return INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.ui.root.top.menu;
|
package org.jcnc.jnotepad.root.center.main.top.menu;
|
||||||
|
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.scene.control.*;
|
import javafx.scene.control.*;
|
||||||
@ -10,10 +10,10 @@ import org.jcnc.jnotepad.controller.config.AppConfigController;
|
|||||||
import org.jcnc.jnotepad.controller.event.handler.menuBar.*;
|
import org.jcnc.jnotepad.controller.event.handler.menuBar.*;
|
||||||
import org.jcnc.jnotepad.controller.event.handler.tool.SetBtn;
|
import org.jcnc.jnotepad.controller.event.handler.tool.SetBtn;
|
||||||
import org.jcnc.jnotepad.controller.i18n.LocalizationController;
|
import org.jcnc.jnotepad.controller.i18n.LocalizationController;
|
||||||
|
import org.jcnc.jnotepad.root.center.main.center.tab.JNotepadTab;
|
||||||
|
import org.jcnc.jnotepad.root.center.main.center.tab.JNotepadTabPane;
|
||||||
|
import org.jcnc.jnotepad.root.center.main.top.tools.JNotepadToolBar;
|
||||||
import org.jcnc.jnotepad.tool.LogUtil;
|
import org.jcnc.jnotepad.tool.LogUtil;
|
||||||
import org.jcnc.jnotepad.ui.root.center.tab.JNotepadTab;
|
|
||||||
import org.jcnc.jnotepad.ui.root.center.tab.JNotepadTabPane;
|
|
||||||
import org.jcnc.jnotepad.ui.root.top.tools.JNotepadToolBar;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.ui.root.top.tools;
|
package org.jcnc.jnotepad.root.center.main.top.tools;
|
||||||
|
|
||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.Button;
|
||||||
import javafx.scene.control.ToolBar;
|
import javafx.scene.control.ToolBar;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.ui.root.top.tools;
|
package org.jcnc.jnotepad.root.center.main.top.tools;
|
||||||
|
|
||||||
import javafx.scene.layout.HBox;
|
import javafx.scene.layout.HBox;
|
||||||
import javafx.scene.layout.Priority;
|
import javafx.scene.layout.Priority;
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
package org.jcnc.jnotepad.root.left.sidebar;
|
||||||
|
|
||||||
|
import org.jcnc.jnotepad.ui.module.AbstractVBox;
|
||||||
|
|
||||||
|
public class RootLeftSideBarVBox extends AbstractVBox {
|
||||||
|
|
||||||
|
private static final RootLeftSideBarVBox INSTANCE = new RootLeftSideBarVBox();
|
||||||
|
|
||||||
|
private RootLeftSideBarVBox() {
|
||||||
|
initSidebarVBox();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initSidebarVBox() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static RootLeftSideBarVBox getInstance() {
|
||||||
|
return INSTANCE;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
package org.jcnc.jnotepad.root.right;
|
||||||
|
|
||||||
|
import org.jcnc.jnotepad.ui.module.AbstractVBox;
|
||||||
|
|
||||||
|
public class RootRightSideBarVBox extends AbstractVBox {
|
||||||
|
|
||||||
|
private static final RootRightSideBarVBox INSTANCE = new RootRightSideBarVBox();
|
||||||
|
|
||||||
|
private RootRightSideBarVBox() {
|
||||||
|
initSidebarVBox();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initSidebarVBox() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static RootRightSideBarVBox getInstance() {
|
||||||
|
return INSTANCE;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
package org.jcnc.jnotepad.root.top;
|
||||||
|
|
||||||
|
import org.jcnc.jnotepad.ui.module.AbstractVBox;
|
||||||
|
|
||||||
|
public class RootTopSideBarVBox extends AbstractVBox {
|
||||||
|
|
||||||
|
private static final RootTopSideBarVBox INSTANCE = new RootTopSideBarVBox();
|
||||||
|
|
||||||
|
private RootTopSideBarVBox() {
|
||||||
|
initSidebarVBox();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initSidebarVBox() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static RootTopSideBarVBox getInstance() {
|
||||||
|
return INSTANCE;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,10 +3,10 @@ package org.jcnc.jnotepad.tool;
|
|||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
import javafx.stage.Window;
|
import javafx.stage.Window;
|
||||||
import org.jcnc.jnotepad.constants.AppConstants;
|
import org.jcnc.jnotepad.constants.AppConstants;
|
||||||
import org.jcnc.jnotepad.ui.root.bottom.status.JNotepadStatusBox;
|
import org.jcnc.jnotepad.root.center.main.bottom.status.JNotepadStatusBox;
|
||||||
import org.jcnc.jnotepad.ui.root.center.tab.JNotepadTab;
|
import org.jcnc.jnotepad.root.center.main.center.tab.JNotepadTab;
|
||||||
import org.jcnc.jnotepad.ui.root.center.tab.JNotepadTabPane;
|
import org.jcnc.jnotepad.root.center.main.center.tab.JNotepadTabPane;
|
||||||
import org.jcnc.jnotepad.ui.root.top.menu.JNotepadMenuBar;
|
import org.jcnc.jnotepad.root.center.main.top.menu.JNotepadMenuBar;
|
||||||
import org.jcnc.jnotepad.ui.setStage.SetStage;
|
import org.jcnc.jnotepad.ui.setStage.SetStage;
|
||||||
import org.jcnc.jnotepad.view.manager.ViewManager;
|
import org.jcnc.jnotepad.view.manager.ViewManager;
|
||||||
|
|
||||||
|
|||||||
@ -3,10 +3,10 @@ package org.jcnc.jnotepad.ui.module;
|
|||||||
import javafx.beans.property.StringProperty;
|
import javafx.beans.property.StringProperty;
|
||||||
import javafx.scene.control.TextArea;
|
import javafx.scene.control.TextArea;
|
||||||
import javafx.scene.layout.BorderPane;
|
import javafx.scene.layout.BorderPane;
|
||||||
|
import org.jcnc.jnotepad.root.center.main.center.tab.JNotepadTab;
|
||||||
import org.jcnc.jnotepad.tool.LogUtil;
|
import org.jcnc.jnotepad.tool.LogUtil;
|
||||||
import org.jcnc.jnotepad.tool.SingletonUtil;
|
import org.jcnc.jnotepad.tool.SingletonUtil;
|
||||||
import org.jcnc.jnotepad.tool.UiUtil;
|
import org.jcnc.jnotepad.tool.UiUtil;
|
||||||
import org.jcnc.jnotepad.ui.root.center.tab.JNotepadTab;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
|
|||||||
@ -1,20 +0,0 @@
|
|||||||
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.ToolHBox;
|
|
||||||
|
|
||||||
public class RootTopVBox extends VBox {
|
|
||||||
private static final RootTopVBox INSTANCE = new RootTopVBox();
|
|
||||||
|
|
||||||
private RootTopVBox() {
|
|
||||||
// 在构造函数中初始化
|
|
||||||
getChildren().add(JNotepadMenuBar.getInstance());
|
|
||||||
getChildren().add(ToolHBox.getInstance());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static RootTopVBox getInstance() {
|
|
||||||
return INSTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -3,9 +3,7 @@ package org.jcnc.jnotepad.view.manager;
|
|||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.layout.BorderPane;
|
import javafx.scene.layout.BorderPane;
|
||||||
import org.jcnc.jnotepad.exception.AppException;
|
import org.jcnc.jnotepad.exception.AppException;
|
||||||
import org.jcnc.jnotepad.ui.root.bottom.status.JNotepadStatusBox;
|
import org.jcnc.jnotepad.root.RootBorderPane;
|
||||||
import org.jcnc.jnotepad.ui.root.center.tab.JNotepadTabPane;
|
|
||||||
import org.jcnc.jnotepad.ui.root.top.RootTopVBox;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -76,12 +74,7 @@ public class ViewManager {
|
|||||||
|
|
||||||
// 创建主界面布局
|
// 创建主界面布局
|
||||||
root = new BorderPane();
|
root = new BorderPane();
|
||||||
|
root.setCenter(RootBorderPane.getInstance());
|
||||||
root.setTop(RootTopVBox.getInstance());
|
|
||||||
|
|
||||||
// 创建标签页和文本编辑区域
|
|
||||||
root.setCenter(JNotepadTabPane.getInstance());
|
|
||||||
root.setBottom(JNotepadStatusBox.getInstance());
|
|
||||||
|
|
||||||
scene.setRoot(root);
|
scene.setRoot(root);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user