Class KStringStyled

java.lang.Object
com.iizix.text.KString
com.iizix.text.KStringStyled
All Implemented Interfaces:
Cloneable, Comparable<KString>

public class KStringStyled extends KString
Styles KString used for parsing in the Editor to provide StyleRange's.
Author:
Christopher Mindus
  • Constructor Details

    • KStringStyled

      public KStringStyled(KString.Type type, String inputString, boolean usesTagProcessing, ArrayList<KStringStyleRange> styleRanges) throws KStringException
      Constructor.
      Parameters:
      type - The type of KString.
      inputString - The string to parse.
      usesTagProcessing - Flag for tag usage.
      styleRanges - Array that is filled with KStringStyleRange's when parsed.
      Throws:
      KStringException - Failure in parsing.
  • Method Details

    • create

      public static KStringStyled create(KString.Type type, String inputString, boolean usesTagProcessing, ArrayList<KStringStyleRange> styleRanges, boolean trusted) throws KStringException
      Creates the styling parse of a KString of the classical or the trusted kind. The kind cannot be a constructor argument, since the parse runs inside the constructor before a field could be assigned; the trusted kind is a subclass with the trusted tables.
      Parameters:
      type - The type of KString.
      inputString - The string to parse.
      usesTagProcessing - Flag for tag usage.
      styleRanges - Array that is filled with KStringStyleRange's when parsed.
      trusted - true to style with the trusted kind's tables (the property being edited holds a trusted KString), false for the classical kind.
      Returns:
      The styled KString, of the requested kind.
      Throws:
      KStringException - Failure in parsing.