增加编码识别功能
This commit is contained in:
parent
0031af2180
commit
7d203d39f3
@ -18,8 +18,6 @@ import java.util.Objects;
|
|||||||
|
|
||||||
public class JNotepad extends Application {
|
public class JNotepad extends Application {
|
||||||
String Title = "JNotepad";
|
String Title = "JNotepad";
|
||||||
private String lastDetectedEncoding = "未知";
|
|
||||||
|
|
||||||
Label encodingLabel; // 新增属性用于显示文本编码
|
Label encodingLabel; // 新增属性用于显示文本编码
|
||||||
|
|
||||||
// 定义菜单栏
|
// 定义菜单栏
|
||||||
@ -67,7 +65,7 @@ public class JNotepad extends Application {
|
|||||||
root.setCenter(tabPane);
|
root.setCenter(tabPane);
|
||||||
|
|
||||||
// 创建状态栏
|
// 创建状态栏
|
||||||
statusLabel = new Label("行: 1 \t列: 1 \t字数: 0 \t编码: ");
|
statusLabel = new Label("行: 1 \t列: 1 \t字数: 0 \t编码: 未知");
|
||||||
encodingLabel = new Label(); // 创建新的标签用于显示编码信息
|
encodingLabel = new Label(); // 创建新的标签用于显示编码信息
|
||||||
HBox statusBox = new HBox(statusLabel, encodingLabel); // 使用 HBox 放置状态标签和编码标签
|
HBox statusBox = new HBox(statusLabel, encodingLabel); // 使用 HBox 放置状态标签和编码标签
|
||||||
root.setBottom(statusBox);
|
root.setBottom(statusBox);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user