datasourceinfosection.java

来自「一个eclipse插件源代码。用于web开发」· Java 代码 · 共 96 行

JAVA
96
字号
/*
 * $Header: /home/cvs/WEBPUMP2.0/WebPumpIDE_Src/WebPumpIDE/src/com/webpump/ui/datasource/editor/DataSourceInfoSection.java,v 1.1.1.1 2004/07/01 09:07:43 wang_j Exp $
 * $Revision: 1.1.1.1 $
 * $Date: 2004/07/01 09:07:43 $
 *
 * ====================================================================
 *
 * The NanJing HopeRun(IT-FOREST) Software License, Version 2.0.0
 *
 * Copyright 2003-2004 by NanJing HopeRun(IT-FOREST) Information System Co., Ltd, CHINA and
 *                        IT Forest Corporation
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * HopeRun(IT-FOREST) Information System Co., Ltd, CHINA and IT Forest Corporation.
 * You shall not disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into with
 * HopeRun(IT-FOREST) Information System Co., Ltd, CHINA and IT Forest Corporation.
 */
package com.webpump.ui.datasource.editor;

import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.pde.core.IModelChangeProvider;
import org.eclipse.pde.internal.ui.editor.PDEFormPage;
import org.eclipse.pde.internal.ui.editor.PDEFormSection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.update.ui.forms.internal.FormWidgetFactory;

import com.webpump.ui.base.data.BaseModel;
import com.webpump.ui.datasource.data.DataSource;
import com.webpump.ui.perspective.MacroResource;
import com.webpump.ui.perspective.WebpumpIDEPlugin;

/**
 * Class for the info part of the datasource editor.
 * 
 * @author zhang_tx
 * @version 2.0.0 2004-2-24
 */
public class DataSourceInfoSection extends PDEFormSection{
	
	/** Factory information of the selected datasource in the table section **/
	private Text m_objTextFactory;
	/** DriverClass information of the selected datasource in the table section **/
	private CCombo m_objTextDriverClass;
	/** URL information of the selected datasource in the table section **/
	private CCombo m_objTextURL;
	/** User information of the selected datasource in the table section **/
	private Text m_objTextUser;
	/** PassWord information of the selected datasource in the table section **/
	private Text m_objTextPassWord;
	/** MaxActive information of the selected datasource in the table section **/
	private Text m_objTextMaxActive;
	/** MaxIdle information of the selected datasource in the table section **/
	private Text m_objTextMaxIdle;
	/** MaxWait information of the selected datasource in the table section **/
	private Text m_objTextMaxWait;
	
	private Text m_objTextAuth;
	
	private Text m_objTextType;
	/** the content of the eight info Text **/
	private String[] m_strText = {"","","","","","","","","",""};
	/** the current selected datasource in the table section **/
	private IStructuredSelection sel;
	private int seltag = 0;

	/**
	 * the constructor which define the content of this part
	 * @param page the page in which the part lies
	 */
	public DataSourceInfoSection(PDEFormPage formPage) {
		super(formPage);
		setHeaderText((WebpumpIDEPlugin.getResourceString(MacroResource.DATASOURCE_EDITOR_INFOSECTION_NAME)));
	}	
	
	/* (非 Javadoc)
	 * @see org.eclipse.update.ui.forms.internal.FormSection#createClient(org.eclipse.swt.widgets.Composite, org.eclipse.update.ui.forms.internal.FormWidgetFactory)
	 */
	public Composite createClient(Composite parent, FormWidgetFactory factory) {
		Composite container = factory.createComposite(parent);
		final GridLayout gridLayout = new GridLayout();
		gridLayout.numColumns = 3;
		container.setLayout(gridLayout);
		{
			//属性

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?