|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.action.SubContributionManager
public abstract class 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. |
void |
disposeManager()
Disposes this sub contribution manager, removing all its items and cleaning up any other resources allocated by it. |
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)
Unwraps a nested 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)
SubContributionManager
mgr - 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 IContributionManageraction - the action, this cannot be nullpublic void add(IContributionItem item)
IContributionManager
add in interface IContributionManageritem - the contribution item, this cannot be null
public void appendToGroup(String groupName,
IAction action)
IContributionManagerappendToGroup(groupName,new ActionContributionItem(action)).
appendToGroup in interface IContributionManagergroupName - the name of the groupaction - the action
public void appendToGroup(String groupName,
IContributionItem item)
IContributionManager
appendToGroup in interface IContributionManagergroupName - the name of the groupitem - the contribution itempublic void disposeManager()
public IContributionItem find(String id)
IContributionManager
find in interface IContributionManagerid - the contribution item id
null if
no item with the given id can be foundpublic IContributionItem[] getItems()
IContributionManager
getItems in interface IContributionManagerpublic IContributionManager getParent()
public IContributionManagerOverrides getOverrides()
IContributionManager
getOverrides in interface IContributionManager
public void insertAfter(String id,
IAction action)
IContributionManagerinsertAfter(id,new ActionContributionItem(action)).
insertAfter in interface IContributionManagerid - the contribution item idaction - the action to insert
public void insertAfter(String id,
IContributionItem item)
IContributionManager
insertAfter in interface IContributionManagerid - the contribution item iditem - the contribution item to insert
public void insertBefore(String id,
IAction action)
IContributionManagerinsertBefore(id,new ActionContributionItem(action)).
insertBefore in interface IContributionManagerid - the contribution item idaction - the action to insert
public void insertBefore(String id,
IContributionItem item)
IContributionManager
insertBefore in interface IContributionManagerid - the contribution item iditem - the contribution item to insertpublic boolean isDirty()
IContributionManager
isDirty in interface IContributionManagertrue if this manager is dirty, and false
if it is up-to-datepublic boolean isEmpty()
IContributionManager
isEmpty in interface 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()
IContributionManager
markDirty in interface IContributionManager
public void prependToGroup(String groupName,
IAction action)
IContributionManagerprependToGroup(groupName,new ActionContributionItem(action)).
prependToGroup in interface IContributionManagergroupName - the name of the groupaction - the action
public void prependToGroup(String groupName,
IContributionItem item)
IContributionManager
prependToGroup in interface IContributionManagergroupName - the name of the groupitem - the contribution itempublic IContributionItem remove(String id)
IContributionManagernull if this manager has no contribution items
with the given id.
remove in interface IContributionManagerid - the contribution item id
null if nonepublic IContributionItem remove(IContributionItem item)
IContributionManager
remove in interface IContributionManageritem - the contribution item
item parameter if the item was removed,
and null if it was not foundpublic void removeAll()
IContributionManager
removeAll 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)
item - the contribution item to be wrapped
protected IContributionItem unwrap(IContributionItem item)
SubContributionItem, then its inner item is
returned. Otherwise, the item itself is returned.
item - The item to unwrap; may be null.
item, if item is
a SubContributionItem;item
otherwise.
|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.