Revision 9212
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/Print.java | ||
---|---|---|
94 | 94 |
* @see com.iver.andami.plugins.IExtension#execute(java.lang.String) |
95 | 95 |
*/ |
96 | 96 |
public void execute(String s) { |
97 |
doPrint((Layout) PluginServices.getMDIManager().getActiveWindow()); |
|
98 |
/* |
|
97 | 99 |
l = (Layout) PluginServices.getMDIManager().getActiveWindow(); |
98 | 100 |
|
99 | 101 |
//PageFormat format = printerJob.defaultPage(); //new PageFormat(); |
... | ... | |
116 | 118 |
System.out.println("Excepci?n al abrir el di?logo de impresi?n: " + |
117 | 119 |
e); |
118 | 120 |
} |
121 |
*/ |
|
119 | 122 |
} |
123 |
|
|
124 |
public void doPrint(Layout layout) { |
|
125 |
l = layout; |
|
126 |
try { |
|
127 |
PluginServices.backgroundExecution(new Runnable() { |
|
128 |
public void run() { |
|
129 |
if (l.getAtributes().getType() == Attributes.CUSTOM) { |
|
130 |
l.showPrintDialog(printerJob); |
|
131 |
} else { |
|
132 |
l.showPrintDialog(null); |
|
133 |
} |
|
134 |
} |
|
135 |
}); |
|
136 |
|
|
137 |
//Thread.sleep(10000); |
|
138 |
} catch (Exception e) { |
|
139 |
System.out.println("Excepci?n al abrir el di?logo de impresi?n: " + |
|
140 |
e); |
|
141 |
} |
|
142 |
} |
|
143 |
|
|
120 | 144 |
public void setLayout(Layout l){ |
121 | 145 |
this.l=l; |
122 | 146 |
} |
Also available in: Unified diff