Class KStringStyledText

All Implemented Interfaces:
Drawable

public class KStringStyledText extends IZ_StyledText
Controller class for editing a KString as a styled string.
Author:
Christopher Mindus
  • Constructor Details

  • Method Details

    • getLastKStringType

      public static KString.Type getLastKStringType()
      Gets the last used type.
      Returns:
      The last used type that was stored using setLastKStringType(KString.Type).
    • setLastKStringType

      public static void setLastKStringType(KString.Type type)
      Sets the last used type.
      Parameters:
      type - The last used type to be stored for retrieval using getLastKStringType().
    • getLastKStringUseTags

      public static boolean getLastKStringUseTags()
      Gets the last used "useTags".
      Returns:
      The last used "useTags" that was stored using setLastKStringUseTags(boolean).
    • setLastKStringUseTags

      public static void setLastKStringUseTags(boolean useTags)
      Sets the last used type.
      Parameters:
      useTags - The last used "useTags" to be stored for retrieval using getLastKStringUseTags().
    • setDialogMode

      public void setDialogMode()
      Sets dialog mode, i.e. Enter to go to default button in dialog, tab keys as normal.
    • getKStringProp

      public KStringProp getKStringProp()
      Gets the edited property.
      Returns:
      The edited property, or null for none.
    • setKStringProp

      public void setKStringProp(KStringProp newKStringProp, ModuleModel model)
      Sets the KStringProp being edited.
      Parameters:
      newKStringProp - The new KString property.
      model - The Module model.
    • buildStyleRanges

      public static ArrayList<StyleRange> buildStyleRanges(ArrayList<KStringStyleRange> styles)
      Constructs a StyleRange ArrayList from KString styles ranges.
    • updateText

      public void updateText(KString ks, IPropErrorItem pei)
      Updates the text editor from the property.
      Parameters:
      ks - The KString, null for none.
      pei - Potential error.