Package com.inductiveautomation.rm.text
Class RMXStringRun
java.lang.Object
com.inductiveautomation.rm.text.RMXStringRun
- All Implemented Interfaces:
- RMTypes,- RMTextTypes,- CharSequence,- Cloneable
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 SummaryNested classes/interfaces inherited from interface com.inductiveautomation.rm.text.RMTextTypesRMTextTypes.TabTypeNested classes/interfaces inherited from interface com.inductiveautomation.rm.base.RMTypesRMTypes.Align, RMTypes.AlignX, RMTypes.AlignY
- 
Field SummaryFields 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
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddLength(int aLength, int anIndex) Adds length to run for char index.charcharAt(int anIndex) CharSequence method returning character at given index.clone()Returns a basic clone of this object.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.booleanReturns whether this run is equal to the given object.getAttribute(String aKey) Returns a specific attribute for the given key.floatReturns the char spacing.getColor()Returns the color for this run.getFont()Returns the font for this run.Returns the format for this run.getNext()Return next run.Returns the outline info for this run (null for none).static RMXString.OutlinegetOutline(Map attrs) Returns the Outline record for the given attributes map (or null for none).Returns the paragraph for this run.getRun(int anIndex) Returns the run at given index.getRunAt(int anIndex, boolean isInclusive) Returns the XString run that contains or ends (if given option is true) at given index.intReturns the run count.Returns the last run.intReturns the scripting for this run (1=SuperScripting, -1=Subscripting, 0=none).getStyle()Returns the text style.intReturns the underline style of this run.booleanReturns 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.split(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.subSequence(int aStart, int anEnd) CharSequence method return character sequence for range.toString()Returns a string representation of this run.Methods inherited from class java.lang.Objectfinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequencechars, codePoints, isEmpty
- 
Constructor Details- 
RMXStringRunCreates a new run.
 
- 
- 
Method Details- 
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- CharSequence
 
- 
charAtpublic char charAt(int anIndex) CharSequence method returning character at given index.- Specified by:
- charAtin interface- CharSequence
 
- 
subSequenceCharSequence method return character sequence for range.- Specified by:
- subSequencein interface- CharSequence
 
- 
getStyleReturns the text style.
- 
setStyleSets the text style.
- 
getAttributeReturns a specific attribute for the given key.
- 
getFontReturns the font for this run.
- 
getColorReturns the color for this run.
- 
getParagraphReturns the paragraph for this run.
- 
isUnderlinedpublic boolean isUnderlined()Returns whether this run is underlined.
- 
getUnderlineStylepublic int getUnderlineStyle()Returns the underline style of this run.
- 
getOutlineReturns the outline info for this run (null for none).
- 
getOutlineReturns the Outline record for the given attributes map (or null for none).
- 
getFormatReturns the format for this run.
- 
getNumberFormat
- 
getDateFormat
- 
getScriptingpublic int getScripting()Returns the scripting for this run (1=SuperScripting, -1=Subscripting, 0=none).
- 
getCharSpacingpublic float getCharSpacing()Returns the char spacing.
- 
getNextReturn next run.
- 
getRunCountpublic int getRunCount()Returns the run count.
- 
getRunReturns the run at given index.
- 
getRunLastReturns the last run.
- 
getRunAtReturns 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.
- 
splitSplits the run at the given index and returns a run containing the remaining characters (and identical attributes).
- 
equalsReturns whether this run is equal to the given object.
- 
cloneReturns a basic clone of this object.
- 
cloneDeepReturns a clone of this run, including a clone of the next run(s) if present.
- 
toStringReturns a string representation of this run.- Specified by:
- toStringin interface- CharSequence
- Overrides:
- toStringin class- Object
 
 
-