public class RMXStringRun extends java.lang.Object implements RMTextTypes, java.lang.Cloneable, java.lang.CharSequence
RMTextTypes.TabType
RMTypes.Align, RMTypes.AlignX, RMTypes.AlignY
TEXT_CHAR_SPACING, TEXT_COLOR, TEXT_EMBEDDED_SHAPE, TEXT_FONT, TEXT_FORMAT, TEXT_OUTLINE, TEXT_PARAGRAPH, TEXT_SCRIPTING, TEXT_UNDERLINE
Constructor and Description |
---|
RMXStringRun(RMXString anXString)
Creates a new run.
|
Modifier and Type | Method and Description |
---|---|
void |
addLength(int aLength,
int anIndex)
Adds length to run for char index.
|
char |
charAt(int anIndex)
CharSequence method returning character at given index.
|
RMXStringRun |
clone()
Returns a basic clone of this object.
|
RMXStringRun |
cloneDeep(RMXString anXString)
Returns a clone of this run, including a clone of the next run(s) if present.
|
int |
end()
Returns the end character index for this run.
|
boolean |
equals(java.lang.Object anObj)
Returns whether this run is equal to the given object.
|
java.lang.Object |
getAttribute(java.lang.String aKey)
Returns a specific attribute for the given key.
|
float |
getCharSpacing()
Returns the char spacing.
|
RMColor |
getColor()
Returns the color for this run.
|
RMFont |
getFont()
Returns the font for this run.
|
RMFormat |
getFormat()
Returns the format for this run.
|
RMXStringRun |
getNext()
Return next run.
|
RMXString.Outline |
getOutline()
Returns the outline info for this run (null for none).
|
static RMXString.Outline |
getOutline(java.util.Map attrs)
Returns the Outline record for the given attributes map (or null for none).
|
RMParagraph |
getParagraph()
Returns the paragraph for this run.
|
RMXStringRun |
getRun(int anIndex)
Returns the run at given index.
|
RMXStringRun |
getRunAt(int anIndex,
boolean isInclusive)
Returns the XString run that contains or ends (if given option is true) at given index.
|
int |
getRunCount()
Returns the run count.
|
RMXStringRun |
getRunLast()
Returns the last run.
|
int |
getScripting()
Returns the scripting for this run (1=SuperScripting, -1=Subscripting, 0=none).
|
RMTextStyle |
getStyle()
Returns the text style.
|
int |
getUnderlineStyle()
Returns the underline style of this run.
|
boolean |
isUnderlined()
Returns whether this run is underlined.
|
int |
length()
Returns the length in characters for this run.
|
void |
removeLength(int aLength,
int anIndex)
Removes a length from run(s) for char index.
|
void |
shift(int anAmount)
Shifts run by given amound.
|
RMXStringRun |
split(int anIndex)
Splits the run at the given index and returns a run containing the remaining characters (and identical attributes).
|
int |
start()
Returns the start character index for this run.
|
java.lang.CharSequence |
subSequence(int aStart,
int anEnd)
CharSequence method return character sequence for range.
|
java.lang.String |
toString()
Returns a string representation of this run.
|
public RMXStringRun(RMXString anXString)
public int start()
public int end()
public int length()
length
in interface java.lang.CharSequence
public char charAt(int anIndex)
charAt
in interface java.lang.CharSequence
public java.lang.CharSequence subSequence(int aStart, int anEnd)
subSequence
in interface java.lang.CharSequence
public RMTextStyle getStyle()
public java.lang.Object getAttribute(java.lang.String aKey)
public RMFont getFont()
public RMColor getColor()
public RMParagraph getParagraph()
public boolean isUnderlined()
public int getUnderlineStyle()
public RMXString.Outline getOutline()
public static RMXString.Outline getOutline(java.util.Map attrs)
public RMFormat getFormat()
public int getScripting()
public float getCharSpacing()
public RMXStringRun getNext()
public int getRunCount()
public RMXStringRun getRun(int anIndex)
public RMXStringRun getRunLast()
public RMXStringRun getRunAt(int anIndex, boolean isInclusive)
public void addLength(int aLength, int anIndex)
public void removeLength(int aLength, int anIndex)
public void shift(int anAmount)
public RMXStringRun split(int anIndex)
public boolean equals(java.lang.Object anObj)
equals
in class java.lang.Object
public RMXStringRun clone()
clone
in class java.lang.Object
public RMXStringRun cloneDeep(RMXString anXString)
public java.lang.String toString()
toString
in interface java.lang.CharSequence
toString
in class java.lang.Object