Browse Source

REPORT-3789 [9.0一轮回归]下拉树、视图树控件无构建树设置

master
kerry 7 years ago
parent
commit
0b25393c94
  1. 2
      designer/src/com/fr/design/widget/ui/DirectWriteEditorDefinePane.java
  2. 32
      designer/src/com/fr/design/widget/ui/TreeComboBoxEditorDefinePane.java
  3. 25
      designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java
  4. 9
      designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java
  5. 0
      designer_base/src/com/fr/design/mainframe/widget/accessibles/AccessibleTreeModelEditor.java
  6. 0
      designer_base/src/com/fr/design/mainframe/widget/wrappers/TreeModelWrapper.java
  7. 12
      designer_form/src/com/fr/design/widget/ui/designer/TreeComboBoxEditorDefinePane.java
  8. 30
      designer_form/src/com/fr/design/widget/ui/designer/TreeEditorDefinePane.java

2
designer/src/com/fr/design/widget/ui/DirectWriteEditorDefinePane.java

@ -24,7 +24,7 @@ public abstract class DirectWriteEditorDefinePane<T extends DirectWriteEditor> e
JPanel contentPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
contentPane.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 0));
directWriteCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_Edit"), false);
directWriteCheckBox.setPreferredSize(new Dimension(100, 30));
directWriteCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
waterMarkDictPane = new WaterMarkDictPane();
contentPane.add(waterMarkDictPane, BorderLayout.NORTH);

32
designer/src/com/fr/design/widget/ui/TreeComboBoxEditorDefinePane.java

@ -1,19 +1,23 @@
package com.fr.design.widget.ui;
import java.awt.BorderLayout;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import com.fr.data.Dictionary;
import com.fr.design.data.DataCreatorUI;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itree.refreshabletree.TreeRootPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.gui.frpane.TreeSettingPane;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.widget.accessibles.AccessibleTreeModelEditor;
import com.fr.form.ui.TreeComboBoxEditor;
import com.fr.form.ui.TreeEditor;
import com.fr.general.Inter;
public class TreeComboBoxEditorDefinePane extends CustomWritableRepeatEditorPane<TreeEditor> {
protected TreeSettingPane treeSettingPane;
protected AccessibleTreeModelEditor treeSettingPane;
protected TreeRootPane treeRootPane;
public TreeComboBoxEditorDefinePane() {
@ -27,10 +31,23 @@ public class TreeComboBoxEditorDefinePane extends CustomWritableRepeatEditorPane
content.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
treeRootPane = new TreeRootPane();
content.add(treeRootPane, BorderLayout.NORTH);
treeSettingPane = new TreeSettingPane(true);
return content;
}
@Override
protected JPanel setFirstContentPane() {
treeSettingPane = new AccessibleTreeModelEditor();
JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel north = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_Create_Tree")), treeSettingPane}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7);
north.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
JPanel center = super.setFirstContentPane();
jPanel.add(north, BorderLayout.NORTH);
jPanel.add(center, BorderLayout.CENTER);
return jPanel;
}
@Override
protected String title4PopupWindow() {
return "treecombobox";
@ -38,19 +55,20 @@ public class TreeComboBoxEditorDefinePane extends CustomWritableRepeatEditorPane
@Override
protected void populateSubCustomWritableRepeatEditorBean(TreeEditor e) {
treeSettingPane.populate(e);
treeSettingPane.setValue(e.getDictionary());
treeRootPane.populate(e.getTreeAttr());
}
@Override
protected TreeComboBoxEditor updateSubCustomWritableRepeatEditorBean() {
TreeComboBoxEditor editor = treeSettingPane.updateTreeComboBox();
TreeComboBoxEditor editor = new TreeComboBoxEditor();
editor.setDictionary((Dictionary)treeSettingPane.getValue());
editor.setTreeAttr(treeRootPane.update());
return editor;
}
@Override
public DataCreatorUI dataUI() {
return treeSettingPane;
return null;
}
}

25
designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java

@ -1,10 +1,13 @@
package com.fr.design.widget.ui;
import com.fr.data.Dictionary;
import com.fr.design.data.DataCreatorUI;
import com.fr.design.gui.frpane.TreeSettingPane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itree.refreshabletree.TreeRootPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.widget.accessibles.AccessibleTreeModelEditor;
import com.fr.form.ui.TreeEditor;
import com.fr.general.Inter;
@ -16,8 +19,8 @@ import java.awt.*;
* richer:tree editor
*/
public class TreeEditorDefinePane extends FieldEditorDefinePane<TreeEditor> {
protected TreeSettingPane treeSettingPane;
protected TreeRootPane treeRootPane;
private AccessibleTreeModelEditor accessibleTreeModelEditor;
private UICheckBox removeRepeatCheckBox;
@ -27,7 +30,7 @@ public class TreeEditorDefinePane extends FieldEditorDefinePane<TreeEditor> {
@Override
protected void populateSubFieldEditorBean(TreeEditor e) {
this.treeSettingPane.populate(e);
this.accessibleTreeModelEditor.setValue(e.getDictionary());
treeRootPane.populate(e.getTreeAttr());
if (this.removeRepeatCheckBox != null) {
this.removeRepeatCheckBox.setSelected(e.isRemoveRepeat());
@ -36,7 +39,8 @@ public class TreeEditorDefinePane extends FieldEditorDefinePane<TreeEditor> {
@Override
protected TreeEditor updateSubFieldEditorBean() {
TreeEditor editor = treeSettingPane.updateTreeEditor();
TreeEditor editor = new TreeEditor();
editor.setDictionary((Dictionary) accessibleTreeModelEditor.getValue());
editor.setTreeAttr(treeRootPane.update());
if (this.removeRepeatCheckBox != null) {
editor.setRemoveRepeat(this.removeRepeatCheckBox.isSelected());
@ -50,13 +54,17 @@ public class TreeEditorDefinePane extends FieldEditorDefinePane<TreeEditor> {
}
protected JPanel setSecondContentPane() {
accessibleTreeModelEditor = new AccessibleTreeModelEditor();
JPanel createTree = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_Create_Tree")), accessibleTreeModelEditor}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7);
createTree.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
JPanel contenter = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0();
JPanel contenter = FRGUIPaneFactory.createBorderLayout_S_Pane();
contentPane.add(contenter,BorderLayout.NORTH);
removeRepeatCheckBox = new UICheckBox(Inter.getLocText("Form-Remove_Repeat_Data"), false);
contenter.add(removeRepeatCheckBox);
removeRepeatCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
contenter.add(createTree, BorderLayout.NORTH);
contenter.add(removeRepeatCheckBox, BorderLayout.CENTER);
JPanel otherContentPane = this.setThirdContentPane();
if (otherContentPane != null) {
contentPane.add(otherContentPane,BorderLayout.CENTER);
@ -69,7 +77,6 @@ public class TreeEditorDefinePane extends FieldEditorDefinePane<TreeEditor> {
content.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
treeRootPane = new TreeRootPane();
content.add(treeRootPane, BorderLayout.NORTH);
treeSettingPane = new TreeSettingPane(true);
return content;
}
@ -80,6 +87,6 @@ public class TreeEditorDefinePane extends FieldEditorDefinePane<TreeEditor> {
@Override
public DataCreatorUI dataUI() {
return treeSettingPane;
return null;
}
}

9
designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java

@ -20,18 +20,15 @@ public class WaterMarkDictPane extends JPanel {
waterMarkTextField = new UITextField();
UILabel emptyLabel = new UILabel();
emptyLabel.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 0));
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("FR-Designer_WaterMark")), emptyLabel, waterMarkTextField},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_WaterMark")), waterMarkTextField},
};
double[] rowSize = {p};
double[] columnSize = {p, p, f};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 18, 7);
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
this.add(panel, BorderLayout.CENTER);
}

0
designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleTreeModelEditor.java → designer_base/src/com/fr/design/mainframe/widget/accessibles/AccessibleTreeModelEditor.java

0
designer_form/src/com/fr/design/mainframe/widget/wrappers/TreeModelWrapper.java → designer_base/src/com/fr/design/mainframe/widget/wrappers/TreeModelWrapper.java

12
designer_form/src/com/fr/design/widget/ui/designer/TreeComboBoxEditorDefinePane.java

@ -27,15 +27,13 @@ public class TreeComboBoxEditorDefinePane extends TreeEditorDefinePane {
return "treecombobox";
}
protected void populateSubDictionaryEditorBean(TreeEditor ob){
super.populateSubDictionaryEditorBean(ob);
formWidgetValuePane.populate(ob);
protected void populateSubCustomWritableRepeatEditorBean(TreeEditor ob){
super.populateSubCustomWritableRepeatEditorBean(ob);
waterMarkDictPane.setText(ob.getWaterMark());
}
protected TreeEditor updateSubDictionaryEditorBean(){
TreeEditor editor = super.updateSubDictionaryEditorBean();
formWidgetValuePane.update(editor);
protected TreeEditor updateSubCustomWritableRepeatEditorBean(){
TreeEditor editor = super.updateSubCustomWritableRepeatEditorBean();
editor.setWaterMark(waterMarkDictPane.getText());
return editor;
}
@ -44,6 +42,6 @@ public class TreeComboBoxEditorDefinePane extends TreeEditorDefinePane {
@Override
public DataCreatorUI dataUI() {
return treeSettingPane;
return null;
}
}

30
designer_form/src/com/fr/design/widget/ui/designer/TreeEditorDefinePane.java

@ -1,14 +1,16 @@
package com.fr.design.widget.ui.designer;
import com.fr.data.Dictionary;
import com.fr.design.data.DataCreatorUI;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.gui.frpane.TreeSettingPane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itree.refreshabletree.TreeRootPane;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.widget.accessibles.AccessibleTreeModelEditor;
import com.fr.form.ui.TreeEditor;
import com.fr.general.Inter;
@ -19,20 +21,21 @@ import java.awt.*;
/*
* richer:tree editor
*/
public class TreeEditorDefinePane extends DictEditorDefinePane<TreeEditor> {
protected TreeSettingPane treeSettingPane;
public class TreeEditorDefinePane extends CustomWritableRepeatEditorPane<TreeEditor> {
protected TreeRootPane treeRootPane;
private UICheckBox mutiSelect;
private UICheckBox loadAsync;
private UICheckBox returnLeaf;
private UICheckBox returnPath;
private AccessibleTreeModelEditor accessibleTreeModelEditor;
public TreeEditorDefinePane(XCreator xCreator) {
super(xCreator);
treeRootPane = new TreeRootPane();
treeSettingPane = new TreeSettingPane(true);
}
public JPanel createOtherPane() {
mutiSelect = new UICheckBox(Inter.getLocText("Tree-Mutiple_Selection_Or_Not"));
loadAsync = new UICheckBox(Inter.getLocText("Widget-Load_By_Async"));
@ -58,9 +61,16 @@ public class TreeEditorDefinePane extends DictEditorDefinePane<TreeEditor> {
return "tree";
}
protected void populateSubDictionaryEditorBean(TreeEditor e){
protected Component[] createDictPane(){
accessibleTreeModelEditor = new AccessibleTreeModelEditor();
return new Component[]{new UILabel(Inter.getLocText("FR-Designer_DS-Dictionary")), accessibleTreeModelEditor};
}
@Override
protected void populateSubCustomWritableRepeatEditorBean(TreeEditor e) {
accessibleTreeModelEditor.setValue(e.getDictionary());
formWidgetValuePane.populate(e);
treeSettingPane.populate(e);
treeRootPane.populate(e.getTreeAttr());
mutiSelect.setSelected(e.isMultipleSelection());
loadAsync.setSelected(e.isAjax());
@ -68,7 +78,9 @@ public class TreeEditorDefinePane extends DictEditorDefinePane<TreeEditor> {
returnPath.setSelected(e.isReturnFullPath());
}
protected TreeEditor updateSubDictionaryEditorBean(){
@Override
protected TreeEditor updateSubCustomWritableRepeatEditorBean() {
TreeEditor editor = (TreeEditor)creator.toData();
formWidgetValuePane.update(editor);
editor.setTreeAttr(treeRootPane.update());
@ -76,12 +88,12 @@ public class TreeEditorDefinePane extends DictEditorDefinePane<TreeEditor> {
editor.setAjax(loadAsync.isSelected());
editor.setSelectLeafOnly(returnLeaf.isSelected());
editor.setReturnFullPath(returnPath.isSelected());
editor.setDictionary((Dictionary) accessibleTreeModelEditor.getValue());
return editor;
}
@Override
public DataCreatorUI dataUI() {
return treeSettingPane;
return null;
}
}
Loading…
Cancel
Save