com.ibm.as400.opnav
Class ActionDescriptor

java.lang.Object
  |
  +--com.ibm.as400.opnav.ActionDescriptor

public class ActionDescriptor
extends java.lang.Object

A data entity which describes an action which a user may take on one or more system objects. An ActionDescriptor provides the text for the action, information on how it should be presented, and an identifier which is passed when a user requests that a particular action be performed.

An ActionDescriptor may serve to identify a group of logically related subactions. For example, a CREATE action may have associated subactions which identify the types of objects the user may create. The subactions are displayed as having a logical relationship to the main action, often as a cascading submenu from an action in a main menu.

Since:
v4r4m0
See Also:
ActionsManager

Field Summary
static int ADD_MENU_ACTION
          THIS CONSTANT IS CURRENTLY NOT SUPPORTED For Menubar actions this constant defines the action requested Indicates that a new menu is to added.
static int ADD_MENUITEM_ACTION
          THIS CONSTANT IS CURRENTLY NOT SUPPORTED For Menubar actions this constant defines the action requested Indicates that a new menu item is to added.
static int ADD_TOOLBARITEM_ACTION
          THIS CONSTANT IS CURRENTLY NOT SUPPORTED For Toolbar actions this constant defines the action requested Indicates that a new toolbar item is to added.
static int CHANGE_MENUITEM_ACTION
          THIS CONSTANT IS CURRENTLY NOT SUPPORTED For Menubar actions this constant defines the action requested Indicates that an existing menu item is to be enabled/disabled.
static int CHANGE_TOOLBARITEM_ACTION
          THIS CONSTANT IS CURRENTLY NOT SUPPORTED For Toolbar actions this constant defines the action requested Indicates that an existing toolbar item is to be modified.
static int DELETE_MENU_ACTION
          THIS CONSTANT IS CURRENTLY NOT SUPPORTED For Menubar actions this constant defines the action requested Indicates that an existing new menu is to be removed.
static int DELETE_MENUITEM_ACTION
          THIS CONSTANT IS CURRENTLY NOT SUPPORTED For Menubar actions this constant defines the action requested Indicates that an existing menu item is to be removed.
static int DELETE_TOOLBARITEM_ACTION
          THIS CONSTANT IS CURRENTLY NOT SUPPORTED For Toolbar actions this constant defines the action requested Indicates that an existing toolbar item is to be removed.
 
Constructor Summary
ActionDescriptor()
          Constructs an action descriptor which acts as a "separator".
ActionDescriptor(int ID)
          Constructs an action descriptor.
 
Method Summary
 boolean getContextMenuOnly()
          THIS METHOD IS CURRENTLY NOT SUPPORTED Indicates that you want this item to appear in the context menu only, and not in any other menu (i.e.
 java.lang.String getHelpText()
          Returns the action's help text.
 javax.swing.Icon getIcon()
          THIS METHOD IS CURRENTLY NOT SUPPORTED Returns the icon for this action item in the toolbar
 int getID()
          Returns the action's identifier.
 int getMenubarAction()
          THIS METHOD IS CURRENTLY NOT SUPPORTED For menubar actions this is the action that should occur Returns the menubar action that was set in setMenubarAction
 java.lang.String getMenuVerb()
          THIS METHOD IS CURRENTLY NOT SUPPORTED For menubar actions this is the verb of the menu Returns the menu verb that was set in setMenuVerb
 int getPosition()
          THIS METHOD IS CURRENTLY NOT SUPPORTED Returns the relative position of this action item in the toolbar/menubar/context menu The default value of -1 means the item is the leftmost/topmost item
 ActionDescriptor[] getSubactions()
          Returns the action's subactions.
 java.lang.String getText()
          Returns the action's text description.
 int getToolbarAction()
          THIS METHOD IS CURRENTLY NOT SUPPORTED For toolbar actions this is the action that should occur Returns the toolbar action that was set in setToolbarAction
 java.lang.String getVerb()
          Returns the action's verb.
 boolean isDefault()
          Indicates whether this is the default action.
 boolean isEnabled()
          Indicates whether the action is enabled.
 void setContextMenuOnly(boolean contextOnly)
          THIS METHOD IS CURRENTLY NOT SUPPORTED Indicates that you want this item to appear in the context menu only, and not in any other menu (i.e.
 void setDefault(boolean bDefault)
          Makes this action the default action.
 void setEnabled(boolean enabled)
          Enables or disables the action.
 void setHelpText(java.lang.String helpText)
          Sets the action's help text.
 void setIcon(javax.swing.Icon icon)
          THIS METHOD IS CURRENTLY NOT SUPPORTED If this is a toolbar action this is the Icon to show in the button
 void setID(int ID)
          Sets the action's identifier.
 void setMenubarAction(int actionType)
          THIS METHOD IS CURRENTLY NOT SUPPORTED For menubar actions this is the action that should occur Valid action types include: ADD_MENU_ACTION - Add a new menu to the current menubar DELETE_MENU_ACTION - Delete a menu from the current menubar ADD_MENUITEM_ACTION - Add a new menu item to an existing menu CHANGE_MENUITEM_ACTION - Enable/Disable a menu item DELETE_MENUITEM_ACTION - Remove a menu item
 void setMenuVerb(java.lang.String menuVerb)
          THIS METHOD IS CURRENTLY NOT SUPPORTED For menubar actions this identifies the menu for the requested change.
 void setPosition(int location)
          THIS METHOD IS CURRENTLY NOT SUPPORTED If this is a toolbar/menubar/context menu action this is the relative position.
 void setSubactions(ActionDescriptor[] subactions)
          Sets the action's subactions.
 void setText(java.lang.String text)
          Sets the action's text description.
 void setToolbarAction(int actionType)
          THIS METHOD IS CURRENTLY NOT SUPPORTED For toolbar actions this is the action that should occur Valid action types include: ADD_TOOLBARITEM_ACTION - Add a new toolbar item to an existing menu DELETE_TOOLBAR_ACTION - Delete a toolbar item
 void setVerb(java.lang.String verb)
          Sets the action's verb.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ADD_MENU_ACTION

public static final int ADD_MENU_ACTION
THIS CONSTANT IS CURRENTLY NOT SUPPORTED For Menubar actions this constant defines the action requested Indicates that a new menu is to added.

ADD_MENUITEM_ACTION

public static final int ADD_MENUITEM_ACTION
THIS CONSTANT IS CURRENTLY NOT SUPPORTED For Menubar actions this constant defines the action requested Indicates that a new menu item is to added.

CHANGE_MENUITEM_ACTION

public static final int CHANGE_MENUITEM_ACTION
THIS CONSTANT IS CURRENTLY NOT SUPPORTED For Menubar actions this constant defines the action requested Indicates that an existing menu item is to be enabled/disabled.

DELETE_MENU_ACTION

public static final int DELETE_MENU_ACTION
THIS CONSTANT IS CURRENTLY NOT SUPPORTED For Menubar actions this constant defines the action requested Indicates that an existing new menu is to be removed.

DELETE_MENUITEM_ACTION

public static final int DELETE_MENUITEM_ACTION
THIS CONSTANT IS CURRENTLY NOT SUPPORTED For Menubar actions this constant defines the action requested Indicates that an existing menu item is to be removed.

ADD_TOOLBARITEM_ACTION

public static final int ADD_TOOLBARITEM_ACTION
THIS CONSTANT IS CURRENTLY NOT SUPPORTED For Toolbar actions this constant defines the action requested Indicates that a new toolbar item is to added.

CHANGE_TOOLBARITEM_ACTION

public static final int CHANGE_TOOLBARITEM_ACTION
THIS CONSTANT IS CURRENTLY NOT SUPPORTED For Toolbar actions this constant defines the action requested Indicates that an existing toolbar item is to be modified.

DELETE_TOOLBARITEM_ACTION

public static final int DELETE_TOOLBARITEM_ACTION
THIS CONSTANT IS CURRENTLY NOT SUPPORTED For Toolbar actions this constant defines the action requested Indicates that an existing toolbar item is to be removed.
Constructor Detail

ActionDescriptor

public ActionDescriptor()
Constructs an action descriptor which acts as a "separator".

An action descriptor constructed in this way indicates that the user interface should make a separation between the preceding action and the next action. The actual effect on the list of displayed actions is dependent on the UI platform.

Since:
v4r4m0

ActionDescriptor

public ActionDescriptor(int ID)
Constructs an action descriptor. After instantiating an action descriptor, an ActionsManager implementation should use the settor methods to completely describe the user action.
Parameters:
ID - the identifier which will be used to determine what action the user has requested.
Since:
v4r4m0
Method Detail

getText

public java.lang.String getText()
Returns the action's text description.
Returns:
the text description in a form suitable for displaying to the user.
Since:
v4r4m0
See Also:
setText(java.lang.String)

setText

public void setText(java.lang.String text)
Sets the action's text description.
Parameters:
text - the text description in a form suitable for displaying to the user.
Since:
v4r4m0
See Also:
getText()

getHelpText

public java.lang.String getHelpText()
Returns the action's help text.
Returns:
the help text string in a form suitable for displaying in a status area.
Since:
v4r4m0
See Also:
setHelpText(java.lang.String)

setHelpText

public void setHelpText(java.lang.String helpText)
Sets the action's help text.
Parameters:
helpText - the help text string in a form suitable for displaying in a status area.
Since:
v4r4m0
See Also:
getHelpText()

getVerb

public java.lang.String getVerb()
Returns the action's verb.
Returns:
the verb string which identifies the action. This string is never displayed to the user and should not be translated.
Since:
v4r4m0
See Also:
setVerb(java.lang.String)

setVerb

public void setVerb(java.lang.String verb)
Sets the action's verb.
Parameters:
verb - the verb string which identifies the action. This string is never displayed to the user and should not be translated.
Since:
v4r4m0
See Also:
getVerb()

isEnabled

public boolean isEnabled()
Indicates whether the action is enabled. An enabled action is one that may be selected by the user.
Returns:
true if the action is enabled; false otherwise.
Since:
v4r4m0
See Also:
setEnabled(boolean)

setEnabled

public void setEnabled(boolean enabled)
Enables or disables the action. An enabled action is one that may be selected by the user.
Parameters:
enabled - true if the action should enabled; false otherwise.
Since:
v4r4m0
See Also:
isEnabled()

isDefault

public boolean isDefault()
Indicates whether this is the default action. The default action for an object is the action performed when the user bypasses the menu of available actions. The exact manner in which the default action is requested by the user is dependent on the UI platform.
Returns:
true if the action is the default action; false otherwise.
Since:
v4r4m0
See Also:
setDefault(boolean)

setDefault

public void setDefault(boolean bDefault)
Makes this action the default action. The default action for an object is the action performed when the user bypasses the menu of available actions. The exact manner in which the default action is requested by the user is dependent on the UI platform.
Returns:
true if the action should be the default action; false otherwise.
Since:
v4r4m0
See Also:
isDefault()

getID

public int getID()
Returns the action's identifier.
Returns:
the identifier which will be used to determine what action the user has requested.
Since:
v4r4m0
See Also:
setID(int)

setID

public void setID(int ID)
Sets the action's identifier.
Parameters:
ID - the identifier which will be used to determine what action the user has requested.
Since:
v4r4m0
See Also:
getID()

setPosition

public void setPosition(int location)
THIS METHOD IS CURRENTLY NOT SUPPORTED If this is a toolbar/menubar/context menu action this is the relative position. For example, zero will cause the new toolbar button/menu item to be first in the toolbar/menubar/context menu. The default value is -1 which will cause the item to be added as the leftmost/topmost item
Parameters:
location - the relative postion of the item in the toolbar/menubar
Since:
v5r1m0
See Also:
getPosition()

getPosition

public int getPosition()
THIS METHOD IS CURRENTLY NOT SUPPORTED Returns the relative position of this action item in the toolbar/menubar/context menu The default value of -1 means the item is the leftmost/topmost item
Returns:
the relative postion of the item in the toolbar/menubar/context menu
Since:
v5r1m0
See Also:
setPosition(int)

setIcon

public void setIcon(javax.swing.Icon icon)
THIS METHOD IS CURRENTLY NOT SUPPORTED If this is a toolbar action this is the Icon to show in the button
Parameters:
icon - the icon to place in the button
Since:
v5r1m0
See Also:
getIcon()

getIcon

public javax.swing.Icon getIcon()
THIS METHOD IS CURRENTLY NOT SUPPORTED Returns the icon for this action item in the toolbar
Returns:
the icon in the toolbar button for this action
Since:
v5r1m0
See Also:
setIcon(javax.swing.Icon)

setMenubarAction

public void setMenubarAction(int actionType)
THIS METHOD IS CURRENTLY NOT SUPPORTED For menubar actions this is the action that should occur Valid action types include: ADD_MENU_ACTION - Add a new menu to the current menubar DELETE_MENU_ACTION - Delete a menu from the current menubar ADD_MENUITEM_ACTION - Add a new menu item to an existing menu CHANGE_MENUITEM_ACTION - Enable/Disable a menu item DELETE_MENUITEM_ACTION - Remove a menu item
Parameters:
actionType - the valid action type
Since:
v5r1m0
See Also:
getMenubarAction()

getMenubarAction

public int getMenubarAction()
THIS METHOD IS CURRENTLY NOT SUPPORTED For menubar actions this is the action that should occur Returns the menubar action that was set in setMenubarAction
Returns:
the menubar action desired
Since:
v5r1m0
See Also:
setMenubarAction(int)

setToolbarAction

public void setToolbarAction(int actionType)
THIS METHOD IS CURRENTLY NOT SUPPORTED For toolbar actions this is the action that should occur Valid action types include: ADD_TOOLBARITEM_ACTION - Add a new toolbar item to an existing menu DELETE_TOOLBAR_ACTION - Delete a toolbar item
Parameters:
actionType - the valid action type
Since:
v5r1m0
See Also:
getToolbarAction()

getToolbarAction

public int getToolbarAction()
THIS METHOD IS CURRENTLY NOT SUPPORTED For toolbar actions this is the action that should occur Returns the toolbar action that was set in setToolbarAction
Returns:
the toolbar action desired
Since:
v5r1m0
See Also:
getToolbarAction()

setMenuVerb

public void setMenuVerb(java.lang.String menuVerb)
THIS METHOD IS CURRENTLY NOT SUPPORTED For menubar actions this identifies the menu for the requested change. If you are adding a new menu item or changing an existing menu item you must specify the menu verb the menu item is under. If you are setting the following actions you must also set the menu verb using this method: ADD_MENUITEM_ACTION - Add a new menu item to an existing menu CHANGE_MENUITEM_ACTION - Enable/Disable a menu item
Parameters:
menuVerb - the menu verb name for the action
Since:
v5r1m0
See Also:
getMenuVerb()

getMenuVerb

public java.lang.String getMenuVerb()
THIS METHOD IS CURRENTLY NOT SUPPORTED For menubar actions this is the verb of the menu Returns the menu verb that was set in setMenuVerb
Returns:
the menu verb of the added/changed menuItem
Since:
v5r1m0
See Also:
setMenuVerb(java.lang.String)

getSubactions

public ActionDescriptor[] getSubactions()
Returns the action's subactions. See the class description.
Returns:
the array of ActionDescriptors which identify this object's subactions.
Since:
v4r4m0
See Also:
setSubactions(com.ibm.as400.opnav.ActionDescriptor[])

setSubactions

public void setSubactions(ActionDescriptor[] subactions)
Sets the action's subactions. See the class description.
Parameters:
subactions - the array of ActionDescriptors which identify this object's subactions.
Since:
v4r4m0
See Also:
getSubactions()

getContextMenuOnly

public boolean getContextMenuOnly()
THIS METHOD IS CURRENTLY NOT SUPPORTED Indicates that you want this item to appear in the context menu only, and not in any other menu (i.e. the File menu in the menubar)
Since:
v5r1m0
See Also:
getContextMenuOnly()

setContextMenuOnly

public void setContextMenuOnly(boolean contextOnly)
THIS METHOD IS CURRENTLY NOT SUPPORTED Indicates that you want this item to appear in the context menu only, and not in any other menu (i.e. the File menu in the menubar)
Parameters:
contextOnly -  
Since:
v5r1m0
See Also:
getContextMenuOnly()

toString

public java.lang.String toString()
Returns a string representation of the object.
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.
Since:
v4r4m0