From 0d3b3b4c980aa80072ef82c40aa20148f7d2beae Mon Sep 17 00:00:00 2001 From: kerry Date: Sat, 30 Sep 2017 17:19:21 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-4602=20(=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=BF=AE=E6=94=B9=E5=92=8C=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E7=95=8C=E9=9D=A2=E6=A0=B7=E5=BC=8F=E5=BE=AE?= =?UTF-8?q?=E8=B0=83)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/locale/designer_zh_CN.properties | 4 ++-- .../ui/designer/MultiFileEditorPane.java | 23 +++++++------------ 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index 8d9517cdd..37dee8ad4 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -681,7 +681,7 @@ CellWrite-InsertRow_DEFAULT=\u9ED8\u8BA4\u503C Widget-Load_By_Complete=\u5B8C\u5168\u52A0\u8F7D FR-Designer-Basic_Only_Submit_Current_Sheet=\u53EA\u63D0\u4EA4\u5F53\u524Dsheet Sort-Sort_Order=\u6392\u5217\u987A\u5E8F -File-File_Size_Limit=\u6587\u4EF6\u5927\u5C0F\u9650\u5236 +File-File_Size_Limit=\u5927\u5C0F\u9650\u5236 PrintP-Print=\u6253\u5370(T) FR-Designer-StyleAlignment_Center=\u5C45\u4E2D Preference-Setting_Colors=\u989C\u8272\u8BBE\u7F6E @@ -1806,7 +1806,7 @@ FR-Designer-Dependence_Connect_Server_Error=\u65E0\u6CD5\u8FDE\u63A5\u670D\u52A1 High=\u9AD8 HJS-Send_Failed=\u53D1\u9001\u5931\u8D25 HJS-Message=\u5185\u5BB9 -File-Allow_Upload_Files=\u5141\u8BB8\u4E0A\u4F20\u6587\u4EF6\u7C7B\u578B +File-Allow_Upload_Files=\u6587\u4EF6\u7C7B\u578B FR-Designer-Form-ToolBar_Chart=\u56FE\u8868 Thick_Bottom_Border_Line=\u7C97\u5E95\u6846\u7EBF FR-Action_Remove=\u5220\u9664 diff --git a/designer_form/src/com/fr/design/widget/ui/designer/MultiFileEditorPane.java b/designer_form/src/com/fr/design/widget/ui/designer/MultiFileEditorPane.java index 3af489ddb..cf406f56e 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/MultiFileEditorPane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/MultiFileEditorPane.java @@ -7,7 +7,6 @@ import com.fr.design.gui.icombobox.DictionaryComboBox; import com.fr.design.gui.icombobox.DictionaryConstants; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; -import com.fr.design.gui.itextfield.UINumberField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -20,7 +19,7 @@ import java.awt.*; public class MultiFileEditorPane extends FieldEditorDefinePane { private DictionaryComboBox acceptType; private UICheckBox singleFileCheckBox; - private UINumberField fileSizeField; + private UISpinner fileSizeField; private UISpinner fontSizeField; public MultiFileEditorPane(XCreator xCreator) { @@ -38,36 +37,30 @@ public class MultiFileEditorPane extends FieldEditorDefinePane acceptType = new DictionaryComboBox(DictionaryConstants.acceptTypes, DictionaryConstants.fileTypeDisplays); singleFileCheckBox = new UICheckBox(Inter.getLocText("SINGLE_FILE_UPLOAD")); singleFileCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - fileSizeField = new UINumberField(); + fileSizeField = new UISpinner(0, Integer.MAX_VALUE, 1, -1); + fileSizeField.setPreferredSize(new Dimension(140, 20)); fontSizeField = new UISpinner(0, 20, 1, 0); JPanel singleFilePane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); singleFilePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); singleFilePane.add(singleFileCheckBox); - 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") + ":")); - allowTypePane.add(acceptType); - - JPanel fileSizePane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); - fileSizePane.add(new UILabel(" " + Inter.getLocText("File-File_Size_Limit") + ":")); - fileSizePane.add(fileSizeField); - fileSizePane.add(new UILabel(" KB")); + JPanel fileSizePane = new JPanel(new BorderLayout()); + fileSizePane.add(fileSizeField, BorderLayout.CENTER); + fileSizePane.add(new UILabel(" KB"), BorderLayout.EAST); 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}, + new Component[]{new UILabel( Inter.getLocText("File-File_Size_Limit")), fileSizePane}, new Component[]{new UILabel( Inter.getLocText("FR-Designer_Font-Size")), fontSizeField} }; double[] rowSize = {p, p, p, p}; double[] columnSize = {p,f}; int[][] rowCount = {{1, 1},{1, 1},{1, 1},{1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W0, IntervalConstants.INTERVAL_L1); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); boundsPane.add(panel);