^1576132600247
@
sname
shell
stext
Shell
sNO_TRIM
false
sCLOSE
true
sTITLE
true
sMIN
true
sMAX
true
sBORDER
false
sRESIZE
true
sON_TOP
false
sTOOL
false
sNO_FOCUS
false
swidth
1024
sheight
768
scenterScreen
true
spack
false
smaximized
false
sfullScreen
false
sdesign
true
sisIde
false
sdesignDefaultOpen
false
sexitOnDispose
false
sH_SCROLL
false
sV_SCROLL
false
sNO_BACKGROUND
false
sNO_MERGE_PAINTS
false
sNO_REDRAW_RESIZE
false
sNO_RADIO_GROUP
false
sEMBEDDED
false
sDOUBLE_BUFFERED
false
slabel
Shell
scapture
false
senabled
true
sredraw
true
svisible
true
sdescriptors
xworker.swt.widgets.Shell
sinheritDescription
false
sth_createIndex
false
sth_registMyChilds
false
sth_registDisabled
false
sth_mark
false
  @/@shellFillLayout
  sname
  shellFillLayout
  stype
  SWT.HORIZONTAL
  sdescriptors
  xworker.swt.Layouts/@FillLayout
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  shellFillLayout
  @/@group
  sname
  group
  stext
  Shell
  sstyle
  SHADOW_ETCHED_IN
  sBORDER
  false
  sH_SCROLL
  false
  sV_SCROLL
  false
  sNO_BACKGROUND
  false
  sNO_FOCUS
  false
  sNO_MERGE_PAINTS
  false
  sNO_REDRAW_RESIZE
  false
  sNO_RADIO_GROUP
  false
  sEMBEDDED
  false
  sDOUBLE_BUFFERED
  false
  slabel
  Shell
  scapture
  false
  senabled
  true
  sredraw
  true
  svisible
  true
  sdescriptors
  xworker.swt.Widgets/@Group
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  group
    @/@group/@GuideComposite
    sname
    GuideComposite
    sdescriptors
    xworker.swt.Widgets/@GuideComposite
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    sid
    GuideComposite
      @/@group/@GuideComposite/@Guide
      sname
      Guide
      sshowHeader
      true
      sdescriptors
      xworker.swt.guide.GuideComposite/@Guide
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_fileMonitor
      false
      sth_mark
      false
      sth_registQueryOnlySelf
      false
      sid
      Guide
        @/@group/@GuideComposite/@Guide/@shell
        sname
        shell
        slabel
        Shell
        sbrowserLocation
        top
        surlType
        thingDoc
        sweights
        20,80
        Sdescription
#$@text#$@
<p>Shell是SWT应用的入口，Shell对应的是窗口。</p>

<p>Shell模型的描述者（类）是xworker.swt.widgets.Shell，下面是Shell模型的表单，可以尝试修改，然后点击运行按钮打开窗口。</p>
#$@text#$@
        sdescriptors
        xworker.swt.guide.Guide/@BrowserComposite
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_fileMonitor
        false
        sth_deprecated
        false
        Sen_description
#$@text#$@
<p>Shell is the entry of SWT application, and shell corresponds to window.</p>

<p>The descriptor (class) of shell model is xworker.swt.widgets.Shell. The form of shell model is below. You can try to modify it, and then click the run button to open the window.</p>
#$@text#$@
        sth_mark
        false
        sth_registQueryOnlySelf
        false
        sid
        shell
          @/@group/@GuideComposite/@Guide/@shell/@Composite
          sname
          Composite
          sBORDER
          false
          sH_SCROLL
          false
          sV_SCROLL
          false
          sNO_BACKGROUND
          false
          sNO_FOCUS
          false
          sNO_MERGE_PAINTS
          false
          sNO_REDRAW_RESIZE
          false
          sNO_RADIO_GROUP
          false
          sEMBEDDED
          false
          sDOUBLE_BUFFERED
          false
          scapture
          false
          senabled
          true
          sredraw
          true
          spack
          false
          svisible
          true
          sdescriptors
          xworker.swt.guide.Guide/@BrowserComposite/@Composite
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_fileMonitor
          false
          sth_mark
          false
          sth_registQueryOnlySelf
          false
          sid
          Composite
            @/@group/@GuideComposite/@Guide/@shell/@Composite/@GridLayout
            sname
            GridLayout
            smakeColumnsEqualWidth
            false
            smarginWidth
            5
            smarginHeight
            5
            smarginLeft
            0
            smarginTop
            0
            smarginRight
            0
            smarginBottom
            0
            shorizontalSpacing
            5
            sverticalSpacing
            5
            sdescriptors
            xworker.swt.Layouts/@GridLayout
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_fileMonitor
            false
            sth_mark
            false
            sth_registQueryOnlySelf
            false
            sid
            GridLayout
            @/@group/@GuideComposite/@Guide/@shell/@Composite/@thingForm
            sname
            thingForm
            sthing
            xworker.example.swt.controls.MenuShell
            scolumn
            1
            sH_SCROLL
            true
            sV_SCROLL
            true
            sNO_BACKGROUND
            false
            sNO_FOCUS
            false
            sNO_MERGE_PAINTS
            false
            sNO_REDRAW_RESIZE
            false
            sNO_RADIO_GROUP
            false
            sEMBEDDED
            false
            sDOUBLE_BUFFERED
            false
            sBORDER
            false
            sdescriptors
            xworker.swt.Widgets/@ThingForm
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_fileMonitor
            false
            sth_mark
            false
            sth_registQueryOnlySelf
            false
            sid
            thingForm
              @/@group/@GuideComposite/@Guide/@shell/@Composite/@thingForm/@GridData
              sname
              GridData
              sstyle
              FILL_BOTH
              shorizontalIndent
              0
              swidth
              -1
              sheight
              -1
              shorizontalAlignment
              BEGINNING
              sverticalAlignment
              CENTER
              shorizontalSpan
              1
              sverticalSpan
              1
              sgrabExcessHorizontalSpace
              false
              sgrabExcessVerticalSpace
              false
              sdescriptors
              xworker.swt.layout.LayoutDatas/@GridData
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_fileMonitor
              false
              sth_mark
              false
              sth_registQueryOnlySelf
              false
              sid
              GridData
          @/@group/@GuideComposite/@Guide/@shell/@Buttons
          sname
          Buttons
          sdescriptors
          xworker.swt.guide.Node/@Buttons
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_fileMonitor
          false
          sth_mark
          false
          sth_registQueryOnlySelf
          false
          sid
          Buttons
            @/@group/@GuideComposite/@Guide/@shell/@Buttons/@runButton
            sname
            runButton
            stext
            lang:d=运行&en=Run
            stype
            SWT.PUSH
            sflat
            false
            sborder
            false
            sselected
            false
            scapture
            false
            senabled
            true
            sredraw
            true
            spack
            false
            svisible
            true
            sdescriptors
            xworker.swt.guide.Buttons/@Button
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_fileMonitor
            false
            sth_mark
            false
            sth_registQueryOnlySelf
            false
            sid
            runButton
              @/@group/@GuideComposite/@Guide/@shell/@Buttons/@runButton/@onSelection
              sname
              onSelection
              sdescriptors
              xworker.swt.widgets.Widget/@Event
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_fileMonitor
              false
              sth_mark
              false
              sth_registQueryOnlySelf
              false
              sid
              onSelection
                @/@group/@GuideComposite/@Guide/@shell/@Buttons/@runButton/@onSelection/@runButtonSelection
                sname
                runButtonSelection
                sisSynchronized
                false
                sthrowException
                true
                suseOtherAction
                false
                svarScope
                Local
                sdisableGlobalContext
                false
                Scode
#$@text#$@
import org.xmeta.Thing;
import org.xmeta.ActionContext;

def thing = new Thing("xworker.swt.widgets.Shell");
thing.getAttributes().putAll(thingForm.doAction("getValues", actionContext));
//添加关闭按钮
thing.addChild(world.getThing("xworker.example.swt.controls.Shell/@shellFillLayout"), false);
thing.addChild(world.getThing("xworker.example.swt.shell.ShellWithRegion/@closeButton"), false);
def ac = new ActionContext();
ac.put("parent", runButton.getShell());

def shell = thing.doAction("create", ac);
shell.setVisible(true);
#$@text#$@
                sinterpretationType
                Action
                screateLocalVarScope
                false
                ssaveReturn
                false
                sswitchResult
                false
                sdebugLog
                false
                sdescriptors
                xworker.lang.actions.Actions/@GroovyAction
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_fileMonitor
                false
                sth_mark
                false
                sth_registQueryOnlySelf
                false
                sid
                runButtonSelection
            @/@group/@GuideComposite/@Guide/@shell/@Buttons/@nextButton
            sname
            nextButton
            slabel
            不规则Shell
            sen_label
            Irregular shell
            sdescriptors
            xworker.swt.guide.Buttons/@NextButton
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_fileMonitor
            false
            sth_deprecated
            false
            sth_mark
            false
            sth_registQueryOnlySelf
            false
            sid
            nextButton
        @/@group/@GuideComposite/@Guide/@Irregularshell
        sname
        Irregularshell
        slabel
        不规则Shell
        stype
        thingDoc
        Sdescription
#$@text#$@
<p>&nbsp;&nbsp;&nbsp; 可以创建不规则Shell，方法是设置Shell的属性NO_TRIM=true，其次添加Region子节点。比如下面的Shell代码，可以点击运行按钮执行。</p>

<p>&nbsp;&nbsp;&nbsp; 注意，RWT下不支持。</p>

<pre class="brush:xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;

&lt;Shell name=&quot;shell&quot; descriptors=&quot;xworker.swt.widgets.Shell&quot; NO_TRIM=&quot;true&quot; CLOSE=&quot;false&quot;
     TITLE=&quot;false&quot; MIN=&quot;false&quot; MAX=&quot;false&quot; RESIZE=&quot;true&quot; label=&quot;ShellWithRegion&quot; background=&quot;#004080&quot;&gt;
    &lt;Region&gt;
        &lt;Add&gt;
            &lt;Circle name=&quot;Circle&quot; radius=&quot;67&quot; offsetX=&quot;67&quot; offsetY=&quot;67&quot;&gt;&lt;/Circle&gt;
        &lt;/Add&gt;
        &lt;Subtract&gt;
            &lt;Circle name=&quot;Circle&quot; radius=&quot;20&quot; offsetX=&quot;67&quot; offsetY=&quot;50&quot;&gt;&lt;/Circle&gt;
            &lt;Points name=&quot;Points&quot; points=&quot;67, 50, 55, 105, 79, 105&quot;&gt;&lt;/Points&gt;
        &lt;/Subtract&gt;
    &lt;/Region&gt;
    &lt;Button name=&quot;closeButton&quot; text=&quot;Close&quot; location=&quot;10,68&quot; pack=&quot;true&quot;&gt;
        &lt;Event name=&quot;onSelection&quot;&gt;
            &lt;Dispose name=&quot;Dispose&quot; descriptors=&quot;xworker.swt.actions.ControlActions/@Dispose&quot;
                 controlList=&quot;shell&quot;&gt;&lt;/Dispose&gt;
        &lt;/Event&gt;
    &lt;/Button&gt;
    &lt;DragMove&gt;
        &lt;actions&gt;
            &lt;GroovyAction name=&quot;dragMoveMoved&quot;&gt;
                &lt;code&gt;&lt;![CDATA[//移动窗口
def loc = shell.getLocation();
shell.setLocation(loc.x + dragMove.getOffsetX(), loc.y + dragMove.getOffsetY());
shell.update();]]&gt;&lt;/code&gt;
            &lt;/GroovyAction&gt;
        &lt;/actions&gt;
    &lt;/DragMove&gt;
&lt;/Shell&gt;</pre>

<p>&nbsp;</p>
#$@text#$@
        sen_label
        Irregular shell
        sdescriptors
        xworker.swt.guide.Guide/@SimpleBrowser
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_noThingRegistViewer
        false
        sth_fileMonitor
        false
        sth_deprecated
        false
        Sen_description
#$@text#$@
<p>&nbsp;&nbsp;&nbsp; You can create an irregular shell by setting the shell property NO_TRIM = true, and then adding the region sub node. For example, the following shell code can be executed by clicking the run button.</p>

<p>&nbsp;&nbsp;&nbsp; Note, not supported under RWT.</p>

<pre class="brush:xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;

&lt;Shell name=&quot;shell&quot; descriptors=&quot;xworker.swt.widgets.Shell&quot; NO_TRIM=&quot;true&quot; CLOSE=&quot;false&quot;
     TITLE=&quot;false&quot; MIN=&quot;false&quot; MAX=&quot;false&quot; RESIZE=&quot;true&quot; label=&quot;ShellWithRegion&quot; background=&quot;#004080&quot;&gt;
    &lt;Region&gt;
        &lt;Add&gt;
            &lt;Circle name=&quot;Circle&quot; radius=&quot;67&quot; offsetX=&quot;67&quot; offsetY=&quot;67&quot;&gt;&lt;/Circle&gt;
        &lt;/Add&gt;
        &lt;Subtract&gt;
            &lt;Circle name=&quot;Circle&quot; radius=&quot;20&quot; offsetX=&quot;67&quot; offsetY=&quot;50&quot;&gt;&lt;/Circle&gt;
            &lt;Points name=&quot;Points&quot; points=&quot;67, 50, 55, 105, 79, 105&quot;&gt;&lt;/Points&gt;
        &lt;/Subtract&gt;
    &lt;/Region&gt;
    &lt;Button name=&quot;closeButton&quot; text=&quot;Close&quot; location=&quot;10,68&quot; pack=&quot;true&quot;&gt;
        &lt;Event name=&quot;onSelection&quot;&gt;
            &lt;Dispose name=&quot;Dispose&quot; descriptors=&quot;xworker.swt.actions.ControlActions/@Dispose&quot;
                 controlList=&quot;shell&quot;&gt;&lt;/Dispose&gt;
        &lt;/Event&gt;
    &lt;/Button&gt;
    &lt;DragMove&gt;
        &lt;actions&gt;
            &lt;GroovyAction name=&quot;dragMoveMoved&quot;&gt;
                &lt;code&gt;&lt;![CDATA[
def loc = shell.getLocation();
shell.setLocation(loc.x + dragMove.getOffsetX(), loc.y + dragMove.getOffsetY());
shell.update();]]&gt;&lt;/code&gt;
            &lt;/GroovyAction&gt;
        &lt;/actions&gt;
    &lt;/DragMove&gt;
&lt;/Shell&gt;</pre>

<p>&nbsp;</p>
#$@text#$@
        sth_mark
        false
        sth_registQueryOnlySelf
        false
        sid
        Irregularshell
          @/@group/@GuideComposite/@Guide/@Irregularshell/@Buttons
          sname
          Buttons
          sdescriptors
          xworker.swt.guide.Node/@Buttons
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_fileMonitor
          false
          sth_mark
          false
          sth_registQueryOnlySelf
          false
          sid
          Buttons
            @/@group/@GuideComposite/@Guide/@Irregularshell/@Buttons/@runButton
            sname
            runButton
            stext
            lang:d=运行&en=Run
            stype
            SWT.PUSH
            sflat
            false
            sborder
            false
            sselected
            false
            scapture
            false
            senabled
            true
            sredraw
            true
            spack
            false
            svisible
            true
            sdescriptors
            xworker.swt.guide.Buttons/@Button
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_fileMonitor
            false
            sth_mark
            false
            sth_registQueryOnlySelf
            false
            sid
            runButton
              @/@group/@GuideComposite/@Guide/@Irregularshell/@Buttons/@runButton/@onSelection
              sname
              onSelection
              sdescriptors
              xworker.swt.widgets.Widget/@Event
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_fileMonitor
              false
              sth_mark
              false
              sth_registQueryOnlySelf
              false
              sid
              onSelection
                @/@group/@GuideComposite/@Guide/@Irregularshell/@Buttons/@runButton/@onSelection/@OpenShell
                sname
                OpenShell
                sshellPath
                xworker.example.swt.shell.ShellWithRegion
                ssingleInstance
                true
                sanotherThread
                false
                sinterpretationType
                Self
                sattributeTemplate
                false
                schildsAttributeTemplate
                false
                svarScope
                Local
                sisSynchronized
                false
                sthrowException
                true
                screateLocalVarScope
                false
                ssaveReturn
                false
                sswitchResult
                false
                sdisableGlobalContext
                false
                sdebugLog
                false
                sdescriptors
                xworker.swt.actions.ShellActionsNew/@OpenShell
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_fileMonitor
                false
                sth_mark
                false
                sth_registQueryOnlySelf
                false
                sid
                OpenShell
            @/@group/@GuideComposite/@Guide/@Irregularshell/@Buttons/@nextButton
            sname
            nextButton
            slabel
            上一步
            sen_label
            Previous
            sdescriptors
            xworker.swt.guide.Buttons/@NextButton1
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_fileMonitor
            false
            sth_mark
            false
            sth_registQueryOnlySelf
            false
            sid
            nextButton
    @/@group/@FillLayout
    sname
    FillLayout
    stype
    SWT.HORIZONTAL
    sdescriptors
    xworker.swt.Layouts/@FillLayout
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    sid
    FillLayout
