2023年4月25日18:18:48
parent
8a47040eb2
commit
aa732af9a4
|
|
@ -68,6 +68,7 @@ public class HomeController implements Serializable {
|
||||||
private AnchorPane root;
|
private AnchorPane root;
|
||||||
private AnchorPane md5;
|
private AnchorPane md5;
|
||||||
private AnchorPane spring_security;
|
private AnchorPane spring_security;
|
||||||
|
private AnchorPane jks_file;
|
||||||
|
|
||||||
public static final String color_cell = "#f4f4f4";
|
public static final String color_cell = "#f4f4f4";
|
||||||
|
|
||||||
|
|
@ -279,6 +280,13 @@ public class HomeController implements Serializable {
|
||||||
}
|
}
|
||||||
spring(flag);
|
spring(flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (newValue.getIndex() == 2) {
|
||||||
|
if (jks_file != null){
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
jks_file(flag);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -287,6 +295,7 @@ public class HomeController implements Serializable {
|
||||||
return switch (player){
|
return switch (player){
|
||||||
case Md5 -> new Image(ImagePath.path(ImagePath.ImagePathType.MD5));
|
case Md5 -> new Image(ImagePath.path(ImagePath.ImagePathType.MD5));
|
||||||
case SpringSecurity -> new Image(ImagePath.path(ImagePath.ImagePathType.SPRING_SECURITY));
|
case SpringSecurity -> new Image(ImagePath.path(ImagePath.ImagePathType.SPRING_SECURITY));
|
||||||
|
case Jks_File -> new Image(ImagePath.path(ImagePath.ImagePathType.SPRING_SECURITY));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -377,6 +386,23 @@ public class HomeController implements Serializable {
|
||||||
common_method();
|
common_method();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void jks_file(boolean flag){
|
||||||
|
//默认选择第一个
|
||||||
|
listView.getSelectionModel().select(2);
|
||||||
|
|
||||||
|
if (!flag){
|
||||||
|
try {
|
||||||
|
root = FXMLLoader.load(ResourcesUtils.getResource("jks-file"));
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
jks_file = root;
|
||||||
|
}else {
|
||||||
|
root = jks_file;
|
||||||
|
}
|
||||||
|
common_method();
|
||||||
|
}
|
||||||
|
|
||||||
private void common_method() {
|
private void common_method() {
|
||||||
splitPane.getItems().remove(1);
|
splitPane.getItems().remove(1);
|
||||||
splitPane.getItems().add(1, root);
|
splitPane.getItems().add(1, root);
|
||||||
|
|
@ -508,4 +534,12 @@ public class HomeController implements Serializable {
|
||||||
public void music_parser_menu_item(ActionEvent event) {
|
public void music_parser_menu_item(ActionEvent event) {
|
||||||
load_player(3);
|
load_player(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void jks_file_menu_item(ActionEvent event) {
|
||||||
|
boolean flag = false;
|
||||||
|
if (jks_file != null){
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
jks_file(flag);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -49,7 +49,9 @@ public class ResourcesUtils {
|
||||||
|
|
||||||
public enum Menu{
|
public enum Menu{
|
||||||
Md5("md5加密",0),
|
Md5("md5加密",0),
|
||||||
SpringSecurity("spring加密",1);
|
SpringSecurity("spring加密",1),
|
||||||
|
Jks_File("spring加密",2),
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
Menu(String title, int index) {
|
Menu(String title, int index) {
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,9 @@
|
||||||
<Menu mnemonicParsing="false" text="加密工具">
|
<Menu mnemonicParsing="false" text="加密工具">
|
||||||
<items>
|
<items>
|
||||||
<MenuItem mnemonicParsing="false" onAction="#md5_menu_item" text="md5 加密"/>
|
<MenuItem mnemonicParsing="false" onAction="#md5_menu_item" text="md5 加密"/>
|
||||||
<MenuItem mnemonicParsing="false" onAction="#spring_security_menu_item"
|
<MenuItem mnemonicParsing="false" onAction="#spring_security_menu_item" text="spring security 加密"/>
|
||||||
text="spring security 加密"/>
|
<MenuItem mnemonicParsing="false" onAction="#jks_file_menu_item" text="jkd 文件生成"/>
|
||||||
|
|
||||||
</items>
|
</items>
|
||||||
</Menu>
|
</Menu>
|
||||||
<Menu mnemonicParsing="false" text="影音工具">
|
<Menu mnemonicParsing="false" text="影音工具">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue