datasourceform.java

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

JAVA
95
字号
/*
 * $Header: /home/cvs/WEBPUMP2.0/WebPumpIDE_Src/WebPumpIDE/src/com/webpump/ui/datasource/editor/DataSourceForm.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.swt.layout.*;
import org.eclipse.swt.widgets.*;

import com.webpump.ui.base.gui.*;

/**
 * Class for the layout of the editor page.
 * 
 * @author zhng_tx
 * @version 2.0.0 2004-2-24
 */
public class DataSourceForm extends BaseForm{
    
	/** The table section part which display the list of the datasources */
	private DataSourceTableSection m_objDataSourceTableSection;
    /** the section of the page which display the Properties of the selected
     *  datasource in the tablesection */
	private DataSourceInfoSection m_objDataSourceInfoSection;

	/**
	 * @param page
	 */
	public DataSourceForm(BasePage page) {
		super(page);
	}

	
	/**
	 * Define the layout of the editor page
	 * @param parent 
	 */
	protected void createFormClient(Composite parent) {
		//Define the layout 
		GridLayout layout = new GridLayout();
		parent.setLayout(layout);
		layout.makeColumnsEqualWidth=true;
		layout.numColumns = 2;
		layout.marginWidth = 10;
		layout.horizontalSpacing=15;
		GridData gd ;
	    
		//Define the table section
		m_objDataSourceTableSection= new DataSourceTableSection(page);
		Control control = m_objDataSourceTableSection.createControl(parent, getFactory());
		gd = new GridData(GridData.FILL_BOTH);
		control.setLayoutData(gd);
  
		//Defjine the info section
		m_objDataSourceInfoSection = new DataSourceInfoSection(page);
		control = m_objDataSourceInfoSection.createControl(parent, getFactory());
		gd = new GridData(GridData.FILL_BOTH);
		control.setLayoutData(gd);
		
		//Register the two section
		registerSection(m_objDataSourceTableSection);
		registerSection(m_objDataSourceInfoSection);
		
	}
	
	/**
	 * Return the info part
	 */
	public DataSourceInfoSection getDataSourceInfoSection(){
		return m_objDataSourceInfoSection;
	}
	
	/**
	 * Return the table part
	 */
	public DataSourceTableSection getDataSourceTableSection(){
		return m_objDataSourceTableSection;
	}
}

⌨️ 快捷键说明

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