forked from fanruan/design
Browse Source
Merge in DESIGN/design from ~HADES/design:feature/10.0 to feature/10.0 * commit 'ade05d9005e5a3c5e404b29a1398ed453fb0616f': REPORT-53211 && REPORT-53208 && REPORT-53209 && REPORT-53207 几个使用公式的场景未联动修改feature/10.0
Hades
4 years ago
12 changed files with 397 additions and 11 deletions
@ -0,0 +1,36 @@
|
||||
package com.fr.design.mod.impl.change.formula; |
||||
|
||||
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.FormulaReplacer; |
||||
import com.fr.form.ui.CardSwitchButton; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author hades |
||||
* @version 10.0 |
||||
* Created by hades on 2021/6/3 |
||||
*/ |
||||
public class CardSwitchButtonContentChange implements ContentChange<CardSwitchButton> { |
||||
|
||||
|
||||
private final Map<ChangeItem, ContentReplacer<CardSwitchButton>> map; |
||||
|
||||
public CardSwitchButtonContentChange() { |
||||
map = new HashMap<>(); |
||||
map.put(ChangeItem.WIDGET_NAME, FormulaReplacer.CardSwitchButton4WidgetNameContentReplacer); |
||||
map.put(ChangeItem.TABLE_DATA_NAME, FormulaReplacer.CardSwitchButton4TableDataNameContentReplacer); |
||||
} |
||||
|
||||
@Override |
||||
public String type() { |
||||
return CardSwitchButton.class.getName(); |
||||
} |
||||
|
||||
@Override |
||||
public Map<ChangeItem, ContentReplacer<CardSwitchButton>> changeInfo() { |
||||
return map; |
||||
} |
||||
} |
@ -0,0 +1,35 @@
|
||||
package com.fr.design.mod.impl.change.formula; |
||||
|
||||
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.FormulaReplacer; |
||||
import com.fr.report.cell.cellattr.CellGUIAttr; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author hades |
||||
* @version 10.0 |
||||
* Created by hades on 2021/6/3 |
||||
*/ |
||||
public class CellGUIAttrContentChange implements ContentChange<CellGUIAttr> { |
||||
|
||||
private Map<ChangeItem, ContentReplacer<CellGUIAttr>> map; |
||||
|
||||
public CellGUIAttrContentChange() { |
||||
map = new HashMap<>(); |
||||
map.put(ChangeItem.WIDGET_NAME, FormulaReplacer.CellGUIAttr4WidgetNameContentReplacer); |
||||
map.put(ChangeItem.TABLE_DATA_NAME, FormulaReplacer.CellGUIAttr4TableDataNameContentReplacer); |
||||
} |
||||
|
||||
@Override |
||||
public String type() { |
||||
return CellGUIAttr.class.getName(); |
||||
} |
||||
|
||||
@Override |
||||
public Map<ChangeItem, ContentReplacer<CellGUIAttr>> changeInfo() { |
||||
return map; |
||||
} |
||||
} |
@ -0,0 +1,35 @@
|
||||
package com.fr.design.mod.impl.change.formula; |
||||
|
||||
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.FormulaReplacer; |
||||
import com.fr.report.cell.cellattr.core.group.FunctionGrouper; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author hades |
||||
* @version 10.0 |
||||
* Created by hades on 2021/6/3 |
||||
*/ |
||||
public class FunctionGrouperContentChange implements ContentChange<FunctionGrouper> { |
||||
|
||||
private final Map<ChangeItem, ContentReplacer<FunctionGrouper>> map; |
||||
|
||||
public FunctionGrouperContentChange() { |
||||
map = new HashMap<>(); |
||||
map.put(ChangeItem.WIDGET_NAME, FormulaReplacer.FunctionGrouper4WidgetNameContentReplacer); |
||||
map.put(ChangeItem.TABLE_DATA_NAME, FormulaReplacer.FunctionGrouper4TableDataNameContentReplacer); |
||||
} |
||||
|
||||
@Override |
||||
public String type() { |
||||
return FunctionGrouper.class.getName(); |
||||
} |
||||
|
||||
@Override |
||||
public Map<ChangeItem, ContentReplacer<FunctionGrouper>> changeInfo() { |
||||
return map; |
||||
} |
||||
} |
@ -0,0 +1,35 @@
|
||||
package com.fr.design.mod.impl.change.formula; |
||||
|
||||
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.FormulaReplacer; |
||||
import com.fr.report.cell.cellattr.core.group.SelectCount; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author hades |
||||
* @version 10.0 |
||||
* Created by hades on 2021/6/3 |
||||
*/ |
||||
public class SelectCountContentChange implements ContentChange<SelectCount> { |
||||
|
||||
private final Map<ChangeItem, ContentReplacer<SelectCount>> map; |
||||
|
||||
public SelectCountContentChange() { |
||||
map = new HashMap<>(); |
||||
map.put(ChangeItem.WIDGET_NAME, FormulaReplacer.SelectCount4WidgetNameContentReplacer); |
||||
map.put(ChangeItem.TABLE_DATA_NAME, FormulaReplacer.SelectCount4TableDataNameContentReplacer); |
||||
} |
||||
|
||||
@Override |
||||
public String type() { |
||||
return SelectCount.class.getName(); |
||||
} |
||||
|
||||
@Override |
||||
public Map<ChangeItem, ContentReplacer<SelectCount>> changeInfo() { |
||||
return map; |
||||
} |
||||
} |
@ -0,0 +1,35 @@
|
||||
package com.fr.design.mod.impl.change.formula; |
||||
|
||||
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.FormulaReplacer; |
||||
import com.fr.form.ui.WidgetTitle; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author hades |
||||
* @version 10.0 |
||||
* Created by hades on 2021/6/3 |
||||
*/ |
||||
public class WidgetTitleContentChange implements ContentChange<WidgetTitle> { |
||||
|
||||
private final Map<ChangeItem, ContentReplacer<WidgetTitle>> map; |
||||
|
||||
public WidgetTitleContentChange() { |
||||
map = new HashMap<>(); |
||||
map.put(ChangeItem.WIDGET_NAME, FormulaReplacer.WidgetTitle4WidgetNameContentReplacer); |
||||
map.put(ChangeItem.TABLE_DATA_NAME, FormulaReplacer.WidgetTitle4TableDataNameContentReplacer); |
||||
} |
||||
|
||||
@Override |
||||
public String type() { |
||||
return WidgetTitle.class.getName(); |
||||
} |
||||
|
||||
@Override |
||||
public Map<ChangeItem, ContentReplacer<WidgetTitle>> changeInfo() { |
||||
return map; |
||||
} |
||||
} |
@ -0,0 +1,19 @@
|
||||
package com.fr.design.mod.impl.repalce; |
||||
|
||||
import com.fr.design.mod.ContentReplaceUtil; |
||||
import com.fr.design.mod.ContentReplacer; |
||||
import com.fr.report.cell.cellattr.core.group.DSColumn; |
||||
|
||||
/** |
||||
* @author hades |
||||
* @version 10.0 |
||||
* Created by hades on 2021/6/3 |
||||
*/ |
||||
public class DSColumn4WidgetNameContentReplacer implements ContentReplacer<DSColumn> { |
||||
|
||||
@Override |
||||
public void replace(DSColumn dsColumn, String oldName, String newName) { |
||||
dsColumn.setResult(ContentReplaceUtil.replacePureFormula4WidgetName(dsColumn.getResult(), oldName, newName)); |
||||
dsColumn.setSortFormula(ContentReplaceUtil.replacePureFormula4WidgetName(dsColumn.getSortFormula(), oldName, newName)); |
||||
} |
||||
} |
Loading…
Reference in new issue