public abstract class ContributionItem extends Object implements IContributionItem
| Modifier | Constructor and Description |
|---|---|
protected |
ContributionItem()
Creates a contribution item with a
null id. |
protected |
ContributionItem(String id)
Creates a contribution item with the given (optional) id.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
The default implementation of this
IContributionItem
method does nothing. |
void |
fill(Composite parent)
The default implementation of this
IContributionItem
method does nothing. |
void |
fill(CoolBar parent,
int index)
The default implementation of this
IContributionItem
method does nothing. |
void |
fill(Menu menu,
int index)
The default implementation of this
IContributionItem
method does nothing. |
void |
fill(ToolBar parent,
int index)
The default implementation of this
IContributionItem
method does nothing. |
String |
getId()
Returns the identifier of this contribution item.
|
IContributionManager |
getParent()
Returns the parent contribution manager, or
null if this
contribution item is not currently added to a contribution manager. |
boolean |
isDirty()
The default implementation of this
IContributionItem
method returns false. |
boolean |
isDynamic()
The default implementation of this
IContributionItem
method returns false. |
boolean |
isEnabled()
The default implementation of this
IContributionItem
method returns true. |
boolean |
isGroupMarker()
The default implementation of this
IContributionItem
method returns false. |
boolean |
isSeparator()
The default implementation of this
IContributionItem
method returns false. |
boolean |
isVisible()
The default implementation of this
IContributionItem
method returns the value recorded in an internal state variable,
which is true by default. |
void |
saveWidgetState()
The default implementation of this
IContributionItem
method does nothing. |
void |
setParent(IContributionManager parent)
Sets the parent manager of this item
|
void |
setVisible(boolean visible)
The default implementation of this
IContributionItem
method stores the value in an internal state variable,
which is true by default. |
String |
toString()
Returns a string representation of this contribution item
suitable only for debugging.
|
void |
update()
The default implementation of this
IContributionItem
method does nothing. |
void |
update(String id)
The
ContributionItem implementation of this
method declared on IContributionItem does nothing. |
protected ContributionItem()
null id.
Calls this(String) with null.protected ContributionItem(String id)
id - the contribution item identifier, or nullpublic void dispose()
IContributionItem
method does nothing. Subclasses may override.dispose in interface IContributionItempublic void fill(Composite parent)
IContributionItem
method does nothing. Subclasses may override.fill in interface IContributionItemparent - the parent controlpublic void fill(Menu menu, int index)
IContributionItem
method does nothing. Subclasses may override.fill in interface IContributionItemmenu - the parent menuindex - the index where the controls are inserted,
or -1 to insert at the endpublic void fill(ToolBar parent, int index)
IContributionItem
method does nothing. Subclasses may override.fill in interface IContributionItemparent - the parent tool barindex - the index where the controls are inserted,
or -1 to insert at the endpublic void fill(CoolBar parent, int index)
IContributionItem
method does nothing. Subclasses may override.fill in interface IContributionItemparent - the parent cool barindex - the index where the controls are inserted,
or -1 to insert at the endpublic void saveWidgetState()
IContributionItem
method does nothing. Subclasses may override.saveWidgetState in interface IContributionItempublic String getId()
IContributionItemgetId in interface IContributionItemnull
if nonepublic IContributionManager getParent()
null if this
contribution item is not currently added to a contribution manager.nullpublic boolean isDirty()
IContributionItem
method returns false. Subclasses may override.isDirty in interface IContributionItemtrue if this item is dirtypublic boolean isEnabled()
IContributionItem
method returns true. Subclasses may override.isEnabled in interface IContributionItemtrue if this item is enabledpublic boolean isDynamic()
IContributionItem
method returns false. Subclasses may override.isDynamic in interface IContributionItemtrue if this item is dynamic, and
false for normal itemspublic boolean isGroupMarker()
IContributionItem
method returns false. Subclasses may override.isGroupMarker in interface IContributionItemtrue if this item is a group marker, and
false for normal itemsGroupMarker,
IContributionManager.appendToGroup(String, IContributionItem),
IContributionManager.prependToGroup(String, IContributionItem)public boolean isSeparator()
IContributionItem
method returns false. Subclasses may override.isSeparator in interface IContributionItemtrue if this item is a separator, and
false for normal itemsSeparatorpublic boolean isVisible()
IContributionItem
method returns the value recorded in an internal state variable,
which is true by default. setVisible
should be used to change this setting.isVisible in interface IContributionItemtrue if this item is visible, and
false otherwisepublic void setVisible(boolean visible)
IContributionItem
method stores the value in an internal state variable,
which is true by default.setVisible in interface IContributionItemvisible - true if this item should be visible, and
false otherwisepublic String toString()
public void update()
IContributionItem
method does nothing. Subclasses may override.update in interface IContributionItempublic void setParent(IContributionManager parent)
IContributionItemsetParent in interface IContributionItemparent - the parent contribution managerpublic void update(String id)
ContributionItem implementation of this
method declared on IContributionItem does nothing.
Subclasses should override to update their state.update in interface IContributionItemid - the id of the changed propertyGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.