^1585018775134
@
sname
TaskMonitor
slabel
任务监控器
sdescriptors
xworker.lang.MetaDescriptor3
sextends
xworker.swt.layout.LayoutDatas
smany
true
seditCols
2
sformNoLabel
false
sinitialization
false
sgroup
util
smodifier
public
sinheritDescription
false
Sdescription
#$@text#$@
<p><strong>任务监控器</strong></p>

<p>&nbsp;&nbsp;&nbsp; 创建后启动一个线程执行任务列表，并把执行情况反映在进度条和标签上。</p>

<p>&nbsp;&nbsp;&nbsp; 其中进度条和标签是传入的，使用Tasks子节点可以创建任务。</p>

<p><strong>保存和返回值</strong></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp; 保存的是TaskMonitor对象，返回的是Composite。</p>

<p><strong>任务</strong></p>

<p>&nbsp;&nbsp;&nbsp; 任务执行时是执行它的run方法，即task.doAction(&quot;run&quot;, actionContext);</p>

<p>&nbsp;&nbsp;&nbsp; 如果动态任务=true，表示任务可以追加，此时忽略进度条，进度条最后设置成反复滚动的，否则会根据任务数量设置进度条的值。</p>

<p><strong>TaskMonitor常用方法</strong></p>

<ul>
	<li><strong>void addTask(Thing task)</strong><br />
	添加一个任务。如果先前的任务已经执行完毕，那么不会再添加了。<br />
	&nbsp;</li>
	<li><strong>void removeTask(Thing task)</strong><br />
	移除一个任务。如果任务已经执行完毕了，则不执行移除操作。</li>
</ul>

<p><strong>注册任务</strong></p>

<p>&nbsp;&nbsp;&nbsp; 新的任务类型可以以子事物的方式注册到xworker.swt.util.Tasks下。</p>
#$@text#$@
snotXmlAttribute
false
sjson_isArray
false
sth_createIndex
false
sth_mark
false
sid
TaskMonitor
  @/@actions
  sname
  actions
  sdescriptors
  xworker.lang.MetaDescriptor3/@actions
  sth_createIndex
  false
  sth_mark
  false
  sid
  actions
    @/@actions/@create
    sname
    create
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    souterClassName
    xworker.swt.util.TaskMonitor
    smethodName
    create
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sth_createIndex
    false
    sth_mark
    false
    sid
    create
    @/@actions/@addTask
    sname
    addTask
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    souterClassName
    xworker.swt.util.TaskMonitor
    smethodName
    addTask
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sth_createIndex
    false
    sth_mark
    false
    sid
    addTask
      @/@actions/@addTask/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sth_createIndex
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@addTask/@ins/@task
        sname
        task
        stype
        org.xmeta.Thing
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sth_createIndex
        false
        sth_mark
        false
        sid
        task
    @/@actions/@addTasks
    sname
    addTasks
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    souterClassName
    xworker.swt.util.TaskMonitor
    smethodName
    addTasks
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sth_createIndex
    false
    sth_mark
    false
    sid
    addTasks
      @/@actions/@addTasks/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sth_createIndex
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@addTasks/@ins/@tasks
        sname
        tasks
        stype
        List<Thing>
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sth_createIndex
        false
        sth_mark
        false
        sid
        tasks
    @/@actions/@removeTask
    sname
    removeTask
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    souterClassName
    xworker.swt.util.TaskMonitor
    smethodName
    removeTask
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sth_createIndex
    false
    sth_mark
    false
    sid
    removeTask
      @/@actions/@removeTask/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sth_createIndex
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@removeTask/@ins/@task
        sname
        task
        stype
        org.xmeta.Thing
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sth_createIndex
        false
        sth_mark
        false
        sid
        task
    @/@actions/@removeTasks
    sname
    removeTasks
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    souterClassName
    xworker.swt.util.TaskMonitor
    smethodName
    removeTasks
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sth_createIndex
    false
    sth_mark
    false
    sid
    removeTasks
      @/@actions/@removeTasks/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sth_createIndex
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@removeTasks/@ins/@tasks
        sname
        tasks
        stype
        List<Thing>
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sth_createIndex
        false
        sth_mark
        false
        sid
        tasks
    @/@actions/@onFinished
    sname
    onFinished
    sdescriptors
    xworker.lang.actions.Actions/@NOOP
    sdescription
    <p>所有任务都执行完毕后将调用此方法</p>
    sth_createIndex
    false
    sth_mark
    false
    sid
    onFinished
    @/@actions/@getFinishLabel
    sname
    getFinishLabel
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    souterClassName
    xworker.swt.util.TaskMonitor
    smethodName
    getFinishLabel
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sth_createIndex
    false
    sth_mark
    false
    sid
    getFinishLabel
  @/@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_mark
  false
  sid
  name
  @/@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_mark
  false
  sid
  label
  @/@dynamicTask
  sname
  dynamicTask
  slabel
  动态任务
  sinputtype
  truefalse
  sshowLabel
  true
  sreadOnly
  false
  sinheritDescription
  false
  sdescription
  <p>如果为true那么忽略进度条的设置。</p>
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_mark
  false
  sid
  dynamicTask
  @/@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_mark
  false
  sid
  description
  @/@Tasks
  sname
  Tasks
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  sextends
  xworker.swt.util.Tasks
  smany
  true
  seditCols
  2
  sinitialization
  false
  smodifier
  public
  sinheritDescription
  false
  sdescription
  <p>任务列表。</p>
  sth_createIndex
  false
  sth_mark
  false
  sid
  Tasks
