From 23d3095b408553bb025a375af0e738edbf316b66 Mon Sep 17 00:00:00 2001 From: falseU Date: Thu, 2 Mar 2023 00:55:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=B0=BA=E5=AF=B8?= =?UTF-8?q?=E4=B8=8ETablePreviewUI=E4=B8=80=E6=A0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/idea/mybatisx/generate/ui/CodeGenerateUI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/baomidou/plugin/idea/mybatisx/generate/ui/CodeGenerateUI.java b/src/main/java/com/baomidou/plugin/idea/mybatisx/generate/ui/CodeGenerateUI.java index 7a26ad1..bc91f39 100644 --- a/src/main/java/com/baomidou/plugin/idea/mybatisx/generate/ui/CodeGenerateUI.java +++ b/src/main/java/com/baomidou/plugin/idea/mybatisx/generate/ui/CodeGenerateUI.java @@ -293,7 +293,7 @@ public class CodeGenerateUI { }) .disableAddAction() .disableUpDownActions() - .setPreferredSize(new Dimension(840, 150)) + .setPreferredSize(new Dimension(860, 200)) .createPanel(), gridConstraints); } -- Gitee From d35f69f89611115e9afd0005b8c41b7b3c7e552a Mon Sep 17 00:00:00 2001 From: falseU Date: Thu, 2 Mar 2023 01:01:15 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=20CodeGenerateUI=20?= =?UTF-8?q?=E4=B8=BA=E8=87=AA=E9=80=82=E5=BA=94=E5=88=97=E5=AE=BD=EF=BC=8C?= =?UTF-8?q?=E4=B8=94=E6=94=AF=E6=8C=81=E6=89=8B=E5=8A=A8=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=88=97=E5=AE=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybatisx/generate/ui/CodeGenerateUI.java | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/baomidou/plugin/idea/mybatisx/generate/ui/CodeGenerateUI.java b/src/main/java/com/baomidou/plugin/idea/mybatisx/generate/ui/CodeGenerateUI.java index bc91f39..5cf8f9b 100644 --- a/src/main/java/com/baomidou/plugin/idea/mybatisx/generate/ui/CodeGenerateUI.java +++ b/src/main/java/com/baomidou/plugin/idea/mybatisx/generate/ui/CodeGenerateUI.java @@ -68,10 +68,10 @@ public class CodeGenerateUI { private ButtonGroup templateButtonGroup = new ButtonGroup(); ListTableModel model = new ListTableModel<>( - new MybaitsxModuleInfo("config name", 120, false), - new MybaitsxModuleInfo("module path", 420, true, true), - new MybaitsxModuleInfo("base path", 140, true), - new MybaitsxModuleInfo("package name", 160, true) + new MybaitsxModuleInfo("config name", false), + new MybaitsxModuleInfo("module path", true, true), + new MybaitsxModuleInfo("base path", true), + new MybaitsxModuleInfo("package name", true) ); private Project project; private DomainInfo domainInfo; @@ -203,7 +203,7 @@ public class CodeGenerateUI { if (!refresh && templatesName.equals(generateConfig.getTemplatesName())) { moduleUIInfoList = generateConfig.getModuleUIInfoList(); // 如果默认选择的数据是历史版本, 则重置为空. 使用插件的最新默认配置 - boolean check = checkModuleInfo(moduleUIInfoList); + boolean check = checkModuleInfo(moduleUIInfoList); if (!check) { moduleUIInfoList = null; } @@ -407,20 +407,17 @@ public class CodeGenerateUI { private class MybaitsxModuleInfo extends ColumnInfo { - public MybaitsxModuleInfo(String name, int width, boolean editable) { + public MybaitsxModuleInfo(String name, boolean editable) { super(name); - this.width = width; this.editable = editable; } - public MybaitsxModuleInfo(String name, int width, boolean editable, boolean moduleEditor) { + public MybaitsxModuleInfo(String name, boolean editable, boolean moduleEditor) { super(name); - this.width = width; this.editable = editable; this.moduleEditor = moduleEditor; } - private int width; private boolean editable; private boolean moduleEditor; @@ -429,11 +426,6 @@ public class CodeGenerateUI { return editable; } - @Override - public int getWidth(JTable table) { - return width; - } - @Nullable @Override public TableCellRenderer getRenderer(ModuleInfoGo moduleUIInfo) { -- Gitee