[Ds-java-dev] svn commit r14430 - trunk/solutions/data-services/java/modules/ide/src/org/wso2/ws/dataservice/ide/dialog

svn at wso2.org svn at wso2.org
Mon Mar 3 00:27:43 PST 2008


Author: sandakith
Date: Mon Mar  3 00:27:18 2008
New Revision: 14430

Log:

Add Dialog to represent the CSV configuration

Added:
   trunk/solutions/data-services/java/modules/ide/src/org/wso2/ws/dataservice/ide/dialog/JNDIConfigurationDialog.java

Added: trunk/solutions/data-services/java/modules/ide/src/org/wso2/ws/dataservice/ide/dialog/JNDIConfigurationDialog.java
==============================================================================
--- (empty file)
+++ trunk/solutions/data-services/java/modules/ide/src/org/wso2/ws/dataservice/ide/dialog/JNDIConfigurationDialog.java	Mon Mar  3 00:27:18 2008
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2005,2006 WSO2, Inc. http://www.wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.ws.dataservice.ide.dialog;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * Dialog represent the JNDI configuration UI
+ */
+public class JNDIConfigurationDialog extends Dialog{
+
+	private Text jndiClassText;
+	private Text providerURLText;
+	private Text resourceNameText;
+	private Text userNameText;
+	private Text passwordText;
+	
+	public JNDIConfigurationDialog(Shell parentShell) {
+		super(parentShell);
+	}
+
+	/**
+	 * Create the dialog area with the controls
+	 */
+	protected Control createDialogArea(final Composite parent) {
+		Composite container = (Composite) super.createDialogArea(parent);
+
+		GridLayout layout = new GridLayout();
+		container.setLayout(layout);
+		layout.numColumns = 3;
+		layout.verticalSpacing = 10;
+		
+		Label label = new Label(container, SWT.NULL);
+		label.setText("JNDI Data Source Configuration");
+		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 3;
+		label.setLayoutData(gd);
+		
+		label = new Label(container, SWT.HORIZONTAL | SWT.SEPARATOR);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 3;
+		label.setLayoutData(gd);
+
+		label = new Label(container, SWT.NULL);
+		label.setText("JNDI Context Class");
+		gd = new GridData();
+		gd.horizontalSpan = 1;
+		label.setLayoutData(gd);
+		
+		jndiClassText = new Text(container, SWT.BORDER | SWT.SINGLE);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 2;
+		jndiClassText.setLayoutData(gd);
+		
+		label = new Label(container, SWT.NULL);
+		label.setText("Provider URL");
+		gd = new GridData();
+		gd.horizontalSpan = 1;
+		label.setLayoutData(gd);
+		
+		providerURLText = new Text(container, SWT.BORDER | SWT.SINGLE);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 2;
+		providerURLText.setLayoutData(gd);
+		
+		label = new Label(container, SWT.NULL);
+		label.setText("Resource Name");
+		gd = new GridData();
+		gd.horizontalSpan = 1;
+		label.setLayoutData(gd);
+		
+		resourceNameText = new Text(container, SWT.BORDER | SWT.SINGLE);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 2;
+		resourceNameText.setLayoutData(gd);
+		
+		label = new Label(container, SWT.NULL);
+		label.setText("Username");
+		gd = new GridData();
+		gd.horizontalSpan = 1;
+		label.setLayoutData(gd);
+		
+		userNameText = new Text(container, SWT.BORDER | SWT.SINGLE);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 2;
+		userNameText.setLayoutData(gd);
+		
+		label = new Label(container, SWT.NULL);
+		label.setText("Password");
+		gd = new GridData();;
+		gd.horizontalSpan = 1;
+		label.setLayoutData(gd);
+		
+		passwordText = new Text(container, SWT.BORDER | SWT.SINGLE);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 2;
+		passwordText.setLayoutData(gd);
+		
+		return super.createDialogArea(parent);
+	}
+
+}



More information about the Ds-java-dev mailing list