|
|
@ -11,12 +11,24 @@ import javafx.event.Event;
|
|
|
|
import javafx.event.EventHandler;
|
|
|
|
import javafx.event.EventHandler;
|
|
|
|
import javafx.fxml.FXMLLoader;
|
|
|
|
import javafx.fxml.FXMLLoader;
|
|
|
|
import javafx.scene.Scene;
|
|
|
|
import javafx.scene.Scene;
|
|
|
|
import javafx.scene.control.*;
|
|
|
|
import javafx.scene.control.Button;
|
|
|
|
|
|
|
|
import javafx.scene.control.ContextMenu;
|
|
|
|
|
|
|
|
import javafx.scene.control.MenuItem;
|
|
|
|
|
|
|
|
import javafx.scene.control.TableCell;
|
|
|
|
|
|
|
|
import javafx.scene.control.TableColumn;
|
|
|
|
|
|
|
|
import javafx.scene.control.TableView;
|
|
|
|
|
|
|
|
import javafx.scene.control.TreeCell;
|
|
|
|
|
|
|
|
import javafx.scene.control.TreeItem;
|
|
|
|
|
|
|
|
import javafx.scene.control.TreeView;
|
|
|
|
import javafx.scene.control.cell.ChoiceBoxTableCell;
|
|
|
|
import javafx.scene.control.cell.ChoiceBoxTableCell;
|
|
|
|
import javafx.scene.control.cell.PropertyValueFactory;
|
|
|
|
import javafx.scene.control.cell.PropertyValueFactory;
|
|
|
|
import javafx.scene.control.cell.TextFieldTableCell;
|
|
|
|
import javafx.scene.control.cell.TextFieldTableCell;
|
|
|
|
import javafx.scene.control.cell.TextFieldTreeCell;
|
|
|
|
import javafx.scene.control.cell.TextFieldTreeCell;
|
|
|
|
import javafx.scene.input.*;
|
|
|
|
import javafx.scene.input.ClipboardContent;
|
|
|
|
|
|
|
|
import javafx.scene.input.DragEvent;
|
|
|
|
|
|
|
|
import javafx.scene.input.Dragboard;
|
|
|
|
|
|
|
|
import javafx.scene.input.MouseEvent;
|
|
|
|
|
|
|
|
import javafx.scene.input.TransferMode;
|
|
|
|
import javafx.scene.layout.BorderPane;
|
|
|
|
import javafx.scene.layout.BorderPane;
|
|
|
|
import javafx.scene.layout.GridPane;
|
|
|
|
import javafx.scene.layout.GridPane;
|
|
|
|
import javafx.scene.layout.Pane;
|
|
|
|
import javafx.scene.layout.Pane;
|
|
|
@ -27,10 +39,9 @@ import javafx.util.Callback;
|
|
|
|
import javafx.util.converter.DefaultStringConverter;
|
|
|
|
import javafx.util.converter.DefaultStringConverter;
|
|
|
|
import javafx.util.converter.IntegerStringConverter;
|
|
|
|
import javafx.util.converter.IntegerStringConverter;
|
|
|
|
import xyz.wbsite.dbtool.javafx.ctrl.DetailModuleController;
|
|
|
|
import xyz.wbsite.dbtool.javafx.ctrl.DetailModuleController;
|
|
|
|
import xyz.wbsite.dbtool.javafx.ctrl.MainController;
|
|
|
|
|
|
|
|
import xyz.wbsite.dbtool.javafx.ctrl.DetailProjectController;
|
|
|
|
import xyz.wbsite.dbtool.javafx.ctrl.DetailProjectController;
|
|
|
|
import xyz.wbsite.dbtool.javafx.ctrl.DetailTableController;
|
|
|
|
import xyz.wbsite.dbtool.javafx.ctrl.DetailTableController;
|
|
|
|
import xyz.wbsite.dbtool.javafx.view.DBCheckBoxTableCell;
|
|
|
|
import xyz.wbsite.dbtool.javafx.ctrl.MainController;
|
|
|
|
import xyz.wbsite.dbtool.javafx.enums.FieldType;
|
|
|
|
import xyz.wbsite.dbtool.javafx.enums.FieldType;
|
|
|
|
import xyz.wbsite.dbtool.javafx.manger.ManagerFactory;
|
|
|
|
import xyz.wbsite.dbtool.javafx.manger.ManagerFactory;
|
|
|
|
import xyz.wbsite.dbtool.javafx.manger.ProjectManager;
|
|
|
|
import xyz.wbsite.dbtool.javafx.manger.ProjectManager;
|
|
|
@ -38,21 +49,20 @@ import xyz.wbsite.dbtool.javafx.po.Field;
|
|
|
|
import xyz.wbsite.dbtool.javafx.po.Module;
|
|
|
|
import xyz.wbsite.dbtool.javafx.po.Module;
|
|
|
|
import xyz.wbsite.dbtool.javafx.po.Project;
|
|
|
|
import xyz.wbsite.dbtool.javafx.po.Project;
|
|
|
|
import xyz.wbsite.dbtool.javafx.po.Table;
|
|
|
|
import xyz.wbsite.dbtool.javafx.po.Table;
|
|
|
|
import xyz.wbsite.dbtool.javafx.tool.*;
|
|
|
|
import xyz.wbsite.dbtool.javafx.tool.Tool;
|
|
|
|
|
|
|
|
import xyz.wbsite.dbtool.javafx.view.DBCheckBoxTableCell;
|
|
|
|
|
|
|
|
|
|
|
|
import java.net.URL;
|
|
|
|
import java.net.URL;
|
|
|
|
import java.util.Iterator;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
public class JavaFxApplication extends Application {
|
|
|
|
public class JavaFxApplication extends Application {
|
|
|
|
|
|
|
|
|
|
|
|
private ProjectManager dBmanger = ManagerFactory.getdBManager();
|
|
|
|
private ProjectManager dBmanger = ManagerFactory.getProjectManager();
|
|
|
|
private TreeView mdtree = null;
|
|
|
|
private TreeView mdtree = null;
|
|
|
|
private Pane detail = null;
|
|
|
|
private Pane detail = null;
|
|
|
|
private TableView feilds = null;
|
|
|
|
private TableView feilds = null;
|
|
|
|
private Button add = null;
|
|
|
|
private Button add = null;
|
|
|
|
private Button sub = null;
|
|
|
|
private Button sub = null;
|
|
|
|
private CheckBox addSysFields = null;
|
|
|
|
|
|
|
|
private FXMLLoader mainloader;
|
|
|
|
private FXMLLoader mainloader;
|
|
|
|
private FXMLLoader projectdetailloader;
|
|
|
|
private FXMLLoader projectdetailloader;
|
|
|
|
private FXMLLoader mddetailloader;
|
|
|
|
private FXMLLoader mddetailloader;
|
|
|
@ -125,14 +135,6 @@ public class JavaFxApplication extends Application {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
addSysFields = mainController.getAddSysFields();
|
|
|
|
|
|
|
|
addSysFields.setOnMouseClicked(new EventHandler<MouseEvent>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void handle(MouseEvent event) {
|
|
|
|
|
|
|
|
checkSysFields();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ContextMenu con = new ContextMenu(new MenuItem("新增"), new MenuItem("删除"), new MenuItem("向上调整"), new MenuItem("向下调整"));
|
|
|
|
ContextMenu con = new ContextMenu(new MenuItem("新增"), new MenuItem("删除"), new MenuItem("向上调整"), new MenuItem("向下调整"));
|
|
|
|
con.setOnAction(new EventHandler<ActionEvent>() {
|
|
|
|
con.setOnAction(new EventHandler<ActionEvent>() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -442,6 +444,12 @@ public class JavaFxApplication extends Application {
|
|
|
|
currentProject.setProjectAuthor(newValue);
|
|
|
|
currentProject.setProjectAuthor(newValue);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
detailProjectController.getMultiDB().selectedProperty().addListener(new ChangeListener<Boolean>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
|
|
|
|
|
|
|
|
currentProject.setMultiDB(newValue);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{//初始化表面板
|
|
|
|
{//初始化表面板
|
|
|
@ -498,136 +506,26 @@ public class JavaFxApplication extends Application {
|
|
|
|
currentTable.setSearch(newValue);
|
|
|
|
currentTable.setSearch(newValue);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
detailTableController.getGetAll().selectedProperty().addListener(new ChangeListener<Boolean>() {
|
|
|
|
detailTableController.getHtml().selectedProperty().addListener(new ChangeListener<Boolean>() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
|
|
|
|
public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
|
|
|
|
currentTable.setGetAll(newValue);
|
|
|
|
currentTable.setHtml(newValue);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
detailTableController.getHtml().selectedProperty().addListener(new ChangeListener<Boolean>() {
|
|
|
|
detailTableController.getSys().selectedProperty().addListener(new ChangeListener<Boolean>() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
|
|
|
|
public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
|
|
|
|
currentTable.setHtml(newValue);
|
|
|
|
currentTable.setSys(newValue);
|
|
|
|
|
|
|
|
loadingTable();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ManagerFactory.getReflashManager(this).start();
|
|
|
|
ManagerFactory.getReflashManager(this).start();
|
|
|
|
|
|
|
|
|
|
|
|
loadingProjectTree();
|
|
|
|
loadingProjectTree();
|
|
|
|
checkSysFields();
|
|
|
|
|
|
|
|
super.init();
|
|
|
|
super.init();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void checkSysFields() {
|
|
|
|
|
|
|
|
if (currentMD != null) {
|
|
|
|
|
|
|
|
boolean selected = addSysFields.isSelected();
|
|
|
|
|
|
|
|
removeSysFields(currentMD);
|
|
|
|
|
|
|
|
if (selected) {
|
|
|
|
|
|
|
|
bitchInsertSysFields(currentMD);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (currentTable != null) {
|
|
|
|
|
|
|
|
loadingTable();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void removeSysFields() {
|
|
|
|
|
|
|
|
for (Module md : dBmanger.getMds()) {
|
|
|
|
|
|
|
|
for (Table table : md.getTables()) {
|
|
|
|
|
|
|
|
Iterator<Field> iterator = table.getFields().iterator();
|
|
|
|
|
|
|
|
while (iterator.hasNext()) {
|
|
|
|
|
|
|
|
Field next = iterator.next();
|
|
|
|
|
|
|
|
if (next.getIsSystem()) {
|
|
|
|
|
|
|
|
iterator.remove();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void removeSysFields(Module md) {
|
|
|
|
|
|
|
|
md.setHasSysFields(false);
|
|
|
|
|
|
|
|
for (Table table : md.getTables()) {
|
|
|
|
|
|
|
|
Iterator<Field> iterator = table.getFields().iterator();
|
|
|
|
|
|
|
|
while (iterator.hasNext()) {
|
|
|
|
|
|
|
|
Field next = iterator.next();
|
|
|
|
|
|
|
|
if (next.getIsSystem()) {
|
|
|
|
|
|
|
|
iterator.remove();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void insertSysFields(Table table) {
|
|
|
|
|
|
|
|
Field id = new Field("ID");
|
|
|
|
|
|
|
|
id.setIsSystem(true);
|
|
|
|
|
|
|
|
id.setIsMust(true);
|
|
|
|
|
|
|
|
id.setIsPrimaryKey(true);
|
|
|
|
|
|
|
|
id.setFieldType(FieldType.Long);
|
|
|
|
|
|
|
|
id.setFieldLength(19);
|
|
|
|
|
|
|
|
id.setFieldComment("主键");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Field row_version = new Field("ROW_VERSION");
|
|
|
|
|
|
|
|
row_version.setIsSystem(true);
|
|
|
|
|
|
|
|
row_version.setIsMust(true);
|
|
|
|
|
|
|
|
row_version.setFieldType(FieldType.Long);
|
|
|
|
|
|
|
|
row_version.setFieldLength(19);
|
|
|
|
|
|
|
|
row_version.setFieldComment("行版本");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Field is_deleted = new Field("IS_DELETED");
|
|
|
|
|
|
|
|
is_deleted.setIsSystem(true);
|
|
|
|
|
|
|
|
is_deleted.setIsMust(true);
|
|
|
|
|
|
|
|
is_deleted.setDefaultValue("0");
|
|
|
|
|
|
|
|
is_deleted.setFieldType(FieldType.Boolean);
|
|
|
|
|
|
|
|
is_deleted.setFieldLength(1);
|
|
|
|
|
|
|
|
is_deleted.setFieldComment("是否已删除");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Field created_by = new Field("CREATE_BY");
|
|
|
|
|
|
|
|
created_by.setIsSystem(true);
|
|
|
|
|
|
|
|
created_by.setIsMust(true);
|
|
|
|
|
|
|
|
created_by.setFieldType(FieldType.Long);
|
|
|
|
|
|
|
|
created_by.setFieldLength(19);
|
|
|
|
|
|
|
|
created_by.setFieldComment("创建用户");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Field creation_time = new Field("CREATE_TIME");
|
|
|
|
|
|
|
|
creation_time.setIsSystem(true);
|
|
|
|
|
|
|
|
creation_time.setIsMust(true);
|
|
|
|
|
|
|
|
creation_time.setDefaultValue("NULL");
|
|
|
|
|
|
|
|
creation_time.setFieldType(FieldType.Date);
|
|
|
|
|
|
|
|
creation_time.setFieldComment("创建时间");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Field last_updated_by = new Field("LAST_UPDATE_BY");
|
|
|
|
|
|
|
|
last_updated_by.setIsSystem(true);
|
|
|
|
|
|
|
|
creation_time.setDefaultValue("NULL");
|
|
|
|
|
|
|
|
last_updated_by.setFieldType(FieldType.Long);
|
|
|
|
|
|
|
|
last_updated_by.setFieldLength(19);
|
|
|
|
|
|
|
|
last_updated_by.setFieldComment("最后更新用户");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Field last_update_time = new Field("LAST_UPDATE_TIME");
|
|
|
|
|
|
|
|
last_update_time.setIsSystem(true);
|
|
|
|
|
|
|
|
last_update_time.setFieldType(FieldType.Date);
|
|
|
|
|
|
|
|
last_update_time.setFieldComment("最后更新时间");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
table.putFirstField(id);
|
|
|
|
|
|
|
|
table.putField(row_version);
|
|
|
|
|
|
|
|
table.putField(is_deleted);
|
|
|
|
|
|
|
|
table.putField(created_by);
|
|
|
|
|
|
|
|
table.putField(creation_time);
|
|
|
|
|
|
|
|
table.putField(last_updated_by);
|
|
|
|
|
|
|
|
table.putField(last_update_time);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void bitchInsertSysFields() {
|
|
|
|
|
|
|
|
for (Module md : dBmanger.getMds()) {
|
|
|
|
|
|
|
|
md.getTables().forEach(this::insertSysFields);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void bitchInsertSysFields(Module md) {
|
|
|
|
|
|
|
|
md.setHasSysFields(true);
|
|
|
|
|
|
|
|
md.getTables().forEach(this::insertSysFields);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void addField() {
|
|
|
|
private void addField() {
|
|
|
|
if (currentTable != null && feilds != null) {
|
|
|
|
if (currentTable != null && feilds != null) {
|
|
|
|
List<Field> fields = currentTable.getFields();
|
|
|
|
List<Field> fields = currentTable.getFields();
|
|
|
@ -683,10 +581,6 @@ public class JavaFxApplication extends Application {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void loadingModule() {
|
|
|
|
private void loadingModule() {
|
|
|
|
if (currentMD != null) {
|
|
|
|
|
|
|
|
addSysFields.setSelected(currentMD.isHasSysFields());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (currentMD == null) {
|
|
|
|
if (currentMD == null) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -710,6 +604,7 @@ public class JavaFxApplication extends Application {
|
|
|
|
detailProjectController.getProjectName().setText(currentProject.getProjectName());
|
|
|
|
detailProjectController.getProjectName().setText(currentProject.getProjectName());
|
|
|
|
detailProjectController.getProjectBasePackage().setText(currentProject.getProjectBasePackage());
|
|
|
|
detailProjectController.getProjectBasePackage().setText(currentProject.getProjectBasePackage());
|
|
|
|
detailProjectController.getProjectAuthor().setText(currentProject.getProjectAuthor());
|
|
|
|
detailProjectController.getProjectAuthor().setText(currentProject.getProjectAuthor());
|
|
|
|
|
|
|
|
detailProjectController.getMultiDB().setSelected(currentProject.getMultiDB());
|
|
|
|
|
|
|
|
|
|
|
|
if (gridPane != null) {
|
|
|
|
if (gridPane != null) {
|
|
|
|
detail.getChildren().clear();
|
|
|
|
detail.getChildren().clear();
|
|
|
@ -724,11 +619,6 @@ public class JavaFxApplication extends Application {
|
|
|
|
* 加载对象信息
|
|
|
|
* 加载对象信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private void loadingTable() {
|
|
|
|
private void loadingTable() {
|
|
|
|
if (currentMD != null) {
|
|
|
|
|
|
|
|
addSysFields.setSelected(currentMD.isHasSysFields());
|
|
|
|
|
|
|
|
} else if (currentTable != null && currentTable.getdBhandle() != null) {
|
|
|
|
|
|
|
|
addSysFields.setSelected(currentTable.getdBhandle().isHasSysFields());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
GridPane gridPane = tabledetailloader.getRoot();
|
|
|
|
GridPane gridPane = tabledetailloader.getRoot();
|
|
|
|
if (currentTable != null) {
|
|
|
|
if (currentTable != null) {
|
|
|
|
detailTableController.getTablename().setText(currentTable.getTableName());
|
|
|
|
detailTableController.getTablename().setText(currentTable.getTableName());
|
|
|
@ -739,11 +629,10 @@ public class JavaFxApplication extends Application {
|
|
|
|
detailTableController.getFind().setSelected(currentTable.getFind());
|
|
|
|
detailTableController.getFind().setSelected(currentTable.getFind());
|
|
|
|
detailTableController.getGet().setSelected(currentTable.getGet());
|
|
|
|
detailTableController.getGet().setSelected(currentTable.getGet());
|
|
|
|
detailTableController.getSearch().setSelected(currentTable.getSearch());
|
|
|
|
detailTableController.getSearch().setSelected(currentTable.getSearch());
|
|
|
|
detailTableController.getGetAll().setSelected(currentTable.getGetAll());
|
|
|
|
|
|
|
|
detailTableController.getHtml().setSelected(currentTable.getHtml());
|
|
|
|
detailTableController.getHtml().setSelected(currentTable.getHtml());
|
|
|
|
|
|
|
|
detailTableController.getSys().setSelected(currentTable.getSys());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (gridPane != null) {
|
|
|
|
if (gridPane != null) {
|
|
|
|
detail.getChildren().clear();
|
|
|
|
detail.getChildren().clear();
|
|
|
|
detail.getChildren().add(gridPane);
|
|
|
|
detail.getChildren().add(gridPane);
|
|
|
@ -1293,9 +1182,6 @@ public class JavaFxApplication extends Application {
|
|
|
|
Module md = dBmanger.findDBByDBName((String) targetItem.getValue());
|
|
|
|
Module md = dBmanger.findDBByDBName((String) targetItem.getValue());
|
|
|
|
if (md != null) {
|
|
|
|
if (md != null) {
|
|
|
|
Table newTableName = dBmanger.getNewTableName(md);
|
|
|
|
Table newTableName = dBmanger.getNewTableName(md);
|
|
|
|
if (addSysFields.isSelected()) {
|
|
|
|
|
|
|
|
insertSysFields(newTableName);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
targetItem.getChildren().add(newTableName);
|
|
|
|
targetItem.getChildren().add(newTableName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1305,9 +1191,6 @@ public class JavaFxApplication extends Application {
|
|
|
|
System.out.println("对象:" + parent.getValue());
|
|
|
|
System.out.println("对象:" + parent.getValue());
|
|
|
|
Module md = dBmanger.findDBByDBName((String) parent.getValue());
|
|
|
|
Module md = dBmanger.findDBByDBName((String) parent.getValue());
|
|
|
|
Table newTableName = dBmanger.getNewTableName(md);
|
|
|
|
Table newTableName = dBmanger.getNewTableName(md);
|
|
|
|
if (addSysFields.isSelected()) {
|
|
|
|
|
|
|
|
insertSysFields(newTableName);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
parent.getChildren().add(new TreeItem<>(newTableName.getTableName()));
|
|
|
|
parent.getChildren().add(new TreeItem<>(newTableName.getTableName()));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1327,9 +1210,6 @@ public class JavaFxApplication extends Application {
|
|
|
|
System.out.println("模块:" + targetItem.getValue());
|
|
|
|
System.out.println("模块:" + targetItem.getValue());
|
|
|
|
Module md = dBmanger.findDBByDBName((String) targetItem.getValue());
|
|
|
|
Module md = dBmanger.findDBByDBName((String) targetItem.getValue());
|
|
|
|
Table newTableName = dBmanger.getNewTableName(md);
|
|
|
|
Table newTableName = dBmanger.getNewTableName(md);
|
|
|
|
if (addSysFields.isSelected()) {
|
|
|
|
|
|
|
|
insertSysFields(newTableName);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
targetItem.getChildren().add(new TreeItem<>(newTableName.getTableName()));
|
|
|
|
targetItem.getChildren().add(new TreeItem<>(newTableName.getTableName()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|