Browse Source

REPORT-2897 9.0设计器修改

视觉优化
master
MoMeak 7 years ago
parent
commit
94b990083a
  1. 2
      designer/src/com/fr/design/present/BarCodePane.java
  2. 4
      designer/src/com/fr/design/present/CurrencyLinePane.java
  3. 142
      designer/src/com/fr/design/widget/ui/MultiFileEditorPane.java
  4. 1
      designer_base/src/com/fr/design/locale/designer.properties
  5. 1
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  6. 1
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  7. 1
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  8. 1
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  9. 1
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties

2
designer/src/com/fr/design/present/BarCodePane.java

@ -85,7 +85,7 @@ public class BarCodePane extends FurtherBasicBeanPane<BarcodePresent> {
RCodesizespinner = new UIBasicSpinner(new SpinnerNumberModel(2, 1, 6, 1));
RCodeVersionComboBox = new UIComboBox();
RCodeErrorCorrectComboBox = new UIComboBox();
typeSetLabel = new UILabel(Inter.getLocText("Type_Set") + ":", UILabel.RIGHT);
typeSetLabel = new UILabel(Inter.getLocText("Type_Set"), UILabel.RIGHT);
initVersionComboBox();
initErrorCorrectComboBox();

4
designer/src/com/fr/design/present/CurrencyLinePane.java

@ -72,11 +72,11 @@ public class CurrencyLinePane extends FurtherBasicBeanPane<CurrencyLinePresent>
protected void initComponents() {
// 整数位选择
intPartSpinner = new UIBasicSpinner(new SpinnerNumberModel(9, 1, 20, 1));
intPartSpinner.setPreferredSize(new Dimension(135, 20));
intPartSpinner.setPreferredSize(new Dimension(158, 20));
// 小数位选择
deciPartSpinner = new UIBasicSpinner(new SpinnerNumberModel(2, 1, 10, 1));
deciPartSpinner.setPreferredSize(new Dimension(135, 20));
deciPartSpinner.setPreferredSize(new Dimension(158, 20));
// 预览区域
textField = new UITextField(10);

142
designer/src/com/fr/design/widget/ui/MultiFileEditorPane.java

@ -1,86 +1,82 @@
package com.fr.design.widget.ui;
import java.awt.*;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.*;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.DictionaryComboBox;
import com.fr.design.gui.icombobox.DictionaryConstants;
import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.FRLeftFlowLayout;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.form.ui.MultiFileEditor;
import com.fr.general.Inter;
public class MultiFileEditorPane extends FieldEditorDefinePane<MultiFileEditor> {
private DictionaryComboBox acceptType;
private UICheckBox singleFileCheckBox;
private UINumberField fileSizeField;
public MultiFileEditorPane() {
this.initComponents();
}
@Override
protected String title4PopupWindow() {
return "file";
}
@Override
protected JPanel setFirstContentPane() {
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.createMediumHGapFlowInnerContainer_M_Pane_First0();
singleFilePane.add(singleFileCheckBox);
centerPane.add(singleFilePane);
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.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);
contenter.add(centerPane);
return contenter;
}
@Override
protected void populateSubFieldEditorBean(MultiFileEditor e) {
// 这里存在兼容问题 getAccept可能没在待选项目中
acceptType.setSelectedItem(e.getAccept());
singleFileCheckBox.setSelected(e.isSingleFile());
fileSizeField.setValue(e.getMaxSize());
}
import javax.swing.*;
import java.awt.*;
@Override
protected MultiFileEditor updateSubFieldEditorBean() {
MultiFileEditor ob = new MultiFileEditor();
ob.setAccept((String) acceptType.getSelectedItem());
ob.setSingleFile(singleFileCheckBox.isSelected());
ob.setMaxSize(fileSizeField.getValue());
return ob;
}
public class MultiFileEditorPane extends FieldEditorDefinePane<MultiFileEditor> {
private DictionaryComboBox acceptType;
private UICheckBox singleFileCheckBox;
private UISpinner fileSizeField;
public MultiFileEditorPane() {
this.initComponents();
}
@Override
protected String title4PopupWindow() {
return "file";
}
@Override
protected JPanel setFirstContentPane() {
JPanel contenter = new JPanel(new BorderLayout());
singleFileCheckBox = new UICheckBox(Inter.getLocText("SINGLE_FILE_UPLOAD"));
acceptType = new DictionaryComboBox(DictionaryConstants.acceptTypes, DictionaryConstants.fileTypeDisplays);
// acceptType.setPreferredSize(new Dimension(100, 20));
fileSizeField = new UISpinner(0, Integer.MAX_VALUE, 1, -1);
fileSizeField.setPreferredSize(new Dimension(140, 20));
JPanel fileSizePane = new JPanel(new BorderLayout());
UILabel fileTypeLabel = new UILabel(Inter.getLocText("Utils-File_type"));
UILabel fileSizeLabel = new UILabel(Inter.getLocText("FR-Designer_Size_Limit"));
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[]{fileTypeLabel, acceptType},
new Component[]{fileSizeLabel, fileSizePane},
};
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, 22, 10);
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 00));
contenter.add(panel, BorderLayout.CENTER);
return contenter;
}
@Override
protected void populateSubFieldEditorBean(MultiFileEditor e) {
// 这里存在兼容问题 getAccept可能没在待选项目中
acceptType.setSelectedItem(e.getAccept());
singleFileCheckBox.setSelected(e.isSingleFile());
fileSizeField.setValue(e.getMaxSize());
}
@Override
protected MultiFileEditor updateSubFieldEditorBean() {
MultiFileEditor ob = new MultiFileEditor();
ob.setAccept((String) acceptType.getSelectedItem());
ob.setSingleFile(singleFileCheckBox.isSelected());
ob.setMaxSize(fileSizeField.getValue());
return ob;
}
}

1
designer_base/src/com/fr/design/locale/designer.properties

@ -2116,3 +2116,4 @@ FR-Designer_Widget_Error_Tip=error tip
FR-Designer_Widget_Return_Leaf=return leaf
FR-Designer_Widget_Return_Path=return path
FR-Designer_Widget_Display_Position=Display Position
FR-Designer_Size_Limit=Size_Limit

1
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -2112,3 +2112,4 @@ FR-Designer_Widget_Error_Tip=error tip
FR-Designer_Widget_Return_Leaf=return leaf
FR-Designer_Widget_Return_Path=return path
FR-Designer_Widget_Display_Position=Display Position
FR-Designer_Size_Limit=Size_Limit

1
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

@ -2115,3 +2115,4 @@ FR-Designer_Widget_Error_Tip=
FR-Designer_Widget_Return_Leaf=
FR-Designer_Widget_Return_Path=
FR-Designer_Widget_Display_Position=
FR-Designer_Size_Limit=\

1
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

@ -2115,3 +2115,4 @@ FR-Designer_Widget_Error_Tip=
FR-Designer_Widget_Return_Leaf=
FR-Designer_Widget_Return_Path=
FR-Designer_Widget_Display_Position=
FR-Designer_Size_Limit=\

1
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -2123,3 +2123,4 @@ FR-Designer_Widget_Error_Tip=\u9519\u8BEF\u63D0\u793A
FR-Designer_Widget_Return_Leaf=\u7ED3\u679C\u8FD4\u56DE\u53F6\u5B50\u8282\u70B9
FR-Designer_Widget_Return_Path=\u7ED3\u679C\u8FD4\u56DE\u5B8C\u6574\u5C42\u6B21\u8DEF\u5F84
FR-Designer_Widget_Display_Position=\u663E\u793A\u4F4D\u7F6E
FR-Designer_Size_Limit=\u5927\u5C0F\u9650\u5236

1
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -2115,3 +2115,4 @@ FR-Designer_Widget_Error_Tip=
FR-Designer_Widget_Return_Leaf=
FR-Designer_Widget_Return_Path=
FR-Designer_Widget_Display_Position=
FR-Designer_Size_Limit=\
Loading…
Cancel
Save