Class PluggableGroupStrategy

  • All Implemented Interfaces:
    GroupStrategy

    public abstract class PluggableGroupStrategy
    extends java.lang.Object
    implements GroupStrategy
    This class in combination with the GroupPlugs allows you to build a modular GroupStrategy out of routines you already implemented.
    • Constructor Detail

      • PluggableGroupStrategy

        public PluggableGroupStrategy()
    • Method Detail

      • beforeGroup

        public void beforeGroup​(int group,
                                Array<Decal> contents)
        Description copied from interface: GroupStrategy
        Invoked directly before rendering the contents of a group
        Specified by:
        beforeGroup in interface GroupStrategy
        Parameters:
        group - Group that will be rendered
        contents - Array of entries of arrays containing all the decals in the group
      • afterGroup

        public void afterGroup​(int group)
        Description copied from interface: GroupStrategy
        Invoked directly after rendering of a group has completed
        Specified by:
        afterGroup in interface GroupStrategy
        Parameters:
        group - Group which completed rendering
      • plugIn

        public void plugIn​(GroupPlug plug,
                           int group)
        Set the plug used for a specific group. The plug will automatically be invoked.
        Parameters:
        plug - Plug to use
        group - Group the plug is for
      • unPlug

        public GroupPlug unPlug​(int group)
        Remove a plug from the strategy
        Parameters:
        group - Group to remove the plug from
        Returns:
        removed plug, null if there was none for that group