^1640696298047
@
sname
ToolTipBrowser
slabel
ToolTipBrowser
sdescriptors
xworker.swt.widgets.Display
  @/@shell
  sname
  shell
  stext
  res:res.w_exp:document:文档
  sNO_TRIM
  false
  sCLOSE
  true
  sTITLE
  false
  sMIN
  false
  sMAX
  false
  sBORDER
  false
  sRESIZE
  true
  sON_TOP
  true
  sTOOL
  true
  sNO_FOCUS
  false
  swidth
  500
  sheight
  400
  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
  scapture
  false
  senabled
  true
  sredraw
  true
  svisible
  true
  sdescriptors
  xworker.swt.widgets.Display/@Shell
  sid
  shell
    @/@shell/@shellFillLayout
    sname
    shellFillLayout
    stype
    SWT.HORIZONTAL
    sdescriptors
    xworker.swt.Layouts/@FillLayout
    sid
    shellFillLayout
    @/@shell/@htmlViewForm1
    sname
    htmlViewForm
    sBORDER
    false
    sFLAT
    true
    smarginWidth
    0
    smarginHeight
    0
    shorizontalSpacing
    1
    sverticalSpacing
    1
    sdescriptors
    xworker.swt.Widgets/@ViewForm
    sid
    htmlViewForm1
      @/@shell/@htmlViewForm1/@topRight
      sname
      topRight
      sdescriptors
      xworker.swt.custom.ViewForm/@topRight
      sid
      topRight
        @/@shell/@htmlViewForm1/@topRight/@topRightBar
        sname
        topRightBar
        stype
        HORIZONTAL
        sFLAT
        false
        sWRAP
        false
        sBORDER
        false
        sSHADOW_OUT
        false
        sRIGHT
        false
        sdescriptors
        xworker.swt.Widgets/@ToolBar
        sid
        topRightBar
          @/@shell/@htmlViewForm1/@topRight/@topRightBar/@homeToolItem
          sname
          homeToolItem
          stype
          PUSH
          stext
          res:res.w_exp:homePage:主页
          senabled
          true
          sdescriptors
          xworker.swt.widgets.ToolBar/@ToolItem
          sid
          homeToolItem
            @/@shell/@htmlViewForm1/@topRight/@topRightBar/@homeToolItem/@listeners
            sname
            listeners
            sdescriptors
            xworker.swt.events.Listeners/@listeners
            sid
            listeners
              @/@shell/@htmlViewForm1/@topRight/@topRightBar/@homeToolItem/@listeners/@homeToolItemSelection
              sname
              homeToolItemSelection
              stype
              Selection
              sdescriptors
              xworker.swt.events.Listeners/@listeners/@Listener
              sid
              homeToolItemSelection
                @/@shell/@htmlViewForm1/@topRight/@topRightBar/@homeToolItem/@listeners/@homeToolItemSelection/@GroovyAction
                sname
                GroovyAction
                sisSynchronized
                true
                sthrowException
                true
                suseOtherAction
                false
                svarScope
                Global
                scode
                actions.doAction("setContent", [:]);
                sdescriptors
                xworker.lang.actions.Actions/@GroovyAction
                sid
                GroovyAction
          @/@shell/@htmlViewForm1/@topRight/@topRightBar/@backToolItem
          sname
          backToolItem
          stype
          PUSH
          stext
          res:res.w_exp:back:后退
          senabled
          true
          sdescriptors
          xworker.swt.widgets.ToolBar/@ToolItem
          sid
          backToolItem
            @/@shell/@htmlViewForm1/@topRight/@topRightBar/@backToolItem/@listeners
            sname
            listeners
            sdescriptors
            xworker.swt.events.Listeners/@listeners
            sid
            listeners
              @/@shell/@htmlViewForm1/@topRight/@topRightBar/@backToolItem/@listeners/@backToolItemSelection
              sname
              backToolItemSelection
              stype
              Selection
              sdescriptors
              xworker.swt.events.Listeners/@listeners/@Listener
              sid
              backToolItemSelection
                @/@shell/@htmlViewForm1/@topRight/@topRightBar/@backToolItem/@listeners/@backToolItemSelection/@GroovyAction
                sname
                GroovyAction
                sisSynchronized
                true
                sthrowException
                true
                suseOtherAction
                false
                svarScope
                Global
                Scode
#$@text#$@
browser.back();

if(!browser.isBackEnabled()){
    actions.doAction("setContent", actionContext);
}
#$@text#$@
                sdescriptors
                xworker.lang.actions.Actions/@GroovyAction
                sid
                GroovyAction
          @/@shell/@htmlViewForm1/@topRight/@topRightBar/@forwardToolItem
          sname
          forwardToolItem
          stype
          PUSH
          stext
          res:res.w_exp:forward:前进
          senabled
          true
          sdescriptors
          xworker.swt.widgets.ToolBar/@ToolItem
          sid
          forwardToolItem
            @/@shell/@htmlViewForm1/@topRight/@topRightBar/@forwardToolItem/@listeners
            sname
            listeners
            sdescriptors
            xworker.swt.events.Listeners/@listeners
            sid
            listeners
              @/@shell/@htmlViewForm1/@topRight/@topRightBar/@forwardToolItem/@listeners/@forwardToolItemSelection
              sname
              forwardToolItemSelection
              stype
              Selection
              sdescriptors
              xworker.swt.events.Listeners/@listeners/@Listener
              sid
              forwardToolItemSelection
                @/@shell/@htmlViewForm1/@topRight/@topRightBar/@forwardToolItem/@listeners/@forwardToolItemSelection/@GroovyAction
                sname
                GroovyAction
                sisSynchronized
                true
                sthrowException
                true
                suseOtherAction
                false
                svarScope
                Global
                scode
                browser.forward();
                sdescriptors
                xworker.lang.actions.Actions/@GroovyAction
                sid
                GroovyAction
          @/@shell/@htmlViewForm1/@topRight/@topRightBar/@stopToolItem
          sname
          stopToolItem
          stype
          PUSH
          stext
          res:res.w_exp:stop:停止
          senabled
          true
          sdescriptors
          xworker.swt.widgets.ToolBar/@ToolItem
          sid
          stopToolItem
            @/@shell/@htmlViewForm1/@topRight/@topRightBar/@stopToolItem/@listeners
            sname
            listeners
            sdescriptors
            xworker.swt.events.Listeners/@listeners
            sid
            listeners
              @/@shell/@htmlViewForm1/@topRight/@topRightBar/@stopToolItem/@listeners/@stoptoolItemSelection
              sname
              stoptoolItemSelection
              stype
              Selection
              sdescriptors
              xworker.swt.events.Listeners/@listeners/@Listener
              sid
              stoptoolItemSelection
                @/@shell/@htmlViewForm1/@topRight/@topRightBar/@stopToolItem/@listeners/@stoptoolItemSelection/@GroovyAction
                sname
                GroovyAction
                sisSynchronized
                true
                sthrowException
                true
                suseOtherAction
                false
                svarScope
                Global
                scode
                browser.stop();
                sdescriptors
                xworker.lang.actions.Actions/@GroovyAction
                sid
                GroovyAction
          @/@shell/@htmlViewForm1/@topRight/@topRightBar/@refreshToolItem
          sname
          refreshToolItem
          stype
          PUSH
          stext
          res:res.w_exp:refresh:刷新
          senabled
          true
          sdescriptors
          xworker.swt.widgets.ToolBar/@ToolItem
          sid
          refreshToolItem
            @/@shell/@htmlViewForm1/@topRight/@topRightBar/@refreshToolItem/@listeners
            sname
            listeners
            sdescriptors
            xworker.swt.events.Listeners/@listeners
            sid
            listeners
              @/@shell/@htmlViewForm1/@topRight/@topRightBar/@refreshToolItem/@listeners/@refreshToolItemSelection
              sname
              refreshToolItemSelection
              stype
              Selection
              sdescriptors
              xworker.swt.events.Listeners/@listeners/@Listener
              sid
              refreshToolItemSelection
                @/@shell/@htmlViewForm1/@topRight/@topRightBar/@refreshToolItem/@listeners/@refreshToolItemSelection/@GroovyAction
                sname
                GroovyAction
                sisSynchronized
                true
                sthrowException
                true
                suseOtherAction
                false
                svarScope
                Global
                scode
                browser.refresh();
                sdescriptors
                xworker.lang.actions.Actions/@GroovyAction
                sid
                GroovyAction
      @/@shell/@htmlViewForm1/@content
      sname
      content
      sdescriptors
      xworker.swt.custom.ViewForm/@content
      sid
      content
        @/@shell/@htmlViewForm1/@content/@browser
        sname
        browser
        sMOZILLA
        false
        sdescriptors
        xworker.swt.Widgets/@Browser
        sid
        browser
          @/@shell/@htmlViewForm1/@content/@browser/@init
          sname
          init
          sisSynchronized
          true
          sthrowException
          true
          suseOtherAction
          false
          svarScope
          Global
          sdisableGlobalContext
          false
          Scode
#$@text#$@
import org.eclipse.swt.browser.ProgressListener;
import org.eclipse.swt.browser.StatusTextListener;
import xworker.swt.util.SwtUtils;

def progressListener = [
    changed : {event ->        
    },
    completed : {event ->        
        if(SwtUtils.isRWT()){
        }else{
		       backToolItem.setEnabled(browser.isBackEnabled());		   
		       forwardToolItem.setEnabled(browser.isForwardEnabled());
		   }
    }] as ProgressListener;    
browser.addProgressListener(progressListener);

if(SwtUtils.isRWT() == false){
    backToolItem.setEnabled(browser.isBackEnabled());
    forwardToolItem.setEnabled(browser.isForwardEnabled());
}else{
    backToolItem.setEnabled(false);
    forwardToolItem.setEnabled(false);
}

//添加utilBrowser如果存在
def utilBrowser = actionContext.get("utilBrowser");
if(utilBrowser != null && utilBrowser instanceof StatusTextListener){
    //browser.addStatusTextListener(utilBrowser);
    utilBrowser.attach(browser);
}
#$@text#$@
          sinterpretationType
          Action
          screateLocalVarScope
          false
          ssaveReturn
          false
          sdebugLog
          false
          sdescriptors
          xworker.swt.Widgets/@Code
          sid
          init
    @/@shell/@actions
    sname
    actions
    sdescriptors
    xworker.swt.Widgets/@actions
    sid
    actions
      @/@shell/@actions/@setContent
      sname
      setContent
      sisSynchronized
      true
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Global
      sdisableGlobalContext
      false
      Scode
#$@text#$@
String html = """<html>
<head>
<title>ToolTip</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
body {
	overflow: hidden;
    background-color: #ffffee;
    margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<script  type="text/javascript">
function getContents(){	
    //alert("tt");
    var div = document.getElementById("all");
    window.status = "html_edit_content" + div.offsetHeight + ":" + div.offsetWidth;
    window.status = "";
}
</script>
</head>
<body style="overflow:hidden">

<div id="all" style="width:100%;">
<div id="messageDiv" style='background-color: #ffffee;width:100%;color:#000000;border: 0px #000000 solid; font-size: 12px;'>
${message}
</div>
</div>
</body>
</html>
""";

println html;
browser.setText(html);
#$@text#$@
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sswitchResult
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sid
      setContent
    @/@shell/@Code
    sname
    Code
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    svarScope
    Global
    scode
    shell.setData("actions", actions);
    sdescriptors
    xworker.swt.Widgets/@Code
    sid
    Code
    @/@shell/@shellListener
    sname
    shellListener
    sdescriptors
    xworker.swt.widgets.Shell/@ShellListener
    sid
    shellListener
      @/@shell/@shellListener/@actions
      sname
      actions
      sdescriptors
      xworker.swt.events.ShellListener/@actions1
      sid
      actions
        @/@shell/@shellListener/@actions/@shellClosed
        sname
        shellClosed
        sisSynchronized
        false
        sthrowException
        true
        suseOtherAction
        false
        svarScope
        Global
        sdisableGlobalContext
        false
        Scode
#$@text#$@
import xworker.swt.util.PoolableControlFactory;
import xworker.swt.util.SwtUtils;
import xworker.swt.util.UtilSwt;

//关闭窗口
event.doit = false;
shell.setVisible(false);

if(SwtUtils.isRWT()){
    //RWT下需要归还toolTip窗口
    PoolableControlFactory.returnControl(parent, 
        "xworker.swt.ide.worldexplorer.swt.util.ToolTipBrowser/@shell", shell);
}
#$@text#$@
        sinterpretationType
        Action
        screateLocalVarScope
        false
        ssaveReturn
        false
        sdebugLog
        false
        sdescriptors
        xworker.lang.actions.Actions/@GroovyAction
        sid
        shellClosed
