ch.tatool.core.executable
Class AbstractInstructionExecutable

java.lang.Object
  extended by ch.tatool.core.element.AbstractPropertyHolder
      extended by ch.tatool.core.element.NodeImpl
          extended by ch.tatool.core.executable.BlockingExecutable
              extended by ch.tatool.core.executable.BlockingAWTExecutable
                  extended by ch.tatool.core.executable.AbstractInstructionExecutable
All Implemented Interfaces:
ActionPanelListener, PropertyHolder, Executable, Node, KeyEventDispatcher
Direct Known Subclasses:
ListInstructionExecutable

public abstract class AbstractInstructionExecutable
extends BlockingAWTExecutable
implements ActionPanelListener

Node intended for use cases where information needs to be presented to the user. The actual information to display has to be provided by subclasses, flipping through the information panels happens through user input (space key currently).

Author:
Andre Locher

Constructor Summary
AbstractInstructionExecutable()
          Default constructor.
AbstractInstructionExecutable(String elementName)
          Constructor with element id parameter.
 
Method Summary
 void actionTriggered(ActionPanel source, Object actionValue)
          ActionPanelListener interface.
protected  void cancelExecutionAWT()
          Cleanup after element execution
protected abstract  JPanel getInstruction(int index)
          Get one of the instruction panels.
protected abstract  int getInstructionCount()
          Get the number of available instruction panels.
protected  void startExecutionAWT()
          Called at element start.
 
Methods inherited from class ch.tatool.core.executable.BlockingAWTExecutable
cancelExecution, startExecution
 
Methods inherited from class ch.tatool.core.executable.BlockingExecutable
cancel, dispatchKeyEvent, execute, finishExecution, getExecutionContext, getFinishExecutionLock, setExecutionContext
 
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.Executable
cancel, execute, setExecutionContext
 
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

AbstractInstructionExecutable

public AbstractInstructionExecutable()
Default constructor.


AbstractInstructionExecutable

public AbstractInstructionExecutable(String elementName)
Constructor with element id parameter.

Method Detail

startExecutionAWT

protected void startExecutionAWT()
Called at element start.

Specified by:
startExecutionAWT in class BlockingAWTExecutable

cancelExecutionAWT

protected void cancelExecutionAWT()
Cleanup after element execution

Overrides:
cancelExecutionAWT in class BlockingAWTExecutable

actionTriggered

public void actionTriggered(ActionPanel source,
                            Object actionValue)
ActionPanelListener interface.

Specified by:
actionTriggered in interface ActionPanelListener
actionValue - the value registered with the action panel for the action that got triggered

getInstructionCount

protected abstract int getInstructionCount()
Get the number of available instruction panels.


getInstruction

protected abstract JPanel getInstruction(int index)
Get one of the instruction panels.



Copyright © 2012. All Rights Reserved.