报表预览按需计算sheet内容。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.4 KiB

package com.fr.plugin.lazy.sheet;
import com.fr.general.Inter;
import com.fr.main.impl.WorkBook;
import com.fr.main.workbook.ResultWorkBook;
import com.fr.plugin.ExtraClassManager;
import com.fr.stable.ViewActor;
import com.fr.stable.fun.FunctionHelper;
import com.fr.stable.fun.FunctionProcessor;
import com.fr.stable.fun.impl.AbstractFunctionProcessor;
import java.util.Map;
/**
* Created by richie on 15/7/17.
*/
public class LazySheetActor extends ViewActor {
private static final FunctionProcessor PPP = new AbstractFunctionProcessor() {
@Override
public int getId() {
return FunctionHelper.generateFunctionID(LazyConstants.PLUGIN_ID);
}
@Override
public String getLocaleKey() {
return Inter.getLocText("Plugin-Lazy_Load_Sheet");
}
};
@Override
public ResultWorkBook executeWorkBook(WorkBook workBook, Map parameterMap, int sheetIndex) {
if (parameterMap.containsKey("__lazy__")) {
FunctionProcessor processor = ExtraClassManager.getInstance().getFunctionProcessor();
if (processor != null) {
processor.recordFunction(PPP);
}
return new LazySheetWorkBookExecutor(workBook, parameterMap, sheetIndex).execute();
} else {
return super.executeWorkBook(workBook, parameterMap, sheetIndex);
}
}
}