airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1180118 - /incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/
Date Fri, 07 Oct 2011 17:35:28 GMT
Author: lahiru
Date: Fri Oct  7 17:35:28 2011
New Revision: 1180118

URL: http://svn.apache.org/viewvc?rev=1180118&view=rev
Log:
applying patch given by saminda for issue https://issues.apache.org/jira/browse/AIRAVATA-123.

Added:
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ApplicationDescriptionAdvancedOptionDialog.java
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ApplicationDescriptionDialog.java
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/HostDescriptionDialog.java
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ServiceDescriptionDialog.java

Added: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ApplicationDescriptionAdvancedOptionDialog.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ApplicationDescriptionAdvancedOptionDialog.java?rev=1180118&view=auto
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ApplicationDescriptionAdvancedOptionDialog.java
(added)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ApplicationDescriptionAdvancedOptionDialog.java
Fri Oct  7 17:35:28 2011
@@ -0,0 +1,240 @@
+package org.apache.airavata.xbaya.appwrapper;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+import javax.swing.border.EmptyBorder;
+import javax.swing.GroupLayout;
+import javax.swing.GroupLayout.Alignment;
+import javax.swing.JLabel;
+import javax.swing.JComboBox;
+import javax.swing.JTextField;
+import javax.swing.JSeparator;
+import org.apache.airavata.xbaya.gui.XBayaLinkButton;
+import javax.swing.SwingConstants;
+import javax.swing.LayoutStyle.ComponentPlacement;
+import java.awt.Font;
+import javax.swing.JTable;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.ListSelectionModel;
+import javax.swing.JScrollPane;
+
+public class ApplicationDescriptionAdvancedOptionDialog extends JDialog {
+	private JTextField textField;
+	private JTextField textField_1;
+	private JTextField textField_2;
+	private JTextField textField_3;
+	private JTextField textField_4;
+	private JTextField textField_5;
+	private JTable table;
+
+	/**
+	 * Launch the application.
+	 */
+	public static void main(String[] args) {
+		try {
+			ApplicationDescriptionAdvancedOptionDialog dialog = new ApplicationDescriptionAdvancedOptionDialog();
+			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+			dialog.setVisible(true);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * Create the dialog.
+	 */
+	public ApplicationDescriptionAdvancedOptionDialog() {
+		setTitle("Application Description Advance Options");
+		setBounds(100, 100, 601, 284);
+		getContentPane().setLayout(new BorderLayout());
+		{
+			JPanel buttonPane = new JPanel();
+			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
+			getContentPane().add(buttonPane, BorderLayout.SOUTH);
+			{
+				JButton okButton = new JButton("OK");
+				okButton.setActionCommand("OK");
+				buttonPane.add(okButton);
+				getRootPane().setDefaultButton(okButton);
+			}
+			{
+				JButton cancelButton = new JButton("Cancel");
+				cancelButton.setActionCommand("Cancel");
+				buttonPane.add(cancelButton);
+			}
+		}
+		{
+			JPanel panel = new JPanel();
+			getContentPane().add(panel, BorderLayout.CENTER);
+			JLabel lblWorkingDirectory = new JLabel("Working Directory");
+			JLabel lblInputDirectory = new JLabel("Input directory");
+			textField = new JTextField();
+			textField.setColumns(10);
+			textField_1 = new JTextField();
+			textField_1.setColumns(10);
+			JLabel lblLocations = new JLabel("Locations");
+			lblLocations.setFont(new Font("Tahoma", Font.BOLD, 11));
+			
+			textField_2 = new JTextField();
+			textField_2.setColumns(10);
+			
+			JLabel lblOutputDirectory = new JLabel("Output directory");
+			
+			JSeparator separator = new JSeparator();
+			
+			JLabel label = new JLabel("Program data");
+			label.setFont(new Font("Tahoma", Font.BOLD, 11));
+			
+			JLabel lblStdin = new JLabel("STDIN");
+			lblStdin.setHorizontalAlignment(SwingConstants.TRAILING);
+			
+			textField_3 = new JTextField();
+			textField_3.setColumns(10);
+			
+			JLabel lblStdout = new JLabel("STDOUT");
+			lblStdout.setHorizontalAlignment(SwingConstants.TRAILING);
+			
+			textField_4 = new JTextField();
+			textField_4.setColumns(10);
+			
+			JLabel lblStderr = new JLabel("STDERR");
+			lblStderr.setHorizontalAlignment(SwingConstants.TRAILING);
+			
+			textField_5 = new JTextField();
+			textField_5.setColumns(10);
+			
+			JSeparator separator_1 = new JSeparator();
+			separator_1.setOrientation(SwingConstants.VERTICAL);
+			
+			JLabel lblEnvironmentalVariables = new JLabel("Environmental Variables");
+			lblEnvironmentalVariables.setFont(new Font("Tahoma", Font.BOLD, 11));
+			
+			JScrollPane scrollPane = new JScrollPane();
+			GroupLayout gl_panel = new GroupLayout(panel);
+			gl_panel.setHorizontalGroup(
+				gl_panel.createParallelGroup(Alignment.LEADING)
+					.addGroup(gl_panel.createSequentialGroup()
+						.addContainerGap()
+						.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)
+							.addGroup(gl_panel.createSequentialGroup()
+								.addComponent(lblLocations, GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)
+								.addGap(135))
+							.addGroup(gl_panel.createSequentialGroup()
+								.addComponent(label, GroupLayout.PREFERRED_SIZE, 78, GroupLayout.PREFERRED_SIZE)
+								.addGap(215))
+							.addGroup(gl_panel.createSequentialGroup()
+								.addGroup(gl_panel.createParallelGroup(Alignment.TRAILING)
+									.addGroup(gl_panel.createSequentialGroup()
+										.addComponent(lblStderr, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)
+										.addGap(18)
+										.addComponent(textField_5, GroupLayout.PREFERRED_SIZE, 181, GroupLayout.PREFERRED_SIZE))
+									.addGroup(gl_panel.createSequentialGroup()
+										.addComponent(lblStdout, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
+										.addGap(18)
+										.addComponent(textField_4, GroupLayout.PREFERRED_SIZE, 181, GroupLayout.PREFERRED_SIZE))
+									.addGroup(gl_panel.createSequentialGroup()
+										.addComponent(lblStdin, GroupLayout.PREFERRED_SIZE, 86, GroupLayout.PREFERRED_SIZE)
+										.addGap(18)
+										.addComponent(textField_3, GroupLayout.PREFERRED_SIZE, 181, GroupLayout.PREFERRED_SIZE)))
+								.addPreferredGap(ComponentPlacement.UNRELATED))
+							.addComponent(separator, GroupLayout.PREFERRED_SIZE, 293, GroupLayout.PREFERRED_SIZE)
+							.addGroup(gl_panel.createSequentialGroup()
+								.addGroup(gl_panel.createParallelGroup(Alignment.TRAILING)
+									.addGroup(gl_panel.createSequentialGroup()
+										.addComponent(lblWorkingDirectory)
+										.addGap(18))
+									.addGroup(gl_panel.createSequentialGroup()
+										.addComponent(lblInputDirectory)
+										.addGap(17))
+									.addGroup(gl_panel.createSequentialGroup()
+										.addComponent(lblOutputDirectory)
+										.addGap(18)))
+								.addGroup(gl_panel.createParallelGroup(Alignment.LEADING, false)
+									.addComponent(textField_2)
+									.addComponent(textField)
+									.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, 179, GroupLayout.PREFERRED_SIZE))))
+						.addGap(2)
+						.addComponent(separator_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+						.addPreferredGap(ComponentPlacement.UNRELATED)
+						.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)
+							.addComponent(lblEnvironmentalVariables)
+							.addGroup(gl_panel.createSequentialGroup()
+								.addGap(10)
+								.addComponent(scrollPane, GroupLayout.PREFERRED_SIZE, 258, GroupLayout.PREFERRED_SIZE)))
+						.addGap(411))
+			);
+			gl_panel.setVerticalGroup(
+				gl_panel.createParallelGroup(Alignment.LEADING)
+					.addGroup(gl_panel.createSequentialGroup()
+						.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)
+							.addComponent(separator_1, GroupLayout.PREFERRED_SIZE, 212, GroupLayout.PREFERRED_SIZE)
+							.addGroup(gl_panel.createSequentialGroup()
+								.addComponent(lblLocations)
+								.addPreferredGap(ComponentPlacement.RELATED)
+								.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
+									.addComponent(lblWorkingDirectory)
+									.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
GroupLayout.PREFERRED_SIZE))
+								.addPreferredGap(ComponentPlacement.RELATED)
+								.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
+									.addComponent(lblInputDirectory)
+									.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
+								.addPreferredGap(ComponentPlacement.RELATED)
+								.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
+									.addComponent(textField_2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
GroupLayout.PREFERRED_SIZE)
+									.addComponent(lblOutputDirectory))
+								.addPreferredGap(ComponentPlacement.RELATED)
+								.addComponent(separator, GroupLayout.PREFERRED_SIZE, 2, GroupLayout.PREFERRED_SIZE)
+								.addPreferredGap(ComponentPlacement.RELATED)
+								.addComponent(label)
+								.addGap(3)
+								.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
+									.addComponent(lblStdin)
+									.addComponent(textField_3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
GroupLayout.PREFERRED_SIZE))
+								.addGap(9)
+								.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
+									.addComponent(lblStdout)
+									.addComponent(textField_4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
GroupLayout.PREFERRED_SIZE))
+								.addGap(9)
+								.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
+									.addComponent(lblStderr)
+									.addComponent(textField_5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
GroupLayout.PREFERRED_SIZE)))
+							.addGroup(gl_panel.createSequentialGroup()
+								.addComponent(lblEnvironmentalVariables)
+								.addPreferredGap(ComponentPlacement.RELATED)
+								.addComponent(scrollPane, GroupLayout.PREFERRED_SIZE, 179, GroupLayout.PREFERRED_SIZE)))
+						.addContainerGap(29, Short.MAX_VALUE))
+			);
+			
+			table = new JTable();
+			table.setFillsViewportHeight(true);
+			scrollPane.setViewportView(table);
+			table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+			table.setCellSelectionEnabled(true);
+			table.setColumnSelectionAllowed(true);
+			table.setModel(new DefaultTableModel(
+				new Object[][] {
+					{null, null},
+				},
+				new String[] {
+					"Name", "Value"
+				}
+			) {
+				Class[] columnTypes = new Class[] {
+					String.class, String.class
+				};
+				public Class getColumnClass(int columnIndex) {
+					return columnTypes[columnIndex];
+				}
+			});
+			table.getColumnModel().getColumn(0).setPreferredWidth(67);
+			table.getColumnModel().getColumn(1).setPreferredWidth(158);
+			gl_panel.setAutoCreateGaps(true);
+			gl_panel.setAutoCreateContainerGaps(true);
+			panel.setLayout(gl_panel);
+		}
+	}
+}

Added: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ApplicationDescriptionDialog.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ApplicationDescriptionDialog.java?rev=1180118&view=auto
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ApplicationDescriptionDialog.java
(added)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ApplicationDescriptionDialog.java
Fri Oct  7 17:35:28 2011
@@ -0,0 +1,149 @@
+package org.apache.airavata.xbaya.appwrapper;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+import javax.swing.border.EmptyBorder;
+import javax.swing.GroupLayout;
+import javax.swing.GroupLayout.Alignment;
+import javax.swing.JLabel;
+import javax.swing.JComboBox;
+import javax.swing.JTextField;
+import javax.swing.JSeparator;
+import org.apache.airavata.xbaya.gui.XBayaLinkButton;
+import javax.swing.SwingConstants;
+import javax.swing.LayoutStyle.ComponentPlacement;
+
+public class ApplicationDescriptionDialog extends JDialog {
+	private JTextField textField;
+	private JTextField textField_1;
+	private JTextField textField_2;
+
+	/**
+	 * Launch the application.
+	 */
+	public static void main(String[] args) {
+		try {
+			ApplicationDescriptionDialog dialog = new ApplicationDescriptionDialog();
+			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+			dialog.setVisible(true);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * Create the dialog.
+	 */
+	public ApplicationDescriptionDialog() {
+		setTitle("New Application Description");
+		setBounds(100, 100, 441, 240);
+		getContentPane().setLayout(new BorderLayout());
+		{
+			JPanel buttonPane = new JPanel();
+			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
+			getContentPane().add(buttonPane, BorderLayout.SOUTH);
+			{
+				JButton okButton = new JButton("Save");
+				okButton.setActionCommand("OK");
+				buttonPane.add(okButton);
+				getRootPane().setDefaultButton(okButton);
+			}
+			{
+				JButton cancelButton = new JButton("Cancel");
+				cancelButton.setActionCommand("Cancel");
+				buttonPane.add(cancelButton);
+			}
+		}
+		{
+			JPanel panel = new JPanel();
+			getContentPane().add(panel, BorderLayout.CENTER);
+			JLabel label = new JLabel("Registry");
+			JComboBox comboBox = new JComboBox();
+			JLabel lblApplicationName = new JLabel("Application name");
+			JLabel lblExecutablePatyh = new JLabel("Executable path");
+			textField = new JTextField();
+			textField.setColumns(10);
+			textField_1 = new JTextField();
+			textField_1.setColumns(10);
+			JSeparator separator = new JSeparator();
+			JSeparator separator_1 = new JSeparator();
+			JLabel lblTemporaryDirectory = new JLabel("Temporary directory");
+			textField_2 = new JTextField();
+			textField_2.setColumns(10);
+			JButton btnAdvance = new JButton("Advanced options...");
+			GroupLayout gl_panel = new GroupLayout(panel);
+			gl_panel.setHorizontalGroup(
+				gl_panel.createParallelGroup(Alignment.TRAILING)
+					.addGroup(gl_panel.createSequentialGroup()
+						.addGap(22)
+						.addGroup(gl_panel.createParallelGroup(Alignment.TRAILING)
+							.addGroup(gl_panel.createSequentialGroup()
+								.addComponent(label, GroupLayout.PREFERRED_SIZE, 65, GroupLayout.PREFERRED_SIZE)
+								.addPreferredGap(ComponentPlacement.UNRELATED)
+								.addComponent(comboBox, 0, 341, Short.MAX_VALUE)
+								.addGap(15))
+							.addGroup(Alignment.LEADING, gl_panel.createSequentialGroup()
+								.addGroup(gl_panel.createParallelGroup(Alignment.TRAILING)
+									.addComponent(lblApplicationName)
+									.addComponent(lblExecutablePatyh))
+								.addGap(18)
+								.addGroup(gl_panel.createParallelGroup(Alignment.LEADING, false)
+									.addComponent(textField)
+									.addComponent(textField_1, GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE))
+								.addGap(19)))
+						.addGap(18))
+					.addGroup(Alignment.LEADING, gl_panel.createSequentialGroup()
+						.addContainerGap()
+						.addComponent(separator, GroupLayout.PREFERRED_SIZE, 425, GroupLayout.PREFERRED_SIZE)
+						.addContainerGap(36, Short.MAX_VALUE))
+					.addGroup(gl_panel.createSequentialGroup()
+						.addContainerGap()
+						.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)
+							.addComponent(separator_1, GroupLayout.PREFERRED_SIZE, 425, GroupLayout.PREFERRED_SIZE)
+							.addGroup(gl_panel.createSequentialGroup()
+								.addGap(10)
+								.addGroup(gl_panel.createParallelGroup(Alignment.TRAILING)
+									.addComponent(btnAdvance)
+									.addGroup(gl_panel.createSequentialGroup()
+										.addComponent(lblTemporaryDirectory)
+										.addPreferredGap(ComponentPlacement.RELATED)
+										.addComponent(textField_2, GroupLayout.PREFERRED_SIZE, 305, GroupLayout.PREFERRED_SIZE)))))
+						.addGap(36))
+			);
+			gl_panel.setVerticalGroup(
+				gl_panel.createParallelGroup(Alignment.LEADING)
+					.addGroup(gl_panel.createSequentialGroup()
+						.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
+							.addComponent(label)
+							.addComponent(comboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
+						.addPreferredGap(ComponentPlacement.RELATED)
+						.addComponent(separator, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+						.addGap(8)
+						.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
+							.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+							.addComponent(lblApplicationName))
+						.addPreferredGap(ComponentPlacement.RELATED)
+						.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
+							.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+							.addComponent(lblExecutablePatyh))
+						.addPreferredGap(ComponentPlacement.UNRELATED)
+						.addComponent(separator_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+						.addPreferredGap(ComponentPlacement.UNRELATED)
+						.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
+							.addComponent(lblTemporaryDirectory)
+							.addComponent(textField_2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
+						.addPreferredGap(ComponentPlacement.RELATED)
+						.addComponent(btnAdvance)
+						.addGap(109))
+			);
+			gl_panel.setAutoCreateGaps(true);
+			gl_panel.setAutoCreateContainerGaps(true);
+			panel.setLayout(gl_panel);
+		}
+	}
+
+}

Added: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/HostDescriptionDialog.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/HostDescriptionDialog.java?rev=1180118&view=auto
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/HostDescriptionDialog.java
(added)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/HostDescriptionDialog.java
Fri Oct  7 17:35:28 2011
@@ -0,0 +1,123 @@
+package org.apache.airavata.xbaya.appwrapper;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+import javax.swing.border.EmptyBorder;
+import javax.swing.GroupLayout;
+import javax.swing.GroupLayout.Alignment;
+import javax.swing.JLabel;
+import javax.swing.JComboBox;
+import javax.swing.JTextField;
+import javax.swing.JSeparator;
+import javax.swing.LayoutStyle.ComponentPlacement;
+
+public class HostDescriptionDialog extends JDialog {
+	private JTextField textField;
+	private JTextField textField_1;
+
+	/**
+	 * Launch the application.
+	 */
+	public static void main(String[] args) {
+		try {
+			HostDescriptionDialog dialog = new HostDescriptionDialog();
+			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+			dialog.setVisible(true);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * Create the dialog.
+	 */
+	public HostDescriptionDialog() {
+		setTitle("New Host Description");
+		setBounds(100, 100, 446, 167);
+		getContentPane().setLayout(new BorderLayout());
+		{
+			JPanel buttonPane = new JPanel();
+			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
+			getContentPane().add(buttonPane, BorderLayout.SOUTH);
+			{
+				JButton okButton = new JButton("Save");
+				okButton.setActionCommand("OK");
+				buttonPane.add(okButton);
+				getRootPane().setDefaultButton(okButton);
+			}
+			{
+				JButton cancelButton = new JButton("Cancel");
+				cancelButton.setActionCommand("Cancel");
+				buttonPane.add(cancelButton);
+			}
+		}
+		{
+			JPanel panel = new JPanel();
+			getContentPane().add(panel, BorderLayout.CENTER);
+			JLabel label = new JLabel("Registry");
+			JComboBox comboBox = new JComboBox();
+			JLabel lblHostName = new JLabel("Host name");
+			lblHostName.setEnabled(false);
+			JLabel lblHostLocationip = new JLabel("Host location/ip");
+			textField = new JTextField();
+			textField.setColumns(10);
+			textField_1 = new JTextField();
+			textField_1.setEnabled(false);
+			textField_1.setColumns(10);
+			JSeparator separator = new JSeparator();
+			GroupLayout gl_panel = new GroupLayout(panel);
+			gl_panel.setHorizontalGroup(
+				gl_panel.createParallelGroup(Alignment.TRAILING)
+					.addGroup(gl_panel.createSequentialGroup()
+						.addGap(22)
+						.addGroup(gl_panel.createParallelGroup(Alignment.TRAILING)
+							.addGroup(gl_panel.createSequentialGroup()
+								.addComponent(label, GroupLayout.PREFERRED_SIZE, 65, GroupLayout.PREFERRED_SIZE)
+								.addPreferredGap(ComponentPlacement.UNRELATED)
+								.addComponent(comboBox, 0, 341, Short.MAX_VALUE)
+								.addGap(15))
+							.addGroup(Alignment.LEADING, gl_panel.createSequentialGroup()
+								.addGroup(gl_panel.createParallelGroup(Alignment.TRAILING)
+									.addComponent(lblHostName)
+									.addComponent(lblHostLocationip))
+								.addGap(18)
+								.addGroup(gl_panel.createParallelGroup(Alignment.LEADING, false)
+									.addComponent(textField)
+									.addComponent(textField_1, GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE))
+								.addGap(19)))
+						.addGap(18))
+					.addGroup(Alignment.LEADING, gl_panel.createSequentialGroup()
+						.addContainerGap()
+						.addComponent(separator, GroupLayout.PREFERRED_SIZE, 425, GroupLayout.PREFERRED_SIZE)
+						.addContainerGap(36, Short.MAX_VALUE))
+			);
+			gl_panel.setVerticalGroup(
+				gl_panel.createParallelGroup(Alignment.LEADING)
+					.addGap(0, 180, Short.MAX_VALUE)
+					.addGroup(gl_panel.createSequentialGroup()
+						.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
+							.addComponent(label)
+							.addComponent(comboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
+						.addPreferredGap(ComponentPlacement.RELATED)
+						.addComponent(separator, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+						.addGap(8)
+						.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
+							.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+							.addComponent(lblHostName))
+						.addPreferredGap(ComponentPlacement.RELATED)
+						.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
+							.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+							.addComponent(lblHostLocationip))
+						.addGap(176))
+			);
+			gl_panel.setAutoCreateGaps(true);
+			gl_panel.setAutoCreateContainerGaps(true);
+			panel.setLayout(gl_panel);
+		}
+	}
+
+}

Added: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ServiceDescriptionDialog.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ServiceDescriptionDialog.java?rev=1180118&view=auto
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ServiceDescriptionDialog.java
(added)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ServiceDescriptionDialog.java
Fri Oct  7 17:35:28 2011
@@ -0,0 +1,231 @@
+package org.apache.airavata.xbaya.appwrapper;
+
+import java.awt.BorderLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+
+import javax.swing.GroupLayout;
+import javax.swing.GroupLayout.Alignment;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JSeparator;
+import javax.swing.JTextField;
+import javax.swing.LayoutStyle.ComponentPlacement;
+import javax.swing.SwingConstants;
+
+import org.apache.airavata.xbaya.gui.XBayaLinkButton;
+
+public class ServiceDescriptionDialog extends JDialog {
+
+	private final JPanel contentPanel = new JPanel();
+	private JLabel lblRegistry;
+	private JLabel lblServiceName;
+	private JTextField textField;
+	private JTextField textField_1;
+
+	/**
+	 * Launch the application.
+	 */
+	public static void main(String[] args) {
+		try {
+			ServiceDescriptionDialog dialog = new ServiceDescriptionDialog();
+			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+			dialog.setVisible(true);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * Create the dialog.
+	 */
+	public ServiceDescriptionDialog() {
+		setTitle("New Service Description");
+		setBounds(100, 100, 457, 354);
+		BorderLayout borderLayout = new BorderLayout();
+		borderLayout.setVgap(5);
+		borderLayout.setHgap(5);
+		getContentPane().setLayout(borderLayout);
+		contentPanel.setBorder(null);
+		getContentPane().add(contentPanel, BorderLayout.EAST);
+		{
+			lblServiceName = new JLabel("Service name");
+		}
+		{
+			lblRegistry = new JLabel("Registry");
+		}
+		
+		JComboBox comboBox = new JComboBox();
+		
+		JSeparator lblSeperator = new JSeparator();
+		
+		textField = new JTextField();
+		textField.setColumns(10);
+		
+		JLabel lblNewLabel = new JLabel("Method name");
+		
+		textField_1 = new JTextField();
+		textField_1.setColumns(10);
+		
+		JButton btnConfigureInputs = new JButton("Configure Inputs...");
+		
+		JButton btnConfigureOutputs = new JButton("Configure Outputs...");
+		
+		JSeparator separator = new JSeparator();
+		
+		JLabel lblApplicationName = new JLabel("Application");
+		
+		JComboBox comboBox_1 = new JComboBox();
+		
+		XBayaLinkButton btnNewButton = new XBayaLinkButton("New button");
+		btnNewButton.setHorizontalAlignment(SwingConstants.TRAILING);
+		btnNewButton.setText("Create new application...");
+		
+		JSeparator separator_1 = new JSeparator();
+		
+		JLabel lblHost = new JLabel("Host");
+		
+		JComboBox comboBox_2 = new JComboBox();
+		
+		XBayaLinkButton blnkbtnCreateNewHost = new XBayaLinkButton("New button");
+		blnkbtnCreateNewHost.setText("Create new host...");
+		blnkbtnCreateNewHost.setHorizontalAlignment(SwingConstants.TRAILING);
+		GroupLayout gl_contentPanel = new GroupLayout(contentPanel);
+		gl_contentPanel.setHorizontalGroup(
+			gl_contentPanel.createParallelGroup(Alignment.TRAILING)
+				.addGroup(gl_contentPanel.createSequentialGroup()
+					.addGroup(gl_contentPanel.createParallelGroup(Alignment.TRAILING)
+						.addGroup(gl_contentPanel.createSequentialGroup()
+							.addGap(22)
+							.addComponent(lblRegistry, GroupLayout.PREFERRED_SIZE, 65, GroupLayout.PREFERRED_SIZE)
+							.addPreferredGap(ComponentPlacement.UNRELATED)
+							.addComponent(comboBox, 0, 317, Short.MAX_VALUE)
+							.addGap(15))
+						.addGroup(gl_contentPanel.createSequentialGroup()
+							.addGap(19)
+							.addGroup(gl_contentPanel.createParallelGroup(Alignment.TRAILING)
+								.addGroup(gl_contentPanel.createSequentialGroup()
+									.addComponent(btnConfigureInputs)
+									.addPreferredGap(ComponentPlacement.RELATED)
+									.addComponent(btnConfigureOutputs))
+								.addGroup(gl_contentPanel.createSequentialGroup()
+									.addGroup(gl_contentPanel.createParallelGroup(Alignment.TRAILING)
+										.addGroup(gl_contentPanel.createSequentialGroup()
+											.addComponent(lblServiceName)
+											.addGap(18))
+										.addGroup(gl_contentPanel.createSequentialGroup()
+											.addComponent(lblNewLabel)
+											.addGap(17)))
+									.addGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING, false)
+										.addComponent(textField_1)
+										.addComponent(textField, GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE))))
+							.addGap(19)))
+					.addGap(18))
+				.addGroup(gl_contentPanel.createSequentialGroup()
+					.addContainerGap(12, Short.MAX_VALUE)
+					.addComponent(lblSeperator, GroupLayout.PREFERRED_SIZE, 425, GroupLayout.PREFERRED_SIZE)
+					.addContainerGap())
+				.addGroup(gl_contentPanel.createSequentialGroup()
+					.addContainerGap(12, Short.MAX_VALUE)
+					.addGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING)
+						.addGroup(gl_contentPanel.createSequentialGroup()
+							.addGap(10)
+							.addComponent(lblApplicationName)
+							.addGap(26)
+							.addComponent(comboBox_1, GroupLayout.PREFERRED_SIZE, 311, GroupLayout.PREFERRED_SIZE))
+						.addComponent(separator, GroupLayout.PREFERRED_SIZE, 425, GroupLayout.PREFERRED_SIZE))
+					.addContainerGap())
+				.addGroup(gl_contentPanel.createSequentialGroup()
+					.addContainerGap(269, Short.MAX_VALUE)
+					.addComponent(btnNewButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+					.addGap(24))
+				.addGroup(gl_contentPanel.createSequentialGroup()
+					.addContainerGap(14, Short.MAX_VALUE)
+					.addGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING)
+						.addGroup(gl_contentPanel.createSequentialGroup()
+							.addGap(10)
+							.addComponent(lblHost)
+							.addGap(56)
+							.addComponent(comboBox_2, GroupLayout.PREFERRED_SIZE, 310, GroupLayout.PREFERRED_SIZE))
+						.addComponent(separator_1, GroupLayout.PREFERRED_SIZE, 425, GroupLayout.PREFERRED_SIZE))
+					.addContainerGap())
+				.addGroup(gl_contentPanel.createSequentialGroup()
+					.addContainerGap(271, Short.MAX_VALUE)
+					.addComponent(blnkbtnCreateNewHost, GroupLayout.PREFERRED_SIZE, 156, GroupLayout.PREFERRED_SIZE)
+					.addGap(22))
+		);
+		gl_contentPanel.setVerticalGroup(
+			gl_contentPanel.createParallelGroup(Alignment.LEADING)
+				.addGroup(gl_contentPanel.createSequentialGroup()
+					.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)
+						.addComponent(lblRegistry)
+						.addComponent(comboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
+					.addPreferredGap(ComponentPlacement.RELATED)
+					.addComponent(lblSeperator, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+					.addGap(8)
+					.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)
+						.addComponent(lblServiceName)
+						.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
+					.addPreferredGap(ComponentPlacement.RELATED)
+					.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)
+						.addComponent(lblNewLabel)
+						.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
+					.addPreferredGap(ComponentPlacement.UNRELATED)
+					.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)
+						.addComponent(btnConfigureOutputs)
+						.addComponent(btnConfigureInputs))
+					.addPreferredGap(ComponentPlacement.UNRELATED)
+					.addComponent(separator, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+					.addPreferredGap(ComponentPlacement.UNRELATED)
+					.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)
+						.addComponent(comboBox_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+						.addComponent(lblApplicationName))
+					.addGap(1)
+					.addComponent(btnNewButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+					.addPreferredGap(ComponentPlacement.UNRELATED)
+					.addComponent(separator_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+					.addPreferredGap(ComponentPlacement.UNRELATED)
+					.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)
+						.addComponent(lblHost)
+						.addComponent(comboBox_2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
+					.addPreferredGap(ComponentPlacement.RELATED)
+					.addComponent(blnkbtnCreateNewHost, GroupLayout.PREFERRED_SIZE, 23, GroupLayout.PREFERRED_SIZE)
+					.addGap(13))
+		);
+		gl_contentPanel.setAutoCreateContainerGaps(true);
+		gl_contentPanel.setAutoCreateGaps(true);
+		contentPanel.setLayout(gl_contentPanel);
+		{
+			JPanel buttonPane = new JPanel();
+			getContentPane().add(buttonPane, BorderLayout.SOUTH);
+			GridBagLayout gbl_buttonPane = new GridBagLayout();
+			gbl_buttonPane.columnWidths = new int[]{307, 136, 0};
+			gbl_buttonPane.rowHeights = new int[]{33, 0};
+			gbl_buttonPane.columnWeights = new double[]{0.0, 0.0, Double.MIN_VALUE};
+			gbl_buttonPane.rowWeights = new double[]{0.0, Double.MIN_VALUE};
+			buttonPane.setLayout(gbl_buttonPane);
+			JPanel panel = new JPanel();
+			GridBagConstraints gbc_panel = new GridBagConstraints();
+			gbc_panel.anchor = GridBagConstraints.NORTHWEST;
+			gbc_panel.gridx = 1;
+			gbc_panel.gridy = 0;
+			buttonPane.add(panel, gbc_panel);
+			{
+				JButton okButton = new JButton("Save");
+				panel.add(okButton);
+				okButton.setActionCommand("OK");
+				getRootPane().setDefaultButton(okButton);
+			}
+			{
+				JButton cancelButton = new JButton("Cancel");
+				panel.add(cancelButton);
+				cancelButton.setActionCommand("Cancel");
+			}
+		}
+		
+		
+	}
+}



Mime
View raw message