org.fuin.apps4swing
Class AbstractToControllerDispatcher<CTRL extends org.fuin.apps4j.base.Controller<VIEW>,VIEW>

java.lang.Object
  extended by org.fuin.apps4swing.AbstractToControllerDispatcher<CTRL,VIEW>
Type Parameters:
CTRL - Type of the controller.
VIEW - Type of the view.

public abstract class AbstractToControllerDispatcher<CTRL extends org.fuin.apps4j.base.Controller<VIEW>,VIEW>
extends Object

Dispatch events from the view to the controller using a new thread.


Constructor Summary
AbstractToControllerDispatcher()
          Default constructor.
 
Method Summary
protected  void execute(Runnable runnable)
          Execute the runnable in the controller's thread.
 CTRL getController()
          Returns the controller the dispatcher works on.
 void setController(CTRL controller)
          Sets the controller the dispatcher works on.
 void setExecutorService(ExecutorService executor)
          Sets the executor service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractToControllerDispatcher

public AbstractToControllerDispatcher()
Default constructor.

Method Detail

execute

protected final void execute(Runnable runnable)
Execute the runnable in the controller's thread.

Parameters:
runnable - Runnable to execute.

getController

public final CTRL getController()
Returns the controller the dispatcher works on.

Returns:
Controller.

setController

public final void setController(CTRL controller)
Sets the controller the dispatcher works on.

Parameters:
controller - Controller.

setExecutorService

public final void setExecutorService(ExecutorService executor)
Sets the executor service.

Parameters:
executor - Executor to set.


Copyright © 2011 Future Invent Informationsmanagement GmbH. All Rights Reserved.