Browse Source

implements DataCreatorUI

master
juhaoyu 8 years ago
parent
commit
b836a64de0
  1. 30
      designer_base/src/com/fr/design/gui/frpane/TreeSettingPane.java
  2. 3
      designer_base/src/com/fr/design/gui/frpane/tree/layer/config/LayerDataControlPane.java
  3. 9
      designer_base/src/com/fr/design/gui/frpane/tree/layer/config/LayerDependenceSettingPane.java

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

@ -156,15 +156,11 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
te.setAutoBuild(true);
te.setDictionary(dictionary);
te.setNodeOrDict(dictionary);
} else if (buildBox.getSelectedIndex() == 0) {
// TODO: 16/9/12
te.setLayerBuild(true);
} else {
te.setAutoBuild(false);
NameObject no = this.controlPane.update();
if (no != null) {
TreeEditor editor = (TreeEditor) no.getObject();
} else if (buildBox.getSelectedIndex() == 2) {
te.setAutoBuild(false);
NameObject no = this.controlPane.update();
if (no != null) {
TreeEditor editor = (TreeEditor) no.getObject();
te.setAllowBlank(editor.isAllowBlank());
te.setEnabled(editor.isEnabled());
te.setDirectEdit(editor.isDirectEdit());
@ -212,15 +208,13 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
tcb.setAutoBuild(true);
tcb.setDictionary(dictionary);
tcb.setNodeOrDict(dictionary);
} else if (buildBox.getSelectedIndex() == 0) {
// TODO: 16/9/12
} else {
tcb.setAutoBuild(false);
NameObject no = this.controlPane.update();
if (no != null) {
if (no.getObject() instanceof TreeComboBoxEditor) {
return (TreeComboBoxEditor) no.getObject();
}
} else if (buildBox.getSelectedIndex() == 2) {
tcb.setAutoBuild(false);
NameObject no = this.controlPane.update();
if (no != null) {
if (no.getObject() instanceof TreeComboBoxEditor) {
return (TreeComboBoxEditor) no.getObject();
}
TreeEditor editor = (TreeEditor) no.getObject();
tcb.setAllowBlank(editor.isAllowBlank());

3
designer_base/src/com/fr/design/gui/frpane/tree/layer/config/LayerDataControlPane.java

@ -49,10 +49,9 @@ public class LayerDataControlPane extends ControlPane {
JPanel leftPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(Inter.getLocText("FR-Designer_Root"));
defaultTreeModel = new DefaultTreeModel(rootNode);
DefaultMutableTreeNode firstLayer = new DefaultMutableTreeNode(new NameObject(Inter.getLocText("FR-Designer_Gradation") + 1, new LayerConfig(1)));
tree = new JTree(defaultTreeModel);
DefaultMutableTreeNode firstLayer = new DefaultMutableTreeNode(new NameObject(Inter.getLocText("FR-Designer_Gradation") + 1, new LayerConfig(1)));
tree.setRootVisible(false);
tree.repaint();
((DefaultMutableTreeNode) defaultTreeModel.getRoot()).getLastLeaf().add(firstLayer);
tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
leftPane.add(new UIScrollPane(tree), BorderLayout.CENTER);

9
designer_base/src/com/fr/design/gui/frpane/tree/layer/config/LayerDependenceSettingPane.java

@ -1,6 +1,7 @@
package com.fr.design.gui.frpane.tree.layer.config;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.present.dict.TableDataDictPane;
import com.fr.form.ui.tree.LayerDependence;
import com.fr.general.Inter;
@ -31,12 +32,12 @@ public class LayerDependenceSettingPane extends JPanel implements ItemListener {
/**
* 添加依赖按钮
*/
private JButton addButton;
private UIButton addButton;
/**
* 删除依赖按钮
*/
private JButton delButton;
private UIButton delButton;
/**
* 依赖关系编辑Table
@ -66,8 +67,8 @@ public class LayerDependenceSettingPane extends JPanel implements ItemListener {
tableDataDictPane.tableDataNameComboBox.addItemListener(this);
//初始化按钮对象
addButton = new JButton(Inter.getLocText("add"));
delButton = new JButton(Inter.getLocText("Delete"));
addButton = new UIButton(Inter.getLocText("add"));
delButton = new UIButton(Inter.getLocText("Delete"));
//初始化Table对象,并添加renderer和editor
model = new LayerDepenceTableModel();
dependenceTable = new JTable(model);

Loading…
Cancel
Save