Browse Source

REPORT-75998 主要接口、补充菜单插入、闪烁修改

feature/x
Destiny.Lin 2 years ago
parent
commit
0a34ba980a
  1. 23
      designer-realize/src/main/java/com/fr/design/actions/replace/action/SearchAction.java
  2. 30
      designer-realize/src/main/java/com/fr/design/actions/replace/action/ShowValue.java
  3. 23
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/SearchFormula.java
  4. 34
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/cell/SearchCellFormula.java
  5. 22
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/data/SearchDataFormula.java
  6. 33
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/floatelement/SearchFloatFormula.java
  7. 20
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/highlight/SearchHighlightFormula.java
  8. 23
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/highlight/condition/SearchConditionFormula.java
  9. 33
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/highlight/javascript/SearchJSFormula.java
  10. 32
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/template/SearchTemplateFormula.java
  11. 23
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/widget/DictionaryAction.java
  12. 42
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/widget/SearchWidgetFormula.java
  13. 24
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/widget/SearchFrmWidget.java
  14. 45
      designer-realize/src/main/java/com/fr/design/actions/replace/info/DealWithInfoValue.java
  15. 39
      designer-realize/src/main/java/com/fr/design/actions/replace/info/Info.java
  16. 5
      designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java
  17. 2
      designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

23
designer-realize/src/main/java/com/fr/design/actions/replace/action/SearchAction.java

@ -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);
}

30
designer-realize/src/main/java/com/fr/design/actions/replace/action/ShowValue.java

@ -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);
}

23
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/SearchFormula.java

@ -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);
}

34
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/cell/SearchCellFormula.java

@ -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);
}

22
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/data/SearchDataFormula.java

@ -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);
}

33
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/floatelement/SearchFloatFormula.java

@ -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);
}

20
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/highlight/SearchHighlightFormula.java

@ -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);
}

23
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/highlight/condition/SearchConditionFormula.java

@ -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);
}

33
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/highlight/javascript/SearchJSFormula.java

@ -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);
}

32
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/template/SearchTemplateFormula.java

@ -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);
}

23
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/widget/DictionaryAction.java

@ -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);
}

42
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/widget/SearchWidgetFormula.java

@ -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);
}

24
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/widget/SearchFrmWidget.java

@ -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);
}

45
designer-realize/src/main/java/com/fr/design/actions/replace/info/DealWithInfoValue.java

@ -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);
}

39
designer-realize/src/main/java/com/fr/design/actions/replace/info/Info.java

@ -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;
};
}

5
designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe;
import com.fr.base.ScreenResolution;
import com.fr.base.TRL;
import com.fr.design.actions.replace.ui.ITReplaceMainDialog;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.designer.EditingState;
import com.fr.design.event.RemoveListener;
@ -140,8 +141,8 @@ public class ReportComponentComposite extends JComponent implements RemoveListen
Grid grid = centerCardPane.editingComponet.elementCasePane.getGrid();
this.centerCardPane.editingComponet.elementCasePane.getGrid().addMouseWheelListener(new ReportComponentCompositeMouseWheelHandler(this));
if (!grid.hasFocus() && grid.isRequestFocusEnabled()) {
//!ITReplaceMainDialog.isITReplaceFlag()用于解决查找替换面板闪烁问题
if (!grid.hasFocus() && grid.isRequestFocusEnabled() && !ITReplaceMainDialog.isITReplaceFlag()) {
grid.requestFocus();
}
}

2
designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

@ -31,6 +31,7 @@ import com.fr.design.actions.insert.flot.ChartFloatAction;
import com.fr.design.actions.insert.flot.FormulaFloatAction;
import com.fr.design.actions.insert.flot.ImageFloatAction;
import com.fr.design.actions.insert.flot.TextBoxFloatAction;
import com.fr.design.actions.replace.ITReplaceAction;
import com.fr.design.bridge.DesignToolbarProvider;
import com.fr.design.constants.DesignerLaunchStatus;
import com.fr.design.env.DesignerWorkspaceLoader;
@ -466,6 +467,7 @@ public class DesignerActivator extends Activator implements Prepare {
StableFactory.registerMarkedObject(DesignToolbarProvider.STRING_MARKED, WidgetToolBarPane.getInstance());
DesignModuleFactory.registerNewFormActionClass(NewFormAction.class);
DesignModuleFactory.registerReplaceActionClass(ITReplaceAction.class);
DesignModuleFactory.registerFormParaDesignerClass(FormParaDesigner.class);
DesignModuleFactory.registerParaPropertyPaneClass(ParameterPropertyPane.class);
DesignModuleFactory.registerFormHierarchyPaneClass(FormHierarchyTreePane.class);

Loading…
Cancel
Save