|
Eclipse Platform 2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.eclipse.jface.action.SubContributionManager
A SubContributionManager is used to define a set of contribution
items within a parent manager. Once defined, the visibility of the entire set can
be changed as a unit.
| Constructor Summary | |
SubContributionManager(IContributionManager mgr)
Constructs a new SubContributionManager |
|
| Method Summary | |
void |
add(IAction action)
Adds an action as a contribution item to this manager. |
void |
add(IContributionItem item)
Adds a contribution item to this manager. |
void |
appendToGroup(String groupName,
IAction action)
Adds a contribution item for the given action at the end of the group with the given name. |
void |
appendToGroup(String groupName,
IContributionItem item)
Adds a contribution item to this manager at the end of the group with the given name. |
IContributionItem |
find(String id)
Finds the contribution item with the given id. |
IContributionItem[] |
getItems()
Returns all contribution items known to this manager. |
IContributionManagerOverrides |
getOverrides()
Returns the overrides for the items of this manager. |
IContributionManager |
getParent()
Returns the parent manager. |
void |
insertAfter(String id,
IAction action)
Inserts a contribution item for the given action after the item with the given id. |
void |
insertAfter(String id,
IContributionItem item)
Inserts a contribution item after the item with the given id. |
void |
insertBefore(String id,
IAction action)
Inserts a contribution item for the given action before the item with the given id. |
void |
insertBefore(String id,
IContributionItem item)
Inserts a contribution item before the item with the given id. |
boolean |
isDirty()
Returns whether the list of contributions has recently changed and has yet to be reflected in the corresponding widgets. |
boolean |
isEmpty()
Returns whether this manager has any contribution items. |
boolean |
isVisible()
Returns whether the contribution list is visible. |
protected void |
itemAdded(IContributionItem item,
SubContributionItem wrap)
Notifies that an item has been added. |
protected void |
itemRemoved(IContributionItem item)
Notifies that an item has been removed. |
Enumeration |
items()
Deprecated. Use getItems(String value) instead. |
void |
markDirty()
Marks this contribution manager as dirty. |
void |
prependToGroup(String groupName,
IAction action)
Adds a contribution item for the given action at the beginning of the group with the given name. |
void |
prependToGroup(String groupName,
IContributionItem item)
Adds a contribution item to this manager at the beginning of the group with the given name. |
IContributionItem |
remove(IContributionItem item)
Removes the given contribution item from the contribution items known to this manager. |
IContributionItem |
remove(String id)
Removes and returns the contribution item with the given id from this manager. |
void |
removeAll()
Removes all contribution items from this manager. |
void |
setVisible(boolean visible)
Sets the visibility of the manager. |
protected IContributionItem |
unwrap(IContributionItem item)
Unwrap a contribution item. |
protected SubContributionItem |
wrap(IContributionItem item)
Wraps a contribution item in a sub contribution item, and returns the new wrapper. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.jface.action.IContributionManager |
update |
| Constructor Detail |
public SubContributionManager(IContributionManager mgr)
SubContributionManagermgr - the parent contribution manager. All contributions made to the
SubContributionManager are forwarded and appear in the
parent manager.| Method Detail |
public void add(IAction action)
IContributionManageradd(new ActionContributionItem(action)).add in interface IContributionManagerorg.eclipse.jface.action.IContributionManageraction - the actionpublic void add(IContributionItem item)
IContributionManageradd in interface IContributionManagerorg.eclipse.jface.action.IContributionManageritem - the contribution item
public void appendToGroup(String groupName,
IAction action)
IContributionManagerappendToGroup(groupName,new ActionContributionItem(action)).appendToGroup in interface IContributionManagerorg.eclipse.jface.action.IContributionManagergroupName - the name of the groupaction - the actionIllegalArgumentException - if there is no group with
the given name
public void appendToGroup(String groupName,
IContributionItem item)
IContributionManagerappendToGroup in interface IContributionManagerorg.eclipse.jface.action.IContributionManagergroupName - the name of the groupitem - the contribution itemIllegalArgumentException - if there is no group with
the given namepublic IContributionItem find(String id)
IContributionManagerfind in interface IContributionManagerorg.eclipse.jface.action.IContributionManagerid - the contribution item idnull if
no item with the given id can be foundpublic IContributionItem[] getItems()
IContributionManagergetItems in interface IContributionManagerorg.eclipse.jface.action.IContributionManagerpublic IContributionManager getParent()
public IContributionManagerOverrides getOverrides()
IContributionManagergetOverrides in interface IContributionManagerorg.eclipse.jface.action.IContributionManager
public void insertAfter(String id,
IAction action)
IContributionManagerinsertAfter(id,new ActionContributionItem(action)).insertAfter in interface IContributionManagerorg.eclipse.jface.action.IContributionManagerid - the contribution item idaction - the action to insertIllegalArgumentException - if there is no item with
the given id
public void insertAfter(String id,
IContributionItem item)
IContributionManagerinsertAfter in interface IContributionManagerorg.eclipse.jface.action.IContributionManagerid - the contribution item iditem - the contribution item to insertIllegalArgumentException - if there is no item with
the given id
public void insertBefore(String id,
IAction action)
IContributionManagerinsertBefore(id,new ActionContributionItem(action)).insertBefore in interface IContributionManagerorg.eclipse.jface.action.IContributionManagerid - the contribution item idaction - the action to insertIllegalArgumentException - if there is no item with
the given id
public void insertBefore(String id,
IContributionItem item)
IContributionManagerinsertBefore in interface IContributionManagerorg.eclipse.jface.action.IContributionManagerid - the contribution item iditem - the contribution item to insertIllegalArgumentException - if there is no item with
the given idpublic boolean isDirty()
IContributionManagerisDirty in interface IContributionManagerorg.eclipse.jface.action.IContributionManagertrue if this manager is dirty, and false
if it is up-to-datepublic boolean isEmpty()
IContributionManagerisEmpty in interface IContributionManagerorg.eclipse.jface.action.IContributionManagertrue if there are no items, and
false otherwisepublic boolean isVisible()
true then each item within the manager
appears within the parent manager. Otherwise, the items are not visible.true if the manager is visible
protected void itemAdded(IContributionItem item,
SubContributionItem wrap)
Subclasses are not expected to override this method.
item - the item contributed by the clientwrap - the item contributed to the parent manager as a proxy for the item
contributed by the clientprotected void itemRemoved(IContributionItem item)
Subclasses are not expected to override this method.
item - the item contributed by the clientpublic Enumeration items()
public void markDirty()
IContributionManagermarkDirty in interface IContributionManager
public void prependToGroup(String groupName,
IAction action)
IContributionManagerprependToGroup(groupName,new ActionContributionItem(action)).prependToGroup in interface IContributionManagerorg.eclipse.jface.action.IContributionManagergroupName - the name of the groupaction - the actionIllegalArgumentException - if there is no group with
the given name
public void prependToGroup(String groupName,
IContributionItem item)
IContributionManagerprependToGroup in interface IContributionManagerorg.eclipse.jface.action.IContributionManagergroupName - the name of the groupitem - the contribution itemIllegalArgumentException - if there is no group with
the given namepublic IContributionItem remove(String id)
IContributionManagernull if this manager has no contribution items
with the given id.remove in interface IContributionManagerorg.eclipse.jface.action.IContributionManagerid - the contribution item idnull if nonepublic IContributionItem remove(IContributionItem item)
IContributionManagerremove in interface IContributionManagerorg.eclipse.jface.action.IContributionManageritem - the contribution itemitem parameter if the item was removed,
and null if it was not foundpublic void removeAll()
IContributionManagerremoveAll in interface IContributionManagerpublic void setVisible(boolean visible)
true
then each item within the manager appears within the parent manager.
Otherwise, the items are not visible.visible - the new visibilityprotected SubContributionItem wrap(IContributionItem item)
protected IContributionItem unwrap(IContributionItem item)
|
Eclipse Platform 2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||