Search in sources :

Example 1 with DataJTable

use of teamdash.wbs.DataJTable in project processdash by dtuma.

the class SaveAsExcelAction method writeData.

private void writeData(File f) {
    DataJTable dataTable = getDataJTable();
    WBSTabPanel tabPanel = getWBSTabPanel();
    WBSExcelWriter writer = new WBSExcelWriter(dataTable);
    LinkedHashMap<String, TableColumnModel> tabs = tabPanel.getTabData();
    for (Map.Entry<String, TableColumnModel> e : tabs.entrySet()) {
        writer.addData(e.getKey(), e.getValue());
    }
    try {
        writer.save(f);
    } catch (IOException ioe) {
        Object message = resources.formatStrings("Error.Message_FMT", f.getAbsolutePath());
        JOptionPane.showMessageDialog(tabPanel, message, resources.getString("Error.Title"), JOptionPane.ERROR_MESSAGE);
    }
}
Also used : WBSTabPanel(teamdash.wbs.WBSTabPanel) DataJTable(teamdash.wbs.DataJTable) TableColumnModel(javax.swing.table.TableColumnModel) IOException(java.io.IOException) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map)

Aggregations

IOException (java.io.IOException)1 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1 TableColumnModel (javax.swing.table.TableColumnModel)1 DataJTable (teamdash.wbs.DataJTable)1 WBSTabPanel (teamdash.wbs.WBSTabPanel)1