Package org.sunflow.system.ui
Class ConsoleInterface
java.lang.Object
org.sunflow.system.ui.ConsoleInterface
- All Implemented Interfaces:
UserInterface
Basic console implementation of a user interface.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprint(UI.Module m, UI.PrintLevel level, String s) Displays some information to the user from the specified module with the specified print level.voidPrepare a progress bar representing a lengthy task.voidtaskStop()Closes the current progress bar to indicate the task is overvoidtaskUpdate(int current) Updates the current progress bar to a value between the current min and max.
-
Constructor Details
-
ConsoleInterface
public ConsoleInterface()
-
-
Method Details
-
print
Description copied from interface:UserInterfaceDisplays some information to the user from the specified module with the specified print level. A user interface is free to show or ignore any message. Level filtering is done in the core and shouldn't be re-implemented by the user interface. All messages will be short enough to fit on one line.- Specified by:
printin interfaceUserInterface- Parameters:
m- module the message came fromlevel- seriousness of the messages- string to display
-
taskStart
Description copied from interface:UserInterfacePrepare a progress bar representing a lengthy task. The actual progress is first shown by the call to update and closed when update is closed with the max value. It is currently not possible to nest calls to setTask, so only one task needs to be tracked at a time.- Specified by:
taskStartin interfaceUserInterface- Parameters:
s- desriptive stringmin- minimum value of the taskmax- maximum value of the task
-
taskUpdate
public void taskUpdate(int current) Description copied from interface:UserInterfaceUpdates the current progress bar to a value between the current min and max. When min or max are passed the progressed bar is shown or hidden respectively.- Specified by:
taskUpdatein interfaceUserInterface- Parameters:
current- current value of the task in progress.
-
taskStop
public void taskStop()Description copied from interface:UserInterfaceCloses the current progress bar to indicate the task is over- Specified by:
taskStopin interfaceUserInterface
-