From 189673e0a97b1e113f7e2ea199149960d6f75c27 Mon Sep 17 00:00:00 2001 From: Owen Zou Date: Mon, 22 Aug 2016 19:52:05 +0800 Subject: [PATCH] =?UTF-8?q?fix=E7=95=8C=E9=9D=A2=E7=9A=84bug=E5=8F=8A?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../generator/controller/GeneratorConfigController.java | 3 +++ .../zzg/mybatis/generator/controller/MainUIController.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/zzg/mybatis/generator/controller/GeneratorConfigController.java b/src/main/java/com/zzg/mybatis/generator/controller/GeneratorConfigController.java index 9bcabd62..7a81e287 100644 --- a/src/main/java/com/zzg/mybatis/generator/controller/GeneratorConfigController.java +++ b/src/main/java/com/zzg/mybatis/generator/controller/GeneratorConfigController.java @@ -19,6 +19,8 @@ import java.util.ResourceBundle; /** + * 管理GeneratorConfig的Controller + * * Created by Owen on 8/21/16. */ public class GeneratorConfigController extends BaseFXController { @@ -49,6 +51,7 @@ protected void updateItem(Object item, boolean empty) { super.updateItem(item, empty); if (item == null || empty) { setText(null); + setGraphic(null); } else { Button btn1 = new Button("应用"); Button btn2 = new Button("删除"); diff --git a/src/main/java/com/zzg/mybatis/generator/controller/MainUIController.java b/src/main/java/com/zzg/mybatis/generator/controller/MainUIController.java index 29a759a7..f1748a6c 100644 --- a/src/main/java/com/zzg/mybatis/generator/controller/MainUIController.java +++ b/src/main/java/com/zzg/mybatis/generator/controller/MainUIController.java @@ -106,11 +106,11 @@ public void initialize(URL location, ResourceBundle resources) { TreeItem treeItem = treeCell.getTreeItem(); if (level == 1) { final ContextMenu contextMenu = new ContextMenu(); - MenuItem item1 = new MenuItem("Close Connection"); + MenuItem item1 = new MenuItem("新建连接"); item1.setOnAction(event1 -> { treeItem.getChildren().clear(); }); - MenuItem item2 = new MenuItem("Delete Connection"); + MenuItem item2 = new MenuItem("删除连接"); item2.setOnAction(event1 -> { DatabaseConfig selectedConfig = (DatabaseConfig) treeItem.getGraphic().getUserData(); try {