Class TextDelegate


  • public class TextDelegate
    extends java.lang.Object
    Extend this class to replace animation text with custom text. This can be useful to handle translations. The only method you should have to override is getText(String).
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getTextInternal​(java.lang.String input)  
      void invalidateAllText()
      Invalidates all cached strings
      void invalidateText​(java.lang.String input)
      Invalidates a cached string with the given input.
      void setCacheText​(boolean cacheText)
      Sets whether or not TextDelegate will cache (memoize) the results of getText.
      void setText​(java.lang.String input, java.lang.String output)
      Update the text that will be rendered for the given input text.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setText

        public void setText​(java.lang.String input,
                            java.lang.String output)
        Update the text that will be rendered for the given input text.
      • setCacheText

        public void setCacheText​(boolean cacheText)
        Sets whether or not TextDelegate will cache (memoize) the results of getText. If this isn't necessary then set it to false.
      • invalidateText

        public void invalidateText​(java.lang.String input)
        Invalidates a cached string with the given input.
      • invalidateAllText

        public void invalidateAllText()
        Invalidates all cached strings
      • getTextInternal

        public final java.lang.String getTextInternal​(java.lang.String input)