From afd47660ce6ecde19898240741d93cd093ee9b1a Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 9 Mar 2021 16:09:38 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-45944=20=E6=97=A5=E6=96=87=E7=89=88?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E9=87=8D=E5=91=BD=E5=90=8D=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DesignerFrameFileDealerPane.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index d2771cd49..39ef20658 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -600,6 +600,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt warnLabel = new UILabel(); warnLabel.setPreferredSize(new Dimension(300, 30)); warnLabel.setHorizontalAlignment(SwingConstants.LEFT); + warnLabel.setVerticalAlignment(SwingConstants.TOP); warnLabel.setForeground(Color.RED); warnLabel.setVisible(false); @@ -609,7 +610,6 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt // 确认按钮 confirmButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Confirm")); - confirmButton.setPreferredSize(new Dimension(60, 25)); confirmButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -619,7 +619,6 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt // 取消按钮 UIButton cancelButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Cancel")); - cancelButton.setPreferredSize(new Dimension(60, 25)); cancelButton.addActionListener(new ActionListener() { @@ -629,25 +628,26 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt } }); - JPanel bottomPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - bottomPanel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 15)); - bottomPanel.add(confirmButton); - bottomPanel.add(cancelButton); + + JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, 10, 0)); + buttonsPane.setBorder(BorderFactory.createEmptyBorder(10, 15, 10, 10)); + buttonsPane.add(confirmButton); + buttonsPane.add(cancelButton); this.add( TableLayoutHelper.createTableLayoutPane( new Component[][]{ new Component[]{topPanel}, new Component[]{midPanel}, - new Component[]{bottomPanel} + new Component[]{buttonsPane} }, - new double[]{TableLayout.FILL, TableLayout.FILL, TableLayout.FILL}, + new double[]{TableLayout.FILL, TableLayout.FILL, TableLayout.PREFERRED}, new double[]{TableLayout.FILL} ), BorderLayout.CENTER); - this.setSize(340, 180); + this.setSize(340, 200); this.setTitle(Toolkit.i18nText("Fine-Design_Basic_Rename")); this.setResizable(false); this.setAlwaysOnTop(true); @@ -760,7 +760,6 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt ); newNameLabel.setHorizontalAlignment(SwingConstants.RIGHT); newNameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); - newNameLabel.setPreferredSize(new Dimension(118, 15)); // 文件名输入框 nameField = new UITextField(); @@ -806,6 +805,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt warnLabel = new UILabel(); warnLabel.setPreferredSize(new Dimension(300, 30)); warnLabel.setHorizontalAlignment(SwingConstants.LEFT); + warnLabel.setVerticalAlignment(SwingConstants.TOP); warnLabel.setForeground(Color.RED); warnLabel.setVisible(false); @@ -836,8 +836,8 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt } }); - JPanel bottomPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - bottomPanel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 15)); + JPanel bottomPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 10, 0)); + bottomPanel.setBorder(BorderFactory.createEmptyBorder(10, 15, 10, 10)); bottomPanel.add(confirmButton); bottomPanel.add(cancelButton); @@ -848,13 +848,13 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt new Component[]{midPanel}, new Component[]{bottomPanel} }, - new double[]{TableLayout.FILL, TableLayout.FILL, TableLayout.FILL}, + new double[]{TableLayout.FILL, TableLayout.FILL, TableLayout.PREFERRED}, new double[]{TableLayout.FILL} ), BorderLayout.CENTER); - this.setSize(380, 180); + this.setSize(380, 200); this.setTitle(Toolkit.i18nText("Fine-Design_Basic_Mkdir")); this.setResizable(false); this.setAlwaysOnTop(true);