Class PrototypeProvision<P extends Prototype>

java.lang.Object
com.globalmentor.model.AbstractHashObject
io.guise.framework.prototype.PrototypeProvision<P>
Type Parameters:
P - The type of prototype being provided.
All Implemented Interfaces:
io.clogr.Clogged, Comparable<PrototypeProvision<P>>

public class PrototypeProvision<P extends Prototype> extends com.globalmentor.model.AbstractHashObject implements Comparable<PrototypeProvision<P>>, io.clogr.Clogged
Prototype provision information indicating order, hierarchy, and location for generated components. This description is usually used to generate components and place them in menus and/or toolbars.
Author:
Garret Wilson
  • Field Details

    • NO_ORDER

      public static final int NO_ORDER
      No order.
      See Also:
    • MIN_ORDER

      public static final int MIN_ORDER
      The minimum allowed order.
      See Also:
    • MAX_ORDER

      public static final int MAX_ORDER
      The maximum allowed order.
      See Also:
    • RESOURCE_MENU_ORDER

      public static final int RESOURCE_MENU_ORDER
      Top-level "Resource" menu order.
      See Also:
    • EDIT_MENU_ORDER

      public static final int EDIT_MENU_ORDER
      Top-level "Edit" menu order.
      See Also:
    • INSERT_MENU_ORDER

      public static final int INSERT_MENU_ORDER
      Top-level "Insert" menu order.
      See Also:
    • VIEW_MENU_ORDER

      public static final int VIEW_MENU_ORDER
      Top-level "View" menu order.
      See Also:
    • TOOL_MENU_ORDER

      public static final int TOOL_MENU_ORDER
      Top-level "Tool" menu order.
      See Also:
    • CONFIGURE_MENU_ORDER

      public static final int CONFIGURE_MENU_ORDER
      Top-level "Configure" menu order.
      See Also:
    • WINDOW_MENU_ORDER

      public static final int WINDOW_MENU_ORDER
      Top-level "Window" menu order.
      See Also:
    • HELP_MENU_ORDER

      public static final int HELP_MENU_ORDER
      Top-level "Help" menu order.
      See Also:
    • RESOURCE_MENU_NEW_ORDER

      public static final int RESOURCE_MENU_NEW_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_ADD_ORDER

      public static final int RESOURCE_MENU_ADD_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_OPEN_ORDER

      public static final int RESOURCE_MENU_OPEN_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_CLOSE_ORDER

      public static final int RESOURCE_MENU_CLOSE_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_EDIT_ORDER

      public static final int RESOURCE_MENU_EDIT_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_EDIT_CANCEL

      public static final int RESOURCE_MENU_EDIT_CANCEL
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_SAVE_ORDER

      public static final int RESOURCE_MENU_SAVE_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_SAVE_AS_ORDER

      public static final int RESOURCE_MENU_SAVE_AS_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_SAVE_ALL_ORDER

      public static final int RESOURCE_MENU_SAVE_ALL_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_REVERT_ORDER

      public static final int RESOURCE_MENU_REVERT_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_MOVE_ORDER

      public static final int RESOURCE_MENU_MOVE_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_RENAME_ORDER

      public static final int RESOURCE_MENU_RENAME_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_REFRESH_ORDER

      public static final int RESOURCE_MENU_REFRESH_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_DELETE_ORDER

      public static final int RESOURCE_MENU_DELETE_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_PREVIOUS_ORDER

      public static final int RESOURCE_MENU_PREVIOUS_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_RECEDE_ORDER

      public static final int RESOURCE_MENU_RECEDE_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_PLAY_ORDER

      public static final int RESOURCE_MENU_PLAY_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_PAUSE_ORDER

      public static final int RESOURCE_MENU_PAUSE_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_RECORD_ORDER

      public static final int RESOURCE_MENU_RECORD_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_STOP_ORDER

      public static final int RESOURCE_MENU_STOP_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_ADVANCE_ORDER

      public static final int RESOURCE_MENU_ADVANCE_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_NEXT_ORDER

      public static final int RESOURCE_MENU_NEXT_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_RETRIEVE_ORDER

      public static final int RESOURCE_MENU_RETRIEVE_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_ANNOTATE_ORDER

      public static final int RESOURCE_MENU_ANNOTATE_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_PROPERTIES_ORDER

      public static final int RESOURCE_MENU_PROPERTIES_ORDER
      Resource sub-menu order.
      See Also:
    • RESOURCE_MENU_EXIT_ORDER

      public static final int RESOURCE_MENU_EXIT_ORDER
      Resource sub-menu order.
      See Also:
    • HELP_MENU_ABOUT_ORDER

      public static final int HELP_MENU_ABOUT_ORDER
      Help sub-menu order.
      See Also:
  • Constructor Details

    • PrototypeProvision

      public PrototypeProvision(P prototype, int order, boolean isMenu, boolean isTool)
      Prototype constructor with no prototype description parent.
      Parameters:
      prototype - The prototype.
      order - The order of the prototype.
      isMenu - Whether this prototype should be used in a menu if available.
      isTool - Whether this prototype should be used in a toolbar if available.
      Throws:
      NullPointerException - if the given prototype is null.
      IllegalArgumentException - if the given order is not -1 and does not come between 0 and 2147483647, inclusive.
    • PrototypeProvision

      public PrototypeProvision(PrototypeProvision<?> parentPrototypeProvision, P prototype, int order, boolean isMenu, boolean isTool)
      Parent prototype description and prototype constructor.
      Parameters:
      parentPrototypeProvision - The prototype description's parent, or null if the prototype description has no parent.
      prototype - The prototype.
      order - The order of the prototype.
      isMenu - Whether this prototype should be used in a menu if available.
      isTool - Whether this prototype should be used in a toolbar if available.
      Throws:
      NullPointerException - if the given prototype is null.
      IllegalArgumentException - if the given order is not -1 and does not come between 0 and 2147483647, inclusive.
  • Method Details

    • getParentPrototypeProvision

      public PrototypeProvision<?> getParentPrototypeProvision()
      Returns:
      The prototype's parent, or null if the prototype description has no parent.
    • getPrototype

      public P getPrototype()
      Returns:
      The prototype being described.
    • getOrder

      public int getOrder()
      Returns:
      The order of the prototype.
    • isMenu

      public boolean isMenu()
      Returns:
      Whether this prototype should be used in a menu if available.
    • isTool

      public boolean isTool()
      Returns:
      Whether this prototype should be used in a toolbar if available.
    • compareTo

      public int compareTo(PrototypeProvision<P> prototypeDescription)
      Specified by:
      compareTo in interface Comparable<P extends Prototype>