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 |
setId(String itemId)
The ID for this contribution item.
|
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 null
public void dispose()
IContributionItem
method does nothing. Subclasses may override.dispose
in interface IContributionItem
public void fill(Composite parent)
IContributionItem
method does nothing. Subclasses may override.fill
in interface IContributionItem
parent
- the parent controlpublic void fill(Menu menu, int index)
IContributionItem
method does nothing. Subclasses may override.fill
in interface IContributionItem
menu
- 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 IContributionItem
parent
- 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 IContributionItem
parent
- 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 IContributionItem
public String getId()
IContributionItem
getId
in interface IContributionItem
null
if nonepublic IContributionManager getParent()
null
if this
contribution item is not currently added to a contribution manager.null
public boolean isDirty()
IContributionItem
method returns false
. Subclasses may override.isDirty
in interface IContributionItem
true
if this item is dirtypublic boolean isEnabled()
IContributionItem
method returns true
. Subclasses may override.isEnabled
in interface IContributionItem
true
if this item is enabledpublic boolean isDynamic()
IContributionItem
method returns false
. Subclasses may override.isDynamic
in interface IContributionItem
true
if this item is dynamic, and
false
for normal itemspublic boolean isGroupMarker()
IContributionItem
method returns false
. Subclasses may override.isGroupMarker
in interface IContributionItem
true
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 IContributionItem
true
if this item is a separator, and
false
for normal itemsSeparator
public 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 IContributionItem
true
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 IContributionItem
visible
- 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 IContributionItem
public void setParent(IContributionManager parent)
IContributionItem
setParent
in interface IContributionItem
parent
- 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 IContributionItem
id
- the id of the changed property
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.