Browse Source

Pull request #9153: REPORT-70850 下拉树优化埋点

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

* commit '35716baf848f6dfebda1d915167fba5e5d0de495':
  REPORT-72377 控件-下拉框联动其他控件-值联动-FR11样式下部分控件没有联动
  REPORT-72377 控件-下拉框联动其他控件-值联动-FR11样式下部分控件没有联动
  REPORT-70850 下拉树优化埋点
feature/x
Yuan.Wang 2 years ago
parent
commit
6e16fd4caa
  1. 2
      designer-base/src/main/java/com/fr/design/gui/frpane/TreeSettingPane.java
  2. 114
      designer-base/src/main/java/com/fr/design/gui/itree/refreshabletree/TreeRootPane.java
  3. 15
      designer-form/src/main/java/com/fr/design/widget/ui/designer/TreeEditorDefinePane.java

2
designer-base/src/main/java/com/fr/design/gui/frpane/TreeSettingPane.java

@ -79,7 +79,7 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
cardChanged(0);
}
private void cardChanged(int index) {
private void cardChanged(Integer index) {
this.remove(controlPane);
this.remove(autoBuildPane);

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

@ -8,83 +8,89 @@ import com.fr.design.layout.FRGUIPaneFactory;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JPanel;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
public class TreeRootPane extends BasicPane {
// 是否支持多选(checkBoxTree)
//private JCheckBox multipleSelection;
private UICheckBox checkTypeCheckBox;
// 是否支持多选(checkBoxTree)
//private JCheckBox multipleSelection;
private UICheckBox checkTypeCheckBox;
// richer:加载的方式,支持异步加载和完全加载
private UICheckBox loadTypeCheckBox;
// richer:加载的方式,支持异步加载和完全加载
private UICheckBox loadTypeCheckBox;
private UICheckBox layerTypeCheckBox;
private UICheckBox layerTypeCheckBox;
private UICheckBox returnFullPathCheckBox ;
private UICheckBox returnFullPathCheckBox;
public TreeRootPane() {
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
public TreeRootPane() {
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
JPanel checkTypePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0();
checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
checkTypeCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Mutiple_Selection_Or_Not"));
checkTypeCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
JPanel checkTypePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0();
checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
checkTypeCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Mutiple_Selection_Or_Not"));
checkTypeCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
checkTypePane.add(checkTypeCheckBox);
this.add(checkTypePane);
checkTypePane.add(checkTypeCheckBox);
this.add(checkTypePane);
JPanel loadTypePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0();
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());
});
JPanel loadTypePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0();
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.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
UICheckBox checkBox = (UICheckBox) e.getSource();
doLoadTypeChange(checkBox.isSelected());
}
});
loadTypePane.add(loadTypeCheckBox);
this.add(loadTypePane);
loadTypePane.add(loadTypeCheckBox);
this.add(loadTypePane);
JPanel leafSelectPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0();
checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
leafSelectPane.add(layerTypeCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Select_Leaf_Only")));
layerTypeCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
JPanel leafSelectPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0();
checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
leafSelectPane.add(layerTypeCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Select_Leaf_Only")));
layerTypeCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
this.add(leafSelectPane);
this.add(leafSelectPane);
JPanel returnFullPathPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0();
checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
returnFullPathPane.add(returnFullPathCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Return_Full_Path")));
returnFullPathCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
returnFullPathPane.add(returnFullPathCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Return_Full_Path")));
returnFullPathCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
this.add(returnFullPathPane);
this.add(returnFullPathPane);
}
}
private void doLoadTypeChange(boolean selected) {
//给埋点插件提供一个方法,埋埋点用
}
private void doLoadTypeChange(Boolean selected) {
//给埋点插件提供一个方法,埋埋点用
}
@Override
protected String title4PopupWindow() {
return "tree";
}
@Override
protected String title4PopupWindow() {
return "tree";
}
public void populate(TreeAttr treeAttr) {
checkTypeCheckBox.setSelected(treeAttr.isMultipleSelection());
loadTypeCheckBox.setSelected(treeAttr.isAjax());
layerTypeCheckBox.setSelected(treeAttr.isSelectLeafOnly());
public void populate(TreeAttr treeAttr) {
checkTypeCheckBox.setSelected(treeAttr.isMultipleSelection());
loadTypeCheckBox.setSelected(treeAttr.isAjax());
layerTypeCheckBox.setSelected(treeAttr.isSelectLeafOnly());
returnFullPathCheckBox.setSelected(treeAttr.isReturnFullPath());
}
}
public TreeAttr update() {
TreeAttr treeAttr = new TreeAttr();
treeAttr.setMultipleSelection(checkTypeCheckBox.isSelected());
treeAttr.setAjax(loadTypeCheckBox.isSelected());
treeAttr.setSelectLeafOnly(layerTypeCheckBox.isSelected());
public TreeAttr update() {
TreeAttr treeAttr = new TreeAttr();
treeAttr.setMultipleSelection(checkTypeCheckBox.isSelected());
treeAttr.setAjax(loadTypeCheckBox.isSelected());
treeAttr.setSelectLeafOnly(layerTypeCheckBox.isSelected());
treeAttr.setReturnFullPath(returnFullPathCheckBox.isSelected());
return treeAttr;
}
return treeAttr;
}
}

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

@ -14,6 +14,9 @@ import com.fr.form.ui.TreeEditor;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.Component;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
/*
@ -39,11 +42,13 @@ public class TreeEditorDefinePane extends CustomWritableRepeatEditorPane<TreeEdi
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());
loadAsync.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent 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));
@ -64,7 +69,7 @@ public class TreeEditorDefinePane extends CustomWritableRepeatEditorPane<TreeEdi
return panel;
}
private void doLoadTypeChange(boolean selected) {
private void doLoadTypeChange(Boolean selected) {
//给埋点插件提供一个方法,埋埋点用
}

Loading…
Cancel
Save