Browse Source

Merge pull request #482 in BA/design from ~JU/core-design:master to dev

* commit '397ac90901939cd352f3bde240e47ac166b0b4a3':
  New changelist
  极速下拉树构建中,填报的问题
  极速下拉树构建中,填报的问题
master
superman 8 years ago
parent
commit
cecd111058
  1. 17
      designer_base/src/com/fr/design/gui/frpane/TreeSettingPane.java

17
designer_base/src/com/fr/design/gui/frpane/TreeSettingPane.java

@ -23,6 +23,7 @@ import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.event.ItemEvent; import java.awt.event.ItemEvent;
import java.awt.event.ItemListener; import java.awt.event.ItemListener;
import java.util.Arrays;
public class TreeSettingPane extends BasicPane implements DataCreatorUI { public class TreeSettingPane extends BasicPane implements DataCreatorUI {
private JTreeControlPane controlPane; private JTreeControlPane controlPane;
@ -133,7 +134,7 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
for (LayerConfig layerConfig : layerConfigList) { for (LayerConfig layerConfig : layerConfigList) {
layerConfigs[i++] = layerConfig; layerConfigs[i++] = layerConfig;
} }
this.layerDataControlPane.populate(new NameObject("tree", layerConfigs)); this.layerDataControlPane.populate(new NameObject("Tree Layer Data", layerConfigs));
} else { } else {
buildBox.setSelectedIndex(2); buildBox.setSelectedIndex(2);
} }
@ -154,10 +155,12 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
if (buildBox.getSelectedIndex() == 1) { if (buildBox.getSelectedIndex() == 1) {
TableDataDictionary dictionary = this.autoBuildPane.update(); TableDataDictionary dictionary = this.autoBuildPane.update();
te.setAutoBuild(true); te.setAutoBuild(true);
te.setLayerBuild(false);
te.setDictionary(dictionary); te.setDictionary(dictionary);
te.setNodeOrDict(dictionary); te.setNodeOrDict(dictionary);
} else if (buildBox.getSelectedIndex() == 2) { } else if (buildBox.getSelectedIndex() == 2) {
te.setAutoBuild(false); te.setAutoBuild(false);
te.setLayerBuild(false);
NameObject no = this.controlPane.update(); NameObject no = this.controlPane.update();
if (no != null) { if (no != null) {
TreeEditor editor = (TreeEditor) no.getObject(); TreeEditor editor = (TreeEditor) no.getObject();
@ -174,6 +177,11 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
te.setNodeOrDict(editor.getTreeNodeAttr()); te.setNodeOrDict(editor.getTreeNodeAttr());
te.setPerformanceFirst(editor.isPerformanceFirst()); te.setPerformanceFirst(editor.isPerformanceFirst());
} }
} else {
LayerConfig[] configs = (LayerConfig[]) layerDataControlPane.update().getObject();
te.setAutoBuild(false);
te.setLayerBuild(true);
te.setLayerConfigs(Arrays.asList(configs));
} }
return te; return te;
} }
@ -206,10 +214,12 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
if (buildBox.getSelectedIndex() == 1) { if (buildBox.getSelectedIndex() == 1) {
TableDataDictionary dictionary = this.autoBuildPane.update(); TableDataDictionary dictionary = this.autoBuildPane.update();
tcb.setAutoBuild(true); tcb.setAutoBuild(true);
tcb.setLayerBuild(false);
tcb.setDictionary(dictionary); tcb.setDictionary(dictionary);
tcb.setNodeOrDict(dictionary); tcb.setNodeOrDict(dictionary);
} else if (buildBox.getSelectedIndex() == 2) { } else if (buildBox.getSelectedIndex() == 2) {
tcb.setAutoBuild(false); tcb.setAutoBuild(false);
tcb.setLayerBuild(false);
NameObject no = this.controlPane.update(); NameObject no = this.controlPane.update();
if (no != null) { if (no != null) {
if (no.getObject() instanceof TreeComboBoxEditor) { if (no.getObject() instanceof TreeComboBoxEditor) {
@ -230,6 +240,11 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
tcb.setNodeOrDict(editor.getTreeNodeAttr()); tcb.setNodeOrDict(editor.getTreeNodeAttr());
tcb.setPerformanceFirst(editor.isPerformanceFirst()); tcb.setPerformanceFirst(editor.isPerformanceFirst());
} }
}else {
LayerConfig[] configs = (LayerConfig[]) layerDataControlPane.update().getObject();
tcb.setAutoBuild(false);
tcb.setLayerBuild(true);
tcb.setLayerConfigs(Arrays.asList(configs));
} }
return tcb; return tcb;
} }

Loading…
Cancel
Save