|
|
@ -12,6 +12,7 @@ import com.fr.design.gui.icombobox.DictionaryComboBox; |
|
|
|
import com.fr.design.gui.icombobox.DictionaryConstants; |
|
|
|
import com.fr.design.gui.icombobox.DictionaryConstants; |
|
|
|
import com.fr.design.gui.itextfield.UINumberField; |
|
|
|
import com.fr.design.gui.itextfield.UINumberField; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
|
|
|
import com.fr.design.layout.FRLeftFlowLayout; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.form.ui.MultiFileEditor; |
|
|
|
import com.fr.form.ui.MultiFileEditor; |
|
|
@ -26,7 +27,7 @@ public class MultiFileEditorPane extends FieldEditorDefinePane<MultiFileEditor> |
|
|
|
this.initComponents(); |
|
|
|
this.initComponents(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected String title4PopupWindow() { |
|
|
|
protected String title4PopupWindow() { |
|
|
|
return "file"; |
|
|
|
return "file"; |
|
|
@ -34,42 +35,35 @@ public class MultiFileEditorPane extends FieldEditorDefinePane<MultiFileEditor> |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected JPanel setFirstContentPane() { |
|
|
|
protected JPanel setFirstContentPane() { |
|
|
|
acceptType = new DictionaryComboBox(DictionaryConstants.acceptTypes, DictionaryConstants.fileTypeDisplays); |
|
|
|
JPanel contenter = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); |
|
|
|
acceptType.setPreferredSize(new Dimension(200, 18)); |
|
|
|
JPanel centerPane = FRGUIPaneFactory.createYBoxEmptyBorderPane(); |
|
|
|
|
|
|
|
// centerPane.add(singleFileCheckBox = new UICheckBox(Inter.getLocText("SINGLE_FILE_UPLOAD")));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 = new UINumberField(); |
|
|
|
fileSizeField.setPreferredSize(new Dimension(80, 18)); |
|
|
|
fileSizeField.setPreferredSize(new Dimension(80, 18)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel singleFilePane = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); |
|
|
|
JPanel singleFilePane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); |
|
|
|
|
|
|
|
singleFilePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); |
|
|
|
|
|
|
|
singleFilePane.add(singleFileCheckBox); |
|
|
|
singleFilePane.add(singleFileCheckBox); |
|
|
|
|
|
|
|
centerPane.add(singleFilePane); |
|
|
|
|
|
|
|
|
|
|
|
JPanel allowTypePane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); |
|
|
|
JPanel allowTypePane = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); |
|
|
|
allowTypePane.setLayout(FRGUIPaneFactory.createLabelFlowLayout()); |
|
|
|
allowTypePane.add(new UILabel(Inter.getLocText("File-Allow_Upload_Files") + ":")); |
|
|
|
allowTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); |
|
|
|
|
|
|
|
allowTypePane.add(new UILabel(" " + Inter.getLocText("File-Allow_Upload_Files") + ":")); |
|
|
|
|
|
|
|
allowTypePane.add(acceptType); |
|
|
|
allowTypePane.add(acceptType); |
|
|
|
|
|
|
|
centerPane.add(allowTypePane); |
|
|
|
|
|
|
|
|
|
|
|
JPanel fileSizePane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); |
|
|
|
JPanel fileSizePane = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); |
|
|
|
fileSizePane.add(new UILabel(" " + Inter.getLocText("File-File_Size_Limit") + ":")); |
|
|
|
fileSizePane.add(new UILabel(Inter.getLocText("File-File_Size_Limit") + ":")); |
|
|
|
fileSizePane.add(fileSizeField); |
|
|
|
fileSizePane.add(fileSizeField); |
|
|
|
fileSizePane.add(new UILabel(" KB")); |
|
|
|
fileSizePane.add(new UILabel(" KB")); |
|
|
|
|
|
|
|
centerPane.add(fileSizePane); |
|
|
|
|
|
|
|
|
|
|
|
double f = TableLayout.FILL; |
|
|
|
contenter.add(centerPane); |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
return contenter; |
|
|
|
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; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|