- 浏览: 117391 次
- 性别:
- 来自: 深圳
文章分类
最新评论
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 331ssssssssss -
SWT控件2
2011-08-10 09:47 380vvvvvvvvvv -
SWT控件
2011-08-10 09:44 347aaaaaaa -
SWT的Table对单元格添加可编辑属性
2011-08-09 17:11 938http://imylone.iteye.com/blog/1 ... -
TreeViewer的ContentProvider详解,以及Lazy载入
2011-07-20 14:00 665http://lizhensan.iteye.com/blog ... -
eclipse 对话框 大全
2011-07-20 13:57 555http://lizhensan.iteye.com/blog ... -
rcp 便捷操作
2011-07-20 13:55 624http://lizhensan.iteye.com/blog ... -
eclipse 代码
2011-07-20 13:54 650http://lizhensan.iteye.com/blog ... -
浏览器 chrome 插件开发
2011-07-20 13:52 743http://lizhensan.iteye.com/blog ... -
代码创建java工程
2011-07-20 13:50 618http://lizhensan.iteye.com/blog ... -
eclipse jet
2011-07-20 13:48 608http://lizhensan.iteye.com/blog ... -
freemarker 第一个例子
2011-07-20 13:47 598http://lizhensan.iteye.com/blog ... -
Eclipse的Error Log View中显示自己的Log
2011-07-20 13:44 755http://lizhensan.iteye.com/blog ... -
述_综_术_技_台_平_Eclipse
2011-07-20 13:40 440http://lizhensan.iteye.com/blog ... -
绍_介_点_展_扩
2011-07-20 12:28 275http://lizhensan.iteye.com/blog ... -
TableViewer_TreeViewer
2011-07-12 12:33 1528SWT中设置TableViewer和TreeViewer成为双 ... -
具_工_小_制_自
2011-07-12 12:31 793<extension point=& ... -
点_展_扩_义_定_自
2011-07-12 12:28 568博客分类: eclipse plugin Eclipse 自 ... -
化_际_国_eclipse
2011-07-12 12:23 601博客分类: eclipse plugin 像eclipse ... -
语_法_件_控_本_基_S_W_T
2011-04-06 20:24 1513************************基本控件*** ...
相关推荐
《CCM3310S-T_Demo_T29S.ccm_splitqfx_ccm3310s_3511cCm_modell7y_》项目概述 本项目着重介绍了国芯科技(Goodix)的CCM3310S加密芯片在实际应用中的基本功能实现。该芯片是一款高性能、低功耗的安全加密处理器,...
intmax_t uintmax_t Integer type with the maximum width supported. int8_t uint8_t Integer type with a width of exactly 8, 16, 32, or 64 bits. For signed types, negative values are represented using 2's...
Xerox_DocuCentre_S2011_S2320_S2520.exe
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算法,用于提高潮汐分析的精确度和效率。 潮汐调和分析是研究海洋潮汐现象的核心方法之一,它旨在通过数学模型分解复杂潮汐变化,将之转化为一系列基本...
《Quectel_EC200T_Linux_USB_Driver_User_Guide_V1.0.pdf》是针对Quectel公司生产的EC200T模块在Linux系统下使用的USB驱动程序用户指南。此文档的主要目的是为用户提供及时、全面的服务,帮助他们正确安装和配置...
tools 搜狗输入法 android SogouInput_android_3.1.1_sweb.apk
T检验,亦称student t检验(Student s t test),主要用于样本含量较小(例如n<30),总体标准差σ未知的正态分布资料。 T检验是用于小样本(样本容量小于30)的两个平均值差异程度的检验方法。它是用T分布...
US_W268Rv8RA_V3.2.4.05s_268CN.bin
S9_to_S9HD_PackS9_to_S9HD_PackS9_to_S9HD_PackS9_to_S9HD_PackS9_to_S9HD_PackS9_to_S9HD_PackS9_to_S9HD_PackS9_to_S9HD_PackS9_to_S9HD_PackS9_to_S9HD_PackS9_to_S9HD_PackS9_to_S9HD_PackS9_to_S9HD_PackS9_to...
金升阳A_S-2W & B_S-2W_CN系列电源模块是专门为线路板上分布式电源系统设计的产品,它们能够为需要隔离的电源应用场合提供一组正负双路或单路输出的2W定电压输入DC-DC模块电源。这些模块符合RoHS指令,被广泛应用于...
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 \) 分别代表...