use of net.sf.sdedit.ui.PanelPaintDeviceListener in project abstools by abstools.
the class Tab method renderDiagram.
void renderDiagram() {
PanelPaintDevice paintDevice = new PanelPaintDevice(true);
for (PanelPaintDeviceListener listener : ppdListeners) {
paintDevice.addListener(listener);
}
TextHandler textHandler = new TextHandler(getCode());
Diagram diagram = new Diagram(configuration.getDataObject(), textHandler, paintDevice);
DiagramError newError = null;
try {
diagram.generate();
} catch (RuntimeException e) {
newError = new FatalError(textHandler, e);
} catch (DiagramError e) {
newError = e;
}
synchronized (diagramStack) {
diagramStack.addLast(diagram);
synchronized (this) {
error = newError;
}
}
}
Aggregations