2023年11月18日18:27:09

master
zhangmeng 2023-11-18 18:27:26 +08:00
parent e9628655c5
commit 63a888efb0
2 changed files with 5 additions and 4 deletions

View File

@ -52,7 +52,7 @@ public class RxEditer extends AnchorPane{
changeStyleViaThemeXml(them_name); changeStyleViaThemeXml(them_name);
} }
public RxEditer(String style) { public RxEditer(String style,String theme) {
SwingNode sn = new SwingNode(); SwingNode sn = new SwingNode();
new Thread(()->{ new Thread(()->{
SwingUtilities.invokeLater(() -> { SwingUtilities.invokeLater(() -> {
@ -80,6 +80,7 @@ public class RxEditer extends AnchorPane{
column.setValue(columnnum); column.setValue(columnnum);
}); });
RTextScrollPane sp = new RTextScrollPane(textArea); RTextScrollPane sp = new RTextScrollPane(textArea);
changeStyleViaThemeXml(theme);
sn.setContent(sp); sn.setContent(sp);
}); });
}).start(); }).start();

View File

@ -571,7 +571,7 @@ public class EditorListImplController {
//默认选择第一个 //默认选择第一个
listView.getSelectionModel().select(1); listView.getSelectionModel().select(1);
if (!flag) { if (!flag) {
swingEditor = new RxEditer(null); swingEditor = new RxEditer(null,"idea");
root = swingEditor; root = swingEditor;
} else { } else {
root = acJsEditor; root = acJsEditor;
@ -833,8 +833,8 @@ public class EditorListImplController {
case SQL -> style = SyntaxConstants.SYNTAX_STYLE_SQL; case SQL -> style = SyntaxConstants.SYNTAX_STYLE_SQL;
case MARKDOWN -> style = SyntaxConstants.SYNTAX_STYLE_MARKDOWN; case MARKDOWN -> style = SyntaxConstants.SYNTAX_STYLE_MARKDOWN;
} }
RxEditer rx = new RxEditer(style); RxEditer rx = new RxEditer(style,"idea");
rx.setTheme("idea"); // rx.setTheme("idea");
rx.setText(file_content); rx.setText(file_content);
tab.setContent(rx); tab.setContent(rx);
} }