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 String
formatOutput
(UI.Module m, UI.PrintLevel level, String s) static final void
printDetailed
(UI.Module m, String s, Object... args) static final void
printError
(UI.Module m, String s, Object... args) static final void
static final void
printWarning
(UI.Module m, String s, Object... args) static final void
set
(UserInterface ui) Sets the active user interface implementation.static final void
Cancel the currently active task.static final boolean
Check to see if the current task should be aborted.static final void
static final void
taskStop()
static final void
taskUpdate
(int current) static final void
verbosity
(int verbosity)
-
Method Details
-
set
Sets the active user interface implementation. Passingnull
silences 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:
true
if the current task should be stopped,false
otherwise
-