|
|
@ -10,7 +10,10 @@ import com.fr.form.main.WidgetUtil; |
|
|
|
import com.fr.form.ui.AbstractBorderStyleWidget; |
|
|
|
import com.fr.form.ui.AbstractBorderStyleWidget; |
|
|
|
import com.fr.form.ui.BaseChartEditor; |
|
|
|
import com.fr.form.ui.BaseChartEditor; |
|
|
|
import com.fr.form.ui.CardSwitchButton; |
|
|
|
import com.fr.form.ui.CardSwitchButton; |
|
|
|
|
|
|
|
import com.fr.form.ui.ElementCaseEditor; |
|
|
|
import com.fr.form.ui.ElementCaseEditorProvider; |
|
|
|
import com.fr.form.ui.ElementCaseEditorProvider; |
|
|
|
|
|
|
|
import com.fr.form.ui.LayoutBorderStyle; |
|
|
|
|
|
|
|
import com.fr.form.ui.PaddingMargin; |
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
import com.fr.form.ui.container.WAbsoluteLayout; |
|
|
|
import com.fr.form.ui.container.WAbsoluteLayout; |
|
|
|
import com.fr.form.ui.container.WLayout; |
|
|
|
import com.fr.form.ui.container.WLayout; |
|
|
@ -18,7 +21,6 @@ import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.json.JSONArray; |
|
|
|
import com.fr.json.JSONArray; |
|
|
|
import com.fr.json.JSONObject; |
|
|
|
import com.fr.json.JSONObject; |
|
|
|
import com.fr.report.cell.DefaultTemplateCellElement; |
|
|
|
import com.fr.report.cell.DefaultTemplateCellElement; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.Iterator; |
|
|
|
import java.util.Iterator; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.concurrent.ConcurrentHashMap; |
|
|
|
import java.util.concurrent.ConcurrentHashMap; |
|
|
@ -94,7 +96,18 @@ public class JFormProcessInfo extends TemplateProcessInfo<Form> { |
|
|
|
private boolean hasTestECReport() { |
|
|
|
private boolean hasTestECReport() { |
|
|
|
ElementCaseEditorProvider[] elementCaseEditorProviders = this.template.getElementCases(); |
|
|
|
ElementCaseEditorProvider[] elementCaseEditorProviders = this.template.getElementCases(); |
|
|
|
for (ElementCaseEditorProvider elementCaseEditorProvider : elementCaseEditorProviders) { |
|
|
|
for (ElementCaseEditorProvider elementCaseEditorProvider : elementCaseEditorProviders) { |
|
|
|
|
|
|
|
if (isTestECReport(elementCaseEditorProvider)) { |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean isTestECReport(ElementCaseEditorProvider elementCaseEditorProvider) { |
|
|
|
FormElementCaseProvider elementCase = elementCaseEditorProvider.getElementCase(); |
|
|
|
FormElementCaseProvider elementCase = elementCaseEditorProvider.getElementCase(); |
|
|
|
|
|
|
|
if (!isTestElementCaseEditor((ElementCaseEditor) elementCaseEditorProvider)) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
Iterator it = elementCase.cellIterator(); |
|
|
|
Iterator it = elementCase.cellIterator(); |
|
|
|
if (!it.hasNext()) { |
|
|
|
if (!it.hasNext()) { |
|
|
|
return true; |
|
|
|
return true; |
|
|
@ -102,13 +115,19 @@ public class JFormProcessInfo extends TemplateProcessInfo<Form> { |
|
|
|
while (it.hasNext()) { |
|
|
|
while (it.hasNext()) { |
|
|
|
DefaultTemplateCellElement ce = (DefaultTemplateCellElement) it.next(); |
|
|
|
DefaultTemplateCellElement ce = (DefaultTemplateCellElement) it.next(); |
|
|
|
Object value = ce.getValue(); |
|
|
|
Object value = ce.getValue(); |
|
|
|
if (isTestCell(value, ce.getStyle())) { |
|
|
|
if (!isTestCell(value, ce.getStyle())) { |
|
|
|
return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
private boolean isTestElementCaseEditor(ElementCaseEditor editor) { |
|
|
|
|
|
|
|
return editor.getToolBars().length == 0 && editor.getListenerSize() == 0 |
|
|
|
|
|
|
|
&& ComparatorUtils.equals(editor.getBorderStyle(), new LayoutBorderStyle()) |
|
|
|
|
|
|
|
&& ComparatorUtils.equals(editor.getMargin(), new PaddingMargin()) |
|
|
|
|
|
|
|
&& editor.getBackground() == null; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private boolean hasTestChart() { |
|
|
|
private boolean hasTestChart() { |
|
|
|