^1400345005596
@
sname
WebBrowser
slabel
WebBrowser
sdescriptors
xworker.lang.MetaDescriptor3
sextends
xworker.swt.layout.LayoutDatas
smany
true
seditCols
2
sinitialization
false
smodifier
public
sinheritDescription
false
sth_createIndex
false
sth_registMyChilds
false
sth_mark
false
@/@name
sname
name
sshowLabel
true
sreadOnly
false
sinheritDescription
false
svalidateAllowBlank
true
LvalidateOnBlur
true
LallowDecimals
true
LallowNegative
true
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
sth_registMyChilds
false
sth_mark
false
@/@label
sname
label
sshowLabel
true
sreadOnly
false
sinheritDescription
false
svalidateAllowBlank
true
LvalidateOnBlur
true
LallowDecimals
true
LallowNegative
true
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
sth_registMyChilds
false
sth_mark
false
@/@description
sname
description
sinputtype
html
sshowLabel
true
sreadOnly
false
sinheritDescription
false
svalidateAllowBlank
true
LvalidateOnBlur
true
LallowDecimals
true
LallowNegative
true
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
sth_registMyChilds
false
sth_mark
false
@/@actions
sname
actions
sdescriptors
xworker.lang.MetaDescriptor3/@actions
sth_createIndex
false
sth_registMyChilds
false
sth_mark
false
@/@actions/@create
sname
create
sisSynchronized
false
sthrowException
true
suseOtherAction
false
svarScope
Local
sdisableGlobalContext
false
Scode
#$@text#$@
//默认都有一个parent变量，是父控件
def parent = actionContext.get("parent");

//下面的代码是如何创建控件
def thing = world.getThing("xworker.swt.ide.worldexplorer.swt.util.WebBrowser/@shell/@mainComposite");
//创建浏览器
def browser = thing.doAction("create", actionContext);

//一般控件还可以添加布局和事件等
//这里只演示如何添加布局
//在这里我们通过继承LayoutDatas实现了布局节点
//那么如何让布局节点生效呢？
//方法如下

//首先把自己的控件对象压入大栈中
def bindings = actionContext.push();
//把browser对象以parent变量名放入栈中
bindings.put("parent", browser);
try{
    //遍历子节点执行create方法
    for(child in self.getChilds()){
        child.doAction("create", actionContext);
    }
}finally{
    actionContext.pop();
}

//这样布局节点就可以生效了
//可以看到布局节点已经生效
//而事件以及子控件等都可以通过此方式实现

//本次演示完毕
#$@text#$@
sinitBreakPoint
false
ssuccessBreakPoint
false
sexceptionBreakPoint
false
seditBreakPoint
false
sinterpretationType
Action
screateLocalVarScope
false
ssaveReturn
false
sdescriptors
xworker.lang.actions.Actions/@GroovyAction
sth_createIndex
false
sth_registMyChilds
false
sth_mark
false
