- java.lang.Object
-
- org.jline.utils.AttributedCharSequence
-
- All Implemented Interfaces:
CharSequence
- Direct Known Subclasses:
AttributedString
,AttributedStringBuilder
public abstract class AttributedCharSequence extends Object implements CharSequence
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AttributedCharSequence.ForceMode
-
Field Summary
Fields Modifier and Type Field Description static int
TRUE_COLORS
-
Constructor Summary
Constructors Constructor Description AttributedCharSequence()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract char[]
buffer()
char
charAt(int index)
int
codePointAt(int index)
int
codePointBefore(int index)
int
codePointCount(int index, int length)
int
columnLength()
List<AttributedString>
columnSplitLength(int columns)
List<AttributedString>
columnSplitLength(int columns, boolean includeNewlines, boolean delayLineWrap)
AttributedString
columnSubSequence(int start, int stop)
boolean
contains(char c)
boolean
isHidden(int index)
protected abstract int
offset()
void
print(Terminal terminal)
void
println(Terminal terminal)
static int
rgbColor(int col)
Deprecated.static int
roundColor(int col, int max)
Deprecated.static int
roundRgbColor(int r, int g, int b, int max)
Deprecated.int
runLimit(int index)
int
runStart(int index)
abstract AttributedStyle
styleAt(int index)
abstract AttributedString
subSequence(int start, int end)
AttributedString
substring(int start, int end)
String
toAnsi()
String
toAnsi(int colors, boolean force256colors)
Deprecated.String
toAnsi(int colors, boolean force256colors, String altIn, String altOut)
Deprecated.String
toAnsi(int colors, AttributedCharSequence.ForceMode force)
String
toAnsi(int colors, AttributedCharSequence.ForceMode force, ColorPalette palette)
String
toAnsi(int colors, AttributedCharSequence.ForceMode force, ColorPalette palette, String altIn, String altOut)
String
toAnsi(Terminal terminal)
AttributedString
toAttributedString()
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.CharSequence
chars, codePoints, length
-
-
-
-
Field Detail
-
TRUE_COLORS
public static final int TRUE_COLORS
- See Also:
- Constant Field Values
-
-
Method Detail
-
print
public void print(Terminal terminal)
-
println
public void println(Terminal terminal)
-
toAnsi
public String toAnsi()
-
toAnsi
@Deprecated public String toAnsi(int colors, boolean force256colors)
Deprecated.
-
toAnsi
@Deprecated public String toAnsi(int colors, boolean force256colors, String altIn, String altOut)
Deprecated.
-
toAnsi
public String toAnsi(int colors, AttributedCharSequence.ForceMode force)
-
toAnsi
public String toAnsi(int colors, AttributedCharSequence.ForceMode force, ColorPalette palette)
-
toAnsi
public String toAnsi(int colors, AttributedCharSequence.ForceMode force, ColorPalette palette, String altIn, String altOut)
-
rgbColor
@Deprecated public static int rgbColor(int col)
Deprecated.
-
roundColor
@Deprecated public static int roundColor(int col, int max)
Deprecated.
-
roundRgbColor
@Deprecated public static int roundRgbColor(int r, int g, int b, int max)
Deprecated.
-
styleAt
public abstract AttributedStyle styleAt(int index)
-
isHidden
public boolean isHidden(int index)
-
runStart
public int runStart(int index)
-
runLimit
public int runLimit(int index)
-
subSequence
public abstract AttributedString subSequence(int start, int end)
- Specified by:
subSequence
in interfaceCharSequence
-
substring
public AttributedString substring(int start, int end)
-
buffer
protected abstract char[] buffer()
-
offset
protected abstract int offset()
-
charAt
public char charAt(int index)
- Specified by:
charAt
in interfaceCharSequence
-
codePointAt
public int codePointAt(int index)
-
contains
public boolean contains(char c)
-
codePointBefore
public int codePointBefore(int index)
-
codePointCount
public int codePointCount(int index, int length)
-
columnLength
public int columnLength()
-
columnSubSequence
public AttributedString columnSubSequence(int start, int stop)
-
columnSplitLength
public List<AttributedString> columnSplitLength(int columns)
-
columnSplitLength
public List<AttributedString> columnSplitLength(int columns, boolean includeNewlines, boolean delayLineWrap)
-
toString
public String toString()
- Specified by:
toString
in interfaceCharSequence
- Overrides:
toString
in classObject
-
toAttributedString
public AttributedString toAttributedString()
-
-