Browse Source

Merging in latest from upstream (BA/design:refs/heads/dev)

* commit '04a5cfe32fde95f6415dee744be28bd56dadc229':
  REPORT-414 同步到dev上演示
  测试
  显示依赖jar
  1
  REPORT-364 修改
  异步请求图片
  REPORT-415 填报提交提供多sheet配置
  REPORT-364 之前的process加一下
  REPORT-364 格式修改
  REPORT-585 添加formletName变量说明
  update
  update
  update
  切换bug
  REPORT-364 最初的接口 忘了删了
  REPORT-364 和自适应用的同一个接口处理
  REPORT-364 报表块刷新接口处理
master
xiaoxia 8 years ago
parent
commit
3fba011137
  1. 6
      designer/src/com/fr/design/webattr/EditToolBar.java
  2. 2
      designer_base/src/com/fr/design/constants/KeyWords.java
  3. 5
      designer_base/src/com/fr/design/fun/FormElementCaseEditorProcessor.java
  4. 38
      designer_base/src/com/fr/design/fun/FormElementCaseEditorProvider.java
  5. 51
      designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProvider.java
  6. 3
      designer_base/src/com/fr/design/insert/formula/variable/cn/formletName.txt
  7. 3
      designer_base/src/com/fr/design/insert/formula/variable/en/formletName.txt
  8. 34
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java
  9. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java
  10. 63
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java
  11. 12
      designer_form/build.dev.gradle
  12. 89
      designer_form/build.dev.gradle.bak
  13. 21
      designer_form/src/com/fr/design/designer/creator/XElementCase.java

6
designer/src/com/fr/design/webattr/EditToolBar.java

@ -319,7 +319,7 @@ public class EditToolBar extends BasicPane {
private CardLayout card; private CardLayout card;
private JPanel centerPane; private JPanel centerPane;
private UICheckBox icon, text, pdf, excelP, excelO, excelS, image, word, private UICheckBox icon, text, pdf, excelP, excelO, excelS, image, word,
flashPrint, pdfPrint, appletPrint, serverPrint, isPopup, isVerify, failSubmit; flashPrint, pdfPrint, appletPrint, serverPrint, isPopup, isVerify, failSubmit, isCurSheet;
private UIBasicSpinner count; private UIBasicSpinner count;
private Widget widget; private Widget widget;
private UITextField nameField; private UITextField nameField;
@ -469,10 +469,12 @@ public class EditToolBar extends BasicPane {
private JPanel getSubmitPane() { private JPanel getSubmitPane() {
isVerify = new UICheckBox(Inter.getLocText("Verify-Data_Verify")); isVerify = new UICheckBox(Inter.getLocText("Verify-Data_Verify"));
failSubmit = new UICheckBox(Inter.getLocText(new String[]{"Verify_Fail", "Still", "Submit"})); failSubmit = new UICheckBox(Inter.getLocText(new String[]{"Verify_Fail", "Still", "Submit"}));
isCurSheet = new UICheckBox(Inter.getLocText("FR-Designer-Basic_Only_Submit_Current_Sheet"));
JPanel submitPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); JPanel submitPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
submitPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText(new String[]{"Form-Button", "Property", "Set"}), null)); submitPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText(new String[]{"Form-Button", "Property", "Set"}), null));
submitPane.add(isVerify); submitPane.add(isVerify);
submitPane.add(failSubmit); submitPane.add(failSubmit);
submitPane.add(isCurSheet);
isVerify.addChangeListener(changeListener); isVerify.addChangeListener(changeListener);
return submitPane; return submitPane;
} }
@ -562,6 +564,7 @@ public class EditToolBar extends BasicPane {
Submit submit = ((Submit) widget); Submit submit = ((Submit) widget);
this.isVerify.setSelected(submit.isVerify()); this.isVerify.setSelected(submit.isVerify());
this.failSubmit.setSelected(submit.isFailVerifySubmit()); this.failSubmit.setSelected(submit.isFailVerifySubmit());
this.isCurSheet.setSelected(submit.isOnlySubmitSelect());
} }
private void populatePDFPrint(){ private void populatePDFPrint(){
@ -624,6 +627,7 @@ public class EditToolBar extends BasicPane {
Submit submit = ((Submit) widget); Submit submit = ((Submit) widget);
submit.setVerify(this.isVerify.isSelected()); submit.setVerify(this.isVerify.isSelected());
submit.setFailVerifySubmit(this.failSubmit.isSelected()); submit.setFailVerifySubmit(this.failSubmit.isSelected());
submit.setOnlySubmitSelect(this.isCurSheet.isSelected());
} }
private void updatePrint(){ private void updatePrint(){

2
designer_base/src/com/fr/design/constants/KeyWords.java

@ -117,6 +117,8 @@ public class KeyWords {
"verifyReport()", "verifyReport()",
"writeReportIgnoreVerify(true)", "writeReportIgnoreVerify(true)",
"writeReport(index)", "writeReport(index)",
"loadSheetByIndex(index)",
"loadSheetByName(sheetName)",
// curLGP // curLGP
"currentTDCell", "currentTDCell",

5
designer_base/src/com/fr/design/fun/FormElementCaseEditorProcessor.java

@ -6,10 +6,9 @@ import com.fr.stable.fun.mark.Immutable;
import java.beans.PropertyDescriptor; import java.beans.PropertyDescriptor;
/** /**
* Created by zhouping on 2015/9/10. * Created by Slpire on 2016/10/28.
*/ */
public interface FormElementCaseEditorProcessor extends Immutable { public interface FormElementCaseEditorProcessor extends Immutable {
String MARK_STRING = "PropertyEditor"; String MARK_STRING = "PropertyEditor";
int CURRENT_LEVEL = 1; int CURRENT_LEVEL = 1;
@ -29,6 +28,4 @@ public interface FormElementCaseEditorProcessor extends Immutable {
* @return 返回pc自适应属性值 * @return 返回pc自适应属性值
*/ */
int getFitStateInPC(ReportFitAttrProvider fitAttrProvider); int getFitStateInPC(ReportFitAttrProvider fitAttrProvider);
} }

38
designer_base/src/com/fr/design/fun/FormElementCaseEditorProvider.java

@ -0,0 +1,38 @@
package com.fr.design.fun;
import com.fr.form.ui.ElementCaseEditor;
import com.fr.stable.fun.ReportFitAttrProvider;
import com.fr.form.main.Form;
import com.fr.stable.fun.mark.Mutable;
import java.beans.PropertyDescriptor;
/**
* Created by zhouping on 2015/9/10.
*/
public interface FormElementCaseEditorProvider extends Mutable {
String MARK_STRING = "PropertyEditor";
int CURRENT_LEVEL = 1;
//加个provider返回tab的接口
//design_base依赖了form
PropertyDescriptor[] createPropertyDescriptor (Class<?> temp, Form form, ElementCaseEditor editor);
/**
* 生成属性表
* @param temp 传入当前操作的class
* @param reportFitAttr 传入的自适应属性
* @return 返回属性表
*/
PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, ReportFitAttrProvider reportFitAttr);
/**
* 返回pc自适应属性值
* @param fitAttrProvider 传入的自适应属性
* @return 返回pc自适应属性值
*/
int getFitStateInPC(ReportFitAttrProvider fitAttrProvider);
}

51
designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProvider.java

@ -0,0 +1,51 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.FormElementCaseEditorProvider;
import com.fr.form.main.Form;
import com.fr.form.ui.ElementCaseEditor;
import com.fr.stable.fun.ReportFitAttrProvider;
import com.fr.stable.fun.mark.API;
import java.beans.PropertyDescriptor;
/**
* Created by zhouping on 2015/9/10.
*/
@API(level = FormElementCaseEditorProvider.CURRENT_LEVEL)
public abstract class AbstractFormElementCaseEditorProvider implements FormElementCaseEditorProvider {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return this.getClass().getName();
}
@Override
public PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, Form reportAttr, ElementCaseEditor editor) {
return new PropertyDescriptor[0];
}
/**
* 生成属性表
* @param temp 传入当前操作的class
* @param reportFitAttr 传入的自适应属性
* @return 返回属性表
*/
@Override
public PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, ReportFitAttrProvider reportFitAttr) {
return new PropertyDescriptor[0];
}
/**
* 返回pc自适应属性值
* @param fitAttrProvider 传入的自适应属性
* @return 返回pc自适应属性值
*/
@Override
public int getFitStateInPC(ReportFitAttrProvider fitAttrProvider) {
return 0;
}
}

3
designer_base/src/com/fr/design/insert/formula/variable/cn/formletName.txt

@ -0,0 +1,3 @@
表单名字
假如访问:http://localhost:8080/WebReport/ReportServer?formlet=Form1.frm,
formName就是Form1.frm

3
designer_base/src/com/fr/design/insert/formula/variable/en/formletName.txt

@ -0,0 +1,3 @@
form name
http://localhost:8080/WebReport/ReportServer?formlet=Form1.frm£¬
formName is Form1.frm

34
designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java

@ -87,6 +87,20 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames();
ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; ChartWidgetOption[] child = new ChartWidgetOption[typeName.length];
//异步加载
new Thread(new Runnable() {
@Override
public void run() {
getWidgetOption(typeName, child);
}
}).start();
return child;
}
private static void getWidgetOption(ChartInternationalNameContentBean[] typeName, ChartWidgetOption[] child){
for (int i = 0; i < typeName.length; i++) { for (int i = 0; i < typeName.length; i++) {
String plotID = typeName[i].getPlotID(); String plotID = typeName[i].getPlotID();
Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID);
@ -94,14 +108,15 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
continue; continue;
} }
//初始化图表模型图片 //加载初始化图表模型图片
initChartsDemoImage(rowChart); initChartsDemoImage(rowChart);
String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID); String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID);
Icon icon = IOUtils.readIcon(iconPath); Icon icon = IOUtils.readIcon(iconPath);
child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]); child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]);
} }
return child;
DesignModuleFactory.registerExtraWidgetOptions(child);
} }
private static void initChartsDemoImage(Chart[] rowChart) { private static void initChartsDemoImage(Chart[] rowChart) {
@ -249,6 +264,21 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
return new String[0]; return new String[0];
} }
/**
* 获取指定图表的标题
* @param chartID
* @return
*/
public String getTitle4PopupWindow(String chartID, String plotID){
if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(chartID) && chartTypeInterfaces.get(chartID).containsKey(plotID)){
HashMap<String, IndependentChartUIProvider> chartUIList = chartTypeInterfaces.get(chartID);
IndependentChartUIProvider provider = chartTypeInterfaces.get(chartID).get(plotID);
return provider.getPlotTypePane().title4PopupWindow();
}
return new String();
}
private String[] getTitle4PopupWindow(){ private String[] getTitle4PopupWindow(){
int size = 0; int size = 0;
if (chartTypeInterfaces != null){ if (chartTypeInterfaces != null){

4
designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java

@ -158,8 +158,8 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
//获取图表收集器的状态 //获取图表收集器的状态
private void checkoutChange(){ private void checkoutChange(){
SwitchState state = editingCollection.calculateMultiChartMode(); editingCollection.calculateMultiChartMode();
if (state.isDynamicState() && parent != null){ if (parent != null){
parent.reactorChartTypePane(editingCollection); parent.reactorChartTypePane(editingCollection);
} }
//检查是否可以配置切换 //检查是否可以配置切换

63
designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java

@ -8,6 +8,7 @@ import com.fr.chart.chartattr.SwitchState;
import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chart.fun.IndependentChartUIProvider;
import com.fr.design.dialog.BasicScrollPane; import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
@ -37,6 +38,30 @@ public class ChartTypePane extends AbstractChartAttrPane{
private ChartTypeButtonPane buttonPane; private ChartTypeButtonPane buttonPane;
private ChartEditPane editPane; private ChartEditPane editPane;
private ChartCollection editingCollection; private ChartCollection editingCollection;
private PaneState paneState = new PaneState();
private class PaneState{
//记录面板所处状态
private SwitchState paneState = SwitchState.DEFAULT;
//记录当前面板是谁在使用切换状态
private String chartID = StringUtils.EMPTY;
public SwitchState getPaneState() {
return paneState;
}
public void setPaneState(SwitchState paneState) {
this.paneState = paneState;
}
public String getChartID() {
return chartID;
}
public void setChartID(String chartID) {
this.chartID = chartID;
}
}
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
@ -161,8 +186,6 @@ public class ChartTypePane extends AbstractChartAttrPane{
} }
public void reactor(ChartCollection collection){ public void reactor(ChartCollection collection){
//重构前存储所选择的下拉选项
Object item = jcb.getSelectedItem();
//重构需要重构下拉框选项和cardNames //重构需要重构下拉框选项和cardNames
Chart chart = collection.getSelectedChart(); Chart chart = collection.getSelectedChart();
String chartID = chart.getChartID(); String chartID = chart.getChartID();
@ -172,14 +195,28 @@ public class ChartTypePane extends AbstractChartAttrPane{
//第一步就是重构cardNames //第一步就是重构cardNames
cardNames = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID); cardNames = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID);
//重构下拉框选项 //重构下拉框选项
reactorComboBox();
//重新选择选中的下拉项
chartID = chart.getChartID();
String plotID = chart.getPlot().getPlotID();
Object item = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID, plotID);
jcb.setSelectedItem(item);
//重新选中
checkPlotPane();
}
private void checkPlotPane() {
CardLayout cl = (CardLayout)cardPane.getLayout();
cl.show(cardPane, cardNames[jcb.getSelectedIndex()]);
}
private void reactorComboBox() {
FlexibleComboBox fcb = (FlexibleComboBox)jcb; FlexibleComboBox fcb = (FlexibleComboBox)jcb;
fcb.setItemEvenType(ItemEventType.REACTOR); fcb.setItemEvenType(ItemEventType.REACTOR);
fcb.removeAllItems(); fcb.removeAllItems();
for (int i = 0; i < this.cardNames.length; i++) { for (int i = 0; i < this.cardNames.length; i++) {
fcb.addItem(cardNames[i]); fcb.addItem(cardNames[i]);
} }
//重新选择选中的下拉项
jcb.setSelectedItem(item);
fcb.setItemEvenType(ItemEventType.DEFAULT); fcb.setItemEvenType(ItemEventType.DEFAULT);
} }
@ -220,7 +257,20 @@ public class ChartTypePane extends AbstractChartAttrPane{
public void reactorChartTypePane(ChartCollection collection){ public void reactorChartTypePane(ChartCollection collection){
chartTypePane.reactor(collection); if (needReactor(collection)) {
chartTypePane.reactor(collection);
//设置面板切换状态
updatePaneState(collection);
}
}
private void updatePaneState(ChartCollection collection) {
paneState.setChartID(collection.getRepresentChartID());
paneState.setPaneState(collection.getState());
}
private boolean needReactor(ChartCollection collection) {
return paneState.getChartID() != collection.getRepresentChartID() || paneState.getPaneState() != collection.getState();
} }
/** /**
@ -228,9 +278,8 @@ public class ChartTypePane extends AbstractChartAttrPane{
*/ */
public void populate(ChartCollection collection) { public void populate(ChartCollection collection) {
Chart chart = collection.getSelectedChart(); Chart chart = collection.getSelectedChart();
chartTypePane.populateBean(chart);
buttonPane.populateBean(collection); buttonPane.populateBean(collection);
chartTypePane.populateBean(chart);
} }
/** /**

12
designer_form/build.dev.gradle

@ -30,11 +30,17 @@ FileTree files =fileTree(dir:'./',include:'build.*.gradle')
def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\'))
buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\'))
def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1)
//jar包
FileTree f=fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar")
f.each{File file->
println "----${file.path}"
}
// //
dependencies{ dependencies{
compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar') compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar')
compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar")
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
} }

89
designer_form/build.dev.gradle.bak

@ -0,0 +1,89 @@
apply plugin: 'java'
tasks.withType(JavaCompile){
options.encoding = 'UTF-8'
}
//jdk版本
sourceCompatibility=1.8
//jar包版本
version='8.0'
def srcDir="."
//jar包的名字
jar{
baseName='fr-designer-report'
}
//
sourceSets{
main{
java{
srcDirs=["${srcDir}/src",
"${srcDir}/../designer/src"]
}
}
}
//
FileTree files =fileTree(dir:'./',include:'build.*.gradle')
def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\'))
buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\'))
def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1)
//jar包
FileTree f=fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar")
f.each{File file->
println "----${f.path}"
}
//
dependencies{
compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar')
compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar")
testCompile 'junit:junit:4.12'
}
//
def dataContent ={def dir ->
copySpec{
from ("${dir}"){
exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html'
}
}
}
//.java文件复制到classes文件夹下
task copyFile(type:Copy,dependsOn:compileJava){
copy{
with dataContent.call("${srcDir}/src")
with dataContent.call("${srcDir}/../designer/src")
into ('build/classes/main')
}
}
//js文件
task compressJS{
ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){
classpath {
fileset(dir:'../../../finereport-lib4build-stable',includes:'**/*.jar')
}
}
ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false", charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){
fileset (dir:"${srcDir}/src"){
include (name:'**/*.js')
include (name:'**/*.css')
}
fileset (dir:"${srcDir}/../designer/src"){
include (name:'**/*.js')
include (name:'**/*.css')
}
}
}
jar.dependsOn compressJS

21
designer_form/src/com/fr/design/designer/creator/XElementCase.java

@ -5,7 +5,9 @@ import com.fr.design.ExtraDesignClassManager;
import com.fr.design.designer.properties.mobile.ElementCasePropertyUI; import com.fr.design.designer.properties.mobile.ElementCasePropertyUI;
import com.fr.design.form.util.XCreatorConstants; import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.fun.FormElementCaseEditorProcessor; import com.fr.design.fun.FormElementCaseEditorProcessor;
import com.fr.design.fun.FormElementCaseEditorProvider;
import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.design.fun.impl.AbstractFormElementCaseEditorProvider;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.CoverReportPane; import com.fr.design.mainframe.CoverReportPane;
import com.fr.design.mainframe.EditingMouseListener; import com.fr.design.mainframe.EditingMouseListener;
@ -23,6 +25,7 @@ import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.CoreGraphHelper; import com.fr.stable.CoreGraphHelper;
import com.fr.stable.core.PropertyChangeAdapter; import com.fr.stable.core.PropertyChangeAdapter;
import com.fr.form.main.Form;
import com.fr.stable.fun.FitProvider; import com.fr.stable.fun.FitProvider;
import com.fr.stable.fun.ReportFitAttrProvider; import com.fr.stable.fun.ReportFitAttrProvider;
@ -32,6 +35,7 @@ import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.beans.IntrospectionException; import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor; import java.beans.PropertyDescriptor;
import java.util.Set;
public class XElementCase extends XBorderStyleWidgetCreator implements FormElementCaseContainerProvider{ public class XElementCase extends XBorderStyleWidgetCreator implements FormElementCaseContainerProvider{
private UILabel imageLable; private UILabel imageLable;
@ -97,9 +101,20 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
new CRPropertyDescriptor("showToolBar", this.data.getClass()).setEditorClass(BooleanEditor.class) new CRPropertyDescriptor("showToolBar", this.data.getClass()).setEditorClass(BooleanEditor.class)
.setI18NName(Inter.getLocText("Form-EC_toolbar")) .setI18NName(Inter.getLocText("Form-EC_toolbar"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
}; };
//这边有个插件兼容问题,之后还是要改回process才行
Set<FormElementCaseEditorProvider> set = ExtraDesignClassManager.getInstance().getArray(AbstractFormElementCaseEditorProvider.MARK_STRING);
for (FormElementCaseEditorProvider provider : set) {
if (provider == null) {
continue;
}
this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner();
Form form = designer.getTarget();
PropertyDescriptor[] extraEditor = provider.createPropertyDescriptor(this.data.getClass(), form, this.toData());
propertyTableEditor = (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor);
}
FormElementCaseEditorProcessor processor = ExtraDesignClassManager.getInstance().getSingle(FormElementCaseEditorProcessor.MARK_STRING); FormElementCaseEditorProcessor processor = ExtraDesignClassManager.getInstance().getSingle(FormElementCaseEditorProcessor.MARK_STRING);
if (processor == null) { if (processor == null) {
return propertyTableEditor; return propertyTableEditor;
@ -114,11 +129,11 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
} }
ReportFitAttrProvider reportFitAttr = editor.getReportFitAttr() == null ? fitAttr : editor.getReportFitAttr(); ReportFitAttrProvider reportFitAttr = editor.getReportFitAttr() == null ? fitAttr : editor.getReportFitAttr();
PropertyDescriptor[] extraEditor = processor.createPropertyDescriptor(this.data.getClass(), reportFitAttr); PropertyDescriptor[] extraEditor = processor.createPropertyDescriptor(this.data.getClass(), reportFitAttr);
if (editor.getReportFitAttr() == null) { if (editor.getReportFitAttr() == null) {
editor.setReportFitInPc(processor.getFitStateInPC(fitAttr)); editor.setReportFitInPc(processor.getFitStateInPC(fitAttr));
} }
return (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor);
return (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor);
} }
@Override @Override

Loading…
Cancel
Save