Destiny.Lin
2 years ago
17 changed files with 451 additions and 2 deletions
@ -0,0 +1,23 @@
|
||||
package com.fr.design.actions.replace.action; |
||||
|
||||
import com.fr.design.actions.replace.info.Info; |
||||
import com.fr.design.mainframe.JTemplate; |
||||
|
||||
import java.util.ArrayList; |
||||
|
||||
/** |
||||
* @author Destiny.Lin |
||||
* @version 11.0 |
||||
* created by Destiny.Lin on 2022-08-11 |
||||
*/ |
||||
public interface SearchAction { |
||||
|
||||
/** |
||||
* 搜索模板,获取信息列表 |
||||
* |
||||
* @param jTemplate 指定搜索的模板 |
||||
* @return 对应的Info信息列表 |
||||
*/ |
||||
ArrayList<? extends Info> search4Infos(JTemplate jTemplate); |
||||
|
||||
} |
@ -0,0 +1,30 @@
|
||||
package com.fr.design.actions.replace.action; |
||||
|
||||
import com.fr.design.actions.replace.info.Info; |
||||
import com.fr.design.mainframe.JTemplate; |
||||
|
||||
import java.util.ArrayList; |
||||
|
||||
/** |
||||
* @author Destiny.Lin |
||||
* @version 11.0 |
||||
* created by Destiny.Lin on 2022-08-22 |
||||
*/ |
||||
public interface ShowValue { |
||||
|
||||
/** |
||||
* 获取搜索结果 |
||||
* @param jTemplate |
||||
* @return |
||||
*/ |
||||
ArrayList<? extends Info> showSearchValue(JTemplate jTemplate); |
||||
|
||||
/** |
||||
* 对搜索结果进行过滤 |
||||
* @param str |
||||
* @param arrayList |
||||
* @return |
||||
*/ |
||||
ArrayList<? extends Info> addMatchResult(String str,ArrayList<? extends Info> arrayList); |
||||
|
||||
} |
@ -0,0 +1,23 @@
|
||||
package com.fr.design.actions.replace.action.content.formula; |
||||
|
||||
import com.fr.design.actions.replace.action.SearchAction; |
||||
import com.fr.design.actions.replace.info.FormulaInfo; |
||||
import com.fr.design.actions.replace.info.base.ITContent; |
||||
|
||||
|
||||
import java.util.ArrayList; |
||||
|
||||
/** |
||||
* @author Destiny.Lin |
||||
* @version 11.0 |
||||
* created by Destiny.Lin on 2022-08-18 |
||||
*/ |
||||
public interface SearchFormula extends SearchAction { |
||||
/** |
||||
* 获取公式 |
||||
* |
||||
* @param formulaInfos 存储公式信息的列表 |
||||
* @param content ITContent的数据结构 |
||||
*/ |
||||
void searchFormula(ArrayList<FormulaInfo> formulaInfos, ITContent content); |
||||
} |
@ -0,0 +1,34 @@
|
||||
package com.fr.design.actions.replace.action.content.formula.cell; |
||||
|
||||
import com.fr.design.actions.replace.action.content.formula.SearchFormula; |
||||
import com.fr.design.actions.replace.info.FormulaInfo; |
||||
import com.fr.design.actions.replace.info.base.ITContent; |
||||
import com.fr.design.mainframe.JTemplate; |
||||
|
||||
import java.util.ArrayList; |
||||
|
||||
/** |
||||
* 查找单元格中可能存在的公式 |
||||
* |
||||
* @author Destiny.Lin |
||||
* @version 11.0 |
||||
* created by Destiny.Lin on 2022-08-19 |
||||
*/ |
||||
public interface SearchCellFormula extends SearchFormula { |
||||
|
||||
/** |
||||
* 查找单元格可能存在的共有的公式 |
||||
* |
||||
* @param jTemplate 指定搜索模板 |
||||
* @param formulaInfos 要存储对应信息列表的数据结构 |
||||
*/ |
||||
void searchFormulaFromCell(JTemplate jTemplate, ArrayList<FormulaInfo> formulaInfos); |
||||
|
||||
/** |
||||
* 查找不同单元格内容类型各自可能存在的公式 |
||||
* |
||||
* @param formulaInfos |
||||
* @param content |
||||
*/ |
||||
void searchFormulaFromCellType(ArrayList<FormulaInfo> formulaInfos, ITContent content); |
||||
} |
@ -0,0 +1,22 @@
|
||||
package com.fr.design.actions.replace.action.content.formula.data; |
||||
|
||||
import com.fr.design.actions.replace.action.content.formula.SearchFormula; |
||||
import com.fr.design.actions.replace.info.FormulaInfo; |
||||
import com.fr.design.actions.replace.info.base.ITContent; |
||||
import com.fr.design.mainframe.JTemplate; |
||||
|
||||
import java.util.ArrayList; |
||||
|
||||
/** |
||||
* @author Destiny.Lin |
||||
* @version 11.0 |
||||
* created by Destiny.Lin on 2022-08-26 |
||||
*/ |
||||
public interface SearchDataFormula extends SearchFormula { |
||||
/** |
||||
* 从数据集类型中去获取公式 |
||||
* @param jTemplate |
||||
* @param fomulaInfos |
||||
*/ |
||||
void searchFormulaFromData(JTemplate jTemplate, ArrayList<FormulaInfo> fomulaInfos); |
||||
} |
@ -0,0 +1,33 @@
|
||||
package com.fr.design.actions.replace.action.content.formula.floatelement; |
||||
|
||||
import com.fr.design.actions.replace.action.content.formula.SearchFormula; |
||||
import com.fr.design.actions.replace.info.FloatInfo; |
||||
import com.fr.design.actions.replace.info.FormulaInfo; |
||||
import com.fr.design.actions.replace.info.base.ITContent; |
||||
import com.fr.design.mainframe.JTemplate; |
||||
|
||||
import java.util.ArrayList; |
||||
|
||||
/** |
||||
* @author Destiny.Lin |
||||
* @version 11.0 |
||||
* created by Destiny.Lin on 2022-09-12 |
||||
*/ |
||||
public interface SearchFloatFormula extends SearchFormula { |
||||
|
||||
/** |
||||
* 查找悬浮元素可能存在的共有的公式 |
||||
* |
||||
* @param floatInfo FloatInfo信息 |
||||
* @param formulaInfos 要存储对应信息列表的数据结构 |
||||
*/ |
||||
void searchFormulaFromFloat(ArrayList<FormulaInfo> formulaInfos, FloatInfo floatInfo); |
||||
|
||||
/** |
||||
* 查找不同悬浮元素内容类型各自可能存在的公式 |
||||
* |
||||
* @param formulaInfos 要存储对应信息列表的数据结构 |
||||
* @param floatInfo FloatInfo信息 |
||||
*/ |
||||
void searchFormulaFromFloatType(ArrayList<FormulaInfo> formulaInfos, FloatInfo floatInfo); |
||||
} |
@ -0,0 +1,20 @@
|
||||
package com.fr.design.actions.replace.action.content.formula.highlight; |
||||
|
||||
import com.fr.design.actions.replace.action.content.formula.SearchFormula; |
||||
import com.fr.design.actions.replace.info.FormulaInfo; |
||||
import com.fr.design.actions.replace.info.base.ITContent; |
||||
import com.fr.report.cell.cellattr.highlight.HighlightAction; |
||||
|
||||
import java.util.ArrayList; |
||||
|
||||
/** |
||||
* @author Destiny.Lin |
||||
* @version 11.0 |
||||
* created by Destiny.Lin on 2022-08-18 |
||||
*/ |
||||
public interface SearchHighlightFormula extends SearchFormula { |
||||
|
||||
//处理条件属性中各种属性
|
||||
void dealWithHighlightAction(ITContent content, ArrayList<FormulaInfo> formulaInfos, HighlightAction highlightAction); |
||||
|
||||
} |
@ -0,0 +1,23 @@
|
||||
package com.fr.design.actions.replace.action.content.formula.highlight.condition; |
||||
|
||||
import com.fr.design.actions.replace.info.FormulaInfo; |
||||
import com.fr.design.actions.replace.info.base.ITContent; |
||||
|
||||
import com.fr.general.data.Condition; |
||||
|
||||
import java.util.ArrayList; |
||||
|
||||
/** |
||||
* @author Destiny.Lin |
||||
* @version 11.0 |
||||
* created by Destiny.Lin on 2022-08-17 |
||||
*/ |
||||
public interface SearchConditionFormula { |
||||
/** |
||||
* 从条件相关对象中获取公式 |
||||
* @param formulaInfos |
||||
* @param content |
||||
* @param condition |
||||
*/ |
||||
void searchFormulaFromCondition(ArrayList<FormulaInfo> formulaInfos, ITContent content, Condition condition); |
||||
} |
@ -0,0 +1,33 @@
|
||||
package com.fr.design.actions.replace.action.content.formula.highlight.javascript; |
||||
|
||||
import com.fr.design.actions.replace.action.content.formula.SearchFormula; |
||||
import com.fr.design.actions.replace.action.content.formula.highlight.SearchHighlightFormula; |
||||
import com.fr.design.actions.replace.info.FormulaInfo; |
||||
import com.fr.design.actions.replace.info.base.ITContent; |
||||
import com.fr.js.JavaScript; |
||||
|
||||
import java.util.ArrayList; |
||||
|
||||
/** |
||||
* @author Destiny.Lin |
||||
* @version 11.0 |
||||
* created by Destiny.Lin on 2022-08-18 |
||||
*/ |
||||
public interface SearchJSFormula extends SearchHighlightFormula { |
||||
|
||||
/** |
||||
* 对各种类型的JS分别处理,获取各自其他地方的公式 |
||||
* @param formulaInfos |
||||
* @param content |
||||
* @param javaScript |
||||
*/ |
||||
void searchJSFormulaFromOther(ArrayList<FormulaInfo> formulaInfos, ITContent content, JavaScript javaScript); |
||||
|
||||
/** |
||||
* 从超链中的参数获取公式 |
||||
* @param formulaInfos |
||||
* @param content |
||||
* @param javaScript |
||||
*/ |
||||
void addFormulaInfosFromJSPara(ArrayList<FormulaInfo> formulaInfos, ITContent content, JavaScript javaScript); |
||||
} |
@ -0,0 +1,32 @@
|
||||
package com.fr.design.actions.replace.action.content.formula.template; |
||||
|
||||
import com.fr.design.actions.replace.action.content.formula.SearchFormula; |
||||
import com.fr.design.actions.replace.info.FormulaInfo; |
||||
import com.fr.design.actions.replace.info.base.ITContent; |
||||
import com.fr.design.mainframe.JTemplate; |
||||
|
||||
import java.util.ArrayList; |
||||
|
||||
/** |
||||
* @author Destiny.Lin |
||||
* @version 11.0 |
||||
* created by Destiny.Lin on 2022-09-12 |
||||
*/ |
||||
public interface SearchTemplateFormula extends SearchFormula { |
||||
|
||||
/** |
||||
* 搜索全局水印中的公式 |
||||
* @param jTemplate |
||||
* @param formulaInfos |
||||
* @param content |
||||
*/ |
||||
void searchTemplateWaterMarkFormula(JTemplate jTemplate, ArrayList<FormulaInfo> formulaInfos, ITContent content); |
||||
|
||||
/** |
||||
* 搜索全局参数中的公式 |
||||
* @param jTemplate |
||||
* @param formulaInfos |
||||
* @param content |
||||
*/ |
||||
void searchTemplateParaFormula(JTemplate jTemplate, ArrayList<FormulaInfo> formulaInfos, ITContent content); |
||||
} |
@ -0,0 +1,23 @@
|
||||
package com.fr.design.actions.replace.action.content.formula.widget; |
||||
|
||||
import com.fr.data.Dictionary; |
||||
import com.fr.design.actions.replace.info.FormulaInfo; |
||||
import com.fr.design.actions.replace.info.base.ITContent; |
||||
|
||||
import java.util.ArrayList; |
||||
|
||||
/** |
||||
* @author Destiny.Lin |
||||
* @version 11.0 |
||||
* created by Destiny.Lin on 2022-08-22 |
||||
*/ |
||||
public interface DictionaryAction { |
||||
|
||||
/** |
||||
* 从数据字典中获取公式 |
||||
* @param content |
||||
* @param formulaInfos |
||||
* @param dictionary |
||||
*/ |
||||
void searchFormulaFromDictionary(ITContent content, ArrayList<FormulaInfo> formulaInfos, Dictionary dictionary); |
||||
} |
@ -0,0 +1,42 @@
|
||||
package com.fr.design.actions.replace.action.content.formula.widget; |
||||
|
||||
import com.fr.design.actions.replace.action.content.formula.SearchFormula; |
||||
import com.fr.design.actions.replace.info.FormulaInfo; |
||||
import com.fr.design.actions.replace.info.WidgetInfo; |
||||
import com.fr.design.actions.replace.info.base.ITContent; |
||||
import com.fr.form.ui.Widget; |
||||
|
||||
import java.util.ArrayList; |
||||
|
||||
/** |
||||
* @author Destiny.Lin |
||||
* @version 11.0 |
||||
* created by Destiny.Lin on 2022-08-19 |
||||
*/ |
||||
public interface SearchWidgetFormula extends SearchFormula { |
||||
|
||||
/** |
||||
* 从WidgetInfos列表中搜索所有公式 |
||||
* |
||||
* @param widgetInfo 对应的Info信息列表 |
||||
* @param formulaInfos 要存储进去的公式信息列表 |
||||
*/ |
||||
void searchFormulaFromWidgetInfos(WidgetInfo widgetInfo, ArrayList<FormulaInfo> formulaInfos); |
||||
|
||||
/** |
||||
* 从控件的不同类型中获取公式 |
||||
* |
||||
* @param content 对应的ITContent数据结构 |
||||
* @param formulaInfos 要存储进去的公式信息列表 |
||||
*/ |
||||
void searchFormulaFromWidget(ITContent content, ArrayList<FormulaInfo> formulaInfos); |
||||
|
||||
/** |
||||
* 从控件值中获取公式 |
||||
* |
||||
* @param content 对应的ITContent数据结构 |
||||
* @param formulaInfos 要存储进去的公式信息列表 |
||||
*/ |
||||
void searchFormulaFromWidgetValue(ITContent content, ArrayList<FormulaInfo> formulaInfos); |
||||
|
||||
} |
@ -0,0 +1,24 @@
|
||||
package com.fr.design.actions.replace.action.content.widget; |
||||
|
||||
import com.fr.design.actions.replace.info.WidgetInfo; |
||||
import com.fr.design.actions.replace.info.base.ITContent; |
||||
import com.fr.form.ui.Widget; |
||||
import com.fr.form.ui.container.WLayout; |
||||
|
||||
import java.util.ArrayList; |
||||
|
||||
/** |
||||
* @author Destiny.Lin |
||||
* @version 11.0 |
||||
* created by Destiny.Lin on 2022-08-29 |
||||
*/ |
||||
public interface SearchFrmWidget { |
||||
|
||||
/** |
||||
* 将决策报表的控件加入数组中 |
||||
* @param content ITContent信息 |
||||
* @param widget 对应的控件 |
||||
* @return |
||||
*/ |
||||
ArrayList<WidgetInfo> addFrmWidget2Array(ITContent content, Widget widget); |
||||
} |
@ -0,0 +1,45 @@
|
||||
package com.fr.design.actions.replace.info; |
||||
|
||||
import com.fr.design.actions.replace.info.base.ITContent; |
||||
import javafx.util.Pair; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.HashMap; |
||||
|
||||
/** |
||||
* 处理信息 |
||||
* |
||||
* @author Destiny.Lin |
||||
* @version 11.0 |
||||
* created by Destiny.Lin on 2022-08-23 |
||||
*/ |
||||
public interface DealWithInfoValue { |
||||
|
||||
/** |
||||
* 获取存储的值 |
||||
* |
||||
* @param o 用于替换的replaceObject |
||||
* @return 返回便于处理的HashMap(不同类型可能会存在多个需要存储的数据,eg:控件名 & 水印) |
||||
*/ |
||||
HashMap<String, String> getValue(Object... o); |
||||
|
||||
|
||||
/** |
||||
* 替换时调用的方法,设置值 |
||||
* |
||||
* @param info 用于获取值和设置值 |
||||
* @param findStr 要被替换的字符串 |
||||
* @param replaceStr 用于替换的字符串 |
||||
* @param operatorArray 存储内容类替换所要操作的所有位置(Pair<起始位置,结束位置>) |
||||
*/ |
||||
void setValue(Info info, String findStr, String replaceStr, ArrayList<Pair<Integer, Integer>> operatorArray); |
||||
|
||||
|
||||
/** |
||||
* 获取用于展示给用户的值 |
||||
* |
||||
* @param info 信息 |
||||
* @return 返回用于展示的字符串 |
||||
*/ |
||||
String getInfoShowStr(Info info); |
||||
} |
@ -0,0 +1,39 @@
|
||||
package com.fr.design.actions.replace.info; |
||||
|
||||
import com.fr.design.actions.replace.info.base.ITContent; |
||||
import com.fr.stable.StringUtils; |
||||
|
||||
|
||||
/** |
||||
* @author Destiny.Lin |
||||
* @version 11.0 |
||||
* created by Destiny.Lin on 2022-08-17 |
||||
*/ |
||||
public interface Info extends DealWithInfoValue{ |
||||
|
||||
/** |
||||
* 获取ITContent |
||||
* @return |
||||
*/ |
||||
ITContent getContent(); |
||||
|
||||
|
||||
/** |
||||
* 更新旧值 |
||||
* @param oldShowStr |
||||
* @param lastSearchStr |
||||
*/ |
||||
default void updateOldStr(String oldShowStr, String lastSearchStr){ |
||||
this.getContent().setOldShowStr(oldShowStr); |
||||
this.getContent().setLastSearchStr(lastSearchStr); |
||||
} |
||||
|
||||
/** |
||||
* 校验正确性(是否被修改) |
||||
* @return |
||||
*/ |
||||
default Boolean checkValid(){ |
||||
//todo 完善所有类型的校验
|
||||
return true; |
||||
}; |
||||
} |
Loading…
Reference in new issue