Browse Source

REPORT-2623 树数据集在菜单栏那边预览和在左侧目录树下面预览, 列数不一样

master
hzzz 8 years ago
parent
commit
ea6999c941
  1. 28
      designer_base/src/com/fr/design/data/datapane/TreeTableDataDictPane.java

28
designer_base/src/com/fr/design/data/datapane/TreeTableDataDictPane.java

@ -1,21 +1,21 @@
package com.fr.design.data.datapane; package com.fr.design.data.datapane;
import com.fr.design.data.DesignTableDataManager;
import com.fr.data.impl.RecursionTableData; import com.fr.data.impl.RecursionTableData;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.preview.PreviewLabel; import com.fr.design.data.datapane.preview.PreviewLabel;
import com.fr.design.data.datapane.preview.PreviewLabel.Previewable; import com.fr.design.data.datapane.preview.PreviewLabel.Previewable;
import com.fr.design.data.datapane.preview.PreviewTablePane; import com.fr.design.data.datapane.preview.PreviewTablePane;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory; import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.design.editor.editor.ColumnIndexEditor; import com.fr.design.editor.editor.ColumnIndexEditor;
import com.fr.design.editor.editor.ColumnNameEditor; import com.fr.design.editor.editor.ColumnNameEditor;
import com.fr.design.editor.editor.Editor; import com.fr.design.editor.editor.Editor;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.script.Calculator; import com.fr.script.Calculator;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -49,6 +49,7 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
public TreeTableDataDictPane() { public TreeTableDataDictPane() {
this(StringUtils.EMPTY); this(StringUtils.EMPTY);
} }
public TreeTableDataDictPane(String treeName) { public TreeTableDataDictPane(String treeName) {
this.setLayout(new BorderLayout(5, 30)); this.setLayout(new BorderLayout(5, 30));
this.setBorder(BorderFactory.createEmptyBorder(20, 20, 0, 0)); this.setBorder(BorderFactory.createEmptyBorder(20, 20, 0, 0));
@ -138,11 +139,20 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
RecursionTableData rtd = new RecursionTableData(); RecursionTableData rtd = new RecursionTableData();
rtd.setOriginalTableDataName(tableDataWrappe.getTableDataName()); rtd.setOriginalTableDataName(tableDataWrappe.getTableDataName());
if (isBuildByParentFiled()) { if (isBuildByParentFiled()) {
rtd.setMarkFields((Integer.parseInt(originalMarkedFieldPane1.update().toString()) - 1) + ""); Object o = parentMarkedFieldPane1.update();
rtd.setParentmarkFields(Integer.parseInt(parentMarkedFieldPane1.update().toString()) - 1 + ""); rtd.setParentmarkFields((Integer) o - 1 + "");
rtd.setParentmarkFieldName("" + o);
Object o2 = originalMarkedFieldPane1.update();
rtd.setMarkFields((Integer) o2 - 1 + "");
rtd.setMarkFieldName("" + o2);
} else {
Object o = originalMarkedFieldPane2.update();
if (o == null) {
rtd.setMarkFields("-1");
} else { } else {
rtd.setMarkFields(Integer.parseInt(originalMarkedFieldPane2.update().toString()) - 1 + ""); rtd.setMarkFields((Integer) o - 1 + "");
rtd.setParentmarkFields("-1"); rtd.setMarkFieldName("" + o);
}
} }
rtd.setTableDataSource(DesignTableDataManager.getEditingTableDataSource()); rtd.setTableDataSource(DesignTableDataManager.getEditingTableDataSource());
rtd.createDataModel(Calculator.createCalculator()); rtd.createDataModel(Calculator.createCalculator());

Loading…
Cancel
Save