| Modifier and Type | Class and Description |
|---|---|
protected static class |
BaseAString.FoundRunBreak |
| Constructor and Description |
|---|
BaseAString(AttributedCharacterIterator text) |
BaseAString(AttributedCharacterIterator[] iterators) |
BaseAString(AttributedCharacterIterator text,
int beginIndex,
int endIndex) |
BaseAString(AttributedCharacterIterator text,
int beginIndex,
int endIndex,
AttributedCharacterIterator.Attribute[] attributes) |
BaseAString(AttributedString astr)
Конструктор копирования
|
BaseAString(BaseAString astr)
Конструктор копирования
|
BaseAString(String text) |
BaseAString(String text,
Map<? extends AttributedCharacterIterator.Attribute,?> attributes) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAttribute(AttributedCharacterIterator.Attribute attribute,
Object value)
Adds an attribute to the entire string.
|
protected void |
addAttribute(AttributedCharacterIterator.Attribute attribute,
Object value,
int beginIndex,
int endIndex)
Adds an attribute to a subrange of the string.
|
protected void |
addAttributeImpl(AttributedCharacterIterator.Attribute attribute,
Object value,
int beginIndex,
int endIndex) |
protected void |
addAttributeRunData(AttributedCharacterIterator.Attribute attribute,
Object value,
int beginRunIndex,
int endRunIndex) |
protected void |
addAttributes(Map<? extends AttributedCharacterIterator.Attribute,?> attributes,
int beginIndex,
int endIndex)
Adds a set of attributes to a subrange of the string.
|
protected void |
appendContents(StringBuffer buf,
CharacterIterator iterator)
Appends the contents of the CharacterIterator iterator into the
StringBuffer buf.
|
protected boolean |
attributeValuesMatch(Set attributes,
int runIndex1,
int runIndex2) |
char |
charAt(int index) |
protected void |
clearAttributes(int beginIndex,
int endIndex) |
protected void |
clearAttributesImpl(int beginIndex,
int endIndex) |
protected void |
clearAttributesRunData(int beginRunIndex,
int endRunIndex) |
BaseAString |
clone() |
protected void |
createRunAttributeDataVectors() |
protected int |
ensureRunBreak(int offset) |
protected int |
ensureRunBreak(int offset,
boolean copyAttrs)
Ensures there is a run break at offset, returning the index of
the run.
|
protected BaseAString.FoundRunBreak |
findRunBreak(int offset) |
protected Object |
getAttribute(AttributedCharacterIterator.Attribute attribute,
int runIndex) |
protected Object |
getAttributeCheckRange(AttributedCharacterIterator.Attribute attribute,
int runIndex,
int beginIndex,
int endIndex) |
AttributedCharacterIterator |
getIterator()
Creates an AttributedCharacterIterator instance that provides access to the entire contents of
this string.
|
AttributedCharacterIterator |
getIterator(AttributedCharacterIterator.Attribute[] attributes)
Creates an AttributedCharacterIterator instance that provides access to
selected contents of this string.
|
AttributedCharacterIterator |
getIterator(AttributedCharacterIterator.Attribute[] attributes,
int beginIndex,
int endIndex)
Creates an AttributedCharacterIterator instance that provides access to
selected contents of this string.
|
Vector[] |
getRunAttributes() |
Vector[] |
getRunAttributeValues() |
int |
getRunCount() |
int[] |
getRunStarts() |
long |
getScn() |
int |
length() |
static int |
length(AttributedCharacterIterator astr) |
protected static boolean |
mapsDiffer(Map last,
Map attrs)
Returns true if the attributes specified in last and attrs differ.
|
protected void |
nextScn() |
protected void |
removeAttributeImpl(AttributedCharacterIterator.Attribute attribute,
int beginIndex,
int endIndex) |
protected void |
removeAttributeRunData(AttributedCharacterIterator.Attribute attribute,
int beginRunIndex,
int endRunIndex) |
protected void |
removeAttributes(Set<? extends AttributedCharacterIterator.Attribute> attributes,
int beginIndex,
int endIndex) |
protected void |
setAttributes(Map attrs,
int offset)
Sets the attributes for the range from offset to the next run break
(typically the end of the text) to the ones specified in attrs.
|
String |
text() |
static boolean |
valuesMatch(Object value1,
Object value2) |
public BaseAString(AttributedCharacterIterator[] iterators)
public BaseAString(String text)
public BaseAString(String text, Map<? extends AttributedCharacterIterator.Attribute,?> attributes)
public BaseAString(AttributedCharacterIterator text)
public BaseAString(AttributedCharacterIterator text, int beginIndex, int endIndex)
public BaseAString(AttributedCharacterIterator text, int beginIndex, int endIndex, AttributedCharacterIterator.Attribute[] attributes)
public BaseAString(AttributedString astr)
astr - образецpublic BaseAString(BaseAString astr)
astr - образецprotected void nextScn()
public long getScn()
public int getRunCount()
public int[] getRunStarts()
public Vector[] getRunAttributes()
public Vector[] getRunAttributeValues()
public BaseAString clone()
protected void appendContents(StringBuffer buf, CharacterIterator iterator)
buf - string bufferiterator - char iterprotected static boolean mapsDiffer(Map last, Map attrs)
last - doc itattrs - doc itprotected void setAttributes(Map attrs, int offset)
attrs - doc itoffset - doc itprotected void createRunAttributeDataVectors()
protected void addAttribute(AttributedCharacterIterator.Attribute attribute, Object value)
attribute - the attribute keyvalue - the value of the attribute; may be nullNullPointerException - if attribute is null.IllegalArgumentException - if the AttributedString has length 0
(attributes cannot be applied to a 0-length range).protected void addAttribute(AttributedCharacterIterator.Attribute attribute, Object value, int beginIndex, int endIndex)
attribute - the attribute keyvalue - The value of the attribute. May be null.beginIndex - Index of the first character of the range.endIndex - Index of the character following the last character of the range.NullPointerException - if attribute is null.IllegalArgumentException - if beginIndex is less then 0, endIndex is
greater than the length of the string, or beginIndex and endIndex together don't
define a non-empty subrange of the string.protected void addAttributes(Map<? extends AttributedCharacterIterator.Attribute,?> attributes, int beginIndex, int endIndex)
attributes - The attributes to be added to the string.beginIndex - Index of the first character of the range.endIndex - Index of the character following the last
character of the range.NullPointerException - if attributes is null.IllegalArgumentException - if beginIndex is less then
0, endIndex is greater than the length of the string, or
beginIndex and endIndex together don't define a non-empty
subrange of the string and the attributes parameter is not an
empty Map.protected void removeAttributes(Set<? extends AttributedCharacterIterator.Attribute> attributes, int beginIndex, int endIndex)
protected void clearAttributes(int beginIndex,
int endIndex)
protected void addAttributeImpl(AttributedCharacterIterator.Attribute attribute, Object value, int beginIndex, int endIndex)
protected void removeAttributeImpl(AttributedCharacterIterator.Attribute attribute, int beginIndex, int endIndex)
protected void clearAttributesImpl(int beginIndex,
int endIndex)
protected BaseAString.FoundRunBreak findRunBreak(int offset)
protected int ensureRunBreak(int offset)
protected int ensureRunBreak(int offset,
boolean copyAttrs)
offset - doc itcopyAttrs - doc itprotected void addAttributeRunData(AttributedCharacterIterator.Attribute attribute, Object value, int beginRunIndex, int endRunIndex)
protected void removeAttributeRunData(AttributedCharacterIterator.Attribute attribute, int beginRunIndex, int endRunIndex)
protected void clearAttributesRunData(int beginRunIndex,
int endRunIndex)
public AttributedCharacterIterator getIterator()
public AttributedCharacterIterator getIterator(AttributedCharacterIterator.Attribute[] attributes)
attributes - a list of attributes that the client is interested inpublic AttributedCharacterIterator getIterator(AttributedCharacterIterator.Attribute[] attributes, int beginIndex, int endIndex)
attributes - a list of attributes that the client is interested inbeginIndex - the index of the first characterendIndex - the index of the character following the last characterIllegalArgumentException - if beginIndex is less then 0,
endIndex is greater than the length of the string, or beginIndex is
greater than endIndex.public char charAt(int index)
protected Object getAttribute(AttributedCharacterIterator.Attribute attribute, int runIndex)
protected Object getAttributeCheckRange(AttributedCharacterIterator.Attribute attribute, int runIndex, int beginIndex, int endIndex)
protected boolean attributeValuesMatch(Set attributes, int runIndex1, int runIndex2)
public int length()
public static int length(AttributedCharacterIterator astr)
public String text()
Copyright © 2019. All rights reserved.