Revision 25777
branches/v2_0_0_prep/applications/appgvSIG/src/com/iver/cit/gvsig/PrintTable.java | ||
---|---|---|
51 | 51 |
import javax.swing.JTable; |
52 | 52 |
|
53 | 53 |
import org.apache.log4j.Logger; |
54 |
import org.gvsig.fmap.dal.exception.DataException; |
|
54 | 55 |
import org.gvsig.project.document.table.gui.FeatureTableDocumentPanel; |
55 | 56 |
|
56 | 57 |
import com.iver.andami.PluginServices; |
58 |
import com.iver.andami.messages.NotificationManager; |
|
57 | 59 |
import com.iver.andami.plugins.Extension; |
58 | 60 |
import com.iver.andami.ui.mdiManager.IWindow; |
59 | 61 |
|
... | ... | |
88 | 90 |
public void execute(String s) { |
89 | 91 |
if (s.compareTo("PRINTTABLE") == 0){ |
90 | 92 |
IWindow f = PluginServices.getMDIManager().getActiveWindow(); |
91 |
table=((FeatureTableDocumentPanel)f).getTablePanel().getTable(); |
|
93 |
try { |
|
94 |
table=((FeatureTableDocumentPanel)f).getTablePanel().getTable(); |
|
95 |
} catch (DataException e) { |
|
96 |
NotificationManager.showMessageError(PluginServices.getText(this, "print_table_error"), e); |
|
97 |
} |
|
92 | 98 |
PluginServices.backgroundExecution(new Runnable() { |
93 | 99 |
public void run() { |
94 | 100 |
PrinterJob pj=PrinterJob.getPrinterJob(); |
Also available in: Unified diff