eclipse forms提供了4个高级组件,这样你能够构建漂亮的ui
expandable composite
在网页中有个普遍的功能就是让你有能力把一部分网页内容用一个按钮
expandablecomposite ec = toolkit.createexpandablecomposi这个composite接受一些风格参数来控制它的表现行为te(form.getbody(), expandablecomposite.tree_node expandablecomposite.client _indent); ec.settext("expandable composite title"); string ctext = "we will now create a somewhat long text so that "+ "we can use it as content for the expandable composite. "+ "expandable composite is used to hide or show the text using the " "toggle control"; label client = toolkit.createlabel(ec, ctext, swt.wrap); ec.setclient(client); td = new tablewrapdata(); td.colspan = 2; ec.setlayoutdata(td); ec.addexpansionlistener(new expansionadapter() { public void expansionstatechanged(expansion event e) { form.reflow(true); } });
section section = toolkit.createsection(form.getbody(), section.descriptionsection这次我们用了twistie风格,添加了描述并要求有标题栏.这个视图看起来应该象这样:.title_bar section.twistiesection .expanded); td = new tablewrapdata(tablewrapdata.fill); td.colspan = 2; section.setlayoutdata(td); section.addexpansionlistener(new expansionadapter() { public void expansionstatechanged(expansion event e) { form.reflow(true); } }); section.settext("section title"); section.setdescription("this is the description that goes "+ below the title"); composite sectionclient = toolkit.createcomposite(section); sectionclient.setlayout(new gridlayout()); button = toolkit.createbutton(sectionclient, "radio 1", swt.radio); button = toolkit.createbutton(sectionclient, "radio 2", swt.radio); section.setclient(sectionclient);
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器