|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vmm.actions.ActionList
public class ActionList
A simple class that is meant to represent a submenu (or a list of items in a menu)
when used with methods such as Exhibit.getActionsForView(View)
and View.getViewCommands()
. The name of an ActionList is
meant to be used as a name for a submenu that contains commands corresponding
to all the items in the ActionList.
Constructor Summary | |
---|---|
ActionList()
Create an unnamed ActionList. |
|
ActionList(java.lang.String name)
Create an ActionList with a specfied name. |
Method Summary | |
---|---|
void |
add(ActionItem object)
Adds an ActionItem to the list of items in this ActionList. |
void |
addAll(ActionList list)
Add all the ActionItems in list to this ActionList. |
ActionItem |
getItem(int i)
Gets the i-th ActionItem in this ActionList. |
int |
getItemCount()
Gets the number of items that have been added to this ActionList. |
java.util.ArrayList<ActionItem> |
getItems()
Returns a list containing all the ActionItems that have been added to this ActionList. |
javax.swing.JMenuItem[] |
getMenuItems()
If this ActionList is unnamed then the retunn value is an array containing JMenuItems created by the individual ActionItems in the ActionList. |
java.lang.String |
getName()
Get the name of this ActionList. |
void |
remove(ActionItem object)
Removes a specified ActionItem from this ActionList. |
void |
setName(java.lang.String name)
Sets the name of this ActionList which, if non-null, is meant to be used as a name for the submenu. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ActionList()
public ActionList(java.lang.String name)
name
- Method Detail |
---|
public void add(ActionItem object)
AbstractActionVMM
, ToggleAction
, <@link ActionRadioGroup}, ActionList, or any other
object that implements ActionItem. Null values are allowed and are meant to r
epresent separators in a mwnu.
public void remove(ActionItem object)
object
- the object to be removedpublic void setName(java.lang.String name)
public java.lang.String getName()
public int getItemCount()
public ActionItem getItem(int i)
public java.util.ArrayList<ActionItem> getItems()
public void addAll(ActionList list)
list
- list of items to be added; if null, nothing is donepublic javax.swing.JMenuItem[] getMenuItems()
getMenuItems
in interface ActionItem
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |