Class ColoredOutput
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
An enumeration of possible background colors.static enum
Deprecated.static enum
An enumeration of possible foreground (text) colors.static enum
An enumeration of possible text formatting options.static interface
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
allOff()
switch off all color codesstatic void
allOn()
switch on all color codesstatic void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.Black
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.Blue
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.Cyan
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.Green
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.Magenta
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.Red
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.White
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.Yellow
instead!static void
blink()
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.Formatting.Blink
instead!static void
bold()
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.Formatting.Bold
instead!static String
colorize
(String input, ColoredOutput.ShellCode... codes) This method returns the String colored/formatted with the given shell codes.static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Black
instead!static void
fontBlue()
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Blue
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
anotherColoredOutput.ForegroundColor
instead!static void
fontCyan()
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Cyan
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.DarkGrey
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Green
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.LightBlue
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.LightCyan
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.LightGreen
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.LightGrey
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.LightMagenta
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.LightRed
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Magenta
instead!static void
fontRed()
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Red
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Default
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.White
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Yellow
instead!static void
inverted()
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.Formatting.Reverse
instead!static void
noBlink()
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.Formatting.ResetBlink
instead!static void
noBold()
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.Formatting.ResetBold
instead!static void
Deprecated.This method is deprecated and will be removed in the future!static void
Deprecated.This method is deprecated and will be removed in the future!static void
println
(String text, ColoredOutput.Color color) Deprecated.Usecolorize(String, ShellCode...)
with aColoredOutput.ForegroundColor
instead!static void
println
(String text, ColoredOutput.Color color, PrintStream stream) Deprecated.Usecolorize(String, ShellCode...)
with aColoredOutput.ForegroundColor
instead!static void
printlnBold
(String text) Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.Formatting.Bold
instead!static void
printlnRed
(String text) Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Red
instead!static void
printlnYellow
(String text) Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Yellow
instead!static void
reset()
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.Formatting.ResetAll
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.Default
instead!static void
sendCode
(int code) Deprecated.Usecolorize(String, ShellCode...)
instead!static void
sendCode
(int... codes) Deprecated.Usecolorize(String, ShellCode...)
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
instead!static void
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.Formatting.Underlined
instead!static void
useStream
(PrintStream stream) Deprecated.Usecolorize(String, ShellCode...)
instead!
-
Constructor Details
-
ColoredOutput
public ColoredOutput()
-
-
Method Details
-
colorize
This method returns the String colored/formatted with the given shell codes.- Parameters:
input
- AString
that should be colored/formatted.codes
- A bunch ofColoredOutput.ShellCode
s that should be applied on theinput
String
.- Returns:
- Returns the colored/formatted String or the given
input
String
if coloring ist disabled.
-
useStream
Deprecated.Usecolorize(String, ShellCode...)
instead!switch the stream to use for output
- Parameters:
stream
-
-
sendCode
Deprecated.Usecolorize(String, ShellCode...)
instead!write a bash code
- Parameters:
code
-
-
sendCode
Deprecated.Usecolorize(String, ShellCode...)
instead!write a color code to the shell
- Parameters:
c
-
-
sendCode
Deprecated.Usecolorize(String, ShellCode...)
instead!write several bash codes at once
- Parameters:
codes
-
-
reset
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.Formatting.ResetAll
instead!simple reset the console to standard (colors and shape)
-
blink
Deprecated. -
noBlink
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.Formatting.ResetBlink
instead!turn off blinking text
-
bold
Deprecated. -
noBold
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.Formatting.ResetBold
instead!turn off bold text
-
underline
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.Formatting.Underlined
instead!write underlined text
-
inverted
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.Formatting.Reverse
instead!write inverted (swap back- and foreground color)
-
fontBlack
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Black
instead!switch to black font color
-
fontRed
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Red
instead!switch to red font color
-
fontGreen
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Green
instead!switch to green font color
-
fontBrown
Deprecated.Usecolorize(String, ShellCode...)
anotherColoredOutput.ForegroundColor
instead!switch to brown font color
-
fontBlue
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Blue
instead!switch to blue font color
-
fontMagenta
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Magenta
instead!switch to magenta font color
-
fontCyan
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Cyan
instead!switch to cyan font color
-
fontLightGrey
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.LightGrey
instead!switch to light grey font color
-
fontDarkGrey
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.DarkGrey
instead!switch to dark grey font color
-
fontLightRed
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.LightRed
instead!switch to light red font color
-
fontLightGreen
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.LightGreen
instead!switch to light green font color
-
fontYellow
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Yellow
instead!switch to yellow font color
-
fontLightBlue
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.LightBlue
instead!switch to light blue font color
-
fontLightMagenta
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.LightMagenta
instead!switch to light magenta font color
-
fontLightCyan
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.LightCyan
instead!switch to lighty cyan font color
-
fontWhite
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.White
instead!switch to white font color
-
fontReset
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Default
instead!reset to terminal default
-
backgroundBlack
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.Black
instead!switch background to black
-
backgroundRed
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.Red
instead!switch background to red
-
backgroundGreen
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.Green
instead!switch background to green
-
backgroundYellow
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.Yellow
instead!switch background to yellow
-
backgroundBlue
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.Blue
instead!switch background to blue
-
backgroundMagenta
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.Magenta
instead!switch background to magenta
-
backgroundCyan
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.Cyan
instead!switch background to cyan
-
backgroundWhite
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.White
instead!switch background to white
-
resetBackground
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.BackgroundColor.Default
instead!reset background to terminal default
-
printlnRed
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Red
instead!print a line of red text
- Parameters:
text
-
-
printlnYellow
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.ForegroundColor.Yellow
instead!print a line of yellow text
- Parameters:
text
-
-
printlnBold
Deprecated.Usecolorize(String, ShellCode...)
withColoredOutput.Formatting.Bold
instead!print a line of bold text
- Parameters:
text
-
-
println
Deprecated.Usecolorize(String, ShellCode...)
with aColoredOutput.ForegroundColor
instead!print a text in the given color
- Parameters:
text
-color
-
-
println
Deprecated.Usecolorize(String, ShellCode...)
with aColoredOutput.ForegroundColor
instead!print some text in the given color to the given printstream
- Parameters:
text
-color
-stream
-
-
println
Deprecated.This method is deprecated and will be removed in the future!print some text followed by a newline to the selected print stream
- Parameters:
text
-
-
print
Deprecated.This method is deprecated and will be removed in the future!print some text to the selected printstream
- Parameters:
text
-
-
allOff
public static void allOff()switch off all color codes -
allOn
public static void allOn()switch on all color codes
-
ColoredOutput.ForegroundColor
instead!