Class Instances

java.lang.Object
tripleplay.flump.Instances

public class Instances extends Object
Provides utility functions for dealing with Instances
  • Constructor Details

    • Instances

      public Instances()
  • Method Details

    • dumpHierarchy

      public static String dumpHierarchy(Instance root)
      Dump the display hierarchy to a String, each component on a newline, children indented two spaces:
      
         forearmRight: container_forearmRight
           TOP_tight: forearmRight_tight_TOP
             CB: Texture (59.0 x 138.0)
             SB: Texture (19.0 x 19.0)
       
    • applyToHierarchy

      public static boolean applyToHierarchy(Instance root, Instances.Op listener)
      Call listener.onVisit for root and all its descendants. If callback returns true, traversal will halt. The passed in depth is 0 for root, and increases by 1 for each level of children.
      Returns:
      true if onVisit returned true