airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1360877 - in /incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya: interpretor/WorkflowInterpreter.java ui/dialogs/descriptors/DeploymentDescriptionDialog.java
Date Thu, 12 Jul 2012 19:33:18 GMT
Author: samindaw
Date: Thu Jul 12 19:33:18 2012
New Revision: 1360877

URL: http://svn.apache.org/viewvc?rev=1360877&view=rev
Log:
double click to edit + color chk using equal

Modified:
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/DeploymentDescriptionDialog.java

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java?rev=1360877&r1=1360876&r2=1360877&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java
Thu Jul 12 19:33:18 2012
@@ -1437,8 +1437,8 @@ public class WorkflowInterpreter {
 		ArrayList<Node> list = new ArrayList<Node>();
 		List<NodeImpl> nodes = this.getGraph().getNodes();
 		for (Node node : nodes) {
-			if (node instanceof OutputNode && NodeController.getGUI(node).getBodyColor() ==
NodeGUI.DEFAULT_BODY_COLOR
-					&& NodeController.getGUI(node.getInputPort(0).getFromNode()).getBodyColor()
== NodeState.FINISHED.color) {
+			if (node instanceof OutputNode && NodeController.getGUI(node).getBodyColor().equals(NodeGUI.DEFAULT_BODY_COLOR)
+					&& NodeController.getGUI(node.getInputPort(0).getFromNode()).getBodyColor().equals(NodeState.FINISHED.color))
{
 
 				list.add(node);
 			}

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/DeploymentDescriptionDialog.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/DeploymentDescriptionDialog.java?rev=1360877&r1=1360876&r2=1360877&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/DeploymentDescriptionDialog.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/DeploymentDescriptionDialog.java
Thu Jul 12 19:33:18 2012
@@ -31,6 +31,8 @@ import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.KeyAdapter;
 import java.awt.event.KeyEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
 import java.awt.event.WindowAdapter;
 import java.awt.event.WindowEvent;
 import java.util.ArrayList;
@@ -347,18 +349,7 @@ public class DeploymentDescriptionDialog
         btnEditDeployment.addActionListener(new ActionListener() {
 			@Override
 			public void actionPerformed(ActionEvent e) {
-				String hostName = tblModelHosts.getValueAt(tblHosts.getSelectedRow(),0).toString();
-				HostDeploymentDialog hostDeploymentDialog = new HostDeploymentDialog(getRegistry(),false,getDeployments().get(hostName).getApplicationDescription(),hostName,Arrays.asList(getDeployments().keySet().toArray(new
String[]{})));
-				try {
-					HostDeployment deployDesc = hostDeploymentDialog.execute();
-					if (deployDesc!=null){
-						getDeployments().put(deployDesc.getHostDescription().getType().getHostName(), deployDesc);
-						updateDeploymentTable();
-					}
-				} catch (RegistryException e1) {
-					setError(e1.getLocalizedMessage());
-					e1.printStackTrace();
-				}
+				editSelectedDeployment();
 			}
 		});
         
@@ -384,6 +375,14 @@ public class DeploymentDescriptionDialog
             }
 
         });
+        tblHosts.addMouseListener(new MouseAdapter(){
+        	@Override
+        	public void mouseClicked(MouseEvent e) {
+        		if (e.getClickCount()==2 && tblHosts.getSelectedRows().length>0){
+        			editSelectedDeployment();
+        		}
+        	}
+        });
         JScrollPane scrollPane = new JScrollPane();
         scrollPane.setViewportView(tblHosts);
         
@@ -774,6 +773,21 @@ public class DeploymentDescriptionDialog
 		return deployments;
 	}
 
+	private void editSelectedDeployment() {
+		String hostName = tblModelHosts.getValueAt(tblHosts.getSelectedRow(),0).toString();
+		HostDeploymentDialog hostDeploymentDialog = new HostDeploymentDialog(getRegistry(),false,getDeployments().get(hostName).getApplicationDescription(),hostName,Arrays.asList(getDeployments().keySet().toArray(new
String[]{})));
+		try {
+			HostDeployment deployDesc = hostDeploymentDialog.execute();
+			if (deployDesc!=null){
+				getDeployments().put(deployDesc.getHostDescription().getType().getHostName(), deployDesc);
+				updateDeploymentTable();
+			}
+		} catch (RegistryException e1) {
+			setError(e1.getLocalizedMessage());
+			e1.printStackTrace();
+		}
+	}
+
 	private class StringArrayComboBoxEditor extends DefaultCellEditor {
         private static final long serialVersionUID = -304464739219209395L;
 



Mime
View raw message