From 576032b7a5638789cd4d8dc7b14cef2398cc0894 Mon Sep 17 00:00:00 2001 From: hzzz Date: Mon, 7 Aug 2017 16:30:33 +0800 Subject: [PATCH] hzzzz --- .../widget/ui/ListEditorDefinePane.java | 4 +- .../design/widget/ui/MultiFileEditorPane.java | 46 ++++++++----------- .../ui/WriteUnableRepeatEditorPane.java | 5 +- 3 files changed, 24 insertions(+), 31 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java index 818f4ec114..1f23e18ddd 100644 --- a/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java @@ -25,8 +25,8 @@ public class ListEditorDefinePane extends WriteUnableRepeatEditorPane this.initComponents(); } - + @Override protected String title4PopupWindow() { return "file"; @@ -34,42 +35,35 @@ public class MultiFileEditorPane extends FieldEditorDefinePane @Override protected JPanel setFirstContentPane() { - acceptType = new DictionaryComboBox(DictionaryConstants.acceptTypes, DictionaryConstants.fileTypeDisplays); - acceptType.setPreferredSize(new Dimension(200, 18)); + JPanel contenter = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); + JPanel centerPane = FRGUIPaneFactory.createYBoxEmptyBorderPane(); +// centerPane.add(singleFileCheckBox = new UICheckBox(Inter.getLocText("SINGLE_FILE_UPLOAD"))); + + + singleFileCheckBox = new UICheckBox(Inter.getLocText("SINGLE_FILE_UPLOAD")); + acceptType = new DictionaryComboBox(DictionaryConstants.acceptTypes, DictionaryConstants.fileTypeDisplays); + acceptType.setPreferredSize(new Dimension(100, 18)); fileSizeField = new UINumberField(); fileSizeField.setPreferredSize(new Dimension(80, 18)); - - JPanel singleFilePane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); - singleFilePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + JPanel singleFilePane = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); singleFilePane.add(singleFileCheckBox); + centerPane.add(singleFilePane); - JPanel allowTypePane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); - allowTypePane.setLayout(FRGUIPaneFactory.createLabelFlowLayout()); - allowTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - allowTypePane.add(new UILabel(" " + Inter.getLocText("File-Allow_Upload_Files") + ":")); + JPanel allowTypePane = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); + allowTypePane.add(new UILabel(Inter.getLocText("File-Allow_Upload_Files") + ":")); allowTypePane.add(acceptType); + centerPane.add(allowTypePane); - JPanel fileSizePane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); - fileSizePane.add(new UILabel(" " + Inter.getLocText("File-File_Size_Limit") + ":")); + JPanel fileSizePane = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); + fileSizePane.add(new UILabel(Inter.getLocText("File-File_Size_Limit") + ":")); fileSizePane.add(fileSizeField); fileSizePane.add(new UILabel(" KB")); + centerPane.add(fileSizePane); - double f = TableLayout.FILL; - double p = TableLayout.PREFERRED; - Component[][] components = new Component[][]{ - new Component[]{singleFileCheckBox, null }, - new Component[]{new UILabel(" " + Inter.getLocText("File-Allow_Upload_Files") + ":"), acceptType}, - new Component[]{new UILabel(" " + Inter.getLocText("File-File_Size_Limit") + ":"), fileSizeField}, - }; - double[] rowSize = {p, p,p}; - double[] columnSize = {p,f}; - int[][] rowCount = {{1, 1},{1, 1},{1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_SMALL, 5); - - - return panel; + contenter.add(centerPane); + return contenter; } @Override diff --git a/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java b/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java index 633572e0fc..33b8e3f889 100644 --- a/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java +++ b/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java @@ -20,9 +20,8 @@ public abstract class WriteUnableRepeatEditorPane