Package org.sunflow.system

# Class UI

java.lang.Object
org.sunflow.system.UI

public final class UI extends Object
Static singleton interface to a UserInterface object. This is set to a text console by default.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`UI.Module`
`static enum`
`UI.PrintLevel`

## Method Summary

Modifier and Type
Method
Description
`static 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`
`printInfo(UI.Module m, String s, Object... args)`
`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`
`taskCancel()`
Cancel the currently active task.
`static final boolean`
`taskCanceled()`
Check to see if the current task should be aborted.
`static final void`
`taskStart(String s, int min, int max)`
`static final void`
`taskStop()`
`static final void`
`taskUpdate(int current)`
`static final void`
`verbosity(int verbosity)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### set

public static final void set(UserInterface ui)
Sets the active user interface implementation. Passing `null` silences printing completely.

Parameters:
  `ui` - object to recieve all user interface calls

### verbosity

public static final void verbosity(int verbosity)

### formatOutput

public static final String formatOutput(UI.Module m, UI.PrintLevel level, String s)

### printDetailed

public static final void printDetailed(UI.Module m, String s, Object... args)

### printInfo

public static final void printInfo(UI.Module m, String s, Object... args)

### printWarning

public static final void printWarning(UI.Module m, String s, Object... args)

### printError

public static final void printError(UI.Module m, String s, Object... args)

### taskStart

public static final void taskStart(String s, int min, int max)

### 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