Browse Source

REPORT-4602 (国际化文件修改和文件控件界面样式微调)

master
kerry 7 years ago
parent
commit
0d3b3b4c98
  1. 4
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  2. 23
      designer_form/src/com/fr/design/widget/ui/designer/MultiFileEditorPane.java

4
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

23
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<MultiFileEditor> {
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<MultiFileEditor>
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);

Loading…
Cancel
Save