Browse Source

Pull request #9097: REPORT-70850 下拉树优化

Merge in DESIGN/design from ~YUAN.WANG/design:feature/x to feature/x

* commit '6296b8a5e994ec89e207f43f887c7c9f0eb5efa4':
  REPORT-70850 下拉树优化
feature/x
Yuan.Wang 2 years ago
parent
commit
25b0581f59
  1. 10
      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

10
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));
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.addItemListener(e -> {
UICheckBox checkBox = (UICheckBox) e.getSource();
doLoadTypeChange(checkBox.isSelected());
});
loadTypePane.add(loadTypeCheckBox);
this.add(loadTypePane);
@ -57,7 +61,11 @@ public class TreeRootPane extends BasicPane {
this.add(returnFullPathPane);
}
private void doLoadTypeChange(boolean selected) {
//给埋点插件提供一个方法,埋埋点用
}
@Override
protected String title4PopupWindow() {
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.creator.XCreator;
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 javax.swing.*;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.Component;
/*
@ -35,13 +33,16 @@ public class TreeEditorDefinePane extends CustomWritableRepeatEditorPane<TreeEdi
}
public JPanel createOtherPane() {
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));
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.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.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
@ -63,13 +64,17 @@ public class TreeEditorDefinePane extends CustomWritableRepeatEditorPane<TreeEdi
return panel;
}
private void doLoadTypeChange(boolean selected) {
//给埋点插件提供一个方法,埋埋点用
}
@Override
public String title4PopupWindow() {
return "tree";
}
protected Component[] createDictPane(){
protected Component[] createDictPane() {
accessibleTreeModelEditor = new 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
protected TreeEditor updateSubCustomWritableRepeatEditorBean() {
TreeEditor editor = (TreeEditor)creator.toData();
TreeEditor editor = (TreeEditor) creator.toData();
formWidgetValuePane.update(editor);
editor.setTreeAttr(treeRootPane.update());
editor.setMultipleSelection(mutiSelect.isSelected());

Loading…
Cancel
Save