ch.tatool.core.executable
Class NonBlockingAWTExecutable

java.lang.Object
  extended by ch.tatool.core.element.AbstractPropertyHolder
      extended by ch.tatool.core.element.NodeImpl
          extended by ch.tatool.core.executable.NonBlockingAWTExecutable
All Implemented Interfaces:
PropertyHolder, Executable, Node
Direct Known Subclasses:
StatusRegionConfigurator

public abstract class NonBlockingAWTExecutable
extends NodeImpl
implements Executable

This executable element implementation provides support for executing the code in the AWT event dispatch thread, thus making sure that changes to the task display from within the executable work as expected. Note: Use the BlockingAWTExecutable for implementations that require user input in order to finish the execution.

Author:
Michael Ruflin

Constructor Summary
NonBlockingAWTExecutable()
           
NonBlockingAWTExecutable(String defaultId)
           
 
Method Summary
 void cancel()
          Empty implementation - stopping is not implemented as element execution is expected to be quick anyways
 void execute()
          Implementation of executeTask.
protected abstract  String executeAWT()
          Subclasses implement this method to execute some code.
 ExecutionContext getExecutionContext()
           
 void setExecutionContext(ExecutionContext executionContext)
           
 
Methods inherited from class ch.tatool.core.element.NodeImpl
assignParent, assignParent, assignParents, getId, getLocalId, getParent, setId, setLocalId, setParent
 
Methods inherited from class ch.tatool.core.element.AbstractPropertyHolder
clearProperties, getKeys, getProperty, removeProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ch.tatool.element.Node
getParent, setParent
 
Methods inherited from interface ch.tatool.data.PropertyHolder
clearProperties, getId, getKeys, getProperty, removeProperty, setProperty
 

Constructor Detail

NonBlockingAWTExecutable

public NonBlockingAWTExecutable()

NonBlockingAWTExecutable

public NonBlockingAWTExecutable(String defaultId)
Method Detail

getExecutionContext

public ExecutionContext getExecutionContext()

setExecutionContext

public void setExecutionContext(ExecutionContext executionContext)
Specified by:
setExecutionContext in interface Executable

execute

public final void execute()
Implementation of executeTask. Calls doExecutionAWT then returns.

Specified by:
execute in interface Executable

cancel

public void cancel()
Empty implementation - stopping is not implemented as element execution is expected to be quick anyways

Specified by:
cancel in interface Executable

executeAWT

protected abstract String executeAWT()
Subclasses implement this method to execute some code. It is guaranteed that the caller thread is the AWT thread.



Copyright © 2012. All Rights Reserved.