use of com.mitchellbosecke.pebble.error.PebbleException in project symja_android_library by axkr.
the class BarTrace 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.error.PebbleException in project symja_android_library by axkr.
the class ContourTrace 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());
} catch (PebbleException e) {
throw new IllegalStateException(e);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
return writer.toString();
}
use of com.mitchellbosecke.pebble.error.PebbleException in project symja_android_library by axkr.
the class Histogram2DTrace 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.error.PebbleException in project symja_android_library by axkr.
the class PieTrace method asJavascript.
@Override
public String asJavascript(int i) {
Writer writer = new StringWriter();
PebbleTemplate compiledTemplate;
try {
compiledTemplate = engine.getTemplate("pie_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.error.PebbleException in project symja_android_library by axkr.
the class Figure method asJavascript.
public String asJavascript(String divName) {
Writer writer = new StringWriter();
PebbleTemplate compiledTemplate;
buildContext(divName);
try {
compiledTemplate = engine.getTemplate("figure_template.html");
compiledTemplate.evaluate(writer, getContext());
} catch (PebbleException e) {
throw new IllegalStateException(e);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
return writer.toString();
}
Aggregations