Class Tools


  • public class Tools
    extends java.lang.Object
    A registry of prototype PageItems for all items that appear in the Tools tab of a deck editor. This can be used to add new tool types.
    Since:
    3.0
    Author:
    Chris Jennings
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static PageItem[] getRegisteredTools()
      Returns the prototypes of all currently registered tools, in order of registration.
      static void register​(PageItem prototype)
      Register a new tool to be listed in the Tools tab of the deck editor.
      static void unregister​(PageItem prototype)
      Removes a tool from the list of registered tools.
      • Methods inherited from class java.lang.Object

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

      • register

        public static void register​(PageItem prototype)
        Register a new tool to be listed in the Tools tab of the deck editor.
        Parameters:
        prototype - a prototype item that will be cloned as needed when adding the tool to a deck page
        Throws:
        java.lang.NullPointerException - if the prototype is null
      • unregister

        public static void unregister​(PageItem prototype)
        Removes a tool from the list of registered tools. If the prototype is not registered, does nothing.
        Parameters:
        prototype - the registered tool to remove
      • getRegisteredTools

        public static PageItem[] getRegisteredTools()
        Returns the prototypes of all currently registered tools, in order of registration.
        Returns:
        an array of currently registered tools