|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AnsiCharSequence
Klasa reprezentująca ciąg znaków razem z przypisanymi do nich atrybutami (kolor tekstu, tła, czcionka, styl)
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface net.ranides.assira.text.format.AnsiAttr |
|---|
AnsiAttr.IndirectAt |
| Field Summary |
|---|
| Fields inherited from interface net.ranides.assira.text.format.AnsiAttr |
|---|
bold, BOLD, changed, CHANGED, fresh, FRESH, invert, INVERT, MASK_INTERNAL, MASK_PUBLIC, narrow, NARROW, normal, NORMAL, SPLIT_ALL, SPLIT_BACK, SPLIT_FLAGS, SPLIT_FLAGS_ALL, SPLIT_FONT, SPLIT_FORE, strike, STRIKE, symbol, SYMBOL, underline, UNDERLINE |
| Method Summary | |
|---|---|
AnsiAttr |
getAttr()
Zwraca wszystkie domyślne właściwości przypisane do ciągu tekstowego (kolor, tło, czcionka, styl). |
AnsiAttr |
getAttrAt(int index)
Zwraca wszystkie właściwości przypisane do znaku o podanym indeksie (kolor, tło, czcionka, styl). |
int |
getBackAt(int index)
Zwraca numer koloru tła przypisany do znaku o podanym indeksie. |
char |
getCharAt(int index)
Odczytuje z sekwencji znak o podanym indeksie. |
Color |
getComputedBackAt(int index)
Metoda opcjonalna: zwraca kolor tła przypisany do znaku o podanym indeksie. |
Font |
getComputedFontAt(int index)
Metoda opcjonalna: zwraca numer czcionki przypisany do znaku o podanym indeksie. |
Color |
getComputedForeAt(int index)
Metoda opcjonalna: zwraca kolor tekstu przypisany do znaku o podanym indeksie. |
int |
getFlagsAt(int index)
Zwraca atrybuty przypisane do znaku o podanym indeksie. |
int |
getFontAt(int index)
Zwraca numer czcionki przypisany do znaku o podanym indeksie. |
AnsiFontScheme |
getFonts()
Zwraca schemat czcionek skojarzony z sekwencją znaków. |
int |
getForeAt(int index)
Zwraca numer koloru tekstu przypisany do znaku o podanym indeksie. |
AnsiColorScheme |
getScheme()
Zwraca schemat kolorów skojarzony z sekwencją znaków. |
Iterable<? extends AnsiCharSequence> |
split(int options)
Rozbija tekst na fragmenty zawierające znaki zgrupowane według kryteriów podanych w opcjach. |
AnsiCharSequence |
subAnsiSequence(int begin,
int end)
Returns a new AnsiCharSequence that is a subsequence of this sequence. |
| Methods inherited from interface net.ranides.assira.text.format.AnsiAttr |
|---|
getBack, getComputedBack, getComputedFont, getComputedFore, getFlags, getFont, getFore |
| Methods inherited from interface java.lang.CharSequence |
|---|
charAt, length, subSequence, toString |
| Method Detail |
|---|
char getCharAt(int index)
CharSequence.charAt(int). Metoda istniejąca w celu uzyskania pełnej kompatybilności
sekwencji znaków z konwencją JavaBeans.
index -
int getForeAt(int index)
AnsiColorScheme.
index -
getComputedForeAt(int)int getBackAt(int index)
AnsiColorScheme.
index -
getComputedBackAt(int)int getFlagsAt(int index)
index -
int getFontAt(int index)
AnsiFontScheme.
index -
getComputedFontAt(int)AnsiAttr getAttr()
AnsiAttr getAttrAt(int index)
index -
Color getComputedForeAt(int index)
AnsiColorScheme.
index -
Color getComputedBackAt(int index)
AnsiColorScheme.
index -
Font getComputedFontAt(int index)
AnsiFontScheme.
index -
AnsiColorScheme getScheme()
AnsiAttr.getComputedFore(),
AnsiAttr.getComputedBack() oraz pochodnych.
AnsiFontScheme getFonts()
AnsiAttr.getComputedFont()
oraz getComputedFontAt(int)
Iterable<? extends AnsiCharSequence> split(int options)
Rozbija tekst na fragmenty zawierające znaki zgrupowane według kryteriów
podanych w opcjach. Opcje są zbiorem flag z klasy AnsiAttr.
Rozdziela tekst na fragmenty o jednym kolorze tekstu i tła:
text.split(AnsiAttr.SPLIT_FORE | AnsiAttr.SPLIT_BACK)
Rozdziela tekst na fragmenty o tym samym stylu pogrubienia:
text.split(AnsiAttr.SPLIT_FLAGS | AnsiAttr.BOLD)
options -
AnsiCharSequence subAnsiSequence(int begin,
int end)
AnsiCharSequence that is a subsequence of this sequence.
The subsequence starts with the char value at the specified index and
ends with the char value at index end - 1. The length
(in chars) of the
returned sequence is end - start, so if start == end
then an empty sequence is returned.
begin - the start index, inclusiveend - the end index, exclusive
IndexOutOfBoundsException - if start or end are negative,
if end is greater than length(),
or if start is greater than end
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||