2023年2月21日15:50:36
parent
000d7de773
commit
b1fcb0b76e
|
|
@ -72,6 +72,7 @@ public class MusicController {
|
||||||
private StringBuffer sb;
|
private StringBuffer sb;
|
||||||
private final Random ran = new Random();
|
private final Random ran = new Random();
|
||||||
|
|
||||||
|
@FXML
|
||||||
private HBox hbox;
|
private HBox hbox;
|
||||||
private static final double gap = 5.0D;
|
private static final double gap = 5.0D;
|
||||||
private final int number = SpectrumUtils.CELL_NUMBER;
|
private final int number = SpectrumUtils.CELL_NUMBER;
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ public class MusicSetController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public void commit() throws FileNotFoundException {
|
public void commit() {
|
||||||
String path = text_file.getText();
|
String path = text_file.getText();
|
||||||
if (path.length() == 0 ){
|
if (path.length() == 0 ){
|
||||||
AlertUtils.alert_warning("请选择文件夹");
|
AlertUtils.alert_warning("请选择文件夹");
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ public class ImagePath {
|
||||||
Hex_16("16 进制"),
|
Hex_16("16 进制"),
|
||||||
Unicode("Unicode"),
|
Unicode("Unicode"),
|
||||||
COLOR_CHOOSE("颜色选择"),
|
COLOR_CHOOSE("颜色选择"),
|
||||||
|
Tools_ICON("tools-hardware"),
|
||||||
|
|
||||||
ICON_NULL_COVER("");
|
ICON_NULL_COVER("");
|
||||||
|
|
||||||
|
|
@ -242,6 +243,7 @@ public class ImagePath {
|
||||||
public static String Unicode = "svg/unicode.png";
|
public static String Unicode = "svg/unicode.png";
|
||||||
public static String JWT_WEB = "svg/jwt-web.png";
|
public static String JWT_WEB = "svg/jwt-web.png";
|
||||||
public static String COLOR_CHOOSE = "svg/color-choose.png";
|
public static String COLOR_CHOOSE = "svg/color-choose.png";
|
||||||
|
public static String Tools_ICON = "svg/tools-hardware.png";
|
||||||
|
|
||||||
public static String path(ImagePathType type) {
|
public static String path(ImagePathType type) {
|
||||||
|
|
||||||
|
|
@ -396,6 +398,9 @@ public class ImagePath {
|
||||||
case COLOR_CHOOSE:
|
case COLOR_CHOOSE:
|
||||||
path = ImagePath.COLOR_CHOOSE;
|
path = ImagePath.COLOR_CHOOSE;
|
||||||
break;
|
break;
|
||||||
|
case Tools_ICON:
|
||||||
|
path = ImagePath.Tools_ICON;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return "static/" + path;
|
return "static/" + path;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
package com.zhangmeng.tools.views;
|
package com.zhangmeng.tools.views;
|
||||||
|
|
||||||
|
import com.zhangmeng.tools.utils.ImagePath;
|
||||||
import com.zhangmeng.tools.utils.ResourcesUtils;
|
import com.zhangmeng.tools.utils.ResourcesUtils;
|
||||||
import javafx.application.Application;
|
import javafx.application.Application;
|
||||||
import javafx.fxml.FXMLLoader;
|
import javafx.fxml.FXMLLoader;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
|
import javafx.scene.image.Image;
|
||||||
import javafx.scene.layout.AnchorPane;
|
import javafx.scene.layout.AnchorPane;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
|
|
@ -18,6 +20,8 @@ public class HomeView extends Application {
|
||||||
public void start(Stage primaryStage) throws Exception {
|
public void start(Stage primaryStage) throws Exception {
|
||||||
AnchorPane fx = FXMLLoader.load(ResourcesUtils.getResource("home"));
|
AnchorPane fx = FXMLLoader.load(ResourcesUtils.getResource("home"));
|
||||||
Scene scene = new Scene(fx);
|
Scene scene = new Scene(fx);
|
||||||
|
Image image = new Image(ImagePath.path(ImagePath.ImagePathType.Tools_ICON));
|
||||||
|
primaryStage.getIcons().add(image);
|
||||||
primaryStage.setScene(scene);
|
primaryStage.setScene(scene);
|
||||||
primaryStage.setTitle("java-fx 工具");
|
primaryStage.setTitle("java-fx 工具");
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
Loading…
Reference in New Issue