public class ALDOperatorGUIExecutionProxy extends Object implements ALDWorkflowEventListener, ActionListener
Modifier and Type | Class and Description |
---|---|
protected class |
ALDOperatorGUIExecutionProxy.ParameterUpdateListener
Listener class to react on parameter value updates in config window.
|
protected static class |
ALDOperatorGUIExecutionProxy.WorkflowThreadStatus
Status of the associated thread to execute operator.
|
Modifier and Type | Field and Description |
---|---|
protected ALDWorkflow |
alidaWorkflow
Reference to the underlying Alida workflow object.
|
protected Iterator<Object> |
batchInputIterator
Iterator for batch mode input parameter.
|
protected String |
batchInputParameter
Name of batch mode input parameter.
|
protected boolean |
batchModeActive
Flag to indicate if batch mode is active.
|
protected LinkedList<String> |
batchOutputParameter
List of batch mode output parameters.
|
protected HashMap<String,ALDBatchRunResultInfo> |
batchOutputResultMap
Batch mode result objects.
|
protected ALDOperatorControlFrame |
controlWin
Corresponding configuration and control window.
|
protected JFrame |
failureMessageWin
Corresponding configuration and control window.
|
protected ALDWorkflowNodeID |
operatorNodeID
Reference ID of the operator node in Alida workflow;
|
protected ALDOperatorGUIExecutionProxy.ParameterUpdateListener |
paramUpdateListener
Listener object attached to the control window.
|
protected ALDOperatorResultFrame |
resultFrame
Frame showing operator execution results.
|
protected ALDOperatorGUIExecutionProxy.WorkflowThreadStatus |
workflowStatus
Current status of the operator execution thread.
|
protected Object[] |
yesnoOption
Labels to be used on buttons of Yes/No message boxes.
|
Constructor and Description |
---|
ALDOperatorGUIExecutionProxy(ALDOperatorLocation opLocation)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
void |
configureWorkflow(ALDConfigurationEvent confEvent) |
protected void |
displayFailureMessageWindow(ALDWorkflowEvent event)
Displays window with detailed error information on execution failures.
|
protected void |
doNextBatchModeStep() |
void |
doNextStepInWorkflow() |
protected ALDOperatorControlFrame |
getNewConfigWin(ALDOperator op)
Generate a new configuration window.
|
ALDOperatorGUIExecutionProxy.WorkflowThreadStatus |
getWorkflowThreadStatus()
Returns current status of workflow thread.
|
protected void |
handleAddNodeEvent(ALDOperator op,
ALDWorkflowNodeID id)
Adds a node to the workflow graph.
|
void |
handleALDWorkflowEvent(ALDWorkflowEvent event)
Method which is called on event occurrence.
|
protected void |
handleNodeParameterChangeEvent(Collection<ALDWorkflowNodeID> idList)
Update parameter labels according to configuration states.
|
protected void |
handleNodeStateChangeEvent(HashMap<ALDWorkflowNodeID,ALDWorkflowNode.ALDWorkflowNodeState> idList)
Update control window color according to node's state.
|
void |
interruptExecution()
Aborts running execution of the workflow.
|
void |
killWorkflowThread() |
void |
pauseWorkflow() |
protected void |
processWorkflowEventQueue()
Processes all events that were recently added to the queue.
|
boolean |
quit()
Does clean-up on termination, i.e. closes all open windows.
|
void |
resumeWorkflow() |
void |
runWorkflow()
Executes the workflow.
|
void |
runWorkflowInBatchMode() |
void |
showGUI()
Displays the configuration and control window.
|
void |
showResultFrame()
(Re-)display the result frame again, if results available.
|
void |
stopWorkflow() |
protected final Object[] yesnoOption
protected ALDWorkflow alidaWorkflow
protected ALDOperatorGUIExecutionProxy.WorkflowThreadStatus workflowStatus
protected ALDOperatorControlFrame controlWin
protected JFrame failureMessageWin
protected ALDOperatorGUIExecutionProxy.ParameterUpdateListener paramUpdateListener
protected ALDWorkflowNodeID operatorNodeID
protected ALDOperatorResultFrame resultFrame
protected boolean batchModeActive
protected String batchInputParameter
protected Iterator<Object> batchInputIterator
protected LinkedList<String> batchOutputParameter
protected HashMap<String,ALDBatchRunResultInfo> batchOutputResultMap
The key of the hashmap is corresponding to the names of the output parameters, the values are the result data objects.
public ALDOperatorGUIExecutionProxy(ALDOperatorLocation opLocation)
opLocation
- Info from where to instantiate the operator object.public void showGUI()
public void configureWorkflow(ALDConfigurationEvent confEvent)
public ALDOperatorGUIExecutionProxy.WorkflowThreadStatus getWorkflowThreadStatus()
public void runWorkflow()
public void runWorkflowInBatchMode() throws ALDBatchIOException, ALDOperatorException
protected void doNextBatchModeStep()
public void pauseWorkflow()
public void resumeWorkflow()
public void doNextStepInWorkflow()
public void stopWorkflow()
public void killWorkflowThread()
public void interruptExecution()
public void showResultFrame()
public boolean quit()
protected void processWorkflowEventQueue()
Note that this function needs to be called after all actions on the Alida workflow except calls to 'run' methods.
public void handleALDWorkflowEvent(ALDWorkflowEvent event)
ALDWorkflowEventListener
handleALDWorkflowEvent
in interface ALDWorkflowEventListener
event
- Event to be handled.public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
protected void displayFailureMessageWindow(ALDWorkflowEvent event)
event
- Workflow event got on failure.protected void handleAddNodeEvent(ALDOperator op, ALDWorkflowNodeID id)
op
- Operator associated with the node.id
- Workflow node ID of the corresponding Alida workflow node.protected void handleNodeParameterChangeEvent(Collection<ALDWorkflowNodeID> idList)
idList
- List of nodes that are to be updated.protected void handleNodeStateChangeEvent(HashMap<ALDWorkflowNodeID,ALDWorkflowNode.ALDWorkflowNodeState> idList)
idList
- List of nodes that are to be updated.protected ALDOperatorControlFrame getNewConfigWin(ALDOperator op) throws ALDOperatorException
Is to be overwritten by subclasses.
op
- Operator for which window is requested.ALDOperatorException
- Thrown if initialization of window fails.Copyright © 2010–2021 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.