From 1d7d36e9defaacf7780e6c396eb0bd5f382dd3d0 Mon Sep 17 00:00:00 2001 From: Owen Zou Date: Mon, 22 Aug 2016 20:43:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E8=BF=98=E6=98=AF=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=B9=9F=E8=8B=B1=E6=96=87=E7=9A=84=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=8C=89=E9=92=AE=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +- .../controller/GeneratorConfigController.java | 4 +- src/main/resources/fxml/MainUI.fxml | 60 ++++++++++++------- src/main/resources/fxml/generatorConfigs.fxml | 4 +- src/main/resources/fxml/newConnection.fxml | 18 +++++- src/main/resources/style.css | 28 +++++++++ 6 files changed, 89 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 9f6f5750..706ad989 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,11 @@ mybatis-generator-gui mybatis-generator-gui是基于[mybatis generator](http://www.mybatis.org/generator/index.html)开发一款界面工具, 本工具可以使你非常容易及快速生成Mybatis的Java POJO文件及数据库Mapping文件。 -![MainUI](https://cloud.githubusercontent.com/assets/3505708/16894610/0416f83a-4b8e-11e6-9a25-904f8d2e5583.png) +![MainUI](https://cloud.githubusercontent.com/assets/3505708/17854987/ab4ed078-68a8-11e6-824e-ada64d0b4ad1.png) ### 核心特性 * 按照界面步骤轻松生成代码,省去XML繁琐的学习与配置过程 -* 保存数据库连接与配置,每次代码生成轻松搞定 +* 保存数据库连接与Generator配置,每次代码生成轻松搞定 * 内置常用插件,比如offset * 可选的去除掉对版本管理不友好的注释,这样新增或删除字段重新生成的文件比较过来清楚 * 目前已经支持Mysql、Oracle与PostgreSQL,如果有对其它数据库有需求的请提Issue我会跟进。 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 7a81e287..63be6eef 100644 --- a/src/main/java/com/zzg/mybatis/generator/controller/GeneratorConfigController.java +++ b/src/main/java/com/zzg/mybatis/generator/controller/GeneratorConfigController.java @@ -53,8 +53,8 @@ protected void updateItem(Object item, boolean empty) { setText(null); setGraphic(null); } else { - Button btn1 = new Button("应用"); - Button btn2 = new Button("删除"); + Button btn1 = new Button("Apply"); + Button btn2 = new Button("Delete"); HBox hBox = new HBox(); hBox.setSpacing(10); hBox.getChildren().add(btn1); diff --git a/src/main/resources/fxml/MainUI.fxml b/src/main/resources/fxml/MainUI.fxml index f378d247..70b40592 100644 --- a/src/main/resources/fxml/MainUI.fxml +++ b/src/main/resources/fxml/MainUI.fxml @@ -35,12 +35,12 @@ - @@ -77,25 +77,29 @@ - diff --git a/src/main/resources/fxml/generatorConfigs.fxml b/src/main/resources/fxml/generatorConfigs.fxml index e82aa126..85bf33e4 100644 --- a/src/main/resources/fxml/generatorConfigs.fxml +++ b/src/main/resources/fxml/generatorConfigs.fxml @@ -8,8 +8,8 @@ - - + + diff --git a/src/main/resources/fxml/newConnection.fxml b/src/main/resources/fxml/newConnection.fxml index 03b3f8a3..d5ed0203 100644 --- a/src/main/resources/fxml/newConnection.fxml +++ b/src/main/resources/fxml/newConnection.fxml @@ -67,9 +67,21 @@ - + + diff --git a/src/main/resources/style.css b/src/main/resources/style.css index 1a1d25c7..e49eaa31 100644 --- a/src/main/resources/style.css +++ b/src/main/resources/style.css @@ -10,6 +10,11 @@ -fx-border: none; } +.btn { + -fx-border: 1px solid transparent; + -fx-border-radius: 4px; +} + .btn-primary { -fx-background-color: #378bfa; -fx-text-fill: white; @@ -19,6 +24,29 @@ -fx-background-color: #579efa; } +.btn-default { + -fx-text-fill: #333; + -fx-background-color: #fff; + -fx-border-color: #ccc; +} + +.btn-default:hover { + -fx-background-color: #e6e6e6; + -fx-border-color: #adadad; +} + +.btn-success:hover { + -fx-text-fill: #fff; + -fx-background-color: #449d44; + -fx-border-color: #398439; +} + +.btn-success { + -fx-text-fill: #fff; + -fx-background-color: #5cb85c; + -fx-border-color: #4cae4c; +} + .consoleTextArea { -fx-stroke: white; -fx-fill: black;