Browse Source

REPORT-53163 图表超链联动

feature/10.0
hades 4 years ago
parent
commit
577bb9b9b3
  1. 2
      designer-base/src/main/java/com/fr/design/mod/ContentObjectManager.java
  2. 2
      designer-base/src/main/java/com/fr/design/mod/ContentReplacerCenter.java
  3. 34
      designer-base/src/main/java/com/fr/design/mod/impl/change/FormHyperlinkContentChange.java
  4. 20
      designer-base/src/main/java/com/fr/design/mod/impl/repalce/FormHyperlinkContentReplacer.java

2
designer-base/src/main/java/com/fr/design/mod/ContentObjectManager.java

@ -5,6 +5,7 @@ import com.fr.chart.web.ChartHyperRelateCellLink;
import com.fr.chart.web.ChartHyperRelateFloatLink;
import com.fr.data.SimpleDSColumn;
import com.fr.data.impl.NameTableData;
import com.fr.form.main.FormHyperlink;
import com.fr.invoke.ClassHelper;
import com.fr.js.JavaScriptImpl;
import com.fr.plugin.chart.base.VanChartHtmlLabel;
@ -46,6 +47,7 @@ public class ContentObjectManager {
set.add(NameTableData.class.getName());
set.add(SimpleDSColumn.class.getName());
set.add(DSColumn.class.getName());
set.add(FormHyperlink.class.getName());
}
public void searchObject(Object ob) {

2
designer-base/src/main/java/com/fr/design/mod/ContentReplacerCenter.java

@ -7,6 +7,7 @@ import com.fr.design.mod.event.WidgetNameModifyEvent;
import com.fr.design.mod.impl.change.ChartHyperRelateCellLinkContentChange;
import com.fr.design.mod.impl.change.ChartHyperRelateFloatLinkContentChange;
import com.fr.design.mod.impl.change.DSColumnContentChange;
import com.fr.design.mod.impl.change.FormHyperlinkContentChange;
import com.fr.design.mod.impl.change.FormulaContentChange;
import com.fr.design.mod.impl.change.JavaScriptContentChange;
import com.fr.design.mod.impl.change.NameTableDataContentChange;
@ -79,6 +80,7 @@ public class ContentReplacerCenter {
contentChangeList.add(new NameTableDataContentChange());
contentChangeList.add(new SimpleDSColumnContentChange());
contentChangeList.add(new DSColumnContentChange());
contentChangeList.add(new FormHyperlinkContentChange());
}
private void onRename(List<ContentChangeItem> contentChangeItemList, List<ContentChange> contentChangeList) {

34
designer-base/src/main/java/com/fr/design/mod/impl/change/FormHyperlinkContentChange.java

@ -0,0 +1,34 @@
package com.fr.design.mod.impl.change;
import com.fr.design.mod.ContentChange;
import com.fr.design.mod.ContentReplacer;
import com.fr.design.mod.bean.ChangeItem;
import com.fr.design.mod.impl.repalce.FormHyperlinkContentReplacer;
import com.fr.form.main.FormHyperlink;
import java.util.HashMap;
import java.util.Map;
/**
* @author hades
* @version 10.0
* Created by hades on 2021/6/2
*/
public class FormHyperlinkContentChange implements ContentChange<FormHyperlink> {
private final Map<ChangeItem, ContentReplacer<FormHyperlink>> map;
public FormHyperlinkContentChange() {
map = new HashMap<>();
map.put(ChangeItem.WIDGET_NAME, new FormHyperlinkContentReplacer());
}
@Override
public String type() {
return FormHyperlink.class.getName();
}
@Override
public Map<ChangeItem, ContentReplacer<FormHyperlink>> changeInfo() {
return map;
}
}

20
designer-base/src/main/java/com/fr/design/mod/impl/repalce/FormHyperlinkContentReplacer.java

@ -0,0 +1,20 @@
package com.fr.design.mod.impl.repalce;
import com.fr.design.mod.ContentReplacer;
import com.fr.form.main.FormHyperlink;
import com.fr.general.ComparatorUtils;
/**
* @author hades
* @version 10.0
* Created by hades on 2021/6/2
*/
public class FormHyperlinkContentReplacer implements ContentReplacer<FormHyperlink> {
@Override
public void replace(FormHyperlink formHyperlink, String oldName, String newName) {
if (ComparatorUtils.equals(formHyperlink.getRelateEditorName(), oldName)) {
formHyperlink.setRelateEditorName(newName);
}
}
}
Loading…
Cancel
Save