Browse Source

REPORT-70850 下拉树优化

feature/x
Yuan.Wang 3 years ago
parent
commit
48786bde20
  1. 8
      designer-base/src/main/java/com/fr/design/gui/itree/refreshabletree/TreeRootPane.java
  2. 21
      designer-form/src/main/java/com/fr/design/widget/ui/designer/TreeEditorDefinePane.java

8
designer-base/src/main/java/com/fr/design/gui/itree/refreshabletree/TreeRootPane.java

@ -38,6 +38,10 @@ public class TreeRootPane extends BasicPane {
checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
loadTypeCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Load_By_Async")); loadTypeCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Load_By_Async"));
loadTypeCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); loadTypeCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
loadTypeCheckBox.addItemListener(e -> {
UICheckBox checkBox = (UICheckBox) e.getSource();
doLoadTypeChange(checkBox.isSelected());
});
loadTypePane.add(loadTypeCheckBox); loadTypePane.add(loadTypeCheckBox);
this.add(loadTypePane); this.add(loadTypePane);
@ -58,6 +62,10 @@ public class TreeRootPane extends BasicPane {
} }
private void doLoadTypeChange(boolean selected) {
//给埋点插件提供一个方法,埋埋点用
}
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return "tree"; return "tree";

21
designer-form/src/main/java/com/fr/design/widget/ui/designer/TreeEditorDefinePane.java

@ -4,18 +4,16 @@ import com.fr.design.data.DataCreatorUI;
import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.IntervalConstants;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itree.refreshabletree.TreeRootPane; import com.fr.design.gui.itree.refreshabletree.TreeRootPane;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.widget.accessibles.AccessibleTreeModelEditor; import com.fr.design.mainframe.widget.accessibles.AccessibleTreeModelEditor;
import com.fr.form.ui.TreeEditor; import com.fr.form.ui.TreeEditor;
import javax.swing.BorderFactory;
import javax.swing.*; import javax.swing.JPanel;
import java.awt.*; import java.awt.Component;
/* /*
@ -35,13 +33,16 @@ public class TreeEditorDefinePane extends CustomWritableRepeatEditorPane<TreeEdi
} }
public JPanel createOtherPane() { public JPanel createOtherPane() {
mutiSelect = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Mutiple_Selection_Or_Not")); mutiSelect = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Mutiple_Selection_Or_Not"));
mutiSelect.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); mutiSelect.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
loadAsync = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Load_By_Async")); loadAsync = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Load_By_Async"));
loadAsync.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); loadAsync.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
loadAsync.addItemListener(e -> {
UICheckBox checkBox = (UICheckBox) e.getSource();
doLoadTypeChange(checkBox.isSelected());
});
returnLeaf = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Return_Leaf")); returnLeaf = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Return_Leaf"));
returnLeaf.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); returnLeaf.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
@ -63,13 +64,17 @@ public class TreeEditorDefinePane extends CustomWritableRepeatEditorPane<TreeEdi
return panel; return panel;
} }
private void doLoadTypeChange(boolean selected) {
//给埋点插件提供一个方法,埋埋点用
}
@Override @Override
public String title4PopupWindow() { public String title4PopupWindow() {
return "tree"; return "tree";
} }
protected Component[] createDictPane(){ protected Component[] createDictPane() {
accessibleTreeModelEditor = new AccessibleTreeModelEditor(); accessibleTreeModelEditor = new AccessibleTreeModelEditor();
return new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_DS_Dictionary")), accessibleTreeModelEditor}; return new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_DS_Dictionary")), accessibleTreeModelEditor};
} }
@ -88,7 +93,7 @@ public class TreeEditorDefinePane extends CustomWritableRepeatEditorPane<TreeEdi
@Override @Override
protected TreeEditor updateSubCustomWritableRepeatEditorBean() { protected TreeEditor updateSubCustomWritableRepeatEditorBean() {
TreeEditor editor = (TreeEditor)creator.toData(); TreeEditor editor = (TreeEditor) creator.toData();
formWidgetValuePane.update(editor); formWidgetValuePane.update(editor);
editor.setTreeAttr(treeRootPane.update()); editor.setTreeAttr(treeRootPane.update());
editor.setMultipleSelection(mutiSelect.isSelected()); editor.setMultipleSelection(mutiSelect.isSelected());

Loading…
Cancel
Save