commit
86729c12aa
@ -106,7 +106,7 @@ public class BottomStatusBoxManager {
|
|||||||
if (instance.getSelected() == null) {
|
if (instance.getSelected() == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
TextCodeArea textArea = instance.getSelected().getLineNumberTextArea();
|
TextCodeArea textArea = instance.getSelected().getTextCodeArea();
|
||||||
int caretPosition = textArea.getCaretPosition();
|
int caretPosition = textArea.getCaretPosition();
|
||||||
int row = getRow(caretPosition, textArea.getText());
|
int row = getRow(caretPosition, textArea.getText());
|
||||||
int column = getColumn(caretPosition, textArea.getText());
|
int column = getColumn(caretPosition, textArea.getText());
|
||||||
@ -128,7 +128,7 @@ public class BottomStatusBoxManager {
|
|||||||
updateEncodingLabel(centerTab.getCharset().name());
|
updateEncodingLabel(centerTab.getCharset().name());
|
||||||
|
|
||||||
// 添加光标位置变化监听器
|
// 添加光标位置变化监听器
|
||||||
TextCodeArea textArea = centerTab.getLineNumberTextArea();
|
TextCodeArea textArea = centerTab.getTextCodeArea();
|
||||||
textArea.caretPositionProperty().addListener((ChangeListener<Number>) (observable, oldValue, newValue) -> updateRowColumnLabel(textArea.getCaretPosition(), textArea.getText()));
|
textArea.caretPositionProperty().addListener((ChangeListener<Number>) (observable, oldValue, newValue) -> updateRowColumnLabel(textArea.getCaretPosition(), textArea.getText()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,7 +79,7 @@ public class CenterTabPaneManager {
|
|||||||
}
|
}
|
||||||
if (tab.isRelevance()) {
|
if (tab.isRelevance()) {
|
||||||
// 获取当前文本域对象
|
// 获取当前文本域对象
|
||||||
TextCodeArea textCodeArea = tab.getLineNumberTextArea();
|
TextCodeArea textCodeArea = tab.getTextCodeArea();
|
||||||
// 获取当前标签页对应文件上次修改时间
|
// 获取当前标签页对应文件上次修改时间
|
||||||
Long lastModifiedTime = tab.getLastModifiedTimeOfAssociatedFile();
|
Long lastModifiedTime = tab.getLastModifiedTimeOfAssociatedFile();
|
||||||
// 获取对应文件上次修改时间
|
// 获取对应文件上次修改时间
|
||||||
|
|||||||
@ -72,7 +72,7 @@ public class CenterTab extends Tab {
|
|||||||
textCodeArea.setWrapText(autoLine);
|
textCodeArea.setWrapText(autoLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TextCodeArea getLineNumberTextArea() {
|
public TextCodeArea getTextCodeArea() {
|
||||||
return textCodeArea;
|
return textCodeArea;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ public class CenterTab extends Tab {
|
|||||||
// 从标签页的用户数据中获取文件对象
|
// 从标签页的用户数据中获取文件对象
|
||||||
File file = (File) tab.getUserData();
|
File file = (File) tab.getUserData();
|
||||||
// 获取主文本区域中的文本内容
|
// 获取主文本区域中的文本内容
|
||||||
String newValue = tab.getLineNumberTextArea().getText();
|
String newValue = tab.getTextCodeArea().getText();
|
||||||
|
|
||||||
// 如果文件对象为空,记录警告信息并返回,不执行保存操作
|
// 如果文件对象为空,记录警告信息并返回,不执行保存操作
|
||||||
if (file == null) {
|
if (file == null) {
|
||||||
|
|||||||
@ -68,7 +68,7 @@ public class RunTopMenu extends AbstractTopMenu {
|
|||||||
// 获取TextCodeArea的文本内容
|
// 获取TextCodeArea的文本内容
|
||||||
CenterTab centerTab = CenterTabPaneManager.getInstance().getSelected();
|
CenterTab centerTab = CenterTabPaneManager.getInstance().getSelected();
|
||||||
|
|
||||||
String code = centerTab.getLineNumberTextArea().getText();
|
String code = centerTab.getTextCodeArea().getText();
|
||||||
|
|
||||||
String fileName = centerTab.getText();
|
String fileName = centerTab.getText();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user