master
王兵 4 years ago
parent 465fd7eb10
commit e84c56ffba

@ -99,7 +99,7 @@ public class FreeMarkerManager {
if (list.size() > 0) {
DefaultListAdapter list1 = (DefaultListAdapter) list.get(0);
List wrappedObject = (List) list1.getWrappedObject();
if (wrappedObject.get(0) instanceof SelectItem) {
if (wrappedObject.size()> 0 && wrappedObject.get(0) instanceof SelectItem) {
StringBuffer sb = new StringBuffer("{");
Iterator iterator = wrappedObject.iterator();

@ -24,6 +24,7 @@ import javafx.scene.control.TableView;
import javafx.scene.control.TextField;
import javafx.scene.control.TextInputDialog;
import javafx.scene.control.ToggleGroup;
import javafx.scene.image.Image;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.VBox;
@ -48,6 +49,7 @@ import xyz.wbsite.dbtool.javafx.po.Field;
import xyz.wbsite.dbtool.javafx.po.Module;
import xyz.wbsite.dbtool.javafx.po.SelectItem;
import xyz.wbsite.dbtool.javafx.po.VueOption;
import xyz.wbsite.dbtool.web.frame.utils.ResourceUtil;
import xyz.wbsite.dbtool.web.frame.utils.StringUtil;
import java.io.File;
@ -119,6 +121,8 @@ public class Dialog {
public static void showYesNo(String title, String message, ConfirmCall call) {
Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
Stage stage = (Stage) alert.getDialogPane().getScene().getWindow();
stage.getIcons().add(new Image(ResourceUtil.getResourceInput("icon.png")));
alert.setHeaderText(null);
alert.setTitle(title);
alert.setContentText(message);
@ -138,6 +142,8 @@ public class Dialog {
Platform.runLater(new Runnable() {
public void run() {
Alert alert = new Alert(Alert.AlertType.ERROR);
Stage stage = (Stage) alert.getDialogPane().getScene().getWindow();
stage.getIcons().add(new Image(ResourceUtil.getResourceInput("icon.png")));
alert.setTitle("错误");
alert.setX(JavaFxApplication.primaryStage.getX() + JavaFxApplication.primaryStage.getWidth() / 2 - 213);
alert.setY(JavaFxApplication.primaryStage.getY() + JavaFxApplication.primaryStage.getHeight() / 2 - 70);
@ -152,6 +158,8 @@ public class Dialog {
Platform.runLater(new Runnable() {
public void run() {
Alert alert = new Alert(Alert.AlertType.INFORMATION);
Stage stage = (Stage) alert.getDialogPane().getScene().getWindow();
stage.getIcons().add(new Image(ResourceUtil.getResourceInput("icon.png")));
alert.setTitle("消息");
alert.setX(JavaFxApplication.primaryStage.getX() + JavaFxApplication.primaryStage.getWidth() / 2 - 213);
alert.setY(JavaFxApplication.primaryStage.getY() + JavaFxApplication.primaryStage.getHeight() / 2 - 70);
@ -168,6 +176,8 @@ public class Dialog {
if (dialog == null) {
dialog = new javafx.scene.control.Dialog();
dialog.setTitle("提示");
Stage stage = (Stage) dialog.getDialogPane().getScene().getWindow();
stage.getIcons().add(new Image(ResourceUtil.getResourceInput("icon.png")));
dialog.setResult("1");
dialog.setX(JavaFxApplication.primaryStage.getX() + JavaFxApplication.primaryStage.getWidth() / 2 - 68);
dialog.setY(JavaFxApplication.primaryStage.getY() + JavaFxApplication.primaryStage.getHeight() / 2 - 70);

Loading…
Cancel
Save

Powered by TurnKey Linux.