Search in sources :

Example 1 with OutputConfigurationDialog

use of org.apache.airavata.xbaya.ui.dialogs.graph.system.OutputConfigurationDialog in project airavata by apache.

the class OutputNodeGUI method showConfigurationDialog.

/**
 * Shows a configuration window when a user click the configuration area.
 *
 * @param engine
 */
@Override
protected void showConfigurationDialog(XBayaGUI xbayaGUI) {
    if (this.node instanceof OutputNode) {
        String description = ((OutputNode) this.node).getDescription();
        if (null != description) {
            // try to parse it to a URL and if yes try to open the browser
            try {
                description = description.trim();
                URL url = new URL(description);
                // no exception -> valid url lets try to open it
                BrowserLauncher.openURL(url);
            } catch (Exception e) {
            // do nothing since this is an optional attempt
            }
        }
    }
    if (this.configurationWindow == null) {
        this.configurationWindow = new OutputConfigurationDialog(this.outputNode, xbayaGUI);
    }
    this.configurationWindow.show();
}
Also used : OutputNode(org.apache.airavata.workflow.model.graph.system.OutputNode) URL(java.net.URL) OutputConfigurationDialog(org.apache.airavata.xbaya.ui.dialogs.graph.system.OutputConfigurationDialog)

Aggregations

URL (java.net.URL)1 OutputNode (org.apache.airavata.workflow.model.graph.system.OutputNode)1 OutputConfigurationDialog (org.apache.airavata.xbaya.ui.dialogs.graph.system.OutputConfigurationDialog)1