Revision 31496 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/extension/Print.java
Print.java | ||
---|---|---|
73 | 73 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
74 | 74 |
import org.gvsig.app.project.documents.layout.Attributes; |
75 | 75 |
import org.gvsig.app.project.documents.layout.FLayoutUtilities; |
76 |
import org.gvsig.app.project.documents.layout.gui.Layout; |
|
76 |
import org.gvsig.app.project.documents.layout.gui.LayoutPanel;
|
|
77 | 77 |
|
78 | 78 |
|
79 | 79 |
|
... | ... | |
84 | 84 |
*/ |
85 | 85 |
public class Print extends Extension implements Printable { |
86 | 86 |
public static PrinterJob printerJob = PrinterJob.getPrinterJob(); |
87 |
private static Layout l = null; |
|
87 |
private static LayoutPanel l = null;
|
|
88 | 88 |
//private Paper paper; |
89 | 89 |
Rectangle2D.Double aux = null; |
90 | 90 |
private int veces = 0; |
... | ... | |
92 | 92 |
private PrintService m_cachePrintService = null; |
93 | 93 |
|
94 | 94 |
public void execute(String s) { |
95 |
doPrint((Layout) PluginServices.getMDIManager().getActiveWindow()); |
|
95 |
doPrint((LayoutPanel) PluginServices.getMDIManager().getActiveWindow());
|
|
96 | 96 |
} |
97 | 97 |
|
98 |
public void doPrint(Layout layout) { |
|
98 |
public void doPrint(LayoutPanel layout) {
|
|
99 | 99 |
l = layout; |
100 | 100 |
try { |
101 | 101 |
PluginServices.backgroundExecution(new Runnable() { |
... | ... | |
114 | 114 |
} |
115 | 115 |
} |
116 | 116 |
|
117 |
public void setLayout(Layout l){ |
|
117 |
public void setLayout(LayoutPanel l){
|
|
118 | 118 |
this.l=l; |
119 | 119 |
} |
120 | 120 |
|
... | ... | |
134 | 134 |
return false; |
135 | 135 |
} |
136 | 136 |
|
137 |
return (f instanceof Layout); |
|
137 |
return (f instanceof LayoutPanel);
|
|
138 | 138 |
} |
139 | 139 |
|
140 | 140 |
public boolean isEnabled() { |
141 |
Layout f = (Layout) PluginServices.getMDIManager().getActiveWindow();
|
|
141 |
LayoutPanel f = (LayoutPanel) PluginServices.getMDIManager().getActiveWindow();
|
|
142 | 142 |
|
143 | 143 |
if (f == null) { |
144 | 144 |
return false; |
... | ... | |
215 | 215 |
* |
216 | 216 |
* @param layout Layout a imprimir. |
217 | 217 |
*/ |
218 |
public void OpenDialogToPrint(Layout layout) { |
|
218 |
public void OpenDialogToPrint(LayoutPanel layout) {
|
|
219 | 219 |
l = layout; |
220 | 220 |
|
221 | 221 |
try { |
... | ... | |
236 | 236 |
* |
237 | 237 |
* @param layout Layout a imprimir. |
238 | 238 |
*/ |
239 |
public void printLayout(Layout layout) { |
|
239 |
public void printLayout(LayoutPanel layout) {
|
|
240 | 240 |
l = layout; |
241 | 241 |
|
242 | 242 |
try { |
Also available in: Unified diff