^1592299166991
@
sname
shell
stext
ClipScreen
sNO_TRIM
false
sCLOSE
true
sTITLE
true
sMIN
true
sMAX
true
sBORDER
false
sRESIZE
true
sON_TOP
false
sTOOL
false
sNO_FOCUS
false
swidth
640
sheight
480
scenterScreen
true
spack
false
smaximized
false
sfullScreen
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
ClipScreen
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
  ClipScreen
  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
  ClipScreen
  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/@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_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    sid
    GridLayout
    @/@group/@clipButton
    sname
    clipButton
    stext
    Clip The Screen
    stype
    SWT.PUSH
    sflat
    false
    sborder
    false
    sselected
    false
    scapture
    false
    senabled
    true
    sredraw
    true
    svisible
    true
    sdescriptors
    xworker.swt.Widgets/@Button
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    clipButton
      @/@group/@clipButton/@Listeners
      sname
      Listeners
      sdescriptors
      xworker.swt.widgets.Widget/@Listeners
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      Listeners
        @/@group/@clipButton/@Listeners/@Listener
        sname
        Listener
        stype
        Selection
        sdescriptors
        xworker.swt.events.Listeners/@listeners/@Listener
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        Listener
          @/@group/@clipButton/@Listeners/@Listener/@GroovyAction
          sname
          GroovyAction
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          svarScope
          Local
          sdisableGlobalContext
          false
          Scode
#$@text#$@
import org.eclipse.swt.graphics.Image;

//进行屏幕截图
def imageData = clipScreen(actionContext);

if(imageData != null){
    def image = new Image(clipButton.getDisplay(), imageData);
    canvas.setImage(image);
    
    //销毁之前的截图
    def oldImage = actionContext.get("oldImage");
    if(oldImage != null){
        oldImage.dispose();
    }
    actionContext.g().put("oldImage", image);
}
#$@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_noThingRegistViewer
          false
          sth_fileMonitor
          false
          sth_mark
          false
          sth_registQueryOnlySelf
          false
          sid
          GroovyAction
            @/@group/@clipButton/@Listeners/@Listener/@GroovyAction/@ActionDefined
            sname
            ActionDefined
            sdescriptors
            xworker.lang.actions.Inout/@ActionDefined
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_noThingRegistViewer
            false
            sth_fileMonitor
            false
            sth_mark
            false
            sth_registQueryOnlySelf
            false
            sid
            ActionDefined
              @/@group/@clipButton/@Listeners/@Listener/@GroovyAction/@ActionDefined/@ClipScreen
              sname
              clipScreen
              stype
              manual
              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.UtilActions/@ClipScreen
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              ClipScreen
    @/@group/@canvas
    sname
    canvas
    sdescriptors
    xworker.swt.Widgets/@ImageViewer
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    sid
    canvas
      @/@group/@canvas/@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_noThingRegistViewer
      false
      sth_fileMonitor
      false
      sth_mark
      false
      sth_registQueryOnlySelf
      false
      sid
      GridData
