/**
     * Show the export file dialog and export the current selected task graph using the selected
     * <code>FileImportExportDecorator.exportWorkflow</code> method.
     */
public static void exportTaskgraph() {
        final TFileChooser fc = new TFileChooser(EXPORT_TASKGRAPH_DIR);
        final FileImportExportDecorator chooser = new FileImportExportDecorator(fc);
        int result = chooser.showExportDialog(GUIEnv.getApplicationFrame());
        if (result == TFileChooser.APPROVE_OPTION) {
            Thread thread = new Thread() {
                public void run() {
                    TrianaProgressBar pb = null;
                    String filename = "";
                    try {
                        // Bug fix for not picking up file name text.
                        if (fc.getUI() instanceof BasicFileChooserUI) {
                            filename = ((BasicFileChooserUI) fc.getUI()).getFileName();
                        }
                        pb = new TrianaProgressBar("exporting: " + filename, false);
                        chooser.exportWorkflow(GUIEnv.getApplicationFrame().getSelectedTaskGraphPanel().getTaskGraph());
                    } catch (IOException e) {
                        ErrorDialog.show("Error Exporting TaskGraph", e.getMessage());
                        e.printStackTrace();
                    } catch (TaskGraphException e) {
                        ErrorDialog.show("Error Exporting TaskGraph", e.getMessage());
                        e.printStackTrace();
                    } finally {
                        if (pb != null) {
                            pb.disposeProgressBar();
                        }
                    }
                }
            };
            thread.setName("Export Task Graph");
            thread.setPriority(Thread.NORM_PRIORITY);
            thread.start();
        }
    }
public static void exportTaskgraph() {
final TFileChooser fc = new TFileChooser(EXPORT_TASKGRAPH_DIR);
final FileImportExportDecorator chooser = new FileImportExportDecorator(fc);
int result = chooser.showExportDialog(GUIEnv.getApplicationFrame());
if (result == TFileChooser.APPROVE_OPTION) {
Thread thread = new Thread() {
public void run() {
TrianaProgressBar pb = null;
String filename = "";
try {
// Bug fix for not picking up file name text.
if (fc.getUI() instanceof BasicFileChooserUI) {
filename = ((BasicFileChooserUI) fc.getUI()).getFileName();
}
pb = new TrianaProgressBar("exporting: " + filename, false);
chooser.exportWorkflow(GUIEnv.getApplicationFrame().getSelectedTaskGraphPanel().getTaskGraph());
} catch (IOException e) {
ErrorDialog.show("Error Exporting TaskGraph", e.getMessage());
e.printStackTrace();
} catch (TaskGraphException e) {
ErrorDialog.show("Error Exporting TaskGraph", e.getMessage());
e.printStackTrace();
} finally {
if (pb != null) {
pb.disposeProgressBar();
}
}
}
};
thread.setName("Export Task Graph");
thread.setPriority(Thread.NORM_PRIORITY);
thread.start();
}
}
public static void exportTaskgraph() {
final TFileChooser fc = new TFileChooser(EXPORT_TASKGRAPH_DIR);
final FileImportExportDecorator chooser = new FileImportExportDecorator(fc);
int result = chooser.showExportDialog(GUIEnv.getApplicationFrame());
if (result == TFileChooser.APPROVE_OPTION) {
Thread thread = new Thread() {
public void run() {
TrianaProgressBar pb = null;
String filename = "";
try {
// Bug fix for not picking up file name text.
if (fc.getUI() instanceof BasicFileChooserUI) {
filename = ((BasicFileChooserUI) fc.getUI()).getFileName();
}
pb = new TrianaProgressBar("exporting: " + filename, false);
chooser.exportWorkflow(GUIEnv.getApplicationFrame().getSelectedTaskGraphPanel().getTaskGraph());
} catch (IOException e) {
ErrorDialog.show("Error Exporting TaskGraph", e.getMessage());
e.printStackTrace();
} catch (TaskGraphException e) {
ErrorDialog.show("Error Exporting TaskGraph", e.getMessage());
e.printStackTrace();
} finally {
if (pb != null) {
pb.disposeProgressBar();
}
}
}
};
thread.setName("Export Task Graph");
thread.setPriority(Thread.NORM_PRIORITY);
thread.start();
}
}
public static void exportTaskgraph() {
final TFileChooser fc = new TFileChooser(EXPORT_TASKGRAPH_DIR);
final FileImportExportDecorator chooser = new FileImportExportDecorator(fc);
int result = chooser.showExportDialog(GUIEnv.getApplicationFrame());
if (result == TFileChooser.APPROVE_OPTION) {
Thread thread = new Thread() {
public void run() {
TrianaProgressBar pb = null;
String filename = "";
try {
// Bug fix for not picking up file name text.
if (fc.getUI() instanceof BasicFileChooserUI) {
filename = ((BasicFileChooserUI) fc.getUI()).getFileName();
}
pb = new TrianaProgressBar("exporting: " + filename, false);
chooser.exportWorkflow(GUIEnv.getApplicationFrame().getSelectedTaskGraphPanel().getTaskGraph());
} catch (IOException e) {
ErrorDialog.show("Error Exporting TaskGraph", e.getMessage());
e.printStackTrace();
} catch (TaskGraphException e) {
ErrorDialog.show("Error Exporting TaskGraph", e.getMessage());
e.printStackTrace();
} finally {
if (pb != null) {
pb.disposeProgressBar();
}
}
}
};
thread.setName("Export Task Graph");
thread.setPriority(Thread.NORM_PRIORITY);
thread.start();
}
}