//
// Initialization
//
final AboutDialog initDialog = new AboutDialog();
final JProgressBar pb = new JProgressBar(0, 3);
initDialog.getContentPane().add("South", pb);
// Work around pack() bug on some platforms
Dimension ss = initDialog.getToolkit().getScreenSize();
Dimension ds = initDialog.getPreferredSize();
initDialog.setLocation((ss.width - ds.width) / 2,
(ss.height - ds.height) / 2);
initDialog.setSize(ds);
initDialog.setVisible(true);
final JSVGViewerFrame v = new JSVGViewerFrame(this);
JSVGCanvas c = v.getJSVGCanvas();
c.addSVGDocumentLoaderListener(new SVGDocumentLoaderAdapter() {
public void documentLoadingStarted(SVGDocumentLoaderEvent e) {
pb.setValue(1);
}
public void documentLoadingCompleted(SVGDocumentLoaderEvent e) {
pb.setValue(2);
}
});
c.addGVTTreeBuilderListener(new GVTTreeBuilderAdapter() {
public void gvtBuildCompleted(GVTTreeBuilderEvent e) {
pb.setValue(3);
}
});
c.addGVTTreeRendererListener(new GVTTreeRendererAdapter() {
public void gvtRenderingCompleted(GVTTreeRendererEvent e) {
initDialog.dispose();