Class ColorDemo<T>
- java.lang.Object
-
- com.github.rvesse.airline.examples.io.ColorDemo<T>
-
- All Implemented Interfaces:
ExampleRunnable
- Direct Known Subclasses:
Colors256
,ColorsBasic
,ColorsTrue
public abstract class ColorDemo<T> extends java.lang.Object implements ExampleRunnable
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>
args
private boolean
background
private boolean
hardReset
-
Constructor Summary
Constructors Constructor Description ColorDemo()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract T[]
getColors()
protected abstract ColorizedOutputStream<T>
openOutputStream()
int
run()
Runs the command and returns an exit code that the application should return
-
-
-
Field Detail
-
args
@Arguments(description="Provides the example text to use") private java.util.List<java.lang.String> args
-
background
@Option(name={"-b","--background"}, description="When set changes the background rather than the foreground colour") private boolean background
-
hardReset
@Option(name="--reset", description="When set rather than outputting colours only the relevant escape sequence for hard resetting your terminal is output. This is useful if you\'ve used one of the colour demos that uses features your terminal does not support and have got your terminal in a strange color state as a result") private boolean hardReset
-
-
Method Detail
-
openOutputStream
protected abstract ColorizedOutputStream<T> openOutputStream()
-
getColors
protected abstract T[] getColors()
-
run
public int run()
Description copied from interface:ExampleRunnable
Runs the command and returns an exit code that the application should return- Specified by:
run
in interfaceExampleRunnable
- Returns:
- Exit code
-
-