Package com.inductiveautomation.rm.text
Class RMXStringRun
- java.lang.Object
- 
- com.inductiveautomation.rm.text.RMXStringRun
 
- 
- All Implemented Interfaces:
- RMTypes,- RMTextTypes,- java.lang.CharSequence,- java.lang.Cloneable
 
 public class RMXStringRun extends java.lang.Object implements RMTextTypes, java.lang.Cloneable, java.lang.CharSequence The Run class represents a range of characters in an xstring that share common attributes.This class makes a point to treat its attributes map as read-only so they can be shared among multiple runs. 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface com.inductiveautomation.rm.text.RMTextTypesRMTextTypes.TabType
 - 
Nested classes/interfaces inherited from interface com.inductiveautomation.rm.base.RMTypesRMTypes.Align, RMTypes.AlignX, RMTypes.AlignY
 
- 
 - 
Field Summary- 
Fields inherited from interface com.inductiveautomation.rm.text.RMTextTypesTEXT_CHAR_SPACING, TEXT_COLOR, TEXT_EMBEDDED_SHAPE, TEXT_FONT, TEXT_FORMAT, TEXT_OUTLINE, TEXT_PARAGRAPH, TEXT_SCRIPTING, TEXT_UNDERLINE
 
- 
 - 
Constructor SummaryConstructors Constructor Description RMXStringRun(RMXString anXString)Creates a new run.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLength(int aLength, int anIndex)Adds length to run for char index.charcharAt(int anIndex)CharSequence method returning character at given index.RMXStringRunclone()Returns a basic clone of this object.RMXStringRuncloneDeep(RMXString anXString)Returns a clone of this run, including a clone of the next run(s) if present.intend()Returns the end character index for this run.booleanequals(java.lang.Object anObj)Returns whether this run is equal to the given object.java.lang.ObjectgetAttribute(java.lang.String aKey)Returns a specific attribute for the given key.floatgetCharSpacing()Returns the char spacing.RMColorgetColor()Returns the color for this run.RMDateFormatgetDateFormat()RMFontgetFont()Returns the font for this run.RMFormatgetFormat()Returns the format for this run.RMXStringRungetNext()Return next run.RMNumberFormatgetNumberFormat()RMXString.OutlinegetOutline()Returns the outline info for this run (null for none).static RMXString.OutlinegetOutline(java.util.Map attrs)Returns the Outline record for the given attributes map (or null for none).RMParagraphgetParagraph()Returns the paragraph for this run.RMXStringRungetRun(int anIndex)Returns the run at given index.RMXStringRungetRunAt(int anIndex, boolean isInclusive)Returns the XString run that contains or ends (if given option is true) at given index.intgetRunCount()Returns the run count.RMXStringRungetRunLast()Returns the last run.intgetScripting()Returns the scripting for this run (1=SuperScripting, -1=Subscripting, 0=none).RMTextStylegetStyle()Returns the text style.intgetUnderlineStyle()Returns the underline style of this run.booleanisUnderlined()Returns whether this run is underlined.intlength()Returns the length in characters for this run.voidremoveLength(int aLength, int anIndex)Removes a length from run(s) for char index.protected voidsetStyle(RMTextStyle aStyle)Sets the text style.voidshift(int anAmount)Shifts run by given amound.RMXStringRunsplit(int anIndex)Splits the run at the given index and returns a run containing the remaining characters (and identical attributes).intstart()Returns the start character index for this run.java.lang.CharSequencesubSequence(int aStart, int anEnd)CharSequence method return character sequence for range.java.lang.StringtoString()Returns a string representation of this run.
 
- 
- 
- 
Constructor Detail- 
RMXStringRunpublic RMXStringRun(RMXString anXString) Creates a new run.
 
- 
 - 
Method Detail- 
startpublic int start() Returns the start character index for this run.
 - 
endpublic int end() Returns the end character index for this run.
 - 
lengthpublic int length() Returns the length in characters for this run.- Specified by:
- lengthin interface- java.lang.CharSequence
 
 - 
charAtpublic char charAt(int anIndex) CharSequence method returning character at given index.- Specified by:
- charAtin interface- java.lang.CharSequence
 
 - 
subSequencepublic java.lang.CharSequence subSequence(int aStart, int anEnd)CharSequence method return character sequence for range.- Specified by:
- subSequencein interface- java.lang.CharSequence
 
 - 
getStylepublic RMTextStyle getStyle() Returns the text style.
 - 
setStyleprotected void setStyle(RMTextStyle aStyle) Sets the text style.
 - 
getAttributepublic java.lang.Object getAttribute(java.lang.String aKey) Returns a specific attribute for the given key.
 - 
getFontpublic RMFont getFont() Returns the font for this run.
 - 
getColorpublic RMColor getColor() Returns the color for this run.
 - 
getParagraphpublic RMParagraph getParagraph() Returns the paragraph for this run.
 - 
isUnderlinedpublic boolean isUnderlined() Returns whether this run is underlined.
 - 
getUnderlineStylepublic int getUnderlineStyle() Returns the underline style of this run.
 - 
getOutlinepublic RMXString.Outline getOutline() Returns the outline info for this run (null for none).
 - 
getOutlinepublic static RMXString.Outline getOutline(java.util.Map attrs) Returns the Outline record for the given attributes map (or null for none).
 - 
getFormatpublic RMFormat getFormat() Returns the format for this run.
 - 
getNumberFormat@Nonnull public RMNumberFormat getNumberFormat() 
 - 
getDateFormat@Nonnull public RMDateFormat getDateFormat() 
 - 
getScriptingpublic int getScripting() Returns the scripting for this run (1=SuperScripting, -1=Subscripting, 0=none).
 - 
getCharSpacingpublic float getCharSpacing() Returns the char spacing.
 - 
getNextpublic RMXStringRun getNext() Return next run.
 - 
getRunCountpublic int getRunCount() Returns the run count.
 - 
getRunpublic RMXStringRun getRun(int anIndex) Returns the run at given index.
 - 
getRunLastpublic RMXStringRun getRunLast() Returns the last run.
 - 
getRunAtpublic RMXStringRun getRunAt(int anIndex, boolean isInclusive) Returns the XString run that contains or ends (if given option is true) at given index.
 - 
addLengthpublic void addLength(int aLength, int anIndex)Adds length to run for char index.
 - 
removeLengthpublic void removeLength(int aLength, int anIndex)Removes a length from run(s) for char index.
 - 
shiftpublic void shift(int anAmount) Shifts run by given amound.
 - 
splitpublic RMXStringRun split(int anIndex) Splits the run at the given index and returns a run containing the remaining characters (and identical attributes).
 - 
equalspublic boolean equals(java.lang.Object anObj) Returns whether this run is equal to the given object.- Overrides:
- equalsin class- java.lang.Object
 
 - 
clone@Nullable public RMXStringRun clone() Returns a basic clone of this object.- Overrides:
- clonein class- java.lang.Object
 
 - 
cloneDeeppublic RMXStringRun cloneDeep(RMXString anXString) Returns a clone of this run, including a clone of the next run(s) if present.
 - 
toStringpublic java.lang.String toString() Returns a string representation of this run.- Specified by:
- toStringin interface- java.lang.CharSequence
- Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-