- java.lang.Object
-
- java.lang.Enum<SGR>
-
- com.googlecode.lanterna.SGR
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<SGR>
public enum SGR extends java.lang.Enum<SGR>
SGR - Select Graphic Rendition, changes the state of the terminal as to what kind of text to print after this command. When working with the Terminal interface, its keeping a state of which SGR codes are active, so activating one of these codes will make it apply to all text until you explicitly deactivate it. When you work with Screen and GUI systems, usually the SGR is a property of an independent character and won't affect others.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BLINK
Text will blink on the screen by alternating the foreground color between the real foreground color and the background color.BOLD
Bold text mode.BORDERED
Draws a border around the text.CIRCLED
Draws a circle around the text.CROSSED_OUT
Draws a horizontal line through the text.FRAKTUR
I have no idea, exotic extension, please send me a reference screen shots!ITALIC
Italic (cursive) text mode.REVERSE
Reverse text mode, will flip the foreground and background colors while activeUNDERLINE
Draws a horizontal line under the text.
-
Constructor Summary
Constructors Modifier Constructor Description private
SGR()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SGR
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SGR[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BOLD
public static final SGR BOLD
Bold text mode. Please note that on some terminal implementations, instead of (or in addition to) making the text bold, it will draw the text in a slightly different color
-
REVERSE
public static final SGR REVERSE
Reverse text mode, will flip the foreground and background colors while active
-
UNDERLINE
public static final SGR UNDERLINE
Draws a horizontal line under the text. Not widely supported.
-
BLINK
public static final SGR BLINK
Text will blink on the screen by alternating the foreground color between the real foreground color and the background color. Not widely supported.
-
BORDERED
public static final SGR BORDERED
Draws a border around the text. Rarely supported.
-
FRAKTUR
public static final SGR FRAKTUR
I have no idea, exotic extension, please send me a reference screen shots!
-
CROSSED_OUT
public static final SGR CROSSED_OUT
Draws a horizontal line through the text. Rarely supported.
-
CIRCLED
public static final SGR CIRCLED
Draws a circle around the text. Rarely supported.
-
ITALIC
public static final SGR ITALIC
Italic (cursive) text mode. Some Terminal seem to support it.
-
-
Method Detail
-
values
public static SGR[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SGR c : SGR.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SGR valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-