|
|
|
@ -1,8 +1,13 @@
|
|
|
|
|
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; |
|
|
|
|
|
|
|
|
@ -11,9 +16,25 @@ import java.util.Map;
|
|
|
|
|
*/ |
|
|
|
|
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); |
|
|
|
|