2023年12月1日16:02:46
parent
146b1b093c
commit
8ae4e1e491
|
|
@ -14,7 +14,7 @@ Width=1300
|
||||||
Height=850
|
Height=850
|
||||||
|
|
||||||
# 编辑器主题
|
# 编辑器主题
|
||||||
AceJsThem=monokai
|
AceJsThem=cloud9_day
|
||||||
|
|
||||||
|
|
||||||
[Interpolator]
|
[Interpolator]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.zhangmeng.tools.controller;
|
package com.zhangmeng.tools.controller;
|
||||||
|
|
||||||
|
import com.zhangmeng.tools.components.RxEditer;
|
||||||
import com.zhangmeng.tools.editors.ace.AceEditor;
|
import com.zhangmeng.tools.editors.ace.AceEditor;
|
||||||
|
import com.zhangmeng.tools.editors.ace.AceTheme;
|
||||||
import com.zhangmeng.tools.editors.codemirr.CodeMirrWebView;
|
import com.zhangmeng.tools.editors.codemirr.CodeMirrWebView;
|
||||||
import com.zhangmeng.tools.editors.monaco.*;
|
import com.zhangmeng.tools.editors.monaco.*;
|
||||||
import com.zhangmeng.tools.editors.timifx.TimiFxEditor;
|
import com.zhangmeng.tools.editors.timifx.TimiFxEditor;
|
||||||
|
|
@ -18,10 +20,7 @@ import javafx.fxml.FXML;
|
||||||
import javafx.fxml.FXMLLoader;
|
import javafx.fxml.FXMLLoader;
|
||||||
import javafx.geometry.Pos;
|
import javafx.geometry.Pos;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.*;
|
||||||
import javafx.scene.control.ListCell;
|
|
||||||
import javafx.scene.control.ListView;
|
|
||||||
import javafx.scene.control.SplitPane;
|
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
import javafx.scene.image.ImageView;
|
import javafx.scene.image.ImageView;
|
||||||
import javafx.scene.input.KeyCode;
|
import javafx.scene.input.KeyCode;
|
||||||
|
|
@ -59,6 +58,7 @@ public class EditListController {
|
||||||
private AnchorPane monacoEdit;
|
private AnchorPane monacoEdit;
|
||||||
private AnchorPane codemirror;
|
private AnchorPane codemirror;
|
||||||
private AnchorPane timiFx;
|
private AnchorPane timiFx;
|
||||||
|
private RxEditer swingEditor;
|
||||||
|
|
||||||
public static final String color_cell = "#f4f4f4";
|
public static final String color_cell = "#f4f4f4";
|
||||||
|
|
||||||
|
|
@ -267,6 +267,13 @@ public class EditListController {
|
||||||
}
|
}
|
||||||
timiFx(flag);
|
timiFx(flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (newValue.getIndex() == 4) {
|
||||||
|
if (swingEditor != null){
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
swingEditor(flag);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -277,6 +284,7 @@ public class EditListController {
|
||||||
case Monaco_JS -> new Image(ImagePath.path(ImagePath.ImagePathType.MD5));
|
case Monaco_JS -> new Image(ImagePath.path(ImagePath.ImagePathType.MD5));
|
||||||
case CodeMirror_JS -> new Image(ImagePath.path(ImagePath.ImagePathType.MD5));
|
case CodeMirror_JS -> new Image(ImagePath.path(ImagePath.ImagePathType.MD5));
|
||||||
case Timi_Fx -> new Image(ImagePath.path(ImagePath.ImagePathType.MD5));
|
case Timi_Fx -> new Image(ImagePath.path(ImagePath.ImagePathType.MD5));
|
||||||
|
case Swing -> new Image(ImagePath.path(ImagePath.ImagePathType.MD5));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -666,4 +674,24 @@ public class EditListController {
|
||||||
public void codemirror_js_menu_item(ActionEvent actionEvent) {
|
public void codemirror_js_menu_item(ActionEvent actionEvent) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void swing_menu_item(ActionEvent actionEvent) {
|
||||||
|
boolean flag = false;
|
||||||
|
if (swingEditor != null) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
swingEditor(flag);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void swingEditor(boolean flag) {
|
||||||
|
//默认选择第一个
|
||||||
|
listView.getSelectionModel().select(1);
|
||||||
|
if (!flag) {
|
||||||
|
swingEditor = new RxEditer(null,"idea");
|
||||||
|
root = swingEditor;
|
||||||
|
} else {
|
||||||
|
root = acJsEditor;
|
||||||
|
}
|
||||||
|
common_method();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
package com.zhangmeng.tools.controller;
|
package com.zhangmeng.tools.controller;
|
||||||
|
|
||||||
import com.sun.javafx.PlatformUtil;
|
|
||||||
import com.zhangmeng.tools.components.JFontDialog;
|
|
||||||
import com.zhangmeng.tools.components.RecursiveFileList;
|
|
||||||
import com.zhangmeng.tools.components.RxEditer;
|
import com.zhangmeng.tools.components.RxEditer;
|
||||||
import com.zhangmeng.tools.dto.FileTreeView;
|
import com.zhangmeng.tools.dto.FileTreeView;
|
||||||
import com.zhangmeng.tools.editors.ace.AceEditor;
|
import com.zhangmeng.tools.editors.ace.AceEditor;
|
||||||
|
|
@ -92,16 +89,6 @@ public class EditorListImplController {
|
||||||
@FXML
|
@FXML
|
||||||
public Menu font_item;
|
public Menu font_item;
|
||||||
|
|
||||||
public void swing_menu_item(ActionEvent actionEvent) {
|
|
||||||
editer_index.setValue(1);
|
|
||||||
boolean flag = false;
|
|
||||||
if (swingEditor != null) {
|
|
||||||
flag = true;
|
|
||||||
}
|
|
||||||
load_them_edit();
|
|
||||||
swingEditor(flag);
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum Type {
|
public enum Type {
|
||||||
JAVA, HTML, GO, JS, CSS, SQL, XML, YML, MARKDOWN
|
JAVA, HTML, GO, JS, CSS, SQL, XML, YML, MARKDOWN
|
||||||
}
|
}
|
||||||
|
|
@ -116,7 +103,6 @@ public class EditorListImplController {
|
||||||
private MonacoWebView monacoEdit;
|
private MonacoWebView monacoEdit;
|
||||||
private CodeMirrWebView codemirror;
|
private CodeMirrWebView codemirror;
|
||||||
private AnchorPane timiFx;
|
private AnchorPane timiFx;
|
||||||
private RxEditer swingEditor;
|
|
||||||
|
|
||||||
private SimpleObjectProperty<File> choose_file = new SimpleObjectProperty<>(null);
|
private SimpleObjectProperty<File> choose_file = new SimpleObjectProperty<>(null);
|
||||||
private SimpleObjectProperty<AceTheme> choose_them = new SimpleObjectProperty<>(null);
|
private SimpleObjectProperty<AceTheme> choose_them = new SimpleObjectProperty<>(null);
|
||||||
|
|
@ -344,6 +330,7 @@ public class EditorListImplController {
|
||||||
case Monaco_JS -> new Image(ImagePath.path(ImagePath.ImagePathType.MD5));
|
case Monaco_JS -> new Image(ImagePath.path(ImagePath.ImagePathType.MD5));
|
||||||
case CodeMirror_JS -> new Image(ImagePath.path(ImagePath.ImagePathType.MD5));
|
case CodeMirror_JS -> new Image(ImagePath.path(ImagePath.ImagePathType.MD5));
|
||||||
case Timi_Fx -> new Image(ImagePath.path(ImagePath.ImagePathType.MD5));
|
case Timi_Fx -> new Image(ImagePath.path(ImagePath.ImagePathType.MD5));
|
||||||
|
case Swing -> new Image(ImagePath.path(ImagePath.ImagePathType.MD5));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -566,19 +553,6 @@ public class EditorListImplController {
|
||||||
common_method();
|
common_method();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void swingEditor(boolean flag) {
|
|
||||||
//默认选择第一个
|
|
||||||
listView.getSelectionModel().select(1);
|
|
||||||
if (!flag) {
|
|
||||||
swingEditor = new RxEditer(null,"idea");
|
|
||||||
root = swingEditor;
|
|
||||||
} else {
|
|
||||||
root = acJsEditor;
|
|
||||||
}
|
|
||||||
common_method();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void monacoEdit(boolean flag) {
|
private void monacoEdit(boolean flag) {
|
||||||
|
|
||||||
//默认选择第一个
|
//默认选择第一个
|
||||||
|
|
@ -1172,28 +1146,4 @@ public class EditorListImplController {
|
||||||
load_them_edit();
|
load_them_edit();
|
||||||
acJsEditor(flag);
|
acJsEditor(flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void monaco_menu_item(ActionEvent actionEvent) {
|
|
||||||
boolean flag = false;
|
|
||||||
if (monacoEdit != null) {
|
|
||||||
flag = true;
|
|
||||||
}
|
|
||||||
monacoEdit(flag);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void codemirror_menu_item(ActionEvent actionEvent) {
|
|
||||||
boolean flag = false;
|
|
||||||
if (codemirror != null) {
|
|
||||||
flag = true;
|
|
||||||
}
|
|
||||||
codemirror(flag);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void timeFx_menu_item(ActionEvent actionEvent) {
|
|
||||||
boolean flag = false;
|
|
||||||
if (timiFx != null) {
|
|
||||||
flag = true;
|
|
||||||
}
|
|
||||||
timiFx(flag);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -691,7 +691,7 @@ public class HomeController implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void swing_menu_item(ActionEvent actionEvent) {
|
public void swing_menu_item(ActionEvent actionEvent) {
|
||||||
js_edit_list_impl(1);
|
js_edit_list(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -367,7 +367,7 @@ public class ResourcesUtils {
|
||||||
Monaco_JS("monaco.js 编辑器", 1),
|
Monaco_JS("monaco.js 编辑器", 1),
|
||||||
CodeMirror_JS("codemirror.js 编辑器", 2),
|
CodeMirror_JS("codemirror.js 编辑器", 2),
|
||||||
Timi_Fx("timi-fx 编辑器",3),
|
Timi_Fx("timi-fx 编辑器",3),
|
||||||
|
Swing("swing 编辑器",4),
|
||||||
;
|
;
|
||||||
|
|
||||||
EditorList(String title, int index) {
|
EditorList(String title, int index) {
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,7 @@
|
||||||
<MenuItem mnemonicParsing="false" text="ace.js 编辑器" onAction="#ace_js_menu_item"/>
|
<MenuItem mnemonicParsing="false" text="ace.js 编辑器" onAction="#ace_js_menu_item"/>
|
||||||
<MenuItem mnemonicParsing="false" text="monaco.js 编辑器" onAction="#monaco_js_menu_item"/>
|
<MenuItem mnemonicParsing="false" text="monaco.js 编辑器" onAction="#monaco_js_menu_item"/>
|
||||||
<MenuItem mnemonicParsing="false" text="codemirror.js 编辑器" onAction="#codemirror_js_menu_item"/>
|
<MenuItem mnemonicParsing="false" text="codemirror.js 编辑器" onAction="#codemirror_js_menu_item"/>
|
||||||
|
<MenuItem mnemonicParsing="false" text="swing编辑器" onAction="#swing_menu_item"/>
|
||||||
</items>
|
</items>
|
||||||
</Menu>
|
</Menu>
|
||||||
</menus>
|
</menus>
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,7 @@
|
||||||
<MenuItem mnemonicParsing="false" text="monaco.js 编辑器" onAction="#monaco_js_menu_item"/>
|
<MenuItem mnemonicParsing="false" text="monaco.js 编辑器" onAction="#monaco_js_menu_item"/>
|
||||||
<MenuItem mnemonicParsing="false" text="codemirror.js 编辑器" onAction="#codemirror_js_menu_item"/>
|
<MenuItem mnemonicParsing="false" text="codemirror.js 编辑器" onAction="#codemirror_js_menu_item"/>
|
||||||
<MenuItem mnemonicParsing="false" text="timefx 编辑器" onAction="#timeFx_fx_menu_item"/>
|
<MenuItem mnemonicParsing="false" text="timefx 编辑器" onAction="#timeFx_fx_menu_item"/>
|
||||||
|
<MenuItem mnemonicParsing="false" text="swing编辑器" onAction="#swing_menu_item"/>
|
||||||
</items>
|
</items>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue