|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.action.ContributionItem
An abstract base implementation for contribution items.
Constructor Summary | |
protected |
ContributionItem()
Creates a contribution item with a null id. |
protected |
ContributionItem(String id)
Creates a contribution item with the given (optional) id. |
Method Summary | |
void |
fill(Composite parent)
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. |
boolean |
isDynamic()
The default implementation of this IContributionItem
method returns false . |
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 |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected ContributionItem()
null
id.
Calls this(String)
with null
.
protected ContributionItem(String id)
id
- the contribution item identifier, or null
Method Detail |
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 String getId()
IContributionItem
getId
in interface IContributionItem
null
if nonepublic IContributionManager getParent()
public 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(java.lang.String, org.eclipse.jface.action.IAction)
,
IContributionManager.prependToGroup(java.lang.String, org.eclipse.jface.action.IAction)
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()
toString
in class Object
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
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |