📄 siteconfigsection.java
字号:
/*
* $Header: /home/cvs/WEBPUMP2.0/WebPumpIDE_Src/WebPumpIDE/src/com/webpump/ui/project/SiteConfigSection.java,v 1.1.1.1 2004/07/01 09:07:52 wang_j Exp $
* $Revision: 1.1.1.1 $
* $Date: 2004/07/01 09:07:52 $
*
* ====================================================================
*
* 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.project;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.pde.core.IModelChangedEvent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.ui.part.FileEditorInput;
import com.webpump.ui.base.data.BaseDataObject;
import com.webpump.ui.base.data.BaseModel;
import com.webpump.ui.base.gui.BasePage;
import com.webpump.ui.base.gui.BaseTableSection;
import com.webpump.ui.perspective.MacroResource;
import com.webpump.ui.perspective.WebpumpIDEPlugin;
import com.webpump.ui.wizard.SiteDialog;
/**
* Site Config layout
*
* @author wang_j
* @version 2.0 2004-02-11
*/
public class SiteConfigSection extends BaseTableSection {
public SiteConfigSection(BasePage page) {
super(page,new String[]{WebpumpIDEPlugin.getResourceString(MacroResource.ADDBUTTON),
WebpumpIDEPlugin.getResourceString(MacroResource.DELBUTTON)});
setHeaderText(WebpumpIDEPlugin.getResourceString(MacroResource.WEBPUMP_NEWWIZARD_PAGE_SITE_CONFIG));
}
/**
* 设置列柄垓内容
* @author wang_j
*
*/
protected class TableLabelProvider extends LabelProvider implements ITableLabelProvider {
public Image getColumnImage(Object element, int columnIndex) {
return null;
}
public String getColumnText(Object element, int columnIndex) {
if (element instanceof SiteInfo)
return ((SiteInfo)element).getSiteInfo()[columnIndex] ;
else
return null;
}
}
/**
* init the treeview's Data
* @param input Data Object
*/
public void initialize(Object input) {
BaseModel model = (BaseModel) input;
tableViewer.getTable().setLinesVisible(true);
tableViewer.getTable().setHeaderVisible(true);
TableColumn column = new TableColumn(tableViewer.getTable(), SWT.LEFT);
column.setText(WebpumpIDEPlugin.getResourceString(MacroResource.SITECONFIGSECTION_SOURCE_NAME));
column.setWidth(80);
column = new TableColumn(tableViewer.getTable(), SWT.LEFT);
column.setText(WebpumpIDEPlugin.getResourceString(MacroResource.SITECONFIGSECTION_SOURCE_PATH));
column.setWidth(80);
column = new TableColumn(tableViewer.getTable(), SWT.LEFT|SWT.FLAT);
column.setText(WebpumpIDEPlugin.getResourceString(MacroResource.SITECONFIGSECTION_TARGET_PATH));
column.setWidth(120);
tableViewer.setLabelProvider(new TableLabelProvider());
tableViewer.setInput(getDataFromModel(model));
model.addModelChangedListener(this);
}
/**
* 用户双击列柄垓时弹出修改对话
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -