use of net.sf.sdedit.ui.components.ZoomPane in project abstools by abstools.
the class MultipageExporter method init.
public void init() throws SyntaxError, SemanticError {
paintDevice = new MultipagePaintDevice(properties, size);
TextHandler th = new TextHandler(source);
new Diagram(configuration, th, paintDevice).generate();
int n = paintDevice.getPanels().size();
setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
int i = 0;
for (MultipagePaintDevice.MultipagePanel panel : paintDevice.getPanels()) {
i++;
JPanel wrap = new JPanel();
wrap.setLayout(new BoxLayout(wrap, BoxLayout.Y_AXIS));
wrap.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));
wrap.setAlignmentY(0.5F);
ZoomPane zoomPane = new ZoomPane(false);
zoomPane.setViewportView(panel);
zoomPane.setScale(scale);
zoomPane.setMinimumSize(previewSize);
zoomPane.setMaximumSize(previewSize);
zoomPane.setPreferredSize(previewSize);
zoomPane.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
wrap.add(zoomPane);
JLabel label = new JLabel(i + "/" + n);
label.setAlignmentX(0.5F);
wrap.add(label);
add(wrap);
}
}