} else if (verifier.isPicture(path)) {
AlphalinePanel viewer = new AlphalinePanel();
viewer.setFile(file);
dialog.add(viewer);
} else if (verifier.isPDF(path)) {
SwingController controller = new SwingController();
SwingViewBuilder factory = new SwingViewBuilder(controller);
JPanel viewerComponentPanel = factory.buildViewerPanel();
// add copy keyboard command
ComponentKeyBinding.install(controller, viewerComponentPanel);
// add interactive mouse link annotation support via callback
controller.getDocumentViewController().setAnnotationCallback(
new org.icepdf.ri.common.MyAnnotationCallback(
controller.getDocumentViewController()));
dialog.add(viewerComponentPanel);
controller.openDocument(path);
}
Dimension size = getFullScreen();
dialog.setSize(size);
dialog.setVisible(true);
}