|
|
|
@ -22,6 +22,7 @@ import com.fr.report.cell.DefaultTemplateCellElement;
|
|
|
|
|
import java.util.Iterator; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.concurrent.ConcurrentHashMap; |
|
|
|
|
import java.util.concurrent.atomic.AtomicInteger; |
|
|
|
|
import java.util.regex.Matcher; |
|
|
|
|
import java.util.regex.Pattern; |
|
|
|
|
|
|
|
|
@ -62,12 +63,12 @@ public class JFormProcessInfo extends TemplateProcessInfo<Form> {
|
|
|
|
|
|
|
|
|
|
// 获取模板控件数
|
|
|
|
|
public int getWidgetCount() { |
|
|
|
|
final int[] widgetCount = {0}; |
|
|
|
|
final AtomicInteger widgetCount = new AtomicInteger(); |
|
|
|
|
Form.traversalWidget(this.template.getContainer(), new WidgetGather() { |
|
|
|
|
@Override |
|
|
|
|
public void dealWith(Widget widget) { |
|
|
|
|
if (ComponentOperate.ComponentType.supportComponent(widget)) { |
|
|
|
|
widgetCount[0]++; |
|
|
|
|
widgetCount.incrementAndGet(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -76,7 +77,7 @@ public class JFormProcessInfo extends TemplateProcessInfo<Form> {
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
}, null); |
|
|
|
|
return widgetCount[0]; |
|
|
|
|
return widgetCount.get(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|