!150 修改名称过时的api

Merge pull request !150 from 格物方能致知/develop
This commit is contained in:
格物方能致知 2023-10-07 01:58:56 +00:00 committed by Gitee
commit 86729c12aa
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 6 additions and 6 deletions

View File

@ -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()));
} }
} }

View File

@ -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();
// 获取对应文件上次修改时间 // 获取对应文件上次修改时间

View File

@ -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) {

View File

@ -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();