修改 pom.xml 2023年2月24日17:15:54

master
zhangmeng 2023-02-24 17:16:07 +08:00
parent 94e9ca2183
commit 9270cf3d84
4 changed files with 27 additions and 89 deletions

27
pom.xml
View File

@ -559,6 +559,33 @@
<build>
<plugins>
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-assembly-plugin</artifactId>-->
<!-- <version>3.3.0</version>-->
<!-- <configuration>-->
<!-- <archive>-->
<!-- <manifest>-->
<!-- &lt;!&ndash; <mainClass>入口类main 方法所在位置</mainClass> &ndash;&gt;-->
<!-- <mainClass>com.zhangmeng.tools.JavaFxToolsApplication</mainClass>-->
<!-- </manifest>-->
<!-- </archive>-->
<!-- <descriptorRefs>-->
<!-- &lt;!&ndash; jar 携带依赖 &ndash;&gt;-->
<!-- <descriptorRef>jar-with-dependencies</descriptorRef>-->
<!-- </descriptorRefs>-->
<!-- </configuration>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <phase>package</phase>-->
<!-- <goals>-->
<!-- <goal>single</goal>-->
<!-- </goals>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>

View File

@ -1,13 +0,0 @@
package com.zhangmeng.tools;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class JavaFxToolsApplicationTests {
@Test
void contextLoads() {
}
}

View File

@ -1,61 +0,0 @@
package com.zhangmeng.tools;
import com.zhangmeng.tools.utils.AlertUtils;
import javafx.application.Application;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.AnchorPane;
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import javafx.stage.Window;
import java.net.URL;
/**
* @author :
* @version : 1.0
* @date : 2023-02-16 16:13
*/
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Button button = new Button("1111");
AnchorPane anchorPane = new AnchorPane();
anchorPane.getChildren().add(button);
button.setOnAction(event -> {
AnchorPane pane = new AnchorPane();
pane.getChildren().add(new Button("66666"));
alert("弹窗",pane,primaryStage);
});
primaryStage.setScene(new Scene(anchorPane));
primaryStage.setTitle("test");
primaryStage.setWidth(800);
primaryStage.setHeight(600);
primaryStage.show();
}
public static void alert(String title, Parent node,Stage primaryStage){
alert(title,node,600,400,primaryStage);
}
public static void alert(String title, Parent node, int width, int height, Stage primaryStage) {
Scene scene = new Scene(node);
Stage stage = new Stage();
stage.setScene(scene);
stage.setTitle(title);
stage.setWidth(width);
stage.setHeight(height);
stage.initStyle(StageStyle.UTILITY);
stage.initOwner(primaryStage);
stage.initModality(Modality.APPLICATION_MODAL);
stage.show();
}
}

View File

@ -1,15 +0,0 @@
package com.zhangmeng.tools;
import javafx.application.Application;
/**
* @author :
* @version : 1.0
* @date : 2023-02-16 16:18
*/
public class Test {
public static void main(String[] args) {
Application.launch(Main.class);
}
}