Browse Source

REPORT-19873 设计器英文 表单自适应被遮挡

bugfix/10.0
Hades 5 years ago
parent
commit
9c7c9aba6e
  1. 15
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java
  2. 29
      designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonGroupDictPane.java

15
designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java

@ -22,6 +22,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@ -210,19 +211,15 @@ public class TableDataPaneListPane extends JListControlPane implements TableData
@Override
public void update(TableDataConfig tableDataConfig) {
Iterator<String> tableDataNames = tableDataConfig.getTableDatas().keySet().iterator();
while (tableDataNames.hasNext()) {
tableDataConfig.removeTableData(tableDataNames.next());
}
Iterator<String> procedureName = ProcedureConfig.getInstance().getProcedures().keySet().iterator();
while (procedureName.hasNext()) {
ProcedureConfig.getInstance().removeProcedure(procedureName.next());
}
tableDataConfig.removeAllTableData();
ProcedureConfig.getInstance().removeAllProcedure();
Nameable[] tableDataArray = this.update();
Map<String,TableData> tableDataMap = new LinkedHashMap<String,TableData>();
for (int i = 0; i < tableDataArray.length; i++) {
NameObject nameObject = (NameObject) tableDataArray[i];
tableDataConfig.addTableData(nameObject.getName(), (TableData) nameObject.getObject());
tableDataMap.put(nameObject.getName(), (TableData) nameObject.getObject());
}
tableDataConfig.setTableDatas(tableDataMap);
}
@Override

29
designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonGroupDictPane.java

@ -1,16 +1,20 @@
package com.fr.design.widget.ui.designer;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UIBasicSpinner;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.form.ui.ButtonGroup;
import javax.swing.*;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SpinnerNumberModel;
import java.awt.Component;
public class ButtonGroupDictPane extends JPanel {
@ -26,16 +30,23 @@ public class ButtonGroupDictPane extends JPanel {
*
*/
public void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
adaptiveCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Adaptive"), true);
adaptiveCheckbox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
this.columnLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Group_Display_Columns") + ":");
UILabel dictLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_DS_Dictionary"));
this.columnLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Group_Display_Columns") + ":", dictLabel.getPreferredSize().width);
columnSpinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0, Integer.MAX_VALUE, 1));
JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{adaptiveCheckbox, columnLabel, columnSpinner}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7);
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}};
Component[][] components = {
new Component[] {adaptiveCheckbox, null},
new Component[] {columnLabel, columnSpinner},
};
JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
jPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
this.add(jPanel);
}

Loading…
Cancel
Save