⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 moduleforwardpage.java

📁 一个eclipse插件源代码。用于web开发
💻 JAVA
字号:
/*
 * $Header: /home/cvs/WEBPUMP2.0/WebPumpIDE_Src/WebPumpIDE/src/com/webpump/ui/module/dialog/ModuleForwardPage.java,v 1.1.1.1 2004/07/01 09:07:50 wang_j Exp $
 * $Revision: 1.1.1.1 $
 * $Date: 2004/07/01 09:07:50 $
 *
 * ====================================================================
 *
 * 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.module.dialog;

import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
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 com.webpump.ui.perspective.MacroResource;
import com.webpump.ui.perspective.WebpumpIDEPlugin;

/**
 * Class for layout of addpage .
 * 
 * @author luo_sa
 * @version 2.0.0 2004-3-5
 */
public class ModuleForwardPage extends WizardPage {
    

       
    /** Text in the dialog*/
    private Text m_textForwardName;
    
	private Text m_textForwardAction;
    
    private String[] m_strParamArray;

    /**
     * Constructor
     * 
     * @param strTitle
     * @param strDescription
     * @param strLabel
     * @param strValue
     */
    public ModuleForwardPage(String[] strParamArray) {
        super("wizardPage");
		m_strParamArray = strParamArray;
        setTitle(WebpumpIDEPlugin.getResourceString(MacroResource.MODULE_FORWARD_PAGE_TITLE));
        
        setDescription(WebpumpIDEPlugin.getResourceString(MacroResource.MODULE_FORWARD_PAGE_DESCRIPTION));

    }
    
    /**
     * Create control for the dialog .
     */
    public void createControl(Composite parent) {
		Composite container = new Composite(parent, SWT.NULL);
		final GridLayout gridLayout = new GridLayout();
		gridLayout.makeColumnsEqualWidth = true;
		container.setLayout(gridLayout);
		
		setControl(container);
		{
			final Composite composite = new Composite(container, SWT.NONE);
			final GridLayout gridLayout_1 = new GridLayout();
			gridLayout_1.makeColumnsEqualWidth = true;
			gridLayout_1.numColumns = 3;
			composite.setLayout(gridLayout_1);
			composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.VERTICAL_ALIGN_BEGINNING));
			{
				final Label label = new Label(composite, SWT.NONE);
				label.setText(WebpumpIDEPlugin.getResourceString(MacroResource.PAGEDIALOGVIEW_MODULE_FORWARD_NAME));
			}
			{
				m_textForwardName = new Text(composite, SWT.BORDER);
				final GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
				gridData.horizontalSpan = 2;
				m_textForwardName.setLayoutData(gridData);
				m_textForwardName.setText("");
				m_textForwardName.addModifyListener(new ModifyListener() {
				public void modifyText(ModifyEvent e){						
						m_strParamArray[0] = m_textForwardName.getText();
						setPageComplete(true);
						setMessage(WebpumpIDEPlugin.getResourceString(MacroResource.MODULE_FORWARD_PAGE_DESCRIPTION),NONE);  
						
					}
					
				});				
			}
			{
				final Label label = new Label(composite, SWT.NONE);
				label.setText(WebpumpIDEPlugin.getResourceString(MacroResource.PAGEDIALOGVIEW_MODULE_FORWARD_ACTION));
			}
			{
				m_textForwardAction = new Text(composite, SWT.BORDER);
				final GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
				gridData.horizontalSpan = 2;
				m_textForwardAction.setLayoutData(gridData);
				m_textForwardAction.setText("");
				
				m_textForwardAction.addModifyListener(new ModifyListener() {
				public void modifyText(ModifyEvent e){
						m_strParamArray[1] = m_textForwardAction.getText(); 
						setPageComplete(true);
						setMessage(WebpumpIDEPlugin.getResourceString(MacroResource.MODULE_FORWARD_PAGE_DESCRIPTION),NONE);  						
					}
				});
				
								
			}

		}
		
		init();
    }
       
    /**
     * init the dialog.
     *
     */
    public void init() {
        if(m_strParamArray!=null&&m_strParamArray.length>1) {        	
			m_textForwardName.setText(m_strParamArray[0]);
			m_textForwardAction.setText(m_strParamArray[1]); 
        }
    }

}

⌨️ 快捷键说明

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