Package org.sunflow.system
Class UI
java.lang.Object
org.sunflow.system.UI
Static singleton interface to a UserInterface object. This is set to a text
console by default.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic final StringformatOutput(UI.Module m, UI.PrintLevel level, String s) static final voidprintDetailed(UI.Module m, String s, Object... args) static final voidprintError(UI.Module m, String s, Object... args) static final voidstatic final voidprintWarning(UI.Module m, String s, Object... args) static final voidset(UserInterface ui) Sets the active user interface implementation.static final voidCancel the currently active task.static final booleanCheck to see if the current task should be aborted.static final voidstatic final voidtaskStop()static final voidtaskUpdate(int current) static final voidverbosity(int verbosity)
-
Method Details
-
set
Sets the active user interface implementation. Passingnullsilences printing completely.- Parameters:
ui- object to recieve all user interface calls
-
verbosity
public static final void verbosity(int verbosity) -
formatOutput
-
printDetailed
-
printInfo
-
printWarning
-
printError
-
taskStart
-
taskUpdate
public static final void taskUpdate(int current) -
taskStop
public static final void taskStop() -
taskCancel
public static final void taskCancel()Cancel the currently active task. This forces the application to abort as soon as possible. -
taskCanceled
public static final boolean taskCanceled()Check to see if the current task should be aborted.- Returns:
trueif the current task should be stopped,falseotherwise
-