public static void preview
(final BuCommonImplementation _app, final String _name,
final BuPrintable _composant)
{
if(SwingUtilities.isEventDispatchThread())
{
new Thread(new Runnable()
{
public void run()
{ preview(_app,_name,_composant); }
},"Previewing "+_name).start();
return;
}
final Frame frame =_app.getFrame();
final Image[] images=preview(frame,_name,_composant);
if(images!=null)
{
Runnable runnable=new Runnable()
{
public void run()
{
BuPreviewFrame pf=new BuPreviewFrame
(_app,images,frame,_name,_composant);
_app.addInternalFrame(pf);
_app.activateInternalFrame(pf);
}
};
SwingUtilities.invokeLater(runnable);
}
}