Class RMXStringUtils

java.lang.Object
com.inductiveautomation.rm.text.RMXStringUtils
All Implemented Interfaces:
RMTypes, RMTextTypes

public class RMXStringUtils extends Object implements RMTextTypes
This class provides a method to perform @key@ substitution on an xstring.
  • Constructor Details

    • RMXStringUtils

      public RMXStringUtils()
  • Method Details

    • separate

      public static RMXString[] separate(RMXString aString, String aSeparator)
      Returns a List of XString substrings of this XString that are separated by the given separator String.
    • coalesceNewlines

      public static void coalesceNewlines(RMXString aString)
      Replaces any occurrence of consecutive newlines with a single newline.
    • scaleFonts

      public static void scaleFonts(RMXString aString, float aScale)
      Sets a value to that should be multiplied times all font sizes in this string.
    • blend

      public static RMXString blend(RMXString aString1, RMXString aString2, float fraction)
      Returns a blended version of the receiver and the given string (0 is receiver, 1 is given string). The current implementation actually only blends text color.
    • toStringXML

      public static String toStringXML(RMXString aString)
      Returns an XML style string representation of the attributes and string runs in this XString.
    • getRepresentableString

      public static RMXString getRepresentableString(RMXString aString)
      Returns a version of this string that substitutes alternate fonts for any characters that cannot be displayed in their associated fonts (simply returns the receiver if all characters are valid).
    • rpgClone

      public static RMXString rpgClone(RMXString aString, ReportOwner anRptOwner, Object userInfo, RMShape aShape, boolean doCopy)
      Performs @key@ substitution on an xstring.
    • nextKeyRangeAfterIndex

      public static com.inductiveautomation.rm.text.RMXStringUtils.Range nextKeyRangeAfterIndex(RMXString aString, int anIndex, com.inductiveautomation.rm.text.RMXStringUtils.Range aRange)
      Returns the range of the next occurrence of @delimited@ text.