🔨 修改名称过时的API
This commit is contained in:
parent
70d97cd6e9
commit
fc0eec2932
@ -106,7 +106,7 @@ public class BottomStatusBoxManager {
|
||||
if (instance.getSelected() == null) {
|
||||
return;
|
||||
}
|
||||
TextCodeArea textArea = instance.getSelected().getLineNumberTextArea();
|
||||
TextCodeArea textArea = instance.getSelected().getTextCodeArea();
|
||||
int caretPosition = textArea.getCaretPosition();
|
||||
int row = getRow(caretPosition, textArea.getText());
|
||||
int column = getColumn(caretPosition, textArea.getText());
|
||||
@ -128,7 +128,7 @@ public class BottomStatusBoxManager {
|
||||
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()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ public class CenterTabPaneManager {
|
||||
}
|
||||
if (tab.isRelevance()) {
|
||||
// 获取当前文本域对象
|
||||
TextCodeArea textCodeArea = tab.getLineNumberTextArea();
|
||||
TextCodeArea textCodeArea = tab.getTextCodeArea();
|
||||
// 获取当前标签页对应文件上次修改时间
|
||||
Long lastModifiedTime = tab.getLastModifiedTimeOfAssociatedFile();
|
||||
// 获取对应文件上次修改时间
|
||||
|
||||
@ -72,7 +72,7 @@ public class CenterTab extends Tab {
|
||||
textCodeArea.setWrapText(autoLine);
|
||||
}
|
||||
|
||||
public TextCodeArea getLineNumberTextArea() {
|
||||
public TextCodeArea getTextCodeArea() {
|
||||
return textCodeArea;
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ public class CenterTab extends Tab {
|
||||
// 从标签页的用户数据中获取文件对象
|
||||
File file = (File) tab.getUserData();
|
||||
// 获取主文本区域中的文本内容
|
||||
String newValue = tab.getLineNumberTextArea().getText();
|
||||
String newValue = tab.getTextCodeArea().getText();
|
||||
|
||||
// 如果文件对象为空,记录警告信息并返回,不执行保存操作
|
||||
if (file == null) {
|
||||
|
||||
@ -71,7 +71,7 @@ public class RunTopMenu extends AbstractTopMenu {
|
||||
// 获取TextCodeArea的文本内容
|
||||
|
||||
CenterTab centerTab = CenterTabPaneManager.getInstance().getSelected();
|
||||
String code = centerTab.getLineNumberTextArea().getText();
|
||||
String code = centerTab.getTextCodeArea().getText();
|
||||
|
||||
// TextCodeArea的当前文本内容
|
||||
System.out.println("TextCodeArea的当前文本内容:" + code);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user