- 浏览: 117977 次
- 性别:
- 来自: 深圳
文章分类
最新评论
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.widgets.FormToolkit;
import com.huawei.enip.esdt.common.ui.esdt.forms.EsdtFormSection;
import com.huawei.enip.esdt.esb.ui.editor.pages.ESBTransportConfigPage;
public class TransportConfigSection extends EsdtFormSection
{
private Table table = null;//表格对象
private ESBTransportConfigPage page = null;//ESBOverViewPage页
private Label pageInfoLab;//页信息标签
private Label protocolLab;
private Label LoadLab;
private Label urlLab;//url标签
private Label formatLab;
private Label retryLab;
private Label iterationLab;
private Label applicationLab;
private Text httpTxt;
private Text numTxt;
private Text nubTxt;
private Combo protocolCombo;
private Combo roundCombo;
private Button yesBut;
private Button noBut;
private Button buttonUp;
private Button buttonAdd;
private Button buttonDown;
private Button buttonDel;
/**
* 构造函数
* @param parent
* @param toolkit
* @param style
*/
public TransportConfigSection(Composite parent, FormToolkit toolkit,
int style)
{
super(parent, toolkit, style);
}
/* (此注释不是Javadoc注释)
* @see
com.huawei.enip.esdt.common.ui.forms.FormSection#createClientArea
(org.eclipse.swt.widgets.Composite,
org.eclipse.ui.forms.widgets.FormToolkit)
*/
@Override
public void createClientArea(Composite parent, FormToolkit
formToolkit)
{
//设置Section标签
getSection().setText("Transport Configuration");
getSection().setLayoutData(new GridLayout());
getSection().setLayoutData(new GridData(
GridData.HORIZONTAL_ALIGN_BEGINNING
| GridData.VERTICAL_ALIGN_FILL
| GridData.FILL_HORIZONTAL));
//设置分割线
formToolkit.createCompositeSeparator(getSection());
//创建页面显示
createDescriptionArea(parent);
}
/**
* 页面显示的方法
* @param parent
*/
private void createDescriptionArea(Composite parent)
{
parent.setLayout(new FillLayout());
//设置全局网格布局方式
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 3; //设置网格的列数为4
gridLayout.horizontalSpacing = 50;
parent.setLayout(gridLayout);
pageInfoLab = new Label(parent, SWT.NONE);//定义标签对象
pageInfoLab.setText("Use this page to configure the transport
information for this service.");
GridData gridData = new GridData(SWT.BEGINNING, SWT.CENTER,
false,
false, 3, 1);
pageInfoLab.setLayoutData(gridData);
//第一个标签
protocolLab = new Label(parent, SWT.NONE);
protocolLab.setText("Protocol");
//下拉列表框
protocolCombo = new Combo(parent, SWT.READ_ONLY);
protocolCombo.add("http");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
2, 1);
gridData.widthHint = 120;
protocolCombo.setLayoutData(gridData);
//第二个标签
protocolLab = new Label(parent, SWT.NONE);
protocolLab.setText("Load Balancing\nALgorithm");
//下拉列表框
protocolCombo = new Combo(parent, SWT.READ_ONLY);
protocolCombo.add("round-robin");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
2, 1);
gridData.widthHint = 120;
protocolCombo.setLayoutData(gridData);
//URL标签
protocolLab = new Label(parent, SWT.NONE);
protocolLab.setText("Endpoint URI");
gridData = new GridData(SWT.BEGINNING, SWT.TOP, false, false, 1,
5);
protocolLab.setLayoutData(gridData);
//FORMAT标签
protocolLab = new Label(parent, SWT.NONE);
protocolLab.setText("Format:http://host:post/soneService");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
2, 1);
gridData.widthHint = 300;
protocolLab.setLayoutData(gridData);
Text text = new Text(parent, SWT.BORDER);
text.setText("http://www.iteye.com");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
1, 1);
gridData.widthHint = 300;
text.setLayoutData(gridData);
Button button = new Button(parent, SWT.PUSH);
button.setText("Add");
gridData = new GridData();
gridData.widthHint = 50;
button.setLayoutData(gridData);
//创建表格样式
table = new Table(parent, 2565);
table.setLinesVisible(true); //设置显示表格线
table.setHeaderVisible(true); //设置显示表头
//设置表头数组
final String[] table_column = {"Existing URIs", ""};
//用于设置列宽的布局管理器
TableLayout tLayout = new TableLayout();
//创建表头
for (int i = 0; i < table_column.length; ++i)
{
TableColumn tableColumn = new TableColumn(table, 0);
tableColumn.setText(table_column[i]);
tableColumn.setWidth(200);
//将列宽设置为50px
tLayout.addColumnData(new ColumnWeightData(100));
}
//创建TableViewer
TableViewer tableViewer = new TableViewer(table);
tableViewer.getTable().setLayout(tLayout);
//将表头填充,并显示
for (int i = 0; i < tableViewer.getTable().getColumnCount(); ++i)
{
tableViewer.getTable().getColumn(i).pack();
}
//设置表格样式
gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 3);
table.setLayoutData(gridData);
Button button1 = new Button(parent, SWT.PUSH);
button1.setText("Up");
gridData = new GridData();
gridData.widthHint = 50;
button1.setLayoutData(gridData);
Button button2 = new Button(parent, SWT.PUSH);
button2.setText("Down");
gridData = new GridData();
gridData.widthHint = 50;
button2.setLayoutData(gridData);
Button button3 = new Button(parent, SWT.PUSH);
button3.setText("Delete");
gridData = new GridData();
gridData.widthHint = 50;
button3.setLayoutData(gridData);
//Count标签
protocolLab = new Label(parent, SWT.NONE);
protocolLab.setText("Retry Count");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
1, 1);
protocolLab.setLayoutData(gridData);
//Count文本框
Text text2 = new Text(parent, SWT.BORDER);
text2.setText("0");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
2, 1);
gridData.widthHint = 135;
text2.setLayoutData(gridData);
//Count标签
protocolLab = new Label(parent, SWT.NONE);
protocolLab.setText("Retry Iteration\nInterval");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
1, 1);
protocolLab.setLayoutData(gridData);
//Count文本框
Text text3 = new Text(parent, SWT.BORDER);
text3.setText("30");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
2, 1);
gridData.widthHint = 135;
text3.setLayoutData(gridData);
//Count标签
protocolLab = new Label(parent, SWT.NONE);
protocolLab.setText("Retry Application\nErrors");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
1, 2);
protocolLab.setLayoutData(gridData);
Button button4 = new Button(parent, SWT.RADIO);
button4.setText("男");
gridData = new GridData(SWT.BEGINNING, SWT.TOP, false, false, 2,
1);
button4.setLayoutData(gridData);
Button button5 = new Button(parent, SWT.RADIO);
button5.setText("女");
gridData = new GridData(SWT.BEGINNING, SWT.TOP, false, false, 2,
1);
button5.setLayoutData(gridData);
}
}
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.widgets.FormToolkit;
import com.huawei.enip.esdt.common.ui.esdt.forms.EsdtFormSection;
import com.huawei.enip.esdt.esb.ui.editor.pages.ESBTransportConfigPage;
public class TransportConfigSection extends EsdtFormSection
{
private Table table = null;//表格对象
private ESBTransportConfigPage page = null;//ESBOverViewPage页
private Label pageInfoLab;//页信息标签
private Label protocolLab;
private Label LoadLab;
private Label urlLab;//url标签
private Label formatLab;
private Label retryLab;
private Label iterationLab;
private Label applicationLab;
private Text httpTxt;
private Text numTxt;
private Text nubTxt;
private Combo protocolCombo;
private Combo roundCombo;
private Button yesBut;
private Button noBut;
private Button buttonUp;
private Button buttonAdd;
private Button buttonDown;
private Button buttonDel;
/**
* 构造函数
* @param parent
* @param toolkit
* @param style
*/
public TransportConfigSection(Composite parent, FormToolkit toolkit,
int style)
{
super(parent, toolkit, style);
}
/* (此注释不是Javadoc注释)
* @see
com.huawei.enip.esdt.common.ui.forms.FormSection#createClientArea
(org.eclipse.swt.widgets.Composite,
org.eclipse.ui.forms.widgets.FormToolkit)
*/
@Override
public void createClientArea(Composite parent, FormToolkit
formToolkit)
{
//设置Section标签
getSection().setText("Transport Configuration");
getSection().setLayoutData(new GridLayout());
getSection().setLayoutData(new GridData(
GridData.HORIZONTAL_ALIGN_BEGINNING
| GridData.VERTICAL_ALIGN_FILL
| GridData.FILL_HORIZONTAL));
//设置分割线
formToolkit.createCompositeSeparator(getSection());
//创建页面显示
createDescriptionArea(parent);
}
/**
* 页面显示的方法
* @param parent
*/
private void createDescriptionArea(Composite parent)
{
parent.setLayout(new FillLayout());
//设置全局网格布局方式
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 3; //设置网格的列数为4
gridLayout.horizontalSpacing = 50;
parent.setLayout(gridLayout);
pageInfoLab = new Label(parent, SWT.NONE);//定义标签对象
pageInfoLab.setText("Use this page to configure the transport
information for this service.");
GridData gridData = new GridData(SWT.BEGINNING, SWT.CENTER,
false,
false, 3, 1);
pageInfoLab.setLayoutData(gridData);
//第一个标签
protocolLab = new Label(parent, SWT.NONE);
protocolLab.setText("Protocol");
//下拉列表框
protocolCombo = new Combo(parent, SWT.READ_ONLY);
protocolCombo.add("http");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
2, 1);
gridData.widthHint = 120;
protocolCombo.setLayoutData(gridData);
//第二个标签
protocolLab = new Label(parent, SWT.NONE);
protocolLab.setText("Load Balancing\nALgorithm");
//下拉列表框
protocolCombo = new Combo(parent, SWT.READ_ONLY);
protocolCombo.add("round-robin");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
2, 1);
gridData.widthHint = 120;
protocolCombo.setLayoutData(gridData);
//URL标签
protocolLab = new Label(parent, SWT.NONE);
protocolLab.setText("Endpoint URI");
gridData = new GridData(SWT.BEGINNING, SWT.TOP, false, false, 1,
5);
protocolLab.setLayoutData(gridData);
//FORMAT标签
protocolLab = new Label(parent, SWT.NONE);
protocolLab.setText("Format:http://host:post/soneService");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
2, 1);
gridData.widthHint = 300;
protocolLab.setLayoutData(gridData);
Text text = new Text(parent, SWT.BORDER);
text.setText("http://www.iteye.com");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
1, 1);
gridData.widthHint = 300;
text.setLayoutData(gridData);
Button button = new Button(parent, SWT.PUSH);
button.setText("Add");
gridData = new GridData();
gridData.widthHint = 50;
button.setLayoutData(gridData);
//创建表格样式
table = new Table(parent, 2565);
table.setLinesVisible(true); //设置显示表格线
table.setHeaderVisible(true); //设置显示表头
//设置表头数组
final String[] table_column = {"Existing URIs", ""};
//用于设置列宽的布局管理器
TableLayout tLayout = new TableLayout();
//创建表头
for (int i = 0; i < table_column.length; ++i)
{
TableColumn tableColumn = new TableColumn(table, 0);
tableColumn.setText(table_column[i]);
tableColumn.setWidth(200);
//将列宽设置为50px
tLayout.addColumnData(new ColumnWeightData(100));
}
//创建TableViewer
TableViewer tableViewer = new TableViewer(table);
tableViewer.getTable().setLayout(tLayout);
//将表头填充,并显示
for (int i = 0; i < tableViewer.getTable().getColumnCount(); ++i)
{
tableViewer.getTable().getColumn(i).pack();
}
//设置表格样式
gridData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 3);
table.setLayoutData(gridData);
Button button1 = new Button(parent, SWT.PUSH);
button1.setText("Up");
gridData = new GridData();
gridData.widthHint = 50;
button1.setLayoutData(gridData);
Button button2 = new Button(parent, SWT.PUSH);
button2.setText("Down");
gridData = new GridData();
gridData.widthHint = 50;
button2.setLayoutData(gridData);
Button button3 = new Button(parent, SWT.PUSH);
button3.setText("Delete");
gridData = new GridData();
gridData.widthHint = 50;
button3.setLayoutData(gridData);
//Count标签
protocolLab = new Label(parent, SWT.NONE);
protocolLab.setText("Retry Count");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
1, 1);
protocolLab.setLayoutData(gridData);
//Count文本框
Text text2 = new Text(parent, SWT.BORDER);
text2.setText("0");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
2, 1);
gridData.widthHint = 135;
text2.setLayoutData(gridData);
//Count标签
protocolLab = new Label(parent, SWT.NONE);
protocolLab.setText("Retry Iteration\nInterval");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
1, 1);
protocolLab.setLayoutData(gridData);
//Count文本框
Text text3 = new Text(parent, SWT.BORDER);
text3.setText("30");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
2, 1);
gridData.widthHint = 135;
text3.setLayoutData(gridData);
//Count标签
protocolLab = new Label(parent, SWT.NONE);
protocolLab.setText("Retry Application\nErrors");
gridData = new GridData(SWT.BEGINNING, SWT.CENTER, false, false,
1, 2);
protocolLab.setLayoutData(gridData);
Button button4 = new Button(parent, SWT.RADIO);
button4.setText("男");
gridData = new GridData(SWT.BEGINNING, SWT.TOP, false, false, 2,
1);
button4.setLayoutData(gridData);
Button button5 = new Button(parent, SWT.RADIO);
button5.setText("女");
gridData = new GridData(SWT.BEGINNING, SWT.TOP, false, false, 2,
1);
button5.setLayoutData(gridData);
}
}
发表评论
文章已被作者锁定,不允许评论。
-
SWT控件3
2011-08-10 10:02 337ssssssssss -
SWT控件2
2011-08-10 09:47 398vvvvvvvvvv -
SWT控件
2011-08-10 09:44 354aaaaaaa -
SWT的Table对单元格添加可编辑属性
2011-08-09 17:11 945http://imylone.iteye.com/blog/1 ... -
TreeViewer的ContentProvider详解,以及Lazy载入
2011-07-20 14:00 676http://lizhensan.iteye.com/blog ... -
eclipse 对话框 大全
2011-07-20 13:57 555http://lizhensan.iteye.com/blog ... -
rcp 便捷操作
2011-07-20 13:55 636http://lizhensan.iteye.com/blog ... -
eclipse 代码
2011-07-20 13:54 659http://lizhensan.iteye.com/blog ... -
浏览器 chrome 插件开发
2011-07-20 13:52 751http://lizhensan.iteye.com/blog ... -
代码创建java工程
2011-07-20 13:50 620http://lizhensan.iteye.com/blog ... -
eclipse jet
2011-07-20 13:48 611http://lizhensan.iteye.com/blog ... -
freemarker 第一个例子
2011-07-20 13:47 606http://lizhensan.iteye.com/blog ... -
Eclipse的Error Log View中显示自己的Log
2011-07-20 13:44 763http://lizhensan.iteye.com/blog ... -
述_综_术_技_台_平_Eclipse
2011-07-20 13:40 447http://lizhensan.iteye.com/blog ... -
绍_介_点_展_扩
2011-07-20 12:28 275http://lizhensan.iteye.com/blog ... -
TableViewer_TreeViewer
2011-07-12 12:33 1529SWT中设置TableViewer和TreeViewer成为双 ... -
具_工_小_制_自
2011-07-12 12:31 795<extension point=& ... -
点_展_扩_义_定_自
2011-07-12 12:28 569博客分类: eclipse plugin Eclipse 自 ... -
化_际_国_eclipse
2011-07-12 12:23 604博客分类: eclipse plugin 像eclipse ... -
语_法_件_控_本_基_S_W_T
2011-04-06 20:24 1520************************基本控件*** ...
相关推荐
《CCM3310S-T_Demo_T29S.ccm_splitqfx_ccm3310s_3511cCm_modell7y_》项目概述 本项目着重介绍了国芯科技(Goodix)的CCM3310S加密芯片在实际应用中的基本功能实现。该芯片是一款高性能、低功耗的安全加密处理器,...
BPLGUInfoCustomAppSrcP_MT6261_S00_G36S_240_TFT_V1_0_0
为了解决这个问题,C标准库引入了安全版本的这些函数,例如`strcpy_s`, `strncpy_s`, `snprintf_s`, 和 `memcpy_s`。下面我们将详细探讨这些安全函数的功能和使用方法。 1. **strcpy_s**: 这是`strcpy`的安全版本。...
VB_DRV_W98S_W2K_XP_V6.1.zip是一个包含驱动程序的压缩文件,主要用于支持Windows 98, Windows 2000 和 Windows XP操作系统。这个驱动程序包的核心目标是确保硬件设备在这些旧版Windows系统上能够正常运行。 驱动...
标题中的"T_S_refprop_banknhy_T-S图_T-S图refprop_easy_源码.rar"表明这是一个关于热力学性质计算的程序源代码,主要涉及T-S图(温度-熵图)的绘制和Refprop库的使用。Refprop是NIST(美国国家标准与技术研究所)...
link_Save_and_restore_the_state_of_Shiny_app's_w_shinyURL
BPLGUInfoCustomAppSrcP_MT6261_S01_MAUI_11C_W13_52_.V2
这个工具的最新版本是s_tide_v1.14_updated,它包含了clockt9f算法,用于提高潮汐分析的精确度和效率。 潮汐调和分析是研究海洋潮汐现象的核心方法之一,它旨在通过数学模型分解复杂潮汐变化,将之转化为一系列基本...
TI_BLE_Software_Developer's_Guide 是TI发行的蓝牙4.0协议栈开发指南,据有较强的指导意义,可以避免开发人员少走弯路,提高效率。
tools 搜狗输入法 android SogouInput_android_3.1.1_sweb.apk
US_W268Rv8RA_V3.2.4.05s_268CN.bin
金升阳A_S-2W & B_S-2W_CN系列电源模块是专门为线路板上分布式电源系统设计的产品,它们能够为需要隔离的电源应用场合提供一组正负双路或单路输出的2W定电压输入DC-DC模块电源。这些模块符合RoHS指令,被广泛应用于...
W5x00_DMA_with_W5100S_EVB 该项目基于W5100S-EVB。 但是,如果在W5100S-EVB上使用Arduino接口的SPI,则在修改wizchip_conf.h时可以使用W5100S / W5100 / W5200 / W5500 W5100S EVB W5100S芯片开发平台,用于支持...
Numerical.Recipes 3rd edition source code。文件中包含 C++ 3.0版本代码及2.11最终版的C、CPP源程序 还有相应的例子。 Code files (".h files") are all in C++ and can be accessed directly in the directory ...
ESRL-GMD-CO2_brw_surface-insitu_1_ccgg_MonthlyData_s19730101_e20161231_c20171002.nc
\[ T(f,t) = \frac{1}{\sqrt{2\pi}\sigma_t} \int_{-\infty}^{\infty} x(\tau) e^{-\frac{(t-\tau)^2}{2\sigma_t^2}} e^{-j2\pi f(t-\tau)} d\tau \] 其中,\( x(\tau) \) 是原始信号,\( t \) 和 \( f \) 分别代表...
sogoufep_s60_v5_s3602 搜狗手机输入法 方便 s60专用
本手册指导使用者进行用户管理、业务流程申请与审批管理、文档管理、策略管理、日志管理、终端管理、后台配置等DLP_CDG_V3.8S系统各个模块的业务操作。 本手册的使用对象:公司技术支持部、销售部、市场部、测试部和...
US_W311RV8.0RA_V3.2.4.03s_CN.rar