Top Description Fields Constructors Methods
io.github.darvil.terminal.textformatter

public final Enum FormatOption

extends Enum<FormatOption>
Class Inheritance
Imports
org.jetbrains.annotations.NotNull

Enumerates the ANSI format codes that a terminal can normally display.

Please note that compatibility with all terminals may vary.

Field Summary

Modifier and TypeField and Description
public static final FormatOption
BLINK

Makes the text blink.

public static final FormatOption
public static final FormatOption
DIM

Makes the text dimmer.

public static final FormatOption
HIDDEN

Hides the text.

public static final FormatOption
public static final FormatOption
RESET_ALL

Resets all formatting.

public static final FormatOption
REVERSE

Reverses the foreground and background colors.

public static final FormatOption
public static final FormatOption
private final byte

Constructor Summary

AccessConstructor and Description
private
FormatOption(int value)

Method Summary

Modifier and TypeMethod and Description
public @NotNull String

Returns:

The ANSI escape sequence which resets the formatting of this option.
reset
()

Returns the ANSI escape sequence which resets the formatting of this option.

public @NotNull String

Returns:

The ANSI escape sequence for this format option.
seq
()

Returns the ANSI escape sequence for this format option.

public @NotNull String

Returns:

The ANSI escape sequence for this format option.
toString
()

Overrides java.lang.Enum.toString.

Returns the ANSI escape sequence for this format option.

public static FormatOption
public static FormatOption[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

BOLDback to summary
public static final FormatOption BOLD
DIMback to summary
public static final FormatOption DIM

Makes the text dimmer.

HIDDENback to summary
public static final FormatOption HIDDEN

Hides the text.

ITALICback to summary
public static final FormatOption ITALIC
RESET_ALLback to summary
public static final FormatOption RESET_ALL

Resets all formatting. Including colors.

REVERSEback to summary
public static final FormatOption REVERSE

Reverses the foreground and background colors.

STRIKETHROUGHback to summary
public static final FormatOption STRIKETHROUGH
UNDERLINEback to summary
public static final FormatOption UNDERLINE
valueback to summary
private final byte value

Constructor Detail

FormatOptionback to summary
private FormatOption(int value)

Method Detail

resetback to summary
public @NotNull String reset()

Returns the ANSI escape sequence which resets the formatting of this option.

Returns:@NotNull String

The ANSI escape sequence which resets the formatting of this option.

Annotations
@NotNull
seqback to summary
public @NotNull String seq()

Returns the ANSI escape sequence for this format option.

Returns:@NotNull String

The ANSI escape sequence for this format option.

Annotations
@NotNull
toStringback to summary
public @NotNull String toString()

Overrides java.lang.Enum.toString.

Returns the ANSI escape sequence for this format option.

Returns:@NotNull String

The ANSI escape sequence for this format option.

Annotations
@Override
@NotNull
See Also
FormatOption#seq()
valueOfback to summary
public static FormatOption valueOf(String name)
valuesback to summary
public static FormatOption[] values()