use of com.mitchellbosecke.pebble.template.PebbleTemplate in project symja_android_library by axkr.
the class Scatter3DTrace method asJavascript.
@Override
public String asJavascript(int i) {
Writer writer = new StringWriter();
PebbleTemplate compiledTemplate;
try {
compiledTemplate = engine.getTemplate("trace_template.html");
Map<String, Object> context = getContext(i);
compiledTemplate.evaluate(writer, context);
} catch (PebbleException e) {
throw new IllegalStateException(e);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
return writer.toString();
}
use of com.mitchellbosecke.pebble.template.PebbleTemplate in project symja_android_library by axkr.
the class ScatterTrace method asJavascript.
@Override
public String asJavascript(int i) {
Writer writer = new StringWriter();
PebbleTemplate compiledTemplate;
try {
compiledTemplate = engine.getTemplate("trace_template.html");
Map<String, Object> context = getContext(i);
compiledTemplate.evaluate(writer, context);
} catch (PebbleException e) {
throw new IllegalStateException(e);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
return writer.toString();
}
use of com.mitchellbosecke.pebble.template.PebbleTemplate in project symja_android_library by axkr.
the class ViolinTrace method asJavascript.
@Override
public String asJavascript(int i) {
Writer writer = new StringWriter();
PebbleTemplate compiledTemplate;
try {
compiledTemplate = engine.getTemplate("trace_template.html");
compiledTemplate.evaluate(writer, getContext(i));
} catch (PebbleException e) {
throw new IllegalStateException(e);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
return writer.toString();
}
use of com.mitchellbosecke.pebble.template.PebbleTemplate in project symja_android_library by axkr.
the class Scene method asJavascript.
@Override
public String asJavascript() {
Writer writer = new StringWriter();
PebbleTemplate compiledTemplate;
try {
compiledTemplate = getEngine().getTemplate("scene_template.html");
compiledTemplate.evaluate(writer, getContext());
} catch (PebbleException e) {
throw new IllegalStateException(e);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
return writer.toString();
}
use of com.mitchellbosecke.pebble.template.PebbleTemplate in project symja_android_library by axkr.
the class AbstractTrace method toString.
@Override
public String toString() {
Writer writer = new StringWriter();
PebbleTemplate compiledTemplate;
try {
compiledTemplate = engine.getTemplate("trace_template.html");
compiledTemplate.evaluate(writer, getContext());
} catch (PebbleException e) {
throw new IllegalStateException(e);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
return writer.toString();
}
Aggregations