Class LanternaUI
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.ui.LanternaUI
-
- All Implemented Interfaces:
com.googlecode.lanterna.terminal.TerminalResizeListener,StepObserver,UI
public class LanternaUI extends Object implements com.googlecode.lanterna.terminal.TerminalResizeListener
This class define an UI using Lanterna library.- Since:
- 2.0
- Author:
- Laurent Jourdren
-
-
Constructor Summary
Constructors Constructor Description LanternaUI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Get the name of the UI.voidinit(Workflow workflow)Initialize the UI.protected booleanisInteractiveMode()Test if Eoulsan is running in an interactive mode.voidnotifyStepState(Step step, int terminatedTasks, int submittedTasks, double progress)The progress of the step has been changed.voidnotifyStepState(Step step, int contextId, String contextName, double progress)The progress of the step for a sample has been changed.voidnotifyStepState(Step step, Step.StepState stepState)The status of the step has been changed.voidnotifyStepState(Step step, String note)The note of the step has been changed.voidnotifyTaskDone(Step step, int contextId)Notify that a task has been done.voidnotifyTaskRunning(Step step, int contextId)Notify that a task is running.voidnotifyTaskSubmitted(Step step, int contextId)Notify that a task has been submitted.voidnotifyWorkflowSuccess(boolean success, String message)Notify the success of the workflow.voidonResized(com.googlecode.lanterna.terminal.Terminal terminal, com.googlecode.lanterna.TerminalSize newSize)
-
-
-
Method Detail
-
notifyStepState
public void notifyStepState(Step step, Step.StepState stepState)
Description copied from interface:StepObserverThe status of the step has been changed.- Specified by:
notifyStepStatein interfaceStepObserver- Parameters:
step- step that the status has been changedstepState- state the step state
-
notifyStepState
public void notifyStepState(Step step, int contextId, String contextName, double progress)
Description copied from interface:StepObserverThe progress of the step for a sample has been changed.- Specified by:
notifyStepStatein interfaceStepObserver- Parameters:
step- step that the progress has been changedcontextId- id of the contextcontextName- name of the context that has been changed
-
notifyStepState
public void notifyStepState(Step step, int terminatedTasks, int submittedTasks, double progress)
Description copied from interface:StepObserverThe progress of the step has been changed.- Specified by:
notifyStepStatein interfaceStepObserver- Parameters:
step- step that the progress has been changedterminatedTasks- the terminated tasks countsubmittedTasks- the submitted tasks countprogress- the progress of the step
-
notifyStepState
public void notifyStepState(Step step, String note)
Description copied from interface:StepObserverThe note of the step has been changed.- Specified by:
notifyStepStatein interfaceStepObserver- Parameters:
step- step that the note has been changed
-
notifyWorkflowSuccess
public void notifyWorkflowSuccess(boolean success, String message)Description copied from interface:StepObserverNotify the success of the workflow.- Specified by:
notifyWorkflowSuccessin interfaceStepObserver- Parameters:
success- the success of the workflowmessage- success message
-
notifyTaskSubmitted
public void notifyTaskSubmitted(Step step, int contextId)
Description copied from interface:StepObserverNotify that a task has been submitted.- Specified by:
notifyTaskSubmittedin interfaceStepObserver- Parameters:
step- the step of the submitted taskcontextId- id of the context
-
notifyTaskRunning
public void notifyTaskRunning(Step step, int contextId)
Description copied from interface:StepObserverNotify that a task is running.- Specified by:
notifyTaskRunningin interfaceStepObserver- Parameters:
step- the step of the submitted taskcontextId- id of the context
-
notifyTaskDone
public void notifyTaskDone(Step step, int contextId)
Description copied from interface:StepObserverNotify that a task has been done.- Specified by:
notifyTaskDonein interfaceStepObserver- Parameters:
step- the step of the submitted taskcontextId- id of the context
-
onResized
public void onResized(com.googlecode.lanterna.terminal.Terminal terminal, com.googlecode.lanterna.TerminalSize newSize)- Specified by:
onResizedin interfacecom.googlecode.lanterna.terminal.TerminalResizeListener
-
isInteractiveMode
protected boolean isInteractiveMode()
Test if Eoulsan is running in an interactive mode.- Returns:
- true if Eoulsan is running in an interactive mode
-
-