Revision 59
trunk/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app.mainplugin/src/main/java/org/gvsig/app/extension/Print.java | ||
---|---|---|
42 | 42 |
import javax.print.event.PrintJobAdapter; |
43 | 43 |
import javax.print.event.PrintJobEvent; |
44 | 44 |
import javax.print.event.PrintJobListener; |
45 |
import javax.swing.JOptionPane; |
|
45 | 46 |
|
47 |
import org.slf4j.Logger; |
|
48 |
import org.slf4j.LoggerFactory; |
|
49 |
|
|
46 | 50 |
import org.gvsig.andami.IconThemeHelper; |
47 | 51 |
import org.gvsig.andami.PluginServices; |
48 | 52 |
import org.gvsig.andami.plugins.Extension; |
49 | 53 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
54 |
import org.gvsig.app.ApplicationLocator; |
|
50 | 55 |
import org.gvsig.app.project.documents.layout.Attributes; |
51 | 56 |
import org.gvsig.app.project.documents.layout.FLayoutUtilities; |
52 | 57 |
import org.gvsig.app.project.documents.layout.gui.LayoutPanel; |
58 |
import org.gvsig.i18n.Messages; |
|
53 | 59 |
|
54 | 60 |
/** |
55 | 61 |
* Extensi?n desde la que se imprime. |
... | ... | |
58 | 64 |
*/ |
59 | 65 |
public class Print extends Extension implements Printable { |
60 | 66 |
|
67 |
private static Logger logger = LoggerFactory.getLogger(Print.class); |
|
68 |
|
|
61 | 69 |
public static PrinterJob printerJob = PrinterJob.getPrinterJob(); |
62 | 70 |
|
63 | 71 |
// private Paper paper; |
... | ... | |
90 | 98 |
}); |
91 | 99 |
|
92 | 100 |
} catch (Exception e) { |
93 |
System.out.println("Excepci?n al abrir el di?logo de impresi?n: " |
|
94 |
+ e); |
|
101 |
|
|
102 |
logger.info("Error while showing print dialog.", e); |
|
103 |
ApplicationLocator.getManager().messageDialog( |
|
104 |
Messages.getText("_Error_while_showing_print_dialog"), |
|
105 |
Messages.getText("Imprimir"), |
|
106 |
JOptionPane.ERROR_MESSAGE); |
|
95 | 107 |
} |
96 | 108 |
} |
97 |
|
|
109 |
|
|
110 |
public void setLayout(LayoutPanel layoutp){ |
|
111 |
theLayoutPanel = layoutp; |
|
112 |
} |
|
113 |
|
|
114 |
|
|
98 | 115 |
public boolean isVisible() { |
99 | 116 |
IWindow f = PluginServices.getMDIManager().getActiveWindow(); |
100 | 117 |
|
Also available in: Unified diff