Package io.guise.framework.prototype
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 Summary
Modifier and TypeFieldDescriptionstatic final int
Top-level "Configure" menu order.static final int
Top-level "Edit" menu order.static final int
Help sub-menu order.static final int
Top-level "Help" menu order.static final int
Top-level "Insert" menu order.static final int
The maximum allowed order.static final int
The minimum allowed order.static final int
No order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Top-level "Resource" menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Resource sub-menu order.static final int
Top-level "Tool" menu order.static final int
Top-level "View" menu order.static final int
Top-level "Window" menu order. -
Constructor Summary
ConstructorDescriptionPrototypeProvision
(PrototypeProvision<?> parentPrototypeProvision, P prototype, int order, boolean isMenu, boolean isTool) Parent prototype description and prototype constructor.PrototypeProvision
(P prototype, int order, boolean isMenu, boolean isTool) Prototype constructor with no prototype description parent. -
Method Summary
Methods inherited from class com.globalmentor.model.AbstractHashObject
equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.clogr.Clogged
getLogger
-
Field Details
-
NO_ORDER
public static final int NO_ORDERNo order.- See Also:
-
MIN_ORDER
public static final int MIN_ORDERThe minimum allowed order.- See Also:
-
MAX_ORDER
public static final int MAX_ORDERThe maximum allowed order.- See Also:
-
RESOURCE_MENU_ORDER
public static final int RESOURCE_MENU_ORDERTop-level "Resource" menu order.- See Also:
-
EDIT_MENU_ORDER
public static final int EDIT_MENU_ORDERTop-level "Edit" menu order.- See Also:
-
INSERT_MENU_ORDER
public static final int INSERT_MENU_ORDERTop-level "Insert" menu order.- See Also:
-
VIEW_MENU_ORDER
public static final int VIEW_MENU_ORDERTop-level "View" menu order.- See Also:
-
TOOL_MENU_ORDER
public static final int TOOL_MENU_ORDERTop-level "Tool" menu order.- See Also:
-
CONFIGURE_MENU_ORDER
public static final int CONFIGURE_MENU_ORDERTop-level "Configure" menu order.- See Also:
-
WINDOW_MENU_ORDER
public static final int WINDOW_MENU_ORDERTop-level "Window" menu order.- See Also:
-
HELP_MENU_ORDER
public static final int HELP_MENU_ORDERTop-level "Help" menu order.- See Also:
-
RESOURCE_MENU_NEW_ORDER
public static final int RESOURCE_MENU_NEW_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_ADD_ORDER
public static final int RESOURCE_MENU_ADD_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_OPEN_ORDER
public static final int RESOURCE_MENU_OPEN_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_CLOSE_ORDER
public static final int RESOURCE_MENU_CLOSE_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_EDIT_ORDER
public static final int RESOURCE_MENU_EDIT_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_EDIT_CANCEL
public static final int RESOURCE_MENU_EDIT_CANCELResource sub-menu order.- See Also:
-
RESOURCE_MENU_SAVE_ORDER
public static final int RESOURCE_MENU_SAVE_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_SAVE_AS_ORDER
public static final int RESOURCE_MENU_SAVE_AS_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_SAVE_ALL_ORDER
public static final int RESOURCE_MENU_SAVE_ALL_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_REVERT_ORDER
public static final int RESOURCE_MENU_REVERT_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_MOVE_ORDER
public static final int RESOURCE_MENU_MOVE_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_RENAME_ORDER
public static final int RESOURCE_MENU_RENAME_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_REFRESH_ORDER
public static final int RESOURCE_MENU_REFRESH_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_DELETE_ORDER
public static final int RESOURCE_MENU_DELETE_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_PREVIOUS_ORDER
public static final int RESOURCE_MENU_PREVIOUS_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_RECEDE_ORDER
public static final int RESOURCE_MENU_RECEDE_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_PLAY_ORDER
public static final int RESOURCE_MENU_PLAY_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_PAUSE_ORDER
public static final int RESOURCE_MENU_PAUSE_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_RECORD_ORDER
public static final int RESOURCE_MENU_RECORD_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_STOP_ORDER
public static final int RESOURCE_MENU_STOP_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_ADVANCE_ORDER
public static final int RESOURCE_MENU_ADVANCE_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_NEXT_ORDER
public static final int RESOURCE_MENU_NEXT_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_RETRIEVE_ORDER
public static final int RESOURCE_MENU_RETRIEVE_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_ANNOTATE_ORDER
public static final int RESOURCE_MENU_ANNOTATE_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_PROPERTIES_ORDER
public static final int RESOURCE_MENU_PROPERTIES_ORDERResource sub-menu order.- See Also:
-
RESOURCE_MENU_EXIT_ORDER
public static final int RESOURCE_MENU_EXIT_ORDERResource sub-menu order.- See Also:
-
HELP_MENU_ABOUT_ORDER
public static final int HELP_MENU_ABOUT_ORDERHelp sub-menu order.- See Also:
-
-
Constructor Details
-
PrototypeProvision
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 isnull
.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, ornull
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 isnull
.IllegalArgumentException
- if the given order is not -1 and does not come between 0 and 2147483647, inclusive.
-
-
Method Details
-
getParentPrototypeProvision
- Returns:
- The prototype's parent, or
null
if the prototype description has no parent.
-
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
- Specified by:
compareTo
in interfaceComparable<P extends Prototype>
-