标签:style blog http ar os sp on 数据 2014
1.Comosite类谱系图.
Composite的用法:
格式:Composite(Composite parent,int style)
用法:Composite composite = new Composite(shell,SWT.NONE)
说明:这里第一个参数还是用了Shell类.因为Shell类属于Composite的子类.所以shell也可以当做Composite类型来用.
Composite的式样一般都是用SWT.NONE,这时Composite在界面是不显示出来的.
只暗地里发挥着容器的作用.当然可以用SWT.BORDER式样让它形成凹陷的效果.
3.常用方法
1.composite.getLayout()得到布局管理器
2.composite.getLayoutData()得到本身的布局数据
3.composite.getParent()得到容纳composite的父容器
4.composite.getShell()得到容纳composite的Shell.
5.composite.getlayout()将composite的组件重新布局,相当于刷新功能.
分组框(Group类)
可以发现Group其实是Composite的子类.
Group常用语集合一些同类界面组件,
标签:style blog http ar os sp on 数据 2014
原文地址:http://www.cnblogs.com/DreamDrive/p/4162133.html