de.tsl2.nano.h5.annotation.CSheetAnnotationFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tsl2.nano.h5 Show documentation
Show all versions of tsl2.nano.h5 Show documentation
TSL2 Framework Html5 Extensions (WebServer, Html5Presentation, RuleCover, BeanConfigurator, LogicTable-Sheet, Expression-Descriptors for Actions, Rules, URLs, Queries)
package de.tsl2.nano.h5.annotation;
import de.tsl2.nano.annotation.extension.AnnotationFactory;
import de.tsl2.nano.bean.def.BeanDefinition;
@SuppressWarnings({"rawtypes" })
public class CSheetAnnotationFactory implements AnnotationFactory {
@Override
public void build(BeanDefinition instance, CSheet a) {
de.tsl2.nano.h5.collector.CSheet sheet = new de.tsl2.nano.h5.collector.CSheet(a.title(), a.cols(), a.rows());
CCell c;
for (int i = 0; i < a.cells().length; i++) {
c = a.cells()[i];
sheet.set(c.row(), c.col(), c.value());
}
sheet.save();
}
}